Skip to content

Commit df9bd62

Browse files
Adding JSON and XML files for unit tests
Scenario 1: Files: diagnostic-report-with-one-specimen-and-one-unrelated-observation Diagnostic Report linked to Specimen Observation linked to Diagnostic Report Specimen linked to Diagnostic report (Observation is not linked to Specimen) ---- Scenario 2: Files: diagnostic-report-with-one-specimen-one-linked-observation-and-one-unlinked-observation Diagnostic Report linked to Specimen Observation linked to Diagnostic Report Specimen linked to both Diagnostic Report and Observation Observation linked to only Diagnostic Report (This creates an Observation unlinked to a Specimen)
1 parent 65d36d0 commit df9bd62

5 files changed

+209
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"resourceType": "DiagnosticReport",
3+
"id": "96B93E28-293D-46E7-B4C2-D477EEBF7098",
4+
"meta": {
5+
"profile": [
6+
"https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DiagnosticReport-1"
7+
]
8+
},
9+
"identifier": [
10+
{
11+
"system": "https://EMISWeb/A82038",
12+
"value": "96B93E28-293D-46E7-B4C2-D477EEBF7098"
13+
}
14+
],
15+
"status": "unknown",
16+
"category": {
17+
"coding": [
18+
{
19+
"system": "http://hl7.org/fhir/v2/0074",
20+
"code": "PAT",
21+
"display": "Pathology (gross & histopath, not surgical)"
22+
}
23+
]
24+
},
25+
"code": {
26+
"coding": [
27+
{
28+
"system": "http://snomed.info/sct",
29+
"code": "721981007",
30+
"display": "Diagnostic studies report"
31+
}
32+
]
33+
},
34+
"subject": {
35+
"reference": "Patient/DAED5527-1985-45D9-993E-C5FF51F36828"
36+
},
37+
"issued": "2010-02-25T15:41:00+00:00",
38+
"result": [
39+
{
40+
"reference": "Observation/AD373CA7-3940-4249-85A2-D3A22E9F17C7"
41+
}
42+
]
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<component typeCode="COMP">
2+
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
3+
<id root="II-for-DiagnosticReport-DiagnosticReport/96B93E28-293D-46E7-B4C2-D477EEBF7098"/>
4+
<code code="16488004" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="laboratory reporting">
5+
<originalText>Filed Report</originalText>
6+
</code>
7+
<statusCode code="COMPLETE"/>
8+
<effectiveTime>
9+
<center nullFlavor="NI"/>
10+
</effectiveTime>
11+
<availabilityTime value="20100225154100"/>
12+
<component typeCode="COMP" contextConductionInd="true">
13+
<NarrativeStatement classCode="OBS" moodCode="EVN">
14+
<id root="5E496953-065B-41F2-9577-BE8F2FBD0757"/>
15+
<text mediaType="text/x-h7uk-pmip">CommentType:LABORATORY RESULT COMMENT(E141)
16+
CommentDate:20100225154100
17+
18+
Status: unknown</text>
19+
<statusCode code="COMPLETE"/>
20+
<availabilityTime value="20100225154100"/>
21+
</NarrativeStatement>
22+
</component>
23+
<!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0 -->
24+
<!-- Mapped Observation with id: Observation/AD373CA7-3940-4249-85A2-D3A22E9F17C7 -->
25+
</CompoundStatement>
26+
</component>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"resourceType": "DiagnosticReport",
3+
"id": "96B93E28-293D-46E7-B4C2-D477EEBF7098",
4+
"meta": {
5+
"profile": [
6+
"https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DiagnosticReport-1"
7+
]
8+
},
9+
"identifier": [
10+
{
11+
"system": "https://EMISWeb/A82038",
12+
"value": "96B93E28-293D-46E7-B4C2-D477EEBF7098"
13+
}
14+
],
15+
"status": "unknown",
16+
"category": {
17+
"coding": [
18+
{
19+
"system": "http://hl7.org/fhir/v2/0074",
20+
"code": "PAT",
21+
"display": "Pathology (gross & histopath, not surgical)"
22+
}
23+
]
24+
},
25+
"code": {
26+
"coding": [
27+
{
28+
"system": "http://snomed.info/sct",
29+
"code": "721981007",
30+
"display": "Diagnostic studies report"
31+
}
32+
]
33+
},
34+
"subject": {
35+
"reference": "Patient/DAED5527-1985-45D9-993E-C5FF51F36828"
36+
},
37+
"issued": "2010-02-25T15:41:00+00:00",
38+
"specimen": [{
39+
"reference": "Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0"
40+
}],
41+
"result": [
42+
{
43+
"reference": "Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2",
44+
"reference": "Observation/AD373CA7-3940-4249-85A2-D3A22E9F17C7"
45+
}
46+
]
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<component typeCode="COMP">
2+
<CompoundStatement classCode="CLUSTER" moodCode="EVN">
3+
<id root="II-for-DiagnosticReport-DiagnosticReport/96B93E28-293D-46E7-B4C2-D477EEBF7098"/>
4+
<code code="16488004" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="laboratory reporting">
5+
<originalText>Filed Report</originalText>
6+
</code>
7+
<statusCode code="COMPLETE"/>
8+
<effectiveTime>
9+
<center nullFlavor="NI"/>
10+
</effectiveTime>
11+
<availabilityTime value="20100225154100"/>
12+
<component typeCode="COMP" contextConductionInd="true">
13+
<NarrativeStatement classCode="OBS" moodCode="EVN">
14+
<id root="5E496953-065B-41F2-9577-BE8F2FBD0757"/>
15+
<text mediaType="text/x-h7uk-pmip">CommentType:LABORATORY RESULT COMMENT(E141)
16+
CommentDate:20100225154100
17+
18+
Status: unknown</text>
19+
<statusCode code="COMPLETE"/>
20+
<availabilityTime value="20100225154100"/>
21+
</NarrativeStatement>
22+
</component>
23+
<!-- Mapped Specimen with id: Specimen/96B93E28-293D-46E7-B4C2-D477EEBF7098-SPEC-0 -->
24+
<!-- Mapped Observation with id: Observation/AD373CA7-3940-4249-85A2-D3A22E9F17C7 -->
25+
<!-- Mapped Observation with id: Observation/B7F05EA7-A1A4-48C0-9C4C-CDB5768796B2 -->
26+
</CompoundStatement>
27+
</component>

service/src/test/resources/ehr/mapper/diagnosticreport/fhir_bundle.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,72 @@
628628
]
629629
}
630630
},
631+
{
632+
"resource": {
633+
"resourceType": "Observation",
634+
"id": "AD373CA7-3940-4249-85A2-D3A22E9F17C7",
635+
"meta": {
636+
"profile": [
637+
"https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Observation-1"
638+
]
639+
},
640+
"identifier": [
641+
{
642+
"system": "https://EMISWeb/A82038",
643+
"value": "AD373CA7-3940-4249-85A2-D3A22E9F17C7"
644+
}
645+
],
646+
"status": "unknown",
647+
"category": [
648+
{
649+
"coding": [
650+
{
651+
"system": "http://hl7.org/fhir/observation-category",
652+
"code": "laboratory",
653+
"display": "Laboratory"
654+
}
655+
]
656+
}
657+
],
658+
"code": {
659+
"coding": [
660+
{
661+
"system": "http://read.info/readv2",
662+
"code": "4483.00",
663+
"display": "Serum ACTH",
664+
"userSelected": true
665+
},
666+
{
667+
"extension": [
668+
{
669+
"url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid",
670+
"extension": [
671+
{
672+
"url": "descriptionId",
673+
"valueId": "2563401000000119"
674+
}
675+
]
676+
}
677+
],
678+
"system": "http://snomed.info/sct",
679+
"code": "997201000000100",
680+
"display": "Normal levels detected"
681+
}
682+
]
683+
},
684+
"subject": {
685+
"reference": "Patient/DAED5527-1985-45D9-993E-C5FF51F36828"
686+
},
687+
"effectiveDateTime": "2010-02-23",
688+
"issued": "2010-02-25T15:41:00+00:00",
689+
"performer": [
690+
{
691+
"reference": "Practitioner/C8FD0E2C-3124-4C72-AC8D-ABEA65537D1B"
692+
}
693+
],
694+
"comment": "Test not available - this is a test result without a specimen."
695+
}
696+
},
631697
{
632698
"resource": {
633699
"resourceType": "Observation",

0 commit comments

Comments
 (0)