diff --git a/api/src/main/java/org/openmrs/module/fhir2/api/search/param/OpenmrsPatientSearchParams.java b/api/src/main/java/org/openmrs/module/fhir2/api/search/param/OpenmrsPatientSearchParams.java index 161e887b0..e43e8cedf 100644 --- a/api/src/main/java/org/openmrs/module/fhir2/api/search/param/OpenmrsPatientSearchParams.java +++ b/api/src/main/java/org/openmrs/module/fhir2/api/search/param/OpenmrsPatientSearchParams.java @@ -70,7 +70,7 @@ public SearchParameterMap toSearchParameterMap() { .addParameter(FhirConstants.GENDER_SEARCH_HANDLER, "gender", getGender()) .addParameter(FhirConstants.DATE_RANGE_SEARCH_HANDLER, "birthdate", getBirthDate()) .addParameter(FhirConstants.DATE_RANGE_SEARCH_HANDLER, "deathDate", getDeathDate()) - .addParameter(FhirConstants.BOOLEAN_SEARCH_HANDLER, getDeceased()) + .addParameter(FhirConstants.BOOLEAN_SEARCH_HANDLER, "dead", getDeceased()) .addParameter(FhirConstants.ADDRESS_SEARCH_HANDLER, FhirConstants.CITY_PROPERTY, getCity()) .addParameter(FhirConstants.ADDRESS_SEARCH_HANDLER, FhirConstants.STATE_PROPERTY, getState()) .addParameter(FhirConstants.ADDRESS_SEARCH_HANDLER, FhirConstants.POSTAL_CODE_PROPERTY, getPostalCode()) diff --git a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/PatientFhirResourceProviderIntegrationTest.java b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/PatientFhirResourceProviderIntegrationTest.java index d3ccfc9dc..2ac208a9a 100644 --- a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/PatientFhirResourceProviderIntegrationTest.java +++ b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/PatientFhirResourceProviderIntegrationTest.java @@ -477,7 +477,7 @@ public void shouldReturnSortedAndFilteredSearchResultsForPatientsAsJson() throws @Test public void shouldAllowNamedQueryForPatientsAsJson() throws Exception { - MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given") + MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given&deceased=false") .accept(FhirMediaTypes.JSON).go(); assertThat(response, isOk()); @@ -563,7 +563,7 @@ public void shouldReturnSortedAndFilteredSearchResultsForPatientsAsXML() throws @Test public void shouldAllowNamedQueryForPatientsAsXml() throws Exception { - MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given") + MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given&deceased=false") .accept(FhirMediaTypes.XML).go(); assertThat(response, isOk()); diff --git a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/PatientFhirResourceProviderIntegrationTest.java b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/PatientFhirResourceProviderIntegrationTest.java index 9b0cbaf5e..05821c95a 100644 --- a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/PatientFhirResourceProviderIntegrationTest.java +++ b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/PatientFhirResourceProviderIntegrationTest.java @@ -561,7 +561,7 @@ public void shouldReturnSortedAndFilteredSearchResultsForPatientsAsJson() throws @Test public void shouldAllowNamedQueryForPatientsAsJson() throws Exception { - MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given") + MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given&deceased=false") .accept(FhirMediaTypes.JSON).go(); assertThat(response, isOk()); @@ -647,7 +647,7 @@ public void shouldReturnSortedAndFilteredSearchResultsForPatientsAsXML() throws @Test public void shouldAllowNamedQueryForPatientsAsXml() throws Exception { - MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given") + MockHttpServletResponse response = get("/Patient?_query=openmrsPatients&q=Doe&_sort=given&deceased=false") .accept(FhirMediaTypes.XML).go(); assertThat(response, isOk());