Skip to content

Commit

Permalink
Merge pull request #30 from SoftmedTanzania/client_request_changes
Browse files Browse the repository at this point in the history
Adding client names to the payload
  • Loading branch information
victormanase committed Oct 15, 2021
2 parents 91bd65e + 91343a9 commit 0dd34a5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ public static class Item {
@JsonProperty("patId")
private String patId;

/**
* First name of the patient
*/
@JsonProperty("firstName")
private String firstName;

/**
* Middle name of the patient
*/
@JsonProperty("middleName")
private String middleName;

/**
* Last name of the patient
*/
@JsonProperty("lastName")
private String lastName;

/**
* ICD 10 preferred but other codes will be accepted as long as they are mapped to ICD10.Codes will be comma separated
*/
Expand All @@ -91,6 +109,31 @@ public static class Item {
@JsonProperty("dateDeathOccurred")
private String dateDeathOccurred;


public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getMiddleName() {
return middleName;
}

public void setMiddleName(String middleName) {
this.middleName = middleName;
}

public String getLastName() {
return lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public String getWardId() {
return wardId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ protected List<ResultDetail> validateData(Object receivedMessage) {
if (StringUtils.isBlank(item.getPatId()))
results.add(new ResultDetail(ResultDetail.ResultsDetailsType.ERROR, String.format(errorMessageResource.getString("NN_ERR01"), "patId"), null));

if (StringUtils.isBlank(item.getFirstName()))
results.add(new ResultDetail(ResultDetail.ResultsDetailsType.ERROR, String.format(errorMessageResource.getString("NN_ERR01"), "firstName"), null));

if (StringUtils.isBlank(item.getLastName()))
results.add(new ResultDetail(ResultDetail.ResultsDetailsType.ERROR, String.format(errorMessageResource.getString("NN_ERR01"), "lastName"), null));

if (StringUtils.isBlank(item.getGender()))
results.add(new ResultDetail(ResultDetail.ResultsDetailsType.ERROR, String.format(errorMessageResource.getString("NN_ERR01"), "gender"), null));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
"wardId": "1",
"wardName": "Pediatric",
"patId": "1",
"firstName":"John",
"middleName": "Alex",
"lastName":"Peter",
"icd10Code": "B50.9",
"gender": "Male",
"dob": "19850101",
"dateDeathOccurred": "20201225"
}
]
}
}

0 comments on commit 0dd34a5

Please sign in to comment.