FHIR References References are a concept that is mixed in openEHR depending on the element. There are two types of data in openEHR: clinical data and operational data (non-clinical data). openEHR splits this data into demographics for operational data and EHR for clinical data. Given the delicate nature of resolving references, this chapter is a recommendation References on Clinical Data If a reference that we map pertains to clinical data and is not contained in the composition but appears in another template, a linked mapping should be used. This can be either: Containing some of the information but not all of it. No field provided as part of the archetype. Both cases are relevant to ensure that back transformation into FHIR remains as close as possible. Dedicated Node Typically, the important entry of a dataset is usually contained within the reference. For example, in breast cancer treatment, the diagnosis code is referenced as a reason, but the full diagnosis itself is not included. In FHIR, this would be represented as a link to the diagnosis. In openEHR, it is usually stored as part of the encounter or episode-of-care for breast cancer. In this case, the diagnosis should be mapped to the reason. Additionally, a linked mapping should be attached to map the diagnosis generally. Links only function if a corresponding profile or template mapping is available. This ensures that the reason is resolved while maintaining the linkage to the full diagnosis, making back transformation into FHIR easier. Example Mapping - name: "reason" extension: "add" with: fhir: "$resource.diagnosis.reference" openehr: "$reference" reference: #type None resourceType: "Condition" mappings: - name: "condition" with: fhir: "$fhirRoot.code" openehr: "$archetype/item[at0021]" # reason - name: "conditionMapping" with: fhir: "$fhirRoot" openehr: "$openehrRoot/links" link: meaning: "the diagnosis of the reason" type: "diagnosis" No Node If the template does not contain a node pointing to the referenced resource, a link should be created in the composition to maintain the reference and enable back transformation. Links only function if a corresponding profile or template mapping is available. This ensures that the reason is resolved while linking the full diagnosis, making back transformation into FHIR more straightforward. Example Mapping - name: "reason" extension: "add" with: fhir: "$resource.diagnosis.reference" openehr: "$composition" reference: #type None resourceType: "Condition" mappings: - name: "conditionMapping" with: fhir: "$fhirRoot" openehr: "$composition/links" link: meaning: "the diagnosis linked to this composition" type: "diagnosis" This works because references in the LOCATABLE class are a list. References on Operational Data Operational data is typically mapped into the demographics server of openEHR. There are three ways this data is mapped: PARTY_IDENTIFIER DV_IDENTIFIER As a String (in the worst case) All identifiers should be sent to the demographics server and resolved using the demographics system as described in Demographics. The provider must decide which types of resources are filtered and resolved using demographics. Typically, all clinical resources are mapped to the openEHR platform.