Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIAD-3217 - Send Observation (Test Result) when they do not have a Specimen attached to them #963

Open
wants to merge 91 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 88 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
463956b
[NIAD-3217] Add test data
martin-nhs Oct 23, 2024
1fdc9e0
[NIAD-3217] Rename test data filename for clarity
martin-nhs Oct 23, 2024
2b17133
[NIAD-3217] Create initial test skeleton
martin-nhs Oct 24, 2024
80b83cf
Merge branch 'main' into NIAD-3217
martin-nhs Oct 24, 2024
e032788
[NIAD-3217] Basic test implementation, fixed test data
martin-nhs Oct 25, 2024
65d36d0
Minor changes.
Alex-Nita Oct 30, 2024
df9bd62
Adding JSON and XML files for unit tests
stevenmccullaghmadetech Nov 1, 2024
48c16b7
Adding missing specimen
stevenmccullaghmadetech Nov 4, 2024
4da233e
Adding basic test case
stevenmccullaghmadetech Nov 4, 2024
ff830ba
Adjust format of JSON
stevenmccullaghmadetech Nov 4, 2024
3a7c375
Fixed test data
Alex-Nita Nov 4, 2024
553d2e2
Added logic for creating and assigning dummy specimens.
Alex-Nita Nov 5, 2024
7a5be66
Improve test name
stevenmccullaghmadetech Nov 5, 2024
af99965
Added better assertion.
Alex-Nita Nov 5, 2024
5032009
Cleaner
stevenmccullaghmadetech Nov 5, 2024
f5afeb8
Break lines up for readability.
stevenmccullaghmadetech Nov 5, 2024
fd5bf52
Adding conditions for both types of test result, linked and unlinked
stevenmccullaghmadetech Nov 5, 2024
5b51bde
Changed matches to contains
stevenmccullaghmadetech Nov 5, 2024
a08509e
Check the ids of dummy specimens map to the expected observations
stevenmccullaghmadetech Nov 5, 2024
983e4ab
Making code more DRY.
stevenmccullaghmadetech Nov 5, 2024
84dce4a
Refactoring the logic for assigning specimens to observations.
Alex-Nita Nov 5, 2024
79dffa3
Merge branch 'NIAD-3217' of https://github.com/NHSDigital/integration…
Alex-Nita Nov 5, 2024
d511258
Added check for orphaned results before dummy specimens are assigned.
Alex-Nita Nov 5, 2024
cc146ea
Added better marking in tests for mapped specimens.
Alex-Nita Nov 6, 2024
71cdc9f
Fixed test data from ehr extract mapper.
Alex-Nita Nov 6, 2024
b978804
Merge branch 'main' into NIAD-3217
Alex-Nita Nov 6, 2024
57f792f
Fixed checkstyle violations
Alex-Nita Nov 6, 2024
5aeea1e
Fixed checkstyle violations in the test file
Alex-Nita Nov 6, 2024
4370cba
Updating test result XML
stevenmccullaghmadetech Nov 7, 2024
4002ef9
Updating test result XML
stevenmccullaghmadetech Nov 7, 2024
b4abbbc
Merge branch 'NIAD-3217' of https://github.com/NHSDigital/integration…
Alex-Nita Nov 7, 2024
38b9eef
Reverted some unnecessary changes
Alex-Nita Nov 7, 2024
5641eb7
Reverted unnecessary change
Alex-Nita Nov 7, 2024
c2433e3
Reverted unnecessary change
Alex-Nita Nov 7, 2024
05b6209
Reverted unnecessary change
Alex-Nita Nov 7, 2024
545ecab
Scenario: Diagnostic Report with no Specimen or Observation
stevenmccullaghmadetech Nov 7, 2024
dd1a5fc
Updating mapped dummy observations test cases
stevenmccullaghmadetech Nov 7, 2024
fb9d12d
Linking dummy observations to dummy specimen
stevenmccullaghmadetech Nov 7, 2024
663c0a3
Adding injected dummy specimen
stevenmccullaghmadetech Nov 7, 2024
2f29e6c
Adding injected block from scenario where the only changes made are t…
stevenmccullaghmadetech Nov 8, 2024
13c6ea7
Removing superfluous XML, generated by our other changed tests.
stevenmccullaghmadetech Nov 8, 2024
6a270e4
Removed unused import
Alex-Nita Nov 11, 2024
92b9c30
Adjusting indention
stevenmccullaghmadetech Nov 11, 2024
a1163fc
Adjusting indentation
stevenmccullaghmadetech Nov 11, 2024
297b9d7
Adjusting indentation
stevenmccullaghmadetech Nov 11, 2024
5f5d31a
Adjust indentation
stevenmccullaghmadetech Nov 11, 2024
6bf1f21
Adjusting indentation
stevenmccullaghmadetech Nov 11, 2024
f11a18b
Adjusting indentation
stevenmccullaghmadetech Nov 11, 2024
52dda17
Adjusting indentation
stevenmccullaghmadetech Nov 11, 2024
3a16cbf
Adjust indentation
stevenmccullaghmadetech Nov 11, 2024
03eea81
Adjusting whitespace
stevenmccullaghmadetech Nov 11, 2024
d81a55b
Fixing whitespace
stevenmccullaghmadetech Nov 11, 2024
05887ca
Adjust whitespace
stevenmccullaghmadetech Nov 11, 2024
22c05ea
Adjust Whitespace
Alex-Nita Nov 12, 2024
2082116
Adjust Whitespace
Alex-Nita Nov 12, 2024
1ef50df
Adjust Whitespace
Alex-Nita Nov 12, 2024
cccf39c
Adjust Whitespace
Alex-Nita Nov 12, 2024
844cb90
Adjust Whitespace
Alex-Nita Nov 12, 2024
fdc3bd7
Adjust whitespace
Alex-Nita Nov 12, 2024
eb8eb57
Adjust Whitespace
Alex-Nita Nov 12, 2024
1f4bfbe
Adjust Whitespace
Alex-Nita Nov 12, 2024
bfff936
Adjust Whitespace
Alex-Nita Nov 12, 2024
84cc604
Adjust Whitespace
Alex-Nita Nov 12, 2024
e0ffd56
Adjusted Whitespace
Alex-Nita Nov 12, 2024
0518832
Adjusted Whitespace
Alex-Nita Nov 12, 2024
b168f8b
Adjusted Whitespace
Alex-Nita Nov 12, 2024
e589b9b
Adjusted Whitespace
Alex-Nita Nov 12, 2024
b4090a6
Adjusted Whitespace
Alex-Nita Nov 12, 2024
656e384
Adjusted Whitespace
Alex-Nita Nov 12, 2024
5a854f1
Adjusted Whitespace
Alex-Nita Nov 12, 2024
913631b
Adjusted Whitespace
Alex-Nita Nov 12, 2024
ea96588
Merge remote-tracking branch 'origin/main' into NIAD-3217
adrianclay Nov 13, 2024
9b83a08
Remove test file which appears to be duplicate
adrianclay Nov 13, 2024
97d6bd4
Remove unused test file
adrianclay Nov 13, 2024
baf4a8a
Remove unused Observation
adrianclay Nov 13, 2024
58eb397
Remove unused Observation
adrianclay Nov 13, 2024
b7a998d
Replaces references to Observation for one which already exists in bu…
adrianclay Nov 13, 2024
b53d885
Reverted test test files with filing comments associated with specimens
Alex-Nita Nov 13, 2024
f630524
Removed filtering of filing comments from Specimen mapper and added i…
Alex-Nita Nov 13, 2024
99f4f83
Moved filing comment filter to diagnostic report mapper
Alex-Nita Nov 13, 2024
75738f2
Reverted expected-components-1.xml
Alex-Nita Nov 13, 2024
9051dbb
Updated test file
Alex-Nita Nov 13, 2024
69b58ca
Renamed methods.
Alex-Nita Nov 13, 2024
93c2eb9
Renamed Variable
Alex-Nita Nov 13, 2024
b7e60d6
Renamed variable
Alex-Nita Nov 13, 2024
fea624b
Fixed indentation
Alex-Nita Nov 13, 2024
db4bec9
Fixed whitespace
Alex-Nita Nov 13, 2024
efddaef
Removed redundant test.
Alex-Nita Nov 13, 2024
47656e5
Add new lines to make test file clearer
adrianclay Nov 14, 2024
c07f007
Refactoring
Alex-Nita Nov 14, 2024
30ad880
Added changelog entry
Alex-Nita Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
import static uk.nhs.adaptors.gp2gp.ehr.mapper.CommentType.LABORATORY_RESULT_COMMENT;
import static uk.nhs.adaptors.gp2gp.ehr.mapper.diagnosticreport.ObservationMapper.NARRATIVE_STATEMENT_TEMPLATE;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand Down Expand Up @@ -73,13 +75,18 @@
private final ConfidentialityService confidentialityService;

public String mapDiagnosticReportToCompoundStatement(DiagnosticReport diagnosticReport) {
List<Specimen> specimens = fetchSpecimens(diagnosticReport);
List<Observation> observations = fetchObservations(diagnosticReport);
List<Specimen> specimens = fetchSpecimens(diagnosticReport, observations);
final IdMapper idMapper = messageContext.getIdMapper();
markObservationsAsProcessed(idMapper, observations);
observations = assignDummySpecimensToObservationsWithNoSpecimen(observations, specimens);
Alex-Nita marked this conversation as resolved.
Show resolved Hide resolved

List<Observation> observationsExcludingFilingComments = observations.stream()
.filter(Predicate.not(DiagnosticReportMapper::isFilingComment))
.toList();

String mappedSpecimens = specimens.stream()
.map(specimen -> specimenMapper.mapSpecimenToCompoundStatement(specimen, observations, diagnosticReport))
.map(specimen -> specimenMapper.mapSpecimenToCompoundStatement(specimen, observationsExcludingFilingComments, diagnosticReport))
.collect(Collectors.joining());

String reportLevelNarrativeStatements = prepareReportLevelNarrativeStatements(diagnosticReport, observations);
Expand Down Expand Up @@ -113,21 +120,60 @@
.orElse(StringUtils.EMPTY);
}

private List<Specimen> fetchSpecimens(DiagnosticReport diagnosticReport) {
if (!diagnosticReport.hasSpecimen()) {
return Collections.singletonList(generateDefaultSpecimen(diagnosticReport));
private List<Specimen> fetchSpecimens(DiagnosticReport diagnosticReport, List<Observation> observations) {

List<Specimen> specimens = new ArrayList<>();

// At least one specimen is required to exist for any DiagnosticReport, according to the mim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where in the mim did you see that?

if (!diagnosticReport.hasSpecimen() || hasObservationsWithoutSpecimen(observations)) {
specimens.add(generateDummySpecimen(diagnosticReport));
}

var inputBundleHolder = messageContext.getInputBundleHolder();
return diagnosticReport.getSpecimen()
List<Specimen> nonDummySpecimens = diagnosticReport.getSpecimen()
.stream()
.map(specimenReference -> inputBundleHolder.getResource(specimenReference.getReferenceElement()))
.flatMap(Optional::stream)
.map(Specimen.class::cast)
.collect(Collectors.toList());

specimens.addAll(nonDummySpecimens);

return specimens;

}

private boolean hasObservationsWithoutSpecimen(List<Observation> observations) {
return observations
.stream()
.filter(observation -> !isFilingComment(observation))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this line is super well tested.

.anyMatch(observation -> !observation.hasSpecimen());
}

private List<Observation> assignDummySpecimensToObservationsWithNoSpecimen(
List<Observation> observations, List<Specimen> specimens) {

if (!hasObservationsWithoutSpecimen(observations)) {
return observations;
}

// The assumption was made that all test results without a specimen will have the same dummy specimen referenced
Specimen dummySpecimen = specimens.stream()
.filter(specimen -> specimen.getId().contains(DUMMY_SPECIMEN_ID_PREFIX))

Check warning on line 162 in service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/diagnosticreport/DiagnosticReportMapper.java

View workflow job for this annotation

GitHub Actions / pitest

A change can be made to line 162 without causing a test to fail

removed call to filter (covered by 17 tests RemoveFilterMutator)
.toList().getFirst();

Reference dummySpecimenReference = new Reference(dummySpecimen.getId());

for (Observation observation : observations) {
if (!observation.hasSpecimen() && !isFilingComment(observation)) {
observation.setSpecimen(dummySpecimenReference);
}
}

return observations;
}

private Specimen generateDefaultSpecimen(DiagnosticReport diagnosticReport) {
private Specimen generateDummySpecimen(DiagnosticReport diagnosticReport) {
Specimen specimen = new Specimen();

specimen.setId(DUMMY_SPECIMEN_ID_PREFIX + randomIdGeneratorService.createNewId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand Down Expand Up @@ -149,7 +148,6 @@ private String mapObservationsAssociatedWithSpecimen(Specimen specimen, List<Obs
}

return observationsAssociatedWithSpecimen.stream()
.filter(Predicate.not(DiagnosticReportMapper::isFilingComment))
.map(observationMapper::mapObservationToCompoundStatement)
.collect(Collectors.joining());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.mockito.Mockito.when;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -76,7 +77,6 @@ class DiagnosticReportMapperTest {
private static final String INPUT_JSON_MULTIPLE_CODED_DIAGNOSIS = "diagnostic-report-with-multiple-coded-diagnosis.json";
private static final String INPUT_JSON_EXTENSION_ID = "diagnostic-report-with-extension-id.json";
private static final String INPUT_JSON_URN_OID_EXTENSION_ID = "diagnostic-report-with-urn-oid-extension-id.json";
private static final String INPUT_JSON_UNRELATED_TEST_RESULT = "diagnostic-report-with-one-specimen-and-one-unrelated-observation.json";

private static final String OUTPUT_XML_REQUIRED_DATA = "diagnostic-report-with-required-data.xml";
private static final String OUTPUT_XML_STATUS_NARRATIVE = "diagnostic-report-with-status-narrative.xml";
Expand All @@ -88,7 +88,6 @@ class DiagnosticReportMapperTest {
private static final String OUTPUT_XML_MULTIPLE_CODED_DIAGNOSIS = "diagnostic-report-with-multiple-coded-diagnosis.xml";
private static final String OUTPUT_XML_EXTENSION_ID = "diagnostic-report-with-extension-id.xml";
private static final String OUTPUT_XML_MULTIPLE_RESULTS = "diagnostic-report-with-multiple-results.xml";
private static final String OUTPUT_XML_UNRELATED_TEST_RESULT = "diagnostic-report-with-one-specimen-and-one-unrelated-observation.xml";

@Mock
private CodeableConceptCdMapper codeableConceptCdMapper;
Expand Down Expand Up @@ -293,6 +292,44 @@ void When_DiagnosticReport_With_NoReferencedSpecimenAndFilingCommentWithNoCommen
assertThat(actualXml).isEqualToIgnoringWhitespace(expectedXml);
}

/**
* A Diagnosis Report may have an Observation (Test Result) and Specimen. If the result and specimen are not
* linked then we need to create a dummy specimen linked to the result.
*/
@Test
void When_DiagnosticReport_Has_SpecimenAndUnlinkedTestResult_Expect_ADummySpecimenLinkedToTestResult() {
final String diagnosticReportFileName = "diagnostic-report-with-one-specimen-and-one-unrelated-observation.json";
final DiagnosticReport diagnosticReport = getDiagnosticReportResourceFromJson(diagnosticReportFileName);
final Bundle bundle = getBundleResourceFromJson(INPUT_JSON_BUNDLE);
final InputBundle inputBundle = new InputBundle(bundle);

when(messageContext.getInputBundleHolder()).thenReturn(inputBundle);

final String actualXml = mapper.mapDiagnosticReportToCompoundStatement(diagnosticReport);

// This checks that the unlinked test result is given a dummy specimen.
assertThat(actualXml).containsIgnoringWhitespaces(
"<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 "
+ "with linked Observations: Observation/TestResult-WithoutSpecimenReference-->");
}

@Test
void When_DiagnosticReport_Has_SpecimenALinkedTestResultAndAnUnlinkedTestResult_Expect_ASpecimenOnAllTestResults() {
final String diagnosticReportFileName =
"diagnostic-report-with-one-specimen-one-linked-observation-and-one-unlinked-observation.json";
final DiagnosticReport diagnosticReport = getDiagnosticReportResourceFromJson(diagnosticReportFileName);
final Bundle bundle = getBundleResourceFromJson(INPUT_JSON_BUNDLE);
final InputBundle inputBundle = new InputBundle(bundle);
when(messageContext.getInputBundleHolder()).thenReturn(inputBundle);

final String actualXml = mapper.mapDiagnosticReportToCompoundStatement(diagnosticReport);
// This checks that the unlinked test result is given a dummy specimen.
assertThat(actualXml).containsIgnoringWhitespaces(
"<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 "
+ "with linked Observations: Observation/TestResult-WithoutSpecimenReference-->");

}

private Bundle getBundleResourceFromJson(String filename) {
final String filePath = TEST_FILE_DIRECTORY + filename;
return FileParsingUtility.parseResourceFromJsonFile(filePath, Bundle.class);
Expand All @@ -318,8 +355,7 @@ private static Stream<Arguments> resourceFileParams() {
Arguments.of(INPUT_JSON_CODED_DIAGNOSIS, OUTPUT_XML_CODED_DIAGNOSIS),
Arguments.of(INPUT_JSON_MULTIPLE_CODED_DIAGNOSIS, OUTPUT_XML_MULTIPLE_CODED_DIAGNOSIS),
Arguments.of(INPUT_JSON_EXTENSION_ID, OUTPUT_XML_EXTENSION_ID),
Arguments.of(INPUT_JSON_URN_OID_EXTENSION_ID, OUTPUT_XML_EXTENSION_ID),
Arguments.of(INPUT_JSON_UNRELATED_TEST_RESULT, OUTPUT_XML_UNRELATED_TEST_RESULT)
Arguments.of(INPUT_JSON_URN_OID_EXTENSION_ID, OUTPUT_XML_EXTENSION_ID)
);
}

Expand All @@ -341,7 +377,23 @@ private Answer<String> mockIdForReference() {
private Answer<String> mockSpecimenMapping() {
return invocation -> {
Specimen specimen = invocation.getArgument(0);
return String.format("<!-- Mapped Specimen with id: %s -->", specimen.getId());
List<Observation> observations = invocation.getArgument(1);

List<String> linkedObservations = new ArrayList<>();

for (Observation observation : observations) {
if (observation.getSpecimen().getReference() != null
&& observation.getSpecimen().getReference().equals(specimen.getId())) {
linkedObservations.add(observation.getId());
}
}

if (linkedObservations.isEmpty()) {
return String.format("<!-- Mapped Specimen with id: %s -->", specimen.getId());
}
adrianclay marked this conversation as resolved.
Show resolved Hide resolved
return String.format("<!-- Mapped Specimen with id: %s with linked Observations: %s-->",
specimen.getId(),
String.join(",", linkedObservations));
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
</CompoundStatement>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
</CompoundStatement>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
</CompoundStatement>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0 --><!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-1 --><!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-2 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757--><!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0 --><!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-1 --><!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-2 -->
</CompoundStatement>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
</CompoundStatement>
</component>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"resourceType": "DiagnosticReport",
"id": "96B93E28-293D-46E7-B4C2-D477EEBF7098",
"meta": {
"profile": [
"https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DiagnosticReport-1"
]
},
"identifier": [
{
"system": "https://EMISWeb/A82038",
"value": "96B93E28-293D-46E7-B4C2-D477EEBF7098"
}
],
"status": "unknown",
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0074",
"code": "PAT",
"display": "Pathology (gross & histopath, not surgical)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "721981007",
"display": "Diagnostic studies report"
}
]
},
"subject": {
"reference": "Patient/DAED5527-1985-45D9-993E-C5FF51F36828"
},
"issued": "2010-02-25T15:41:00+00:00",
"specimen": [{
"reference": "Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0"
}],
"result": [
{ "reference": "Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2" },
{ "reference": "Observation/TestResult-WithoutSpecimenReference" }
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
<!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0 -->
</CompoundStatement>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Participants: TEMPLE SOWERBY MEDICAL PRACTICE</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
<Participant typeCode="AUT" contextControlCode="OP">
<agentRef classCode="AGNT">
<id root="II-for-Organization/5E496953-065B-41F2-9577-BE8F2FBD0757"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Status: unknown</text>
<availabilityTime value="20100225154100"/>
</NarrativeStatement>
</component>
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 -->
<!-- Mapped Specimen with id: DUMMY-SPECIMEN-5E496953-065B-41F2-9577-BE8F2FBD0757 with linked Observations: DUMMY-OBSERVATION-5E496953-065B-41F2-9577-BE8F2FBD0757-->
</CompoundStatement>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ Received Date: 2010-02-24 15:41
<availabilityTime value="20201012143344"/>
</NarrativeStatement>
</component>
<!-- Mapped Observation with id: Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2 -->
<!-- Mapped Observation with id: Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2 --><!-- Mapped Observation with id: Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2-COMM -->
</CompoundStatement>
</component>
Loading