@@ -53,14 +53,33 @@ public class EhrExtractMapperComponentTest {
5353 private static final String JSON_INPUT_FILE_WITH_NOPAT = "gpc-access-structured-with-nopat.json" ;
5454 private static final String DUPLICATE_RESOURCE_BUNDLE = INPUT_PATH + "duplicated-resource-bundle.json" ;
5555 private static final String ONE_CONSULTATION_RESOURCE_BUNDLE = INPUT_PATH + "1-consultation-resource.json" ;
56- private static final String FHIR_BUNDLE_FOR_TEST = "TC07_A_B_C_RED_TPPtoEMIS_JSON .json" ;
56+ private static final String FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS = "fhir_bundle_with_duplicated_medication_requests .json" ;
5757
5858 private static final String EXPECTED_XML_FOR_ONE_CONSULTATION_RESOURCE = "ExpectedResponseFrom1ConsultationResponse.xml" ;
5959
60- private static final String EXPECTED_XML_TO_JSON_TEST_FILE = "TC07_A_B_C_RED_TPPtoEMIS_JSON .xml" ;
60+ private static final String EXPECTED_XML_WITHOUT_DUPLICATED_RESOURCES = "expected_xml_without_duplicated_medication_resources .xml" ;
6161 private static final String EXPECTED_XML_TO_JSON_FILE = "expected-ehr-extract-response-from-json.xml" ;
6262 private static final String EXPECTED_XML_TO_JSON_FILE_WITH_NOPAT = "expected-ehr-extract-response-from-json-with-nopat.xml" ;
6363
64+ private static final String FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME = "fhir-bundle-without-effective-time.json" ;
65+ private static final String FHIR_BUNDLE_WITHOUT_HIGH_EFFECTIVE_TIME = "fhir-bundle-without-high-effective-time.json" ;
66+ private static final String FHIR_BUNDLE_WITH_EFFECTIVE_TIME = "fhir-bundle-with-effective-time.json" ;
67+
68+ private static final String FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_BEFORE_DIAGNOSTIC_REPORT =
69+ "fhir-bundle-observations-before-diagnostic-report.json" ;
70+ private static final String FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_AFTER_DIAGNOSTIC_REPORT =
71+ "fhir-bundle-observations-after-diagnostic-report.json" ;
72+ private static final String FHIR_BUNDLE_WITH_OBSERVATIONS_UNRELATED_TO_DIAGNOSTIC_REPORT =
73+ "fhir-bundle-observations-unrelated-to-diagnostic-report.json" ;
74+ private static final String FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS =
75+ "fhir-bundle-observations-with-related-observations.json" ;
76+ private static final String EXPECTED_XML_WITHOUT_EFFECTIVE_TIME = "expected-xml-without-effective-time.xml" ;
77+ private static final String EXPECTED_XML_WITHOUT_HIGH_EFFECTIVE_TIME = "expected-xml-without-high-effective-time.xml" ;
78+ private static final String EXPECTED_XML_WITH_EFFECTIVE_TIME = "expected-xml-with-effective-time.xml" ;
79+ private static final String EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT = "expected-xml-with-observations-inside-report.xml" ;
80+ private static final String EXPECTED_XML_WITH_STANDALONE_OBSERVATIONS = "expected-xml-with-standalone-observations.xml" ;
81+ private static final String EXPECTED_XML_WITH_RELATED_OBSERVATIONS = "expected-xml-with-related-observations.xml" ;
82+
6483 private static final String TEST_ID_1 = "test-id-1" ;
6584 private static final String TEST_ID_2 = "test-id-2" ;
6685 private static final String TEST_ID_3 = "test-id-3" ;
@@ -274,19 +293,19 @@ public void When_MappingProperJsonRequestBody_Expect_NonDuplicatedMedicationRequ
274293 }
275294
276295 private static Stream <Arguments > testDataWithDuplicatedMedicationRequestResources () {
277- return Stream .of (Arguments .of (FHIR_BUNDLE_FOR_TEST , EXPECTED_XML_TO_JSON_TEST_FILE ));
296+ return Stream .of (Arguments .of (FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS , EXPECTED_XML_WITHOUT_DUPLICATED_RESOURCES ));
278297 }
279298
280299 private static Stream <Arguments > testData () {
281300 return Stream .of (
282- Arguments .of (JSON_INPUT_FILE , EXPECTED_XML_TO_JSON_FILE )// ,
283- /* Arguments.of(FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_EFFECTIVE_TIME),
301+ Arguments .of (JSON_INPUT_FILE , EXPECTED_XML_TO_JSON_FILE ),
302+ Arguments .of (FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME , EXPECTED_XML_WITHOUT_EFFECTIVE_TIME ),
284303 Arguments .of (FHIR_BUNDLE_WITHOUT_HIGH_EFFECTIVE_TIME , EXPECTED_XML_WITHOUT_HIGH_EFFECTIVE_TIME ),
285304 Arguments .of (FHIR_BUNDLE_WITH_EFFECTIVE_TIME , EXPECTED_XML_WITH_EFFECTIVE_TIME ),
286305 Arguments .of (FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_BEFORE_DIAGNOSTIC_REPORT , EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT ),
287306 Arguments .of (FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_AFTER_DIAGNOSTIC_REPORT , EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT ),
288307 Arguments .of (FHIR_BUNDLE_WITH_OBSERVATIONS_UNRELATED_TO_DIAGNOSTIC_REPORT , EXPECTED_XML_WITH_STANDALONE_OBSERVATIONS ),
289- Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS, EXPECTED_XML_WITH_RELATED_OBSERVATIONS)*/
308+ Arguments .of (FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS , EXPECTED_XML_WITH_RELATED_OBSERVATIONS )
290309 );
291310 }
292311
0 commit comments