From 36ab237eb24c39c6eb26b5506eb3eb960600a744 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 12 Jul 2023 14:18:04 -0400 Subject: [PATCH] FM2-604: Follow-up: fix integration tests --- ...onFhirResourceProviderIntegrationTest.java | 40 +++++++++---------- ...onFhirResourceProviderIntegrationTest.java | 40 +++++++++---------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/ObservationFhirResourceProviderIntegrationTest.java b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/ObservationFhirResourceProviderIntegrationTest.java index bff2c830f..f79f89c08 100644 --- a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/ObservationFhirResourceProviderIntegrationTest.java +++ b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r3/ObservationFhirResourceProviderIntegrationTest.java @@ -584,7 +584,7 @@ public void shouldReturnLastnObservationsAsJson() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -615,7 +615,7 @@ public void shouldReturnLastnObservationsWhenMaxIsMissingAsJson() throws Excepti assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(1)); @@ -646,7 +646,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsPassedInPatientPa assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -674,7 +674,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsMissingAsJson() t assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -704,7 +704,7 @@ public void shouldReturnLastnObservationsWhenCategoryIsMissingAsJson() throws Ex assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, isSortedAndWithinMax(2)); } @@ -785,7 +785,7 @@ public void shouldReturnLastnObservationsAsXml() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -816,7 +816,7 @@ public void shouldReturnLastnObservationsWhenMaxIsMissingAsXml() throws Exceptio assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(1)); @@ -847,7 +847,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsPassedInPatientPa assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -875,7 +875,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsMissingAsXml() th assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -905,7 +905,7 @@ public void shouldReturnLastnObservationsWhenCategoryIsMissingAsXml() throws Exc assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, isSortedAndWithinMax(2)); } @@ -985,7 +985,7 @@ public void shouldReturnLastnEncountersObservationsAsJson() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1016,7 +1016,7 @@ public void shouldReturnLastnEncountersObservationsWhenMaxIsMissingAsJson() thro assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(1)); @@ -1048,7 +1048,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsPassedI assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1076,7 +1076,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsMissing assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1107,7 +1107,7 @@ public void shouldReturnLastnEncountersObservationsWhenCategoryIsMissingAsJson() assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); } @@ -1188,7 +1188,7 @@ public void shouldReturnLastnEncountersObservationsAsXml() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1219,7 +1219,7 @@ public void shouldReturnLastnEncountersObservationsWhenMaxIsMissingAsXml() throw assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(1)); @@ -1251,7 +1251,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsPassedI assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1279,7 +1279,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsMissing assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1310,7 +1310,7 @@ public void shouldReturnLastnEncountersObservationsWhenCategoryIsMissingAsXml() assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); } diff --git a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/ObservationFhirResourceProviderIntegrationTest.java b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/ObservationFhirResourceProviderIntegrationTest.java index 03fdce6e6..7aba20c4e 100644 --- a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/ObservationFhirResourceProviderIntegrationTest.java +++ b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/ObservationFhirResourceProviderIntegrationTest.java @@ -583,7 +583,7 @@ public void shouldReturnLastnObservationsAsJson() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -614,7 +614,7 @@ public void shouldReturnLastnObservationsWhenMaxIsMissingAsJson() throws Excepti assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(1)); @@ -645,7 +645,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsPassedInPatientPa assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -673,7 +673,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsMissingAsJson() t assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -703,7 +703,7 @@ public void shouldReturnLastnObservationsWhenCategoryIsMissingAsJson() throws Ex assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, isSortedAndWithinMax(2)); } @@ -784,7 +784,7 @@ public void shouldReturnLastnObservationsAsXml() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -815,7 +815,7 @@ public void shouldReturnLastnObservationsWhenMaxIsMissingAsXml() throws Exceptio assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(1)); @@ -846,7 +846,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsPassedInPatientPa assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -874,7 +874,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsMissingAsXml() th assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(entries, isSortedAndWithinMax(2)); @@ -904,7 +904,7 @@ public void shouldReturnLastnObservationsWhenCategoryIsMissingAsXml() throws Exc assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem(hasResource( - hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate")))))))); + hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate")))))))); assertThat(entries, isSortedAndWithinMax(2)); } @@ -984,7 +984,7 @@ public void shouldReturnLastnEncountersObservationsAsJson() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1015,7 +1015,7 @@ public void shouldReturnLastnEncountersObservationsWhenMaxIsMissingAsJson() thro assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(1)); @@ -1047,7 +1047,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsPassedI assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1075,7 +1075,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsMissing assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1106,7 +1106,7 @@ public void shouldReturnLastnEncountersObservationsWhenCategoryIsMissingAsJson() assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); } @@ -1187,7 +1187,7 @@ public void shouldReturnLastnEncountersObservationsAsXml() throws Exception { assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1218,7 +1218,7 @@ public void shouldReturnLastnEncountersObservationsWhenMaxIsMissingAsXml() throw assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(1)); @@ -1250,7 +1250,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsPassedI assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1278,7 +1278,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsMissing assertThat(entries, everyItem(hasResource(instanceOf(Observation.class)))); assertThat(entries, everyItem(hasResource(validResource()))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(entries, everyItem(hasResource(hasProperty("category", everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory"))))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); @@ -1309,7 +1309,7 @@ public void shouldReturnLastnEncountersObservationsWhenCategoryIsMissingAsXml() assertThat(entries, everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID)))))); assertThat(entries, everyItem( - hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight")))))))); + hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight")))))))); assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2)); }