Skip to content

Commit

Permalink
Merge pull request #26 in TELIMA/karnak from fix/patient_birth_date t…
Browse files Browse the repository at this point in the history
…o develop

* commit '53a1f284158e7f3bed17738966744a941873d54c':
  temporary commit to add logs
  • Loading branch information
jdcshug committed May 25, 2021
2 parents 0315806 + 53a1f28 commit 3598ea6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/karnak/backend/api/PseudonymApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ private static HttpRequest.BodyPublisher buildFormDataFromMap(Map<Object, Object
builder.append(URLEncoder.encode(entry.getValue().toString(), StandardCharsets.UTF_8));
}
}

// TODO TO REMOVE
LOGGER.info("builder.toString(): " + builder.toString());

return HttpRequest.BodyPublishers.ofString(builder.toString());
}

Expand Down Expand Up @@ -173,9 +177,16 @@ private String rqGetSessionId() {
.header(MAINZELLISTE_HEADER, API_KEY)
.build();

// TODO TO REMOVE
LOGGER.info("request: " + request.toString());

HttpResponse<String> response;
try {
response = httpClient.send(request, BodyHandlers.ofString());

// TODO TO REMOVE
LOGGER.info("response: " + response.toString());

controlErrorResponse(response);
JSONObject jsonResp = new JSONObject(response.body());
this.sessionId = jsonResp.getString("sessionId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ public class PatientMetadata {
public PatientMetadata(Attributes dcm, String defaultIsserOfPatientID) {
patientID = dcm.getString(Tag.PatientID, "");
patientName = dcm.getString(Tag.PatientName, "");

// TODO: TO REMOVE ONLY FOR TEST
LOGGER.info("dcm.getString(Tag.PatientBirthDate):" + dcm.getString(Tag.PatientBirthDate));

patientBirthDate =
StringUtil.hasText(dcm.getString(Tag.PatientBirthDate))
&& !Objects.equals(dcm.getString(Tag.PatientBirthDate), "NULL")
Expand Down

0 comments on commit 3598ea6

Please sign in to comment.