From 96ccce5b7e06e0f25f5d587120ff09b3612f0664 Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Mon, 8 Sep 2025 11:33:53 +0100 Subject: [PATCH 01/20] small test cleanup --- .../mapper/NonConsultationResourceMapper.java | 21 ++++++++++++++++++- .../NonConsultationResourceMapperTest.java | 3 ++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java index d864551d97..e0da1db427 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java @@ -12,6 +12,7 @@ import org.hl7.fhir.dstu3.model.DiagnosticReport; import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.ListResource; +import org.hl7.fhir.dstu3.model.MedicationRequest; import org.hl7.fhir.dstu3.model.Observation; import org.hl7.fhir.dstu3.model.Reference; import org.hl7.fhir.dstu3.model.Resource; @@ -77,7 +78,25 @@ public List mapRemainingResourcesToEhrCompositions(Bundle bundle) { .map(Bundle.BundleEntryComponent::getResource) .filter(this::isMappableNonConsultationResource) .sorted(this::compareProcessingOrder) - .filter(resource -> !hasIdBeenMapped(resource) && !isIgnoredResource(resource)) + .filter(resource -> { + if (hasIdBeenMapped(resource) || isIgnoredResource(resource)) { + return false; + } + + if (resource instanceof MedicationRequest medicationRequest) { + + if (!medicationRequest.hasBasedOn() || medicationRequest.getBasedOn().isEmpty()) { + return true; + } + + String referenceId = medicationRequest.getBasedOn().getFirst().getReference(); + //String medRequestId = reference.replaceFirst("MedicationRequest/", ""); + var referencedResource = messageContext.getInputBundleHolder().getResource(new IdType(referenceId)); + return referencedResource.isEmpty() || !hasIdBeenMapped(referencedResource.get()); + } + return true; + }) + //.filter(resource -> !hasIdBeenMapped(resource) && !isIgnoredResource(resource)) .map(this::mapResourceToEhrComposition) .flatMap(Optional::stream) .collect(Collectors.toList()); diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapperTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapperTest.java index 7e6d719038..2cff2b2b43 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapperTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapperTest.java @@ -115,6 +115,7 @@ public void When_TransformingResourceToEhrComp_Expect_CorrectValuesToBeExtracted String bundle = ResourceTestFileUtils.getFileContent(inputBundle); String expectedOutput = ResourceTestFileUtils.getFileContent(output); Bundle parsedBundle = fhirParseService.parseResource(bundle, Bundle.class); + messageContext.initialize(parsedBundle); var translatedOutput = nonConsultationResourceMapper.mapRemainingResourcesToEhrCompositions(parsedBundle).get(0); assertThat(translatedOutput).isEqualToIgnoringWhitespace(expectedOutput); @@ -122,7 +123,7 @@ public void When_TransformingResourceToEhrComp_Expect_CorrectValuesToBeExtracted @ParameterizedTest @MethodSource("endedAllergiesArgs") - public void When_TransformingEndedAllergyListToEhrComp_Expect_CorrectValuesToBeExtracted(String inputBundle, String output) { + void When_TransformingEndedAllergyListToEhrComp_Expect_CorrectValuesToBeExtracted(String inputBundle, String output) { setupMock(ResourceTestFileUtils.getFileContent(ALLERGY_INTOLERANCE_XML)); String bundle = ResourceTestFileUtils.getFileContent(inputBundle); String expectedOutput = ResourceTestFileUtils.getFileContent(output); From 85fd52037642e4ea71ff0e75a27e6f344436f4bb Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Mon, 8 Sep 2025 14:39:08 +0100 Subject: [PATCH 02/20] covering code with tests --- .../mapper/EhrExtractMapperComponentTest.java | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java index 7b7c2cdd2c..946b135b06 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java @@ -42,6 +42,7 @@ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) public class EhrExtractMapperComponentTest { + private static final String TEST_FILE_DIRECTORY = "/ehr/request/fhir/"; private static final String INPUT_DIRECTORY = "input/"; private static final String OUTPUT_DIRECTORY = "output/"; @@ -52,29 +53,13 @@ public class EhrExtractMapperComponentTest { private static final String JSON_INPUT_FILE_WITH_NOPAT = "gpc-access-structured-with-nopat.json"; private static final String DUPLICATE_RESOURCE_BUNDLE = INPUT_PATH + "duplicated-resource-bundle.json"; private static final String ONE_CONSULTATION_RESOURCE_BUNDLE = INPUT_PATH + "1-consultation-resource.json"; - private static final String FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME = "fhir-bundle-without-effective-time.json"; - private static final String FHIR_BUNDLE_WITHOUT_HIGH_EFFECTIVE_TIME = "fhir-bundle-without-high-effective-time.json"; - private static final String FHIR_BUNDLE_WITH_EFFECTIVE_TIME = "fhir-bundle-with-effective-time.json"; - - private static final String FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_BEFORE_DIAGNOSTIC_REPORT = - "fhir-bundle-observations-before-diagnostic-report.json"; - private static final String FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_AFTER_DIAGNOSTIC_REPORT = - "fhir-bundle-observations-after-diagnostic-report.json"; - private static final String FHIR_BUNDLE_WITH_OBSERVATIONS_UNRELATED_TO_DIAGNOSTIC_REPORT = - "fhir-bundle-observations-unrelated-to-diagnostic-report.json"; - private static final String FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS = - "fhir-bundle-observations-with-related-observations.json"; + private static final String FHIR_BUNDLE_FOR_TEST = "TC07_A_B_C_RED_TPPtoEMIS_JSON.json"; private static final String EXPECTED_XML_FOR_ONE_CONSULTATION_RESOURCE = "ExpectedResponseFrom1ConsultationResponse.xml"; + private static final String EXPECTED_XML_TO_JSON_TEST_FILE = "TC07_A_B_C_RED_TPPtoEMIS_JSON.xml"; private static final String EXPECTED_XML_TO_JSON_FILE = "expected-ehr-extract-response-from-json.xml"; private static final String EXPECTED_XML_TO_JSON_FILE_WITH_NOPAT = "expected-ehr-extract-response-from-json-with-nopat.xml"; - private static final String EXPECTED_XML_WITHOUT_EFFECTIVE_TIME = "expected-xml-without-effective-time.xml"; - private static final String EXPECTED_XML_WITHOUT_HIGH_EFFECTIVE_TIME = "expected-xml-without-high-effective-time.xml"; - private static final String EXPECTED_XML_WITH_EFFECTIVE_TIME = "expected-xml-with-effective-time.xml"; - private static final String EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT = "expected-xml-with-observations-inside-report.xml"; - private static final String EXPECTED_XML_WITH_STANDALONE_OBSERVATIONS = "expected-xml-with-standalone-observations.xml"; - private static final String EXPECTED_XML_WITH_RELATED_OBSERVATIONS = "expected-xml-with-related-observations.xml"; private static final String TEST_ID_1 = "test-id-1"; private static final String TEST_ID_2 = "test-id-2"; @@ -274,16 +259,34 @@ public void When_MappingProperJsonRequestBody_Expect_ProperXmlOutput(String inpu assertThat(output).isEqualToIgnoringWhitespace(expectedJsonToXmlContent); } + @ParameterizedTest + @MethodSource("testDataWithDuplicatedMedicationRequestResources") + public void When_MappingProperJsonRequestBody_Expect_NonDuplicatedMedicationRequestRemainingResources(String input, String expected) { + String inputJsonFileContent = ResourceTestFileUtils.getFileContent(INPUT_PATH + input); + Bundle bundle = new FhirParseService().parseResource(inputJsonFileContent, Bundle.class); + messageContext.initialize(bundle); + + EhrExtractTemplateParameters ehrExtractTemplateParameters = ehrExtractMapper.mapBundleToEhrFhirExtractParams( + getGpcStructuredTaskDefinition, + bundle); + + assertThat(ehrExtractTemplateParameters.getComponents()).hasSize(2); + } + + private static Stream testDataWithDuplicatedMedicationRequestResources() { + return Stream.of(Arguments.of(FHIR_BUNDLE_FOR_TEST, EXPECTED_XML_TO_JSON_TEST_FILE)); + } + private static Stream testData() { return Stream.of( - Arguments.of(JSON_INPUT_FILE, EXPECTED_XML_TO_JSON_FILE), - Arguments.of(FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_EFFECTIVE_TIME), + Arguments.of(JSON_INPUT_FILE, EXPECTED_XML_TO_JSON_FILE)//, + /*Arguments.of(FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_EFFECTIVE_TIME), Arguments.of(FHIR_BUNDLE_WITHOUT_HIGH_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_HIGH_EFFECTIVE_TIME), Arguments.of(FHIR_BUNDLE_WITH_EFFECTIVE_TIME, EXPECTED_XML_WITH_EFFECTIVE_TIME), Arguments.of(FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_BEFORE_DIAGNOSTIC_REPORT, EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT), Arguments.of(FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_AFTER_DIAGNOSTIC_REPORT, EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT), Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_UNRELATED_TO_DIAGNOSTIC_REPORT, EXPECTED_XML_WITH_STANDALONE_OBSERVATIONS), - Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS, EXPECTED_XML_WITH_RELATED_OBSERVATIONS) + Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS, EXPECTED_XML_WITH_RELATED_OBSERVATIONS)*/ ); } From 87df95aa5d65ff1e82aebc0e70d1a44b7098ac7d Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:26:05 +0100 Subject: [PATCH 03/20] fixing a test --- ...-extract-response-from-json-with-nopat.xml | 10979 +++++----------- 1 file changed, 2954 insertions(+), 8025 deletions(-) diff --git a/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json-with-nopat.xml b/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json-with-nopat.xml index e31d8c9502..baf87a55ef 100644 --- a/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json-with-nopat.xml +++ b/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json-with-nopat.xml @@ -39,8061 +39,2990 @@ - - - - - - Unknown - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - - - - - - - General Medical Practitioner - - - - Mr - NHS - Test - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - System Administrator - - - - Dr - EMIS Web - Recall Schedule - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - Clerical Worker - - - - Dr - David - McAvenue - - - - National + + + + + + Unknown + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + + + + + + + General Medical Practitioner + + + + Mr + NHS + Test + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + System Administrator + + + + Dr + EMIS Web + Recall Schedule + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + General Medical Practitioner + + + + Dr + Peter + Whitcombe + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + General Medical Practitioner + + + + Dr + David + McAvenue + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + + + GP Surgery + + + + + + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + + + + + + + + Mocked code + + + + + + + + + Mocked code + + +
+ + + + + + @ÑѧѬ This has extended unicode characters + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + 1.This is a line of text with a line break at the end. +2.This is a line of text with a line break at the end. +3.This is a line of text with a line break at the end. +4.This is a line of text with a line break at the end. - - - - - - - - General Medical Practitioner - - - - Dr - Peter - Whitcombe - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - General Medical Practitioner - - - - Dr - David - McAvenue - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - - - GP Surgery - - - - - - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - - - - - - - - Mocked code - - - - - - - - - Mocked code - - -
- - - - - - - - @ÑѧѬ This has extended unicode characters - - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - 1.This is a line of text with a line break at the end. - 2.This is a line of text with a line break at the end. - 3.This is a line of text with a line break at the end. - 4.This is a line of text with a line break at the end. - - The Line above this one was blank (with a line break) - - This is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line,and this is the end of the long line. +The Line above this one was blank (with a line break) - ThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesENDOFTEXT +This is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line,and this is the end of the long line. - The line below contains special characters... - ¬`1234567890!"£$%^&*()_+=-{}][~@#':;<>?,./|\ - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - - - - - - - - Mocked code - - -
- - +ThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesENDOFTEXT +The line below contains special characters... +¬`1234567890!"£$%^&*()_+=-{}][~@#':;<>?,./|\ + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + These are some notes !"£$%^&*() + + + + + + + + + + + + This is some random free text + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Family member : Mother + + + + + + + + + + + + Mocked code + + +
+ + + + + + Family member : Father - note - this is obviously wrong? + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + hhhhhhhhh + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + This is kjkjkjkjkjkjkjkjkj + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + This is the BP reading in a consultation with a note + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 28 days + + + + + + + One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 1825 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + gram + + + + + Expected Supply Duration: 28 days + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 28 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 1 days + + + + + + + One To Be Taken Each Day + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 28 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 1 days + + + + + + + One To Be Taken Each Day + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 28 days + + + + + + + One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + gram + + + + + Expected Supply Duration: 28 days + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 1825 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 1825 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + gram + + + + + Expected Supply Duration: 28 days + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 28 days + + + + + + + One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - These are some notes !"£$%^&*() - - - - - - - - - - - - - This is some random free text - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - - - Family member : Mother - - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Family member : Father - note - this is obviously wrong? - - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - hhhhhhhhh - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - This is kjkjkjkjkjkjkjkjkj - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - mmHg - - - - - - Mocked code - - -
- - - mmHg - - - - - - This is the BP reading in a consultation with a note - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - device - - - - - - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - gram - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 28 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - device - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 1 days - - - - - - - One To Be Taken Each Day - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 1 days - - - - - - - One To Be Taken Each Day - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 28 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 1 days - - - - - - - One To Be Taken Each Day - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - gram - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - device - - - - - - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - gram - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active This is text for a warfarin allergy Significance : Major - Episodicity : First - This is text for a warfarin allergy - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Significance : Major - Episodicity : First - This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active Drug Allergy - Apsrin Significance : Minor - Episodicity : First - Drug Allergy - Apsrin - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active This is a peanut allergy, (Replaced Allergic gastroenteritis) - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active This is text for a warfarin allergy Significance : Major - Episodicity : First - This is text for a warfarin allergy + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Significance : Major - Episodicity : First - This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active Drug Allergy - Apsrin Significance : Minor - Episodicity : First - Drug Allergy - Apsrin + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active This is a peanut allergy, (Replaced Allergic gastroenteritis) + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - - - Problem Info: Problem Notes: This is text for a warfarin allergy Transformed AllergyIntolerance problem header Originally coded: H/O: warfarin allergy - - - - - - - - - - - - -
- - - - - - - - - - - - - - Inactive Problem, major - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Problem Info: Related Problem: Child of Aspirin allergy Problem Notes: This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Transformed AllergyIntolerance problem header Originally coded: Peanut allergy - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, minor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Problem Info: Related Problem: Parent of Allergy to peanuts Problem Notes: Drug Allergy - Apsrin Transformed AllergyIntolerance problem header Originally coded: H/O: aspirin allergy - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + Problem Info: Problem Notes: This is text for a warfarin allergy Transformed AllergyIntolerance problem header Originally coded: H/O: warfarin allergy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Inactive Problem, major + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Problem Info: Related Problem: Child of Aspirin allergy Problem Notes: This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Transformed AllergyIntolerance problem header Originally coded: Peanut allergy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, minor + + + + + + + - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Problem Info: Related Problem: Parent of Allergy to peanuts Problem Notes: Drug Allergy - Apsrin Transformed AllergyIntolerance problem header Originally coded: H/O: aspirin allergy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - Engraver (entry added 13/1/2010, but marked as 01/1/1988 as date of entry) - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - Family member : Uncle - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - mmHg - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - mmHg - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - Synonym "Heart Attack" selected Problem Info: Problem Notes: Synonym "Heart Attack" selected - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - Happy Puppet Problem Info: Problem Notes: Happy Puppet - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - This is a standalone note with extended chars ѧ¬ Problem Info: Problem Notes: This is a standalone note with extended chars ѧ¬ - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - This is descriptive text `¬¦!"£$%^&*()-_+={}[]~#@':;<,|\>./? - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - mmHg - - - - - - Mocked code - - -
- - - mmHg - - - - - - This is the standalone BP Interpretation(s): Abnormal - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Engraver (entry added 13/1/2010, but marked as 01/1/1988 as date of entry) + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Family member : Uncle + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First - Synonym "Heart Attack" selected Problem Info: Problem Notes: Synonym "Heart Attack" selected + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First - Happy Puppet Problem Info: Problem Notes: Happy Puppet + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First - This is a standalone note with extended chars ѧ¬ Problem Info: Problem Notes: This is a standalone note with extended chars ѧ¬ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + This is descriptive text `¬¦!"£$%^&*()-_+={}[]~#@':;<,|\>./? + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + This is the standalone BP Interpretation(s): Abnormal + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + From 5436d8e52a0da1e488b7e257e0f5af7390bd420e Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:17:36 +0100 Subject: [PATCH 04/20] tests fix --- ...xpected-ehr-extract-response-from-json.xml | 10977 +++++----------- 1 file changed, 2953 insertions(+), 8024 deletions(-) diff --git a/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json.xml b/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json.xml index 80028e3f67..c7366cdebb 100644 --- a/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json.xml +++ b/service/src/test/resources/ehr/request/fhir/output/expected-ehr-extract-response-from-json.xml @@ -39,8060 +39,2989 @@ - - - - - - Unknown - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - - - - - - - General Medical Practitioner - - - - Mr - NHS - Test - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - System Administrator - - - - Dr - EMIS Web - Recall Schedule - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - Clerical Worker - - - - Dr - David - McAvenue - - - - National + + + + + + Unknown + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + + + + + + + General Medical Practitioner + + + + Mr + NHS + Test + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + System Administrator + + + + Dr + EMIS Web + Recall Schedule + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + General Medical Practitioner + + + + Dr + Peter + Whitcombe + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + General Medical Practitioner + + + + Dr + David + McAvenue + + + + TEMPLE SOWERBY MEDICAL PRACTICE + + + Fulford Grange + Micklefield Lane + Rawdon + Rawdon + Leeds + LS19 6BA + + + + + + + + + + + GP Surgery + + + + + + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + + + + + + + + Mocked code + + + + + + + + + Mocked code + + +
+ + + + + + @ÑѧѬ This has extended unicode characters + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + 1.This is a line of text with a line break at the end. +2.This is a line of text with a line break at the end. +3.This is a line of text with a line break at the end. +4.This is a line of text with a line break at the end. - - - - - - - - General Medical Practitioner - - - - Dr - Peter - Whitcombe - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - General Medical Practitioner - - - - Dr - David - McAvenue - - - - TEMPLE SOWERBY MEDICAL PRACTICE - - - Fulford Grange - Micklefield Lane - Rawdon - Rawdon - Leeds - LS19 6BA - - - - - - - - - - - GP Surgery - - - - - - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - - - - - - - - Mocked code - - - - - - - - - Mocked code - - -
- - - - - - - - @ÑѧѬ This has extended unicode characters - - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - 1.This is a line of text with a line break at the end. - 2.This is a line of text with a line break at the end. - 3.This is a line of text with a line break at the end. - 4.This is a line of text with a line break at the end. - - The Line above this one was blank (with a line break) - - This is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line,and this is the end of the long line. +The Line above this one was blank (with a line break) - ThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesENDOFTEXT +This is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line, this is a long line,and this is the end of the long line. - The line below contains special characters... - ¬`1234567890!"£$%^&*()_+=-{}][~@#':;<>?,./|\ - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - - - - - - - Mocked code - - -
- - +ThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesThisIsALongLineWithoutSpacesENDOFTEXT +The line below contains special characters... +¬`1234567890!"£$%^&*()_+=-{}][~@#':;<>?,./|\ + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + + + + + + + Mocked code + + +
+ + + + + + These are some notes !"£$%^&*() + + + + + + + + + + + + This is some random free text + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Family member : Mother + + + + + + + + + + + + Mocked code + + +
+ + + + + + Family member : Father - note - this is obviously wrong? + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + hhhhhhhhh + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + This is kjkjkjkjkjkjkjkjkj + + + + + + + + + + + + + + + + + + + + GP Surgery + + + +
+ + + + + + + + + EMIS Test Practice Location + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + This is the BP reading in a consultation with a note + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 28 days + + + + + + + One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 1825 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + gram + + + + + Expected Supply Duration: 28 days + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 28 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 1 days + + + + + + + One To Be Taken Each Day + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 28 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 1 days + + + + + + + One To Be Taken Each Day + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 28 days + + + + + + + One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + gram + + + + + Expected Supply Duration: 28 days + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 1825 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + device + + + + + Expected Supply Duration: 1825 days + + + + + + + n/a + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + gram + + + + + Expected Supply Duration: 28 days + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + Mocked code + + + + + + + + + + + + + + + + tablet + + + + + Expected Supply Duration: 28 days + + + + + + + One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - These are some notes !"£$%^&*() - - - - - - - - - - - - - This is some random free text - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - - - Family member : Mother - - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Family member : Father - note - this is obviously wrong? - - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - hhhhhhhhh - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - This is kjkjkjkjkjkjkjkjkj - - - - - - - - - - - - - - - - - - - - GP Surgery - - - -
- - - - - - - - - EMIS Test Practice Location - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - mmHg - - - - - - Mocked code - - -
- - - mmHg - - - - - - This is the BP reading in a consultation with a note - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - + + + - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - device - - - - - - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - gram - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 28 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - device - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 1 days - - - - - - - One To Be Taken Each Day - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 1 days - - - - - - - One To Be Taken Each Day - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 28 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 1 days - - - - - - - One To Be Taken Each Day - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - gram - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - device - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - device - - - - - - - - - - Expected Supply Duration: 1825 days - - - - - - - n/a - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - gram - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - gram - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - 1 - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - - - - - tablet - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - Mocked code - - - - - - - - - - - - tablet - - - - - - - - - - Expected Supply Duration: 28 days - - - - - - - One Tablet Daily For 21 Days; Subsequent Courses Repeated After 7-Day Tablet Free Interval - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active This is text for a warfarin allergy Significance : Major - Episodicity : First - This is text for a warfarin allergy - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Significance : Major - Episodicity : First - This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active Drug Allergy - Apsrin Significance : Minor - Episodicity : First - Drug Allergy - Apsrin - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - Mocked code - - -
- - - - - - Status: Active This is a peanut allergy, (Replaced Allergic gastroenteritis) - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active This is text for a warfarin allergy Significance : Major - Episodicity : First - This is text for a warfarin allergy + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Significance : Major - Episodicity : First - This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active Drug Allergy - Apsrin Significance : Minor - Episodicity : First - Drug Allergy - Apsrin + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + Mocked code + + +
+ + + + + + Status: Active This is a peanut allergy, (Replaced Allergic gastroenteritis) + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - - - Problem Info: Problem Notes: This is text for a warfarin allergy Transformed AllergyIntolerance problem header Originally coded: H/O: warfarin allergy - - - - - - - - - - - - -
- - - - - - - - - - - - - - Inactive Problem, major - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Problem Info: Related Problem: Child of Aspirin allergy Problem Notes: This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Transformed AllergyIntolerance problem header Originally coded: Peanut allergy - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, minor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Problem Info: Related Problem: Parent of Allergy to peanuts Problem Notes: Drug Allergy - Apsrin Transformed AllergyIntolerance problem header Originally coded: H/O: aspirin allergy - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - Active Problem, major - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + Problem Info: Problem Notes: This is text for a warfarin allergy Transformed AllergyIntolerance problem header Originally coded: H/O: warfarin allergy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Inactive Problem, major + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Problem Info: Related Problem: Child of Aspirin allergy Problem Notes: This is a peanut allergy, (Evolved into H/O: aspirin allergy 13-Jan-2010) Transformed AllergyIntolerance problem header Originally coded: Peanut allergy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, minor + + + + + + + - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Problem Info: Related Problem: Parent of Allergy to peanuts Problem Notes: Drug Allergy - Apsrin Transformed AllergyIntolerance problem header Originally coded: H/O: aspirin allergy + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - Engraver (entry added 13/1/2010, but marked as 01/1/1988 as date of entry) - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Active Problem, major + + + + + + + - - - - Family member : Uncle - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - mmHg - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - mmHg - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - Synonym "Heart Attack" selected Problem Info: Problem Notes: Synonym "Heart Attack" selected - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - Happy Puppet Problem Info: Problem Notes: Happy Puppet - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - Significance : Major - Episodicity : First - This is a standalone note with extended chars ѧ¬ Problem Info: Problem Notes: This is a standalone note with extended chars ѧ¬ - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - This is descriptive text `¬¦!"£$%^&*()-_+={}[]~#@':;<,|\>./? - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - Mocked code - - -
- - - mmHg - - - - - - Mocked code - - -
- - - mmHg - - - - - - This is the standalone BP Interpretation(s): Abnormal - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - Mocked code - - -
- - - - - - - - - - - + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Engraver (entry added 13/1/2010, but marked as 01/1/1988 as date of entry) + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Family member : Uncle + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First - Synonym "Heart Attack" selected Problem Info: Problem Notes: Synonym "Heart Attack" selected + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First - Happy Puppet Problem Info: Problem Notes: Happy Puppet + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Significance : Major - Episodicity : First - This is a standalone note with extended chars ѧ¬ Problem Info: Problem Notes: This is a standalone note with extended chars ѧ¬ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + This is descriptive text `¬¦!"£$%^&*()-_+={}[]~#@':;<,|\>./? + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + Mocked code + + +
+ + + + + mmHg + + + + + + + + This is the standalone BP Interpretation(s): Abnormal + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + Mocked code + + +
+ + + + + + + + + + + From 03fb99e8a95e5ca25b5603ded9e8ef4f8b5cf918 Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:39:23 +0100 Subject: [PATCH 05/20] tests fix --- .../mapper/EhrExtractMapperComponentTest.java | 31 +- ...e_with_duplicated_medication_requests.json | 1499 +++++++++++++++++ ...ithout_duplicated_medication_resources.xml | 446 +++++ 3 files changed, 1970 insertions(+), 6 deletions(-) create mode 100644 service/src/test/resources/ehr/request/fhir/input/fhir_bundle_with_duplicated_medication_requests.json create mode 100644 service/src/test/resources/ehr/request/fhir/output/expected_xml_without_duplicated_medication_resources.xml diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java index 946b135b06..2a2abf38d5 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java @@ -53,14 +53,33 @@ public class EhrExtractMapperComponentTest { private static final String JSON_INPUT_FILE_WITH_NOPAT = "gpc-access-structured-with-nopat.json"; private static final String DUPLICATE_RESOURCE_BUNDLE = INPUT_PATH + "duplicated-resource-bundle.json"; private static final String ONE_CONSULTATION_RESOURCE_BUNDLE = INPUT_PATH + "1-consultation-resource.json"; - private static final String FHIR_BUNDLE_FOR_TEST = "TC07_A_B_C_RED_TPPtoEMIS_JSON.json"; + private static final String FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS = "fhir_bundle_with_duplicated_medication_requests.json"; private static final String EXPECTED_XML_FOR_ONE_CONSULTATION_RESOURCE = "ExpectedResponseFrom1ConsultationResponse.xml"; - private static final String EXPECTED_XML_TO_JSON_TEST_FILE = "TC07_A_B_C_RED_TPPtoEMIS_JSON.xml"; + private static final String EXPECTED_XML_WITHOUT_DUPLICATED_RESOURCES = "expected_xml_without_duplicated_medication_resources.xml"; private static final String EXPECTED_XML_TO_JSON_FILE = "expected-ehr-extract-response-from-json.xml"; private static final String EXPECTED_XML_TO_JSON_FILE_WITH_NOPAT = "expected-ehr-extract-response-from-json-with-nopat.xml"; + private static final String FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME = "fhir-bundle-without-effective-time.json"; + private static final String FHIR_BUNDLE_WITHOUT_HIGH_EFFECTIVE_TIME = "fhir-bundle-without-high-effective-time.json"; + private static final String FHIR_BUNDLE_WITH_EFFECTIVE_TIME = "fhir-bundle-with-effective-time.json"; + + private static final String FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_BEFORE_DIAGNOSTIC_REPORT = + "fhir-bundle-observations-before-diagnostic-report.json"; + private static final String FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_AFTER_DIAGNOSTIC_REPORT = + "fhir-bundle-observations-after-diagnostic-report.json"; + private static final String FHIR_BUNDLE_WITH_OBSERVATIONS_UNRELATED_TO_DIAGNOSTIC_REPORT = + "fhir-bundle-observations-unrelated-to-diagnostic-report.json"; + private static final String FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS = + "fhir-bundle-observations-with-related-observations.json"; + private static final String EXPECTED_XML_WITHOUT_EFFECTIVE_TIME = "expected-xml-without-effective-time.xml"; + private static final String EXPECTED_XML_WITHOUT_HIGH_EFFECTIVE_TIME = "expected-xml-without-high-effective-time.xml"; + private static final String EXPECTED_XML_WITH_EFFECTIVE_TIME = "expected-xml-with-effective-time.xml"; + private static final String EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT = "expected-xml-with-observations-inside-report.xml"; + private static final String EXPECTED_XML_WITH_STANDALONE_OBSERVATIONS = "expected-xml-with-standalone-observations.xml"; + private static final String EXPECTED_XML_WITH_RELATED_OBSERVATIONS = "expected-xml-with-related-observations.xml"; + private static final String TEST_ID_1 = "test-id-1"; private static final String TEST_ID_2 = "test-id-2"; private static final String TEST_ID_3 = "test-id-3"; @@ -274,19 +293,19 @@ public void When_MappingProperJsonRequestBody_Expect_NonDuplicatedMedicationRequ } private static Stream testDataWithDuplicatedMedicationRequestResources() { - return Stream.of(Arguments.of(FHIR_BUNDLE_FOR_TEST, EXPECTED_XML_TO_JSON_TEST_FILE)); + return Stream.of(Arguments.of(FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS, EXPECTED_XML_WITHOUT_DUPLICATED_RESOURCES)); } private static Stream testData() { return Stream.of( - Arguments.of(JSON_INPUT_FILE, EXPECTED_XML_TO_JSON_FILE)//, - /*Arguments.of(FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_EFFECTIVE_TIME), + Arguments.of(JSON_INPUT_FILE, EXPECTED_XML_TO_JSON_FILE), + Arguments.of(FHIR_BUNDLE_WITHOUT_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_EFFECTIVE_TIME), Arguments.of(FHIR_BUNDLE_WITHOUT_HIGH_EFFECTIVE_TIME, EXPECTED_XML_WITHOUT_HIGH_EFFECTIVE_TIME), Arguments.of(FHIR_BUNDLE_WITH_EFFECTIVE_TIME, EXPECTED_XML_WITH_EFFECTIVE_TIME), Arguments.of(FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_BEFORE_DIAGNOSTIC_REPORT, EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT), Arguments.of(FHIR_BUNDLE_WITH_WITH_OBSERVATIONS_AFTER_DIAGNOSTIC_REPORT, EXPECTED_XML_WITH_OBSERVATIONS_INSIDE_REPORT), Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_UNRELATED_TO_DIAGNOSTIC_REPORT, EXPECTED_XML_WITH_STANDALONE_OBSERVATIONS), - Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS, EXPECTED_XML_WITH_RELATED_OBSERVATIONS)*/ + Arguments.of(FHIR_BUNDLE_WITH_OBSERVATIONS_WITH_RELATED_OBSERVATIONS, EXPECTED_XML_WITH_RELATED_OBSERVATIONS) ); } diff --git a/service/src/test/resources/ehr/request/fhir/input/fhir_bundle_with_duplicated_medication_requests.json b/service/src/test/resources/ehr/request/fhir/input/fhir_bundle_with_duplicated_medication_requests.json new file mode 100644 index 0000000000..62d729aa3d --- /dev/null +++ b/service/src/test/resources/ehr/request/fhir/input/fhir_bundle_with_duplicated_medication_requests.json @@ -0,0 +1,1499 @@ +{ + "resourceType": "Bundle", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-StructuredRecord-Bundle-1" + ] + }, + "id": "477B8390-7DCD-11F0-A3EA-75D8BA9C1206", + "type": "collection", + "entry": [ + { + "resource": { + "resourceType": "Patient", + "id": "0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1" + ], + "versionId": "242f9bf749401a08c0b2e5afde27df2e" + }, + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-RegistrationDetails-1", + "extension": [ + { + "url": "registrationPeriod", + "valuePeriod": { + "start": "2025-08-20" + } + }, + { + "url": "registrationType", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-RegistrationType-1", + "code": "R", + "display": "Regular" + } + ] + } + } + ] + } + ], + "identifier": [ + { + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-NHSNumberVerificationStatus-1", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1", + "code": "01", + "display": "Number present and verified" + } + ] + } + } + ], + "system": "https://fhir.nhs.uk/Id/nhs-number", + "value": "1234567890" + } + ], + "active": true, + "name": [ + { + "use": "official", + "family": "Dean", + "prefix": [ + "Miss" + ], + "given": [ + "Maggie", + "Iris" + ] + } + ], + "gender": "female", + "birthDate": "2014-11-13", + "address": [ + { + "use": "home", + "line": [ + "216 Warley Road", + "HALIFAX" + ], + "postalCode": "HX2 0BQ", + "country": "GBR" + } + ], + "managingOrganization": { + "reference": "Organization/B84012" + } + } + }, + { + "resource": { + "resourceType": "Organization", + "id": "B84012", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1" + ], + "versionId": "79a9700a9ccf662c7f1dbb571615e9cd" + }, + "identifier": [ + { + "system": "https://fhir.nhs.uk/Id/ods-organization-code", + "value": "B84012" + } + ], + "active": true, + "name": "Spring Hall Group Practice", + "address": [ + { + "use": "work", + "line": [ + "101 Yvonne Falls" + ], + "city": "West Carey", + "district": "Norfolk", + "postalCode": "MK3 7SA", + "country": "GBR" + } + ], + "telecom": [ + { + "system": "phone", + "value": "+441273749184", + "use": "work" + }, + { + "system": "fax", + "value": "+441455338473", + "use": "work" + }, + { + "system": "email", + "value": "bakers.hill@medicus.health", + "use": "work" + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Problems", + "code": { + "coding": [ + { + "display": "Problems", + "system": "http://snomed.info/sct", + "code": "717711000000103" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "note": [ + { + "text": "Information not available." + } + ], + "emptyReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-ListEmptyReasonCode-1", + "code": "no-content-recorded", + "display": "No Content Recorded" + } + ] + } + } + }, + { + "resource": { + "resourceType": "AllergyIntolerance", + "id": "0198c7a6-df8a-7000-8236-61f548e47963", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "0198c7a6-df8a-7000-8236-61f548e47963" + } + ], + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-AllergyIntolerance-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter", + "valueReference": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + } + } + ], + "verificationStatus": "unconfirmed", + "assertedDate": "2025-08-20T14:24:00+01:00", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "300910009", + "display": "Allergy to pollen", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid", + "extension": [ + { + "url": "descriptionId", + "valueId": "442106016" + } + ] + } + ] + } + ], + "text": "Allergy to pollen" + }, + "clinicalStatus": "active", + "patient": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "recorder": { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + }, + "category": [ + "medication" + ], + "reaction": [ + { + "manifestation": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/v3/NullFlavor", + "code": "NI", + "display": "NoInformation" + } + ] + } + ], + "severity": "mild" + } + ] + } + }, + { + "resource": { + "resourceType": "Practitioner", + "id": "01979be5-6c23-726d-9efa-d2998128340d", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1" + ], + "versionId": "edf2d8adbac72b16e925bf3bb6d4e367" + }, + "active": true, + "name": [ + { + "use": "official", + "text": "Adrian Tye", + "family": "Tye", + "given": [ + "Adrian" + ] + } + ] + } + }, + { + "resource": { + "resourceType": "PractitionerRole", + "id": "2c2034c4c02ab69e7883ded05f329b65", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-PractitionerRole-1" + ] + }, + "practitioner": { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + }, + "organization": { + "reference": "Organization/B84012" + } + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Allergies and adverse reactions", + "code": { + "coding": [ + { + "display": "Allergies and adverse reactions", + "system": "http://snomed.info/sct", + "code": "886921000000105" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "AllergyIntolerance/0198c7a6-df8a-7000-8236-61f548e47963" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Ended allergies", + "code": { + "coding": [ + { + "display": "Ended allergies", + "system": "http://snomed.info/sct", + "code": "1103671000000101" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "note": [ + { + "text": "Information not available." + } + ], + "emptyReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-ListEmptyReasonCode-1", + "code": "no-content-recorded", + "display": "No Content Recorded" + } + ] + } + } + }, + { + "resource": { + "resourceType": "MedicationStatement", + "id": "ms-0198c7a7-5596-7000-bc38-89f1216404ad", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "ms-0198c7a7-5596-7000-bc38-89f1216404ad" + } + ], + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationStatement-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-PrescribingAgency-1", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-PrescribingAgency-1", + "code": "prescribed-at-gp-practice", + "display": "Prescribed at GP practice" + } + ] + } + }, + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-MedicationStatementLastIssueDate-1", + "valueDateTime": "2025-08-20" + } + ], + "context": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "status": "completed", + "basedOn": [ + { + "reference": "MedicationRequest/mr-0198c7a7-5596-7000-bc38-89f1216404ad" + } + ], + "medicationReference": { + "reference": "Medication/42292011000001108" + }, + "effectivePeriod": { + "start": "2025-08-20", + "end": "2025-08-20" + }, + "dateAsserted": "2025-08-20", + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "taken": "unk", + "dosage": [ + { + "text": "1" + } + ] + } + }, + { + "resource": { + "resourceType": "Medication", + "id": "42292011000001108", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Medication-1" + ] + }, + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "42292011000001108", + "display": "Aspirin 75mg tablets", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid", + "extension": [ + { + "url": "descriptionId", + "valueId": "3333821000001113" + } + ] + } + ] + } + ] + } + } + }, + { + "resource": { + "resourceType": "MedicationRequest", + "id": "mr-0198c7a7-5596-7000-bc38-89f1216404ad", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "mr-0198c7a7-5596-7000-bc38-89f1216404ad" + } + ], + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationRequest-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-PrescriptionType-1", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-PrescriptionType-1", + "code": "acute", + "display": "Acute" + } + ] + } + } + ], + "status": "completed", + "intent": "plan", + "medicationReference": { + "reference": "Medication/42292011000001108" + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "authoredOn": "2025-08-20", + "recorder": { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + }, + "requester": { + "agent": { + "reference": "Practitioner/c012a388-1ef7-11ee-a34c-0a58a9feac02" + } + }, + "dosageInstruction": [ + { + "text": "1" + } + ], + "dispenseRequest": { + "validityPeriod": { + "start": "2025-08-20", + "end": "2025-08-20" + }, + "quantity": { + "value": 28, + "unit": "tablet", + "system": "http://snomed.info/sct", + "code": "428673006" + } + }, + "context": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + } + } + }, + { + "resource": { + "resourceType": "MedicationRequest", + "id": "0198c7a7-9109-7072-a6a7-edde2440faf3", + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "0198c7a7-9109-7072-a6a7-edde2440faf3" + } + ], + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-MedicationRequest-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-PrescriptionType-1", + "valueCodeableConcept": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-PrescriptionType-1", + "code": "acute", + "display": "Acute" + } + ] + } + } + ], + "status": "completed", + "basedOn": [ + { + "reference": "MedicationRequest/mr-0198c7a7-5596-7000-bc38-89f1216404ad" + } + ], + "intent": "order", + "medicationReference": { + "reference": "Medication/42292011000001108" + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "authoredOn": "2025-08-20", + "recorder": { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + }, + "requester": { + "agent": { + "reference": "Practitioner/c012a388-1ef7-11ee-a34c-0a58a9feac02" + } + }, + "dosageInstruction": [ + { + "text": "1" + } + ], + "dispenseRequest": { + "validityPeriod": { + "start": "2025-08-20", + "end": "2025-08-20" + }, + "quantity": { + "value": 28, + "unit": "tablet", + "system": "http://snomed.info/sct", + "code": "428673006" + } + } + } + }, + { + "resource": { + "resourceType": "Practitioner", + "id": "c012a388-1ef7-11ee-a34c-0a58a9feac02", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1" + ], + "versionId": "e5e7e5fb232ffe868a8de5a4b310eb91" + }, + "active": true, + "name": [ + { + "use": "official", + "text": "Peter Aldore", + "family": "Aldore", + "given": [ + "Peter" + ] + } + ] + } + }, + { + "resource": { + "resourceType": "PractitionerRole", + "id": "fa09243a6cca0b4987cac40461d71f35", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-PractitionerRole-1" + ] + }, + "practitioner": { + "reference": "Practitioner/c012a388-1ef7-11ee-a34c-0a58a9feac02" + }, + "organization": { + "reference": "Organization/B84012" + } + } + }, + { + "resource": { + "resourceType": "Encounter", + "id": "0198c7a6-b68b-71c7-a01b-b2be38beaec5", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Encounter-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "0198c7a6-b68b-71c7-a01b-b2be38beaec5" + } + ], + "status": "finished", + "type": [ + { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "1269515004", + "display": "Face to face consultation with patient" + } + ], + "text": "Face to face" + } + ], + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "participant": [ + { + "type": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType", + "code": "PPRF", + "display": "Primary Performer" + } + ] + } + ], + "individual": { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + } + }, + { + "type": [ + { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/GPConnect-ParticipantType-1", + "code": "REC", + "display": "Recorder" + } + ] + } + ], + "individual": { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + } + } + ], + "period": { + "start": "2025-08-20T14:24:00+01:00" + }, + "serviceProvider": { + "reference": "Organization/B84012" + } + } + }, + { + "resource": { + "resourceType": "List", + "id": "0198c7a6-b68b-71c7-a01b-b2be38beaec5-consultation", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "status": "current", + "mode": "snapshot", + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "encounter": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "date": "2025-08-20T14:24:08+01:00", + "orderedBy": { + "coding": [ + { + "system": "http://hl7.org/fhir/list-order", + "code": "system", + "display": "Sorted by System" + } + ] + }, + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "325851000000107", + "display": "Consultation" + } + ] + }, + "title": "Face to face consultation with patient", + "entry": [ + { + "item": { + "reference": "List/0198c7a6-b6c4-703f-a99b-68a19119693c" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "id": "0198c7a6-b6c4-703f-a99b-68a19119693c", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "status": "current", + "mode": "snapshot", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "25851000000105", + "display": "Topic (EHR)" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "encounter": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "date": "2025-08-20T14:24:08+01:00", + "orderedBy": { + "coding": [ + { + "system": "http://hl7.org/fhir/list-order", + "code": "system", + "display": "Sorted by System" + } + ] + }, + "title": "Headache", + "entry": [ + { + "item": { + "reference": "List/0198c7a6-b6d9-70d8-8fa3-8d86beb64306" + } + }, + { + "item": { + "reference": "List/0198c7a6-b6ee-72d1-a3aa-988900d1e25a" + } + }, + { + "item": { + "reference": "List/0198c7a6-b6f6-7202-8a77-00fbed2acf23" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "id": "0198c7a6-b6d9-70d8-8fa3-8d86beb64306", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "status": "current", + "mode": "snapshot", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "24781000000107", + "display": "Category (EHR)" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "encounter": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "date": "2025-08-20T14:24:08+01:00", + "orderedBy": { + "coding": [ + { + "system": "http://hl7.org/fhir/list-order", + "code": "system", + "display": "Sorted by System" + } + ] + }, + "title": "History", + "entry": [ + { + "item": { + "reference": "AllergyIntolerance/0198c7a6-df8a-7000-8236-61f548e47963" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "id": "0198c7a6-b6ee-72d1-a3aa-988900d1e25a", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "status": "current", + "mode": "snapshot", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "24781000000107", + "display": "Category (EHR)" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "encounter": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "date": "2025-08-20T14:24:08+01:00", + "orderedBy": { + "coding": [ + { + "system": "http://hl7.org/fhir/list-order", + "code": "system", + "display": "Sorted by System" + } + ] + }, + "title": "Examination", + "entry": [ + { + "item": { + "reference": "Observation/0198c7a7-1b40-7000-b3ee-dc3db6e11353" + } + } + ] + } + }, + { + "resource": { + "resourceType": "Observation", + "id": "0198c7a7-1b40-7000-b3ee-dc3db6e11353", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Observation-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "0198c7a7-1b40-7000-b3ee-dc3db6e11353" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "27113001", + "display": "Body weight", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid", + "extension": [ + { + "url": "descriptionId", + "valueId": "598581000000118" + }, + { + "url": "descriptionDisplay", + "valueString": "Weight" + } + ] + } + ] + } + ], + "text": "Weight" + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "context": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "effectiveDateTime": "2025-08-20", + "issued": "2025-08-20T14:24:43+01:00", + "performer": [ + { + "reference": "Practitioner/01979be5-6c23-726d-9efa-d2998128340d" + }, + { + "reference": "Organization/B84012" + } + ], + "valueQuantity": { + "value": "80", + "unit": "kg", + "system": "http://unitsofmeasure.org", + "code": "kg" + } + } + }, + { + "resource": { + "resourceType": "List", + "id": "0198c7a6-b6f6-7202-8a77-00fbed2acf23", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ], + "security": [ + { + "system": "http://hl7.org/fhir/v3/ActCode", + "code": "NOPAT", + "display": "no disclosure to patient, family or caregivers without attending provider's authorization" + } + ] + }, + "status": "current", + "mode": "snapshot", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "24781000000107", + "display": "Category (EHR)" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "encounter": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + }, + "date": "2025-08-20T14:24:08+01:00", + "orderedBy": { + "coding": [ + { + "system": "http://hl7.org/fhir/list-order", + "code": "system", + "display": "Sorted by System" + } + ] + }, + "title": "Plan", + "entry": [ + { + "item": { + "reference": "MedicationRequest/mr-0198c7a7-5596-7000-bc38-89f1216404ad" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "List of consultations", + "code": { + "coding": [ + { + "display": "List of consultations", + "system": "http://snomed.info/sct", + "code": "1149501000000101" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "Encounter/0198c7a6-b68b-71c7-a01b-b2be38beaec5" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Immunisations", + "code": { + "coding": [ + { + "display": "Immunisations", + "system": "http://snomed.info/sct", + "code": "1102181000000102" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "note": [ + { + "text": "Information not available." + } + ], + "emptyReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-ListEmptyReasonCode-1", + "code": "no-content-recorded", + "display": "No Content Recorded" + } + ] + } + } + }, + { + "resource": { + "resourceType": "Observation", + "id": "0198c7ba-ca2b-707e-9254-28cb0f35a87f", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Observation-1" + ] + }, + "identifier": [ + { + "system": "https://tools.ietf.org/html/rfc4122", + "value": "0198c7ba-ca2b-707e-9254-28cb0f35a87f" + } + ], + "status": "final", + "code": { + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "773011000000101", + "display": "Implied consent for core Summary Care Record dataset upload", + "extension": [ + { + "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid", + "extension": [ + { + "url": "descriptionId", + "valueId": "1726131000000119" + } + ] + } + ] + } + ], + "text": "Implied consent for core Summary Care Record dataset upload" + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "effectiveDateTime": "2025-08-20", + "issued": "2025-08-20T14:46:04+01:00", + "performer": [ + { + "reference": "Organization/B84012" + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Uncategorised data", + "code": { + "coding": [ + { + "display": "Miscellaneous records", + "system": "http://snomed.info/sct", + "code": "826501000000100" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "Observation/0198c7a7-1b40-7000-b3ee-dc3db6e11353" + } + }, + { + "item": { + "reference": "Observation/0198c7ba-ca2b-707e-9254-28cb0f35a87f" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Investigations and results", + "code": { + "coding": [ + { + "display": "Investigations and results", + "system": "http://snomed.info/sct", + "code": "887191000000108" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "note": [ + { + "text": "Information not available." + } + ], + "emptyReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-ListEmptyReasonCode-1", + "code": "no-content-recorded", + "display": "No Content Recorded" + } + ] + } + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Outbound referral", + "code": { + "coding": [ + { + "display": "Outbound referral", + "system": "http://snomed.info/sct", + "code": "792931000000107" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "note": [ + { + "text": "Information not available." + } + ], + "emptyReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-ListEmptyReasonCode-1", + "code": "no-content-recorded", + "display": "No Content Recorded" + } + ] + } + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Patient recall administration", + "code": { + "coding": [ + { + "display": "Patient recall administration", + "system": "http://snomed.info/sct", + "code": "714311000000108" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "note": [ + { + "text": "Information not available." + } + ], + "emptyReason": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-ListEmptyReasonCode-1", + "code": "no-content-recorded", + "display": "No Content Recorded" + } + ] + } + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Medications and medical devices", + "code": { + "coding": [ + { + "display": "Medications and medical devices", + "system": "http://snomed.info/sct", + "code": "933361000000108" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "MedicationStatement/ms-0198c7a7-5596-7000-bc38-89f1216404ad" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Consultations - allergies contained in consultations", + "code": { + "coding": [ + { + "display": "Consultations - allergies contained in consultations", + "system": "https://fhir.hl7.org.uk/STU3/CodeSystem/GPConnect-SecondaryListValues-1", + "code": "consultations-allergies-contained-in-consultations" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "AllergyIntolerance/0198c7a6-df8a-7000-8236-61f548e47963" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Consultations - medications contained in consultations", + "code": { + "coding": [ + { + "display": "Consultations - medications contained in consultations", + "system": "https://fhir.hl7.org.uk/STU3/CodeSystem/GPConnect-SecondaryListValues-1", + "code": "consultations-medications-contained-in-consultations" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "MedicationStatement/ms-0198c7a7-5596-7000-bc38-89f1216404ad" + } + } + ] + } + }, + { + "resource": { + "resourceType": "List", + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1" + ] + }, + "status": "current", + "mode": "snapshot", + "title": "Consultations - uncategorised data contained in consultations", + "code": { + "coding": [ + { + "display": "Consultations - uncategorised data contained in consultations", + "system": "https://fhir.hl7.org.uk/STU3/CodeSystem/GPConnect-SecondaryListValues-1", + "code": "consultations-uncategorised-data-contained-in-consultations" + } + ] + }, + "subject": { + "reference": "Patient/0198c7a5-79c9-724d-a5a3-9f2f1be9bbd7" + }, + "entry": [ + { + "item": { + "reference": "Observation/0198c7a7-1b40-7000-b3ee-dc3db6e11353" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/service/src/test/resources/ehr/request/fhir/output/expected_xml_without_duplicated_medication_resources.xml b/service/src/test/resources/ehr/request/fhir/output/expected_xml_without_duplicated_medication_resources.xml new file mode 100644 index 0000000000..d60e37d266 --- /dev/null +++ b/service/src/test/resources/ehr/request/fhir/output/expected_xml_without_duplicated_medication_resources.xml @@ -0,0 +1,446 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unknown + + + + Spring Hall Group Practice + + + + + + + + + Unknown + + + + Adrian + Tye + + + + Spring Hall Group Practice + + + 101 Yvonne Falls + West Carey + MK3 7SA + + + + + + + + + Unknown + + + + Peter + Aldore + + + + Spring Hall Group Practice + + + 101 Yvonne Falls + West Carey + MK3 7SA + + + + + + + + + + + Face to face + + + +
+ + + + + + + + + + + + + + Headache + + + +
+ + + + + + + History + + + +
+ + + + + + + + +
+ + + + + + + Allergy to pollen + + + +
+ + + + + + Status: Active Reaction 1 Severity: MILD Manifestation(s): NoInformation + + + + + + + + + + + + + + + + + + + + + + Examination + + + +
+ + + + + + + Weight + + + +
+ + + + + + + + + + + + + + + + Plan + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tablet + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tablet + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + Implied consent for core Summary Care Record dataset upload + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From ddfc7a08941241128d02e152faca30e917c933cb Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:26:18 +0100 Subject: [PATCH 06/20] refactoring and test fix --- .../mapper/NonConsultationResourceMapper.java | 57 ++++++++++++------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java index e0da1db427..18e12398b0 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java @@ -26,6 +26,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import uk.nhs.adaptors.gp2gp.common.service.RandomIdGeneratorService; +import uk.nhs.adaptors.gp2gp.ehr.exception.EhrMapperException; import uk.nhs.adaptors.gp2gp.ehr.mapper.parameters.EncounterTemplateParameters; import uk.nhs.adaptors.gp2gp.ehr.mapper.parameters.EncounterTemplateParameters.EncounterTemplateParametersBuilder; import uk.nhs.adaptors.gp2gp.ehr.utils.BloodPressureValidator; @@ -34,6 +35,8 @@ import uk.nhs.adaptors.gp2gp.ehr.utils.TemplateUtils; import uk.nhs.adaptors.gp2gp.ehr.utils.XpathExtractor; +import javax.swing.text.html.Option; + @RequiredArgsConstructor(onConstructor = @__(@Autowired)) @Component @Slf4j @@ -73,30 +76,13 @@ public class NonConsultationResourceMapper { ); public List mapRemainingResourcesToEhrCompositions(Bundle bundle) { - var mappedResources = bundle.getEntry() - .stream() + + + var mappedResources = bundle.getEntry().stream() .map(Bundle.BundleEntryComponent::getResource) .filter(this::isMappableNonConsultationResource) .sorted(this::compareProcessingOrder) - .filter(resource -> { - if (hasIdBeenMapped(resource) || isIgnoredResource(resource)) { - return false; - } - - if (resource instanceof MedicationRequest medicationRequest) { - - if (!medicationRequest.hasBasedOn() || medicationRequest.getBasedOn().isEmpty()) { - return true; - } - - String referenceId = medicationRequest.getBasedOn().getFirst().getReference(); - //String medRequestId = reference.replaceFirst("MedicationRequest/", ""); - var referencedResource = messageContext.getInputBundleHolder().getResource(new IdType(referenceId)); - return referencedResource.isEmpty() || !hasIdBeenMapped(referencedResource.get()); - } - return true; - }) - //.filter(resource -> !hasIdBeenMapped(resource) && !isIgnoredResource(resource)) + .filter(this::shouldMapResource) .map(this::mapResourceToEhrComposition) .flatMap(Optional::stream) .collect(Collectors.toList()); @@ -120,6 +106,35 @@ public List mapRemainingResourcesToEhrCompositions(Bundle bundle) { return mappedResources; } + private boolean shouldMapResource(Resource resource) { + if (hasIdBeenMapped(resource) || isIgnoredResource(resource)) { + return false; + } + if (resource instanceof MedicationRequest medicationRequest) { + return shouldMapMedicationRequest(medicationRequest); + } + return true; + } + + private boolean shouldMapMedicationRequest(MedicationRequest medicationRequest) { + if (!medicationRequest.hasBasedOn() || medicationRequest.getBasedOn().isEmpty()) { + return true; + } + + String referenceId = medicationRequest.getBasedOn().getFirst().getReference(); + + try { + Optional referencedResource = + messageContext.getInputBundleHolder().getResource(new IdType(referenceId)); + + return referencedResource.isEmpty() || !hasIdBeenMapped(referencedResource.get()); + + } catch (EhrMapperException e) { + LOGGER.info("MedicationRequest {} cannot be mapped", referenceId); + return true; + } + } + private Resource replaceId(Resource resource) { resource.setIdElement(new IdType(resource.getResourceType().name(), randomIdGeneratorService.createNewId())); return resource; From 45cefd7e812fc8445034938c6b4477a505ca3df1 Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:37:05 +0100 Subject: [PATCH 07/20] checkstyle --- .../gp2gp/ehr/mapper/NonConsultationResourceMapper.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java index 18e12398b0..9d779cd8b9 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java @@ -35,8 +35,6 @@ import uk.nhs.adaptors.gp2gp.ehr.utils.TemplateUtils; import uk.nhs.adaptors.gp2gp.ehr.utils.XpathExtractor; -import javax.swing.text.html.Option; - @RequiredArgsConstructor(onConstructor = @__(@Autowired)) @Component @Slf4j From 093809e7c83ccc5e9a8905f56350ec511c480b00 Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:45:13 +0100 Subject: [PATCH 08/20] refactoring code and tests --- .../mapper/NonConsultationResourceMapper.java | 6 +---- .../mapper/EhrExtractMapperComponentTest.java | 25 +++++++------------ 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java index 9d779cd8b9..ce7645bed8 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java @@ -75,7 +75,6 @@ public class NonConsultationResourceMapper { public List mapRemainingResourcesToEhrCompositions(Bundle bundle) { - var mappedResources = bundle.getEntry().stream() .map(Bundle.BundleEntryComponent::getResource) .filter(this::isMappableNonConsultationResource) @@ -122,11 +121,8 @@ private boolean shouldMapMedicationRequest(MedicationRequest medicationRequest) String referenceId = medicationRequest.getBasedOn().getFirst().getReference(); try { - Optional referencedResource = - messageContext.getInputBundleHolder().getResource(new IdType(referenceId)); - + Optional referencedResource = messageContext.getInputBundleHolder().getResource(new IdType(referenceId)); return referencedResource.isEmpty() || !hasIdBeenMapped(referencedResource.get()); - } catch (EhrMapperException e) { LOGGER.info("MedicationRequest {} cannot be mapped", referenceId); return true; diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java index 2a2abf38d5..cf33f7003c 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractMapperComponentTest.java @@ -41,23 +41,20 @@ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) -public class EhrExtractMapperComponentTest { +class EhrExtractMapperComponentTest { private static final String TEST_FILE_DIRECTORY = "/ehr/request/fhir/"; private static final String INPUT_DIRECTORY = "input/"; private static final String OUTPUT_DIRECTORY = "output/"; private static final String INPUT_PATH = TEST_FILE_DIRECTORY + INPUT_DIRECTORY; private static final String OUTPUT_PATH = TEST_FILE_DIRECTORY + OUTPUT_DIRECTORY; - private static final String JSON_INPUT_FILE = "gpc-access-structured.json"; private static final String JSON_INPUT_FILE_WITH_NOPAT = "gpc-access-structured-with-nopat.json"; private static final String DUPLICATE_RESOURCE_BUNDLE = INPUT_PATH + "duplicated-resource-bundle.json"; private static final String ONE_CONSULTATION_RESOURCE_BUNDLE = INPUT_PATH + "1-consultation-resource.json"; private static final String FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS = "fhir_bundle_with_duplicated_medication_requests.json"; - private static final String EXPECTED_XML_FOR_ONE_CONSULTATION_RESOURCE = "ExpectedResponseFrom1ConsultationResponse.xml"; - private static final String EXPECTED_XML_WITHOUT_DUPLICATED_RESOURCES = "expected_xml_without_duplicated_medication_resources.xml"; private static final String EXPECTED_XML_TO_JSON_FILE = "expected-ehr-extract-response-from-json.xml"; private static final String EXPECTED_XML_TO_JSON_FILE_WITH_NOPAT = "expected-ehr-extract-response-from-json-with-nopat.xml"; @@ -235,7 +232,7 @@ public void tearDown() { } @Test - public void When_MappingUncategorizedObservationWithNOPAT_Expect_ObservationStatementWithConfidentialityCode() { + void When_MappingUncategorizedObservationWithNOPAT_Expect_ObservationStatementWithConfidentialityCode() { String expectedJsonToXmlContent = ResourceTestFileUtils.getFileContent(OUTPUT_PATH + EXPECTED_XML_TO_JSON_FILE_WITH_NOPAT); String inputJsonFileContent = ResourceTestFileUtils.getFileContent(INPUT_PATH + JSON_INPUT_FILE_WITH_NOPAT); @@ -263,7 +260,7 @@ public void When_MappingUncategorizedObservationWithNOPAT_Expect_ObservationStat @ParameterizedTest @MethodSource("testData") - public void When_MappingProperJsonRequestBody_Expect_ProperXmlOutput(String input, String expected) { + void When_MappingProperJsonRequestBody_Expect_ProperXmlOutput(String input, String expected) { String expectedJsonToXmlContent = ResourceTestFileUtils.getFileContent(OUTPUT_PATH + expected); String inputJsonFileContent = ResourceTestFileUtils.getFileContent(INPUT_PATH + input); Bundle bundle = new FhirParseService().parseResource(inputJsonFileContent, Bundle.class); @@ -278,10 +275,10 @@ public void When_MappingProperJsonRequestBody_Expect_ProperXmlOutput(String inpu assertThat(output).isEqualToIgnoringWhitespace(expectedJsonToXmlContent); } - @ParameterizedTest - @MethodSource("testDataWithDuplicatedMedicationRequestResources") - public void When_MappingProperJsonRequestBody_Expect_NonDuplicatedMedicationRequestRemainingResources(String input, String expected) { - String inputJsonFileContent = ResourceTestFileUtils.getFileContent(INPUT_PATH + input); + @Test + void When_MappingProperJsonRequestBody_Expect_NonDuplicatedMedicationRequestRemainingResources() { + String inputJsonFileContent = + ResourceTestFileUtils.getFileContent(INPUT_PATH + FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS); Bundle bundle = new FhirParseService().parseResource(inputJsonFileContent, Bundle.class); messageContext.initialize(bundle); @@ -292,10 +289,6 @@ public void When_MappingProperJsonRequestBody_Expect_NonDuplicatedMedicationRequ assertThat(ehrExtractTemplateParameters.getComponents()).hasSize(2); } - private static Stream testDataWithDuplicatedMedicationRequestResources() { - return Stream.of(Arguments.of(FHIR_BUNDLE_WITH_DUPLICATED_MEDICATION_REQUESTS, EXPECTED_XML_WITHOUT_DUPLICATED_RESOURCES)); - } - private static Stream testData() { return Stream.of( Arguments.of(JSON_INPUT_FILE, EXPECTED_XML_TO_JSON_FILE), @@ -310,7 +303,7 @@ private static Stream testData() { } @Test - public void When_MappingJsonBody_Expect_OnlyOneConsultationResource() { + void When_MappingJsonBody_Expect_OnlyOneConsultationResource() { String expectedJsonToXmlContent = ResourceTestFileUtils.getFileContent(OUTPUT_PATH + EXPECTED_XML_FOR_ONE_CONSULTATION_RESOURCE); String inputJsonFileContent = ResourceTestFileUtils.getFileContent(ONE_CONSULTATION_RESOURCE_BUNDLE); Bundle bundle = new FhirParseService().parseResource(inputJsonFileContent, Bundle.class); @@ -324,7 +317,7 @@ public void When_MappingJsonBody_Expect_OnlyOneConsultationResource() { } @Test - public void When_TransformingResourceToEhrComp_Expect_NoDuplicateMappings() { + void When_TransformingResourceToEhrComp_Expect_NoDuplicateMappings() { String bundle = ResourceTestFileUtils.getFileContent(DUPLICATE_RESOURCE_BUNDLE); Bundle parsedBundle = new FhirParseService().parseResource(bundle, Bundle.class); messageContext.initialize(parsedBundle); From 2db595783adce4167218a776dc7443e2d512300f Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 9 Sep 2025 16:57:38 +0100 Subject: [PATCH 09/20] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe784a660..d7bda148fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +* Prevent duplicate processing: after a medication request is processed, the system no longer pulls a subsequent non‑consultation item based on the same request. + ### Added * The GP2GP Adaptor now adds the EhrComposition / confidentialityCode field when Encounter.meta.security contains NOPAT security entry * The GP2GP Adaptor now populates the ObservationStatement / confidentialityCode field when the .meta.security field of an Uncategorized Data Observation contains NOPAT From b63993a740c224f69fe0a2242106205f5dc35b9c Mon Sep 17 00:00:00 2001 From: MartinWheelerMT Date: Wed, 10 Sep 2025 09:51:01 +0100 Subject: [PATCH 10/20] * Update arcmutate plugin --- service/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/build.gradle b/service/build.gradle index 7781cd7351..a02b3a8aef 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -9,7 +9,7 @@ plugins { id 'org.sonarqube' version '6.2.0.5505' // Mutation testing - id 'info.solidsoft.pitest' version '1.15.0' + id 'info.solidsoft.pitest' version '1.19.0-rc.1' id 'com.arcmutate.github' version '2.2.3' } From b84fbd7776931399788df0b142a26cb0c46e1d87 Mon Sep 17 00:00:00 2001 From: MartinWheelerMT Date: Wed, 10 Sep 2025 10:04:20 +0100 Subject: [PATCH 11/20] * Downgradle plugin for arc mutate as was updated by dependabot --- service/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/build.gradle b/service/build.gradle index a02b3a8aef..9a48654a76 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -9,8 +9,8 @@ plugins { id 'org.sonarqube' version '6.2.0.5505' // Mutation testing - id 'info.solidsoft.pitest' version '1.19.0-rc.1' - id 'com.arcmutate.github' version '2.2.3' + id 'info.solidsoft.pitest' version '1.15.0' + id 'com.arcmutate.github' version '1.3.2' } apply plugin: 'java' From e3870fb943c88568a4bdcfe62e5acbb56eba9fd2 Mon Sep 17 00:00:00 2001 From: MartinWheelerMT Date: Wed, 10 Sep 2025 10:09:54 +0100 Subject: [PATCH 12/20] * Downgradle plugin for arc mutate as was updated by dependabot --- service/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/build.gradle b/service/build.gradle index 9a48654a76..7781cd7351 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -10,7 +10,7 @@ plugins { // Mutation testing id 'info.solidsoft.pitest' version '1.15.0' - id 'com.arcmutate.github' version '1.3.2' + id 'com.arcmutate.github' version '2.2.3' } apply plugin: 'java' From 1866c959090dd9f3c7ab16f60cf5729b691bde9f Mon Sep 17 00:00:00 2001 From: MartinWheelerMT Date: Wed, 10 Sep 2025 10:14:42 +0100 Subject: [PATCH 13/20] * Downgradle plugin for git-plugin as was updated by dependabot --- service/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/build.gradle b/service/build.gradle index 7781cd7351..8a94da1589 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -76,7 +76,7 @@ dependencies { testImplementation 'com.adobe.testing:s3mock-testcontainers:4.7.0' pitest 'com.arcmutate:base:1.3.2' - pitest 'com.arcmutate:pitest-git-plugin:2.2.4' + pitest 'com.arcmutate:pitest-git-plugin:2.1.0' } test { From 231dbb818e5b2fbe2395b9a534695e3da11d022e Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Wed, 10 Sep 2025 15:49:46 +0100 Subject: [PATCH 14/20] pitest --- .../mapper/NonConsultationResourceMapper.java | 4 +- .../mapper/EhrExtractResourceMapperTest.java | 75 +++++++++++++++++++ 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java index ce7645bed8..e618f84c8b 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java @@ -103,7 +103,7 @@ public List mapRemainingResourcesToEhrCompositions(Bundle bundle) { return mappedResources; } - private boolean shouldMapResource(Resource resource) { + boolean shouldMapResource(Resource resource) { if (hasIdBeenMapped(resource) || isIgnoredResource(resource)) { return false; } @@ -113,7 +113,7 @@ private boolean shouldMapResource(Resource resource) { return true; } - private boolean shouldMapMedicationRequest(MedicationRequest medicationRequest) { + boolean shouldMapMedicationRequest(MedicationRequest medicationRequest) { if (!medicationRequest.hasBasedOn() || medicationRequest.getBasedOn().isEmpty()) { return true; } diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java new file mode 100644 index 0000000000..a2d1867024 --- /dev/null +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java @@ -0,0 +1,75 @@ +package uk.nhs.adaptors.gp2gp.ehr.mapper; + +import org.hl7.fhir.dstu3.model.IdType; +import org.hl7.fhir.dstu3.model.MedicationRequest; +import org.hl7.fhir.dstu3.model.Reference; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.mockito.junit.jupiter.MockitoSettings; +import org.mockito.quality.Strictness; +import java.util.Optional; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) +@MockitoSettings(strictness = Strictness.LENIENT) +class EhrExtractResourceMapperTest { + + @Mock + private MessageContext messageContext; + + @Mock + private InputBundle inputBundleHolder; + + @Mock + private IdMapper idMapper; + + @InjectMocks + private NonConsultationResourceMapper resourceMapper; + + @BeforeEach + public void setUp() { + when(messageContext.getInputBundleHolder()).thenReturn(inputBundleHolder); + when(messageContext.getIdMapper()).thenReturn(idMapper); + when(idMapper.hasIdBeenMapped(any(), any())).thenReturn(false); + } + + @AfterEach + public void tearDown() { + messageContext.resetMessageContext(); + } + + @Test + void When_ReferencedResourceIsEmpty_Expect_MapMedicationRequest() { + + MedicationRequest medRequest = new MedicationRequest(); + medRequest.setId("MedicationRequest/1"); + medRequest.addBasedOn(new Reference("ServiceRequest/123")); + when(inputBundleHolder.getResource(new IdType("ServiceRequest/123"))).thenReturn(Optional.empty()); + + boolean result = resourceMapper.shouldMapResource(medRequest); + + assertTrue(result); + } + + @Test + void When_ReferencedResourceHasNotBeenMapped_Expect_MapMedicationRequest() { + + MedicationRequest medRequest = new MedicationRequest(); + medRequest.setId("MedicationRequest/1"); + medRequest.addBasedOn(new Reference("ServiceRequest/123")); + when(inputBundleHolder.getResource(new IdType("ServiceRequest/123"))).thenReturn( + Optional.ofNullable(new MedicationRequest().setId("111"))); + + boolean result = resourceMapper.shouldMapResource(medRequest); + + assertTrue(result); + } + +} From 09907dc2111562128644cbc6f915e2a552fe06bd Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Wed, 10 Sep 2025 16:41:15 +0100 Subject: [PATCH 15/20] pitest --- .../ehr/mapper/EhrExtractResourceMapperTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java index a2d1867024..4203c2f066 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java @@ -13,6 +13,8 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; import java.util.Optional; + +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; @@ -72,4 +74,18 @@ void When_ReferencedResourceHasNotBeenMapped_Expect_MapMedicationRequest() { assertTrue(result); } + @Test + void When_ReferencedResourceHasBeenMapped_Expect_MedicationRequestIsNotMapped() { + + MedicationRequest medRequest = new MedicationRequest(); + medRequest.setId("MedicationRequest/1"); + medRequest.addBasedOn(new Reference("ServiceRequest/123")); + when(inputBundleHolder.getResource(new IdType("ServiceRequest/123"))).thenReturn(Optional.empty()); + when(idMapper.hasIdBeenMapped(any(), any())).thenReturn(true); + + boolean result = resourceMapper.shouldMapResource(medRequest); + + assertFalse(result); + } + } From 2232e119894360a8ebcf2edecc34be7f5d50e15c Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:00:16 +0100 Subject: [PATCH 16/20] pitest --- .../ehr/mapper/EhrExtractResourceMapperTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java index 4203c2f066..36505412f4 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java @@ -88,4 +88,15 @@ void When_ReferencedResourceHasBeenMapped_Expect_MedicationRequestIsNotMapped() assertFalse(result); } + @Test + void When_ReferencedResourceHasNoBasedOn_Expect_MedicationRequestShouldBeMapped() { + + MedicationRequest medRequest = new MedicationRequest(); + medRequest.setId("MedicationRequest/1"); + + boolean result = resourceMapper.shouldMapResource(medRequest); + + assertTrue(result); + } + } From fc7eeea7ab652d0a5891c581f2348509dc212a9f Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Thu, 11 Sep 2025 11:31:52 +0100 Subject: [PATCH 17/20] code refactoring --- .../gp2gp/ehr/mapper/NonConsultationResourceMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java index e618f84c8b..39becdbaa6 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/NonConsultationResourceMapper.java @@ -114,7 +114,7 @@ boolean shouldMapResource(Resource resource) { } boolean shouldMapMedicationRequest(MedicationRequest medicationRequest) { - if (!medicationRequest.hasBasedOn() || medicationRequest.getBasedOn().isEmpty()) { + if (!medicationRequest.hasBasedOn()) { return true; } From bc467ecb19a5f4fb4de7de62d8c94b39dccbfc14 Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:17:10 +0100 Subject: [PATCH 18/20] pitest --- .../mapper/EhrExtractResourceMapperTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java index 36505412f4..06f2689dd5 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java @@ -9,9 +9,13 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.mockito.MockedStatic; +import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; +import uk.nhs.adaptors.gp2gp.ehr.utils.IgnoredResourcesUtils; +import org.hl7.fhir.dstu3.model.ResourceType; import java.util.Optional; import static org.junit.Assert.assertFalse; @@ -99,4 +103,17 @@ void When_ReferencedResourceHasNoBasedOn_Expect_MedicationRequestShouldBeMapped( assertTrue(result); } + @Test + void When_ReferencedResourceHasBeenIgnored_Expect_MedicationRequestShouldNotBeMapped() { + + MedicationRequest medRequest = new MedicationRequest(); + + MockedStatic ignoredResourceMock = Mockito.mockStatic(IgnoredResourcesUtils.class); + ignoredResourceMock.when(() -> IgnoredResourcesUtils.isIgnoredResourceType(ResourceType.MedicationRequest)).thenReturn(true); + + boolean result = resourceMapper.shouldMapResource(medRequest); + + assertFalse(result); + } + } From 71364c37c855ec0f97c4e8b7610abe9787dba306 Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Thu, 11 Sep 2025 13:42:17 +0100 Subject: [PATCH 19/20] adding another pitest --- .../ehr/mapper/EhrExtractResourceMapperTest.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java index 06f2689dd5..0fb84fcec3 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/EhrExtractResourceMapperTest.java @@ -2,6 +2,7 @@ import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.MedicationRequest; +import org.hl7.fhir.dstu3.model.QuestionnaireResponse; import org.hl7.fhir.dstu3.model.Reference; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -105,15 +106,17 @@ void When_ReferencedResourceHasNoBasedOn_Expect_MedicationRequestShouldBeMapped( @Test void When_ReferencedResourceHasBeenIgnored_Expect_MedicationRequestShouldNotBeMapped() { + QuestionnaireResponse questionnaireResp = new QuestionnaireResponse(); + questionnaireResp.setId("MedicationRequest/1"); - MedicationRequest medRequest = new MedicationRequest(); + try (MockedStatic ignoredMock = Mockito.mockStatic(IgnoredResourcesUtils.class)) { - MockedStatic ignoredResourceMock = Mockito.mockStatic(IgnoredResourcesUtils.class); - ignoredResourceMock.when(() -> IgnoredResourcesUtils.isIgnoredResourceType(ResourceType.MedicationRequest)).thenReturn(true); + ignoredMock.when(() -> IgnoredResourcesUtils.isIgnoredResourceType(ResourceType.QuestionnaireResponse)).thenReturn(true); - boolean result = resourceMapper.shouldMapResource(medRequest); + boolean result = resourceMapper.shouldMapResource(questionnaireResp); - assertFalse(result); + assertFalse(result); + } } } From 637610c2e935b6690e2711f9501d01ba2532169d Mon Sep 17 00:00:00 2001 From: ORybak5 <12736698+ORybak5@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:20:42 +0100 Subject: [PATCH 20/20] indentation --- service/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/service/build.gradle b/service/build.gradle index 73ba9197d4..695cdf339f 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -86,11 +86,11 @@ dependencies { testImplementation 'com.squareup.okhttp3:mockwebserver3:5.1.0' testImplementation 'com.adobe.testing:s3mock-testcontainers:4.7.0' - spotbugs 'com.github.spotbugs:spotbugs:4.9.5' - spotbugs 'com.github.spotbugs:spotbugs-annotations:4.9.5' + spotbugs 'com.github.spotbugs:spotbugs:4.9.5' + spotbugs 'com.github.spotbugs:spotbugs-annotations:4.9.5' - pitest 'com.arcmutate:base:1.3.2' - pitest 'com.arcmutate:pitest-git-plugin:2.1.0' + pitest 'com.arcmutate:base:1.3.2' + pitest 'com.arcmutate:pitest-git-plugin:2.1.0' } test {