Skip to content

Commit

Permalink
RESTWS-962: Return empty result when the specified encounter type is …
Browse files Browse the repository at this point in the history
…not found
  • Loading branch information
icrc-psousa authored Dec 11, 2024
1 parent 9786f8d commit 9499895
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public PageableResult search(RequestContext context) throws ResponseException {
EncounterType encounterType = ((EncounterTypeResource1_8) Context.getService(RestService.class)
.getResourceBySupportedClass(EncounterType.class)).getByUniqueId(encounterTypeUuid);

if (patient != null) {
if (patient != null && (encounterType != null || encounterTypeUuid == null)) {
EncounterSearchCriteriaBuilder encounterSearchCriteriaBuilder = new EncounterSearchCriteriaBuilder()
.setPatient(patient).setFromDate(fromDate).setToDate(toDate).setIncludeVoided(false);
if (encounterType != null) {
Expand Down

0 comments on commit 9499895

Please sign in to comment.