Skip to content

Latest commit

 

History

History
202 lines (185 loc) · 15.4 KB

File metadata and controls

202 lines (185 loc) · 15.4 KB

Encounter Mapping

XML HL7 > JSON FHIR

An GP Connect FHIR Encounter is mapped from an GP2GP HL7v3 EHR Composition.

Mapped to (JSON FHIR Encounter field) Mapped from (XML HL7 / other source)
id ehrComposition / id \[@root]
meta.profile[0] fixed value = "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Encounter-1"
meta.security ehrComposition / confidentialityCode mapped as confidentiality code
identifier[0].system "https://PSSAdaptor/{{losingOdsCode}}" - where the {{losingOdsCode}} is the ODS code of the losing practice
identifier[0].value ehrComposition / id \[@root]
status fixed value = "finished"
type[0] ehrComposition / code [@code] or ehrCompostion / code / translation [@code] 1 as described in the XML > FHIR section of Codeable Concept
subject reference to the mapped Patient
participant[index].type[0].coding[0].system 2 fixed value = "https://fhir.nhs.uk/STU3/CodeSystem/GPConnect-ParticipantType-1"
participant[index].type[0].coding[0].code 2 fixed value = "REC"
participant[index].type[0].coding[0].display 2 fixed value = "recorder"
participant[index].individual 2 ehrComposition / author / agentRef / id [@root]
participant[index].type[0].coding[0].system 3 fixed value = "http://hl7.org/fhir/v3/ParticipationType"
participant[index].type[0].coding[0].code 3 fixed value = "PPRF"
participant[index].type[0].coding[0].display 3 fixed value = "primary performer"
participant[index].individual 3 ehrComposition / participant2[0] / AgentRef / id [@root]
period.start ehrComposition / effectiveTime / center or else ehrComposition / effectiveTime / low or else ehrComposition / availibiltyTime
period.end ehrComposition / effectiveTime / high
location the associated location identified by ehrComposition / location
Example JSON
 {
    "resource": {
        "resourceType": "Encounter",
        "id": "9FB8560B-A7FF-4F04-9E0B-CFBB4D0AF4E9",
        "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://PSSAdaptor/D5445",
                "value": "9FB8560B-A7FF-4F04-9E0B-CFBB4D0AF4E9"
            }
        ],
        "status": "finished",
        "type": [
            {
                "coding": [
                    {
                        "system": "http://snomed.info/sct",
                        "code": "24561000000109",
                        "display": "A+E report"
                    }
                ],
                "text": "GP Surgery"
            }
        ],
        "subject": {
            "reference": "Patient/cacf81fd-cb4c-49de-af29-d6968f4de978"
        },
        "participant": [
            {
                "type": [
                    {
                        "coding": [
                            {
                                "system": "https://fhir.nhs.uk/STU3/CodeSystem/GPConnect-ParticipantType-1",
                                "code": "REC",
                                "display": "recorder"
                            }
                        ]
                    }
                ],
                "individual": {
                    "reference": "Practitioner/2E86E940-9011-11EC-B1E5-0800200C9A66"
                }
            },
            {
                "type": [
                    {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/v3/ParticipationType",
                                "code": "PPRF",
                                "display": "primary performer"
                            }
                        ]
                    }
                ],
                "individual": {
                    "reference": "Practitioner/70555A33-0550-405D-BB67-E9805440B38C"
                }
            }
        ],
        "period": {
            "start": "2010-01-13T15:20:00+00:00",
            "end": "2010-01-13T15:20:00+00:00"
        },
        "location": [
            {
                "location": {
                    "reference": "Location/5E54EFE1-70E8-433D-AB36-F62EC443E5C2"
                }
            }
        ]
    }
}

  1. If a SNOMED CT code cannot be found type[0].coding will not be populated.
  2. Where the participant is the Practitioner that recorded the consultation on the system, identified by ehrComposition / author.
  3. Populated only where a ehrComposition / participant2 is populated.

Unmapped fields

  • length
  • serviceProvider

JSON FHIR > XML HL7

An GP Connect FHIR Encounter is mapped to a GP2GP HL7v3 ehrComposition.

Mapped to (XML HL7 ehrComposition child element) Mapped from (JSON FHIR / other source )
id [@root] Fetched from resource ID or, if not valid UUID, generated by the Adaptor
code [@code] Encounter.type[0].coding[0].code 4
code [@displayName] Encounter.type[0].coding[0].display 4
code [@codeSystem] fixed value = "2.16.840.1.113883.2.1.3.2.4.15"
code / originalText Encounter.type[0].text or else Encounter.type[0].coding[0].display 5
statusCode fixed value ="COMPLETE"
effectiveTime Enounter.period.start and Encounter.period.end (if present)
availabilityTime [@value] Encounter.period.start
author / agentRef / id [@root] Encounter.participant[index].individual where Encounter.participant[index].type contains a coding.code of "REC"
author / time [@value] List.date 6
location / locatedEntity / code [@code] fixed value = "394730007"
location / locatedEntity / code [@codeSystem] fixed value = "2.16.840.1.113883.2.1.3.2.4.15"
location / locatedEntity / code [@displayName] fixed value = "Healthcare related organisation"
location / locatedEntity / locatedPlace / name The name field of the Location resource referenced by Encounter.location
Participant2 / AgentRef / id [@root] Encounter.participant[index].individual where Encounter.participant[index].type contains a coding.code of "PPRF", or else where the Encounter.participant[index].type contains a coding.code of "REC".
Example XML
<ehrComposition classCode="COMPOSITION" moodCode="EVN">
    <id root="4BBABD06-93E2-4E87-9345-9B1171AC576F" />
    <code code="24591000000103" displayName="Other report" codeSystem="2.16.840.1.113883.2.1.3.2.4.15">
        <originalText>Surgery Consultation</originalText>
    </code>
    <statusCode code="COMPLETE" />
    <effectiveTime>
        <low value="20190328103000"/><high value="20190328103800"/>
    </effectiveTime>
    <availabilityTime value="20190328103000"/>
    <author typeCode="AUT" contextControlCode="OP">
        <time value="20190328103000" />
        <agentRef classCode="AGNT">
            <id root="4ED3292E-EC9E-400D-84D2-758CCDEA40A4" />
        </agentRef>
    </author>
    <location typeCode="LOC">
        <locatedEntity classCode="LOCE">
            <code code="394730007" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Healthcare related organisation" />
            <locatedPlace classCode="PLC" determinerCode="INSTANCE">
                <name>Example location</name>
            </locatedPlace>
        </locatedEntity>
    </location>
    <Participant2 typeCode="PRF" contextControlCode="OP">
        <agentRef classCode="AGNT">
            <id root="4ED3292E-EC9E-400D-84D2-758CCDEA40A4"/>
        </agentRef>
    </Participant2>
    <component typeCode="COMP">

    ...

    </component>
</ehrComposition>
  1. If the code is a SNOMED code within the EHR Composition Name Vocabulary then that code and display name is used. Otherwise, the SNOMED code 24591000000103 and the display name Other report are inserted by the adaptor.
  2. Encounter.type[0].coding[0].display is only used if the adaptor inserts Other report, as described in footnote 3.
  3. Where the List is the consultation List resource that references the Encounter.

Further documentation