openEHR to FHIR Data Type Mapping, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/openehr-fhir/data-type-mapping-ig/ and changes regularly. See the Directory of published versions
| Page standards status: Informative |
This category covers the openEHR types that carry a pointer to something else
— an opaque URI (DV_URI, DV_EHR_URI) or a structured link to another node in
an EHR or to an external party (LINK, PARTY_IDENTIFIED) — and the FHIR types
that play the same role: the URI primitives (uri, url, oid, uuid,
canonical) and the structured Reference and CodeableReference data types.
DV_IDENTIFIER ↔ Identifier is also here, because an identifier is a pointer
at a thing rather than a description of one.
Five facts shape this category.
The FHIR URI target depends on the element, not on the openEHR type. FHIR
provides several URI primitives with progressively narrower constraints
(uri/canonical, url, oid/uuid), and canonical additionally carries
versioning semantics. Which one a DV_URI maps to is decided by the element
definition the value is being carried in. openEHR also allows "plain-text"
URIs containing characters RFC 3986 forbids, such as spaces, and requires them
to be encoded before machine use; a FHIR URI must be valid, so those characters
are percent-encoded on the way out.
The ehr: scheme has no FHIR counterpart. DV_EHR_URI constrains the
scheme to ehr: and addresses items inside an openEHR EHR — compositions,
sections, entries, or sub-elements. No standard FHIR scheme conveys equivalent
semantics. The closest analogues are absolute or relative Reference values,
which address a resource, not an element within one. Until a LINK.target
is resolved to the FHIR resource its target was converted to, it travels as
Reference.identifier — the element R5 provides for a target "not available
through a FHIR server" — with the system urn:ietf:rfc:3986.
FHIR does not natively address sub-elements. A LINK.target can point at a
sub-element of a composition. Reference.reference is a resource-level pointer,
with #fragment reserved for contained resources. Two standard extensions cover
sub-element addressing when it is genuinely required — targetElement, carrying
a target Element.id, and targetPath, carrying a restricted FHIRPath
expression — but most consumers do not interpret them, so a mapping into FHIR
should avoid producing them unless the source data really needs that
granularity.
openEHR splits what FHIR joins. openEHR separates internal record links
(LINK) from external party references (PARTY_IDENTIFIED); FHIR uses
Reference for both. The working group is investigating consolidating LINK
and PARTY_IDENTIFIED onto a common RM class, likely based on OBJECT_REF.
This guide maps the Reference Model as published today and records the
pending change as an open item rather than anticipating it.
FHIR joins what openEHR splits. CodeableReference combines a coded concept
and a reference in one value. openEHR has no direct equivalent; mapping one
into openEHR generally means splitting it into a coded element plus a LINK, or
into an enclosing CLUSTER.
LINK ↔ Reference is one-way at data-type level. LINK declares
meaning, type, and target all 1..1. A FHIR Reference can source the
first and the third — from display and reference — and has no field at all
that can source type. Only a CodeableReference carries a concept, and
deciding to use one is an archetype-level decision a data-type conversion does
not make. So a LINK becomes a Reference, and a bare Reference does not
become a LINK: the guide publishes that gap rather than inventing a link type
nobody sent.
See Coded Data for the coded half of a
CodeableReference, Gaps for the FHIR elements with no openEHR
home, and Conventions for how to read the tables.
| openEHR type | FHIR type | → FHIR | → openEHR | Maturity | Scope |
|---|---|---|---|---|---|
DV_IDENTIFIER | Identifier | lossy | lossy | open | datatype |
DV_URI / DV_EHR_URI | uri | url | lossy | lossy | open | datatype |
LINK | Reference | CodeableReference | lossy | unmapped | open | datatype |
Sources: openEHR RM — DV_IDENTIFIER · FHIR R5 — Identifier
| openEHR field | FHIR target | → FHIR | → openEHR | Maturity | Notes |
|---|---|---|---|---|---|
DV_IDENTIFIER.id 1..1 | Identifier.value | lossless | lossless | settled | Direct equivalence. A FHIR Identifier with a system and no value has no DV_IDENTIFIER to become, because id is mandatory. |
DV_IDENTIFIER.issuer 0..1 | Identifier.system | lossless | lossless | open | The system versus issuer mismatch — URI against free text — is the primary transformation challenge in this category. Where the issuer is not a valid URI, the convention is to construct one by prefixing http://openehr.org/identifier/, and to strip that prefix again on the way back. Whether that prefix is a real definition or a placeholder, and whether a URN would be preferable to a URL, is not decided; guidance has been sought from HL7 TSMG. |
DV_IDENTIFIER.type 0..1 | Identifier.type | lossless | lossy | open | → openEHR: drops Identifier.type — openEHR carries the type as a single string in system::value notation, so only one coding survives — where several are present the userSelected one is taken, otherwise the first — and every other property of a Coding, including version, display, and userSelected itself, is dropped The system::value convention uses the last occurrence of :: in the string, so no escaping is required even though : is valid in both URLs and codes — http://[2001:db8::1]:8080/path::MR parses correctly. Where no :: is present, http://openehr.org/identifier/type is used as the system. |
DV_IDENTIFIER.assigner 0..1 | Identifier.assigner | lossless | lossy | open | → openEHR: drops Identifier.assigner — a FHIR Reference carries more than an identifier — reference, display, and type — and openEHR reduces the whole thing to one system::value string, so everything except the identifier is dropped On the way into openEHR the convention is to read Identifier.assigner.identifier and, where that is absent, the referenced Organization.identifier. |
| — no counterpart (inventory) | Identifier.use | unmapped | unmapped | open | → FHIR: No DV_IDENTIFIER field produces it. (owner: openehr-modelling) → openEHR: Not carried at the data-type level. A cluster archetype providing use, period, and support for several types is drafted by the openEHR modelling team; this guide links it rather than authoring it. (owner: openehr-modelling) As a consumer of an identifier, use and period are rarely significant. They matter mainly for demographic entities, for temporary patient identifiers, and where the EHR is itself the assigner. |
| — no counterpart (inventory) | Identifier.period | unmapped | unmapped | open | → FHIR: No DV_IDENTIFIER field produces it. (owner: openehr-modelling) → openEHR: Not carried at the data-type level; the extended cluster archetype provides it. (owner: openehr-modelling) Round-tripping therefore loses historic and superseded identifiers where they are distinguished only by their period. |
{
"_type": "DV_IDENTIFIER",
"id": "12345",
"issuer": "http://example.org/hospital",
"type": "http://terminology.hl7.org/CodeSystem/v2-0203::MR",
"assigner": "http://example.org/org::OrgRef123"
}
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "http://example.org/hospital",
"value": "12345",
"period": {
"start": "2020-01-01"
},
"assigner": {
"identifier": {
"system": "http://example.org/org",
"value": "OrgRef123"
}
}
}
Sources: openEHR RM — DV_URI · openEHR RM — DV_EHR_URI · FHIR R5 — uri · FHIR R5 — url · FHIR R5 — oid · FHIR R5 — uuid · FHIR R5 — canonical
| openEHR field | FHIR target | → FHIR | → openEHR | Maturity | Notes |
|---|---|---|---|---|---|
DV_URI.value 1..1 | when the target element is typed uri: uriwhen the target element is typed url and the value is a resolvable address: urlwhen the target element is typed oid and the value is a urn:oid: URI: oidwhen the target element is typed uuid and the value is a lowercase urn:uuid: URI: uuidwhen the target element is typed canonical and the value is the canonical URL of a resource, with an optional |version: canonical | lossless | lossless | open | Direct equivalence for a URI that conforms to RFC 3986, which uri is defined on; url is defined on RFC 1738. Which FHIR primitive is the target is decided by the element definition, not by the openEHR source type: FHIR provides several URI primitives with progressively narrower constraints. canonical reads a | in the value as separating the version of the resource referred to, so a value that is not such a reference does not belong in one. A plain-text URI, and values not in oid or uuid form, are the sub-cases below. |
DV_URI.value[plain-text] 1..1 | uri | lossy | lossless | open | → FHIR: drops DV_URI.value[plain-text] — the RM allows "plain-text URIs" containing characters RFC 3986 forbids, such as spaces, and requires them to be RFC 3986-encoded before machine use; a FHIR uri must be valid, so those characters are percent-encoded and the readable form is not carried A named sub-case of the row above. Only characters RFC 3986 does not allow are encoded, so an existing percent-escape is left as it is; the encoded URI reads back as a valid DV_URI in its encoded form. |
DV_URI.value[not-oid] 1..1 | — no counterpart (inventory) | unmapped | unmapped | settled | → FHIR: A URI in any other form cannot be carried in an element typed oid: the archetype and the FHIR element disagree about the value, and no conversion repairs that. → openEHR: An oid is always in that form, so nothing arrives. archetype scope: the sub-case arises only where the target element is typed oid, which the element decides, not the data type. |
DV_URI.value[not-uuid] 1..1 | — no counterpart (inventory) | unmapped | unmapped | settled | → FHIR: A URI in any other form — an uppercase UUID included — cannot be carried in an element typed uuid: the archetype and the FHIR element disagree about the value, and no conversion repairs that. → openEHR: A uuid is always in that form, so nothing arrives. archetype scope: the sub-case arises only where the target element is typed uuid, which the element decides, not the data type. |
DV_EHR_URI.value 1..1 | uri | lossless | lossless | open | No standard FHIR scheme conveys ehr: semantics. Carrying the URI opaquely preserves it exactly but means nothing on the FHIR side can resolve it. Resolving it to a FHIR Reference makes it usable but is a one-way transformation, and is LINK.target’s concern on LINK ↔ Reference. |
{
"_type": "DV_EHR_URI",
"value": "ehr:/8f3c6b1e-1e5a-4a6b-9a3e-2b6f0c1d4e77"
}
"ehr:/8f3c6b1e-1e5a-4a6b-9a3e-2b6f0c1d4e77"
Sources: openEHR RM — LINK · FHIR R5 — Reference · FHIR R5 — CodeableReference · FHIR R5 — Identifier
| openEHR field | FHIR target | → FHIR | → openEHR | Maturity | Notes |
|---|---|---|---|---|---|
LINK.target 1..1 | when the target has not been resolved to a FHIR resource — what a data-type conversion produces — with system urn:ietf:rfc:3986 and the URI as value: Reference.identifierwhen the target has been resolved to the FHIR resource it was itself converted to, with targetElement or targetPath where it is a sub-element: Reference.reference | lossless | unmapped | open | → openEHR: No LINK is produced at all, so nothing lands in target. LINK.type is mandatory and a plain Reference has no field that can source it — see the LINK.type row — so the reference travels only as part of a LINK that cannot be built. (owner: openehr-modelling) R5 defines Reference.reference as "a location at which the other resource is found", and an ehr: URI names an item in an openEHR EHR rather than a FHIR resource, and does not resolve. Reference.identifier is the element R5 provides for a target that "is not available through a FHIR server", and a URI that is itself the identifier takes the system urn:ietf:rfc:3986. Resolving the target to a FHIR resource takes knowledge of how the record was converted, which a data type does not have. Where the target is a sub-element, two standard extensions cover the granularity: targetElement, carrying a target Element.id, and targetPath, carrying a restricted FHIRPath expression. Prefer targetElement where you control the target instance and can guarantee an Element.id; use targetPath where you cannot. A mapping into FHIR SHOULD NOT produce either unless the source data genuinely needs sub-element granularity, because most consumers do not interpret them. |
LINK.meaning 1..1 | Reference.display | lossy | unmapped | open | → FHIR: drops LINK.meaning — LINK.meaning is a DV_TEXT [1..1] and Reference.display is a plain string, so only DV_TEXT.value participates. formatting, encoding, the deprecated hyperlink, and mappings are lossy or unmapped into a FHIR string — see the DV_TEXT table on Textual Data — and a Reference.display has no extension slot in this mapping to carry them → openEHR: No LINK is produced at all, so nothing lands in meaning. See the LINK.type row. (owner: openehr-modelling) The lossless claim this row used to carry was false in both directions: it ignored every DV_TEXT attribute except value, and it depended on referenceToLink fabricating a LINK.type. |
LINK.type 1..1 | CodeableReference.concept | lossy | unmapped | open | → FHIR: drops LINK.type — only DV_TEXT.value participates, as for LINK.meaning; and a plain Reference — what a data-type conversion produces without the archetype-level decision to use a CodeableReference — carries no concept at all, so this guide’s reference converter emits no link type → openEHR: LINK.type is mandatory (1..1) and a FHIR Reference has no field that can source it. Only a CodeableReference carries a concept, and using one is an archetype-level decision. No LINK is produced from a bare Reference, because inventing a link type — the literal reference, as an earlier draft of this guide did — states a relationship nobody sent. (owner: openehr-modelling) The link type — issue, problem, citation, and the like — has no home on a plain Reference. A CodeableReference carries a concept and a reference in one value, which is the closest FHIR shape. This is the row that makes LINK ↔ Reference a one-way mapping at data-type level. |
| — no counterpart (inventory) | CodeableReference | unmapped | unmapped | open | → FHIR: No single openEHR value produces a CodeableReference. (owner: openehr-modelling) → openEHR: The value must be split into a coded element plus a LINK, or into an enclosing cluster — for example an anatomical-location cluster alongside a coded body-site element. That is an archetype decision, not a data-type mapping. (owner: openehr-modelling) |
| — no counterpart (inventory) | Reference.type | unmapped | unmapped | settled | → FHIR: Not derivable: the resource type depends on how the target item is itself represented in FHIR, which a data-type conversion does not know. → openEHR: A LINK has no attribute for the type of its target, so nothing arrives. |
PARTY_IDENTIFIED 0..1 | — no counterpart (inventory) | unmapped | unmapped | open | → FHIR: Not mapped here. openEHR splits internal record links (LINK) from external party references (PARTY_IDENTIFIED) and the working group is investigating unifying both onto a common Reference Model class, likely based on OBJECT_REF. This guide maps the RM as published today and does not anticipate the unreleased change. (owner: openehr-modelling) → openEHR: Whether an incoming Reference becomes a LINK or a PARTY_IDENTIFIED cannot be decided from the reference alone; it depends on what is referenced, which is archetype context. (owner: openehr-modelling) |