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 guide is a work in progress, and it says so in detail rather than in the abstract. This page publishes two things the working group needs and readers deserve:
Open items fall into three groups.
FHIR-side actions are HL7 Jira tickets against the FHIR specification
itself: changes to Quantity.comparator, to Attachment, and to the
terminology guidance this guide depends on. This guide references their
status; it does not advance them, and it does not publish an R6-era item as
though it were R5 content.
openEHR-side actions are changes to the openEHR Reference Model or to its
published terminology, owned by the openEHR modelling team: binding strengths,
code_string constraints, TERM_MAPPING.purpose, and the pending
LINK / PARTY_IDENTIFIED / OBJECT_REF unification.
Documentation and tooling actions are this guide's own backlog — the concept-map pass, the archetypes that several gap rows depend on, and the questions the working group has not yet decided.
Every ticket cited anywhere in a mapping row appears in the register below. The reviewer-coverage table and the register are maintained by hand in this guide, and editors keep them in step with the mapping tables — see Conventions — so that a gap does not cite an owner this page fails to list.
An item's presence here is not an admission of a defect. It is the guide declining to assert something nobody has agreed.
See Gaps for the mapping-level consequences of these items, and
Conventions for what open and not-discussed mean.
Which mappings have been reviewed, and from which side. unchecked means exactly that: nobody has reviewed the mapping from that side, and a claim in it carries more risk than one that has been checked twice. Notes records, per side, what a review checked the mapping against and anything it left open.
| Mapping | Category | openEHR review | FHIR review | Notes |
|---|---|---|---|---|
| DV_QUANTITY ↔ Quantity | Quantities | ✓ Diego, Ian | ✓ Gino | |
| DV_COUNT ↔ Count | Quantities | ✓ Diego, Ian | ✓ Gino | |
| DV_PROPORTION ↔ Ratio | Quantities | ✓ Diego, Ian | ✓ Gino | |
| DV_INTERVAL ↔ Range / Period / Quantity | Quantities | ✓ Diego, Ian | ✓ Gino | |
| DV_QUANTITY ↔ Money / MoneyQuantity | Quantities | unchecked | ✓ Gino | FHIR: Checked against R5 Money (value is a decimal; currency is a code required-bound to the ISO 4217 Currencies value set; there is no system), MoneyQuantity (mtqy-1), and the declared contexts of quantity-precision, rendered-value, and quantity-accuracy in the extension pack. The review added rows for precision, units_display_name, and the six inherited attributes, made units_system lossless, and refused a DV_QUANTITY whose units_system is not ISO 4217. |
| DV_QUANTITY ↔ SimpleQuantity | Quantities | ✓ Diego, Ian | ✓ Gino | FHIR: Checked against R5 SimpleQuantity (a constraint on Quantity whose one rule is sqty-1, comparator.empty()), the elements R5 types as SimpleQuantity, and the declared contexts of quantity-precision and quantity-accuracy. The review replaced the prose claim that every other field maps as DV_QUANTITY ↔ Quantity does with a row per attribute: the converter had dropped precision and accuracy unreported, and the reference-range attributes have no home on a SimpleQuantity. The Range bounds share the reverse converter and still drop both extensions; that belongs to DV_INTERVAL ↔ Range. |
| DV_ORDINAL ↔ Observation.component | Quantities | ✓ Diego, Ian | ✓ Gino | |
| DV_SCALE ↔ Observation.component | Quantities | ✓ Diego, Ian | ✓ Gino | |
| CODE_PHRASE ↔ Coding | Coded Data | ✓ Severin | ✓ Gino | |
| DV_CODED_TEXT ↔ CodeableConcept / Coding | Coded Data | ✓ Severin | ✓ Gino | |
| TERM_MAPPING ↔ CodeableConcept.coding | Coded Data | ✓ Severin | ✓ Gino | |
| null_flavour ↔ data-absent-reason | Coded Data | ✓ Severin | ✓ Gino | FHIR: Checked against THO data-absent-reason (7.4.0) and v3 NullFlavor, the R5 data-absent-reason and iso21090-nullFlavor extensions, and Observation.dataAbsentReason (obs-6). The v3 collapse is confirmed. The inbound code note claimed a hierarchy THO does not have and now states the assignments as semantic choices; several disagree with THO and need further review, recorded on the register. The v3 extension is reported only when present, the reverse converter reads only data-absent-reason codings, and a missing text takes the openEHR rubric. |
| DV_BOOLEAN ↔ boolean | Boolean Data | unchecked | ✓ Gino | FHIR: Checked against R5 boolean (true or false; a JSON boolean; xs:boolean without 0 and 1). The one row is exact. A FHIR boolean may be absent with only a data-absent-reason extension, which the row’s note covers. |
| Integer ↔ integer | Numeric Primitives | unchecked | ✓ Gino | FHIR: Checked against R5 integer (−2,147,483,648..2,147,483,647, a JSON number with no decimal point) and openEHR’s stated width (32-bit, now cited). The review added the unsignedInt and positiveInt restrictions of integer, and the negative and non-positive values that have no form in them. |
| Integer64 ↔ integer64 | Numeric Primitives | unchecked | ✓ Gino | FHIR: Checked against R5 integer64 (64-bit, serialised as a JSON String, regex [0]|[-+]?[1-9][0-9]*), the R5 elements typed integer64, and openEHR’s stated width (64-bit, now cited). The reference converter had refused values beyond 32 bits while emitting the integer64 form, which carries them; it now carries the full range, and the 32-bit overflow is an archetype-scope sub-case of integer-typed elements. |
| Real / Double ↔ decimal | Numeric Primitives | unchecked | ✓ Gino | FHIR: Checked against R5 decimal (at most 18 digits; precision significant and to be preserved for presentation; no INF, -INF, or NaN) and openEHR’s stated widths (Real 32-bit, Double 64-bit, now cited). The review widened the inbound drop to the digits a 32- or 64-bit value cannot hold, and added the non-finite sub-case, which the reference converter had emitted as null. |
| DV_TEXT ↔ string / markdown | Textual Data | ✓ Ciprian | ✓ Gino | |
| DV_PARAGRAPH ↔ markdown / string | Textual Data | unchecked | ✓ Gino | FHIR: Nothing is asserted to check against: the mapping has not been discussed. Checked that R5 markdown (GFM CommonMark in a FHIR string) and string (up to 1,048,576 characters, newlines allowed) are both plausible targets, and that openEHR names markdown-formatted DV_TEXT as the replacement. A route through DV_TEXT ↔ markdown is proposed on the register. |
| DV_IDENTIFIER ↔ Identifier | Resource-Locator Data and References | ✓ Severin | ✓ Gino | |
| DV_URI / DV_EHR_URI ↔ uri / url | Resource-Locator Data and References | unchecked | ✓ Gino | FHIR: Checked against R5 uri (RFC 3986, no whitespace), url (RFC 1738), oid, uuid, and canonical. The reference converter had passed an openEHR plain-text URI through as an invalid uri, and reported every ordinary URI read back as losing an ehr: reference it never saw. Plain text is now percent-encoded, as the RM requires; Reference resolution is left to LINK ↔ Reference; and the oid and uuid forms are sub-cases. |
| LINK ↔ Reference / CodeableReference | Resource-Locator Data and References | ✓ Severin | ✓ Gino | FHIR: Checked against R5 Reference (reference locates "the other resource"; identifier is for when the target "is not available through a FHIR server"; ref-1, ref-2), CodeableReference, the urn:ietf:rfc:3986 identifier rule, and the targetElement and targetPath contexts. The reference converter had put an unresolvable ehr: URI in Reference.reference; it now emits Reference.identifier, and Reference.reference is the home once the target is resolved to a FHIR resource. A Reference.type row was added. |
| DV_DATE ↔ date / dateTime | Temporal Data | ✓ Ciprian | ✓ Gino | |
| DV_TIME ↔ time | Temporal Data | ✓ Ciprian | ✓ Gino | |
| DV_DATE_TIME ↔ dateTime / instant | Temporal Data | ✓ Ciprian | ✓ Gino | |
| DV_DURATION ↔ Duration | Temporal Data | ✓ Diego, Ian, Ciprian | ✓ Gino | FHIR: Checked against R5 Duration (a Quantity specialisation; drt-1; comparator required-bound to quantity-comparator), the UCUM time units, and the quantity-accuracy context. The review added the six attributes DV_DURATION inherits, which cross-cutting.html already said it follows and which the reference converter had dropped unreported, and the comparator = ad gap; it replaced the unit row, which reported every inbound conversion as losing a unit the ISO 8601 designator carries. |
| Time specifications ↔ Timing | Temporal Data | unchecked | ✓ Gino | FHIR: Nothing is asserted to check against: the mapping has not been discussed. Checked that R5 relates Timing to the same HL7 v3 types the two openEHR classes are based on — its RIM mappings give Timing as QSET<TS> (GTS) and Timing.repeat as PIVL or EIVL, and Timing.code’s preferred value set includes the v3 GTSAbbreviation codes — so the reason now says so. A route through that shared basis is proposed on the register. |
| DV_MULTIMEDIA ↔ Attachment | Other Data | unchecked | ✓ Gino | FHIR: Checked against R5 Attachment (hash is SHA-1; contentType "includes mime type parameters such as charset"; url "SHALL resolve to actual data"; att-1), the published alternate-hash extension and its integrity-check-algorithms code system, which holds exactly openEHR’s seven algorithms. The reference converter had written a SHA-256 hash into hash, dropped charset rather than folding it, and passed a plain-text URI through; a non-SHA-1 hash now travels in alternate-hash, charset in the MIME parameter, and the URI is percent-encoded. |
| DV_PARSABLE ↔ string | Other Data | unchecked | ✓ Gino | FHIR: Checked against R5 string (at least one character), the mimeType extension (contexts Questionnaire.item and ElementDefinition; it constrains what an element permits), the language extension, and THO’s HGVS identifier. The gap and the one-directional verdict stand. The review added an empty value, which the RM allows and FHIR does not, and the language and charset attributes DV_PARSABLE inherits; the two partial routes for the formalism are recorded on the register. |
| DV_STATE ↔ CodeableConcept | Other Data | ✓ Severin | ✓ Gino | FHIR: Checked against R5 CodeableConcept and FHIR’s resource-level workflow state (Task.status and its kind): there is no data type for a state-machine value, so is_terminal has no home, as stated. The fixture’s Coding.system is the bare openehr that CODE_PHRASE ↔ Coding copies through, which R5 does not accept as a system; openEHR now publishes a FHIR CodeSystem per vocabulary, and that is recorded on the register. |
| FHIR features with no openEHR counterpart | Gaps | unchecked | ✓ Gino | FHIR: Checked each entry against R5 — or, for the R6-era RelativeTime, against its absence from R5 — and against R5’s 63 concrete data types. Every entry is a real FHIR feature with no openEHR data type. The metadata and special types the inventory omits are now stated as out of scope on the page, with Dosage named as the deferred scheduling problem. |
| openEHR constructs not yet discussed | Gaps | unchecked | ✓ Gino | FHIR: Checked that each entry is still undiscussed and that its FHIR side correctly asserts no target. R5 does have candidates for the working group to examine, and none is a mapping: Observation.effective[x] and Observation.component for EVENT; DocumentReference, which R5 scopes to references to any media file, for the Media File archetype; Composition and Encounter for COMPOSITION; and RelatedPerson for PARTY_RELATED. DV_ENCAPSULATED is abstract and has no candidate of its own. The EVENT citation now points at the EVENT class rather than HISTORY. |
Every ticket cited anywhere in a mapping row appears below. When a mapping row names a new owner, the change that adds the row adds its item here.
| Item | Owner | Priority | Status |
|---|---|---|---|
Add defining_code to the coding-purpose code systemHTA-170 | Brett Esler | high | Open; mis-filed, and Gino has taken a task to refile it. The coding-purpose code system is FHIR-I’s, in the Extensions Registry rather than THO, so the request belongs as a FHIR- ticket against the Extensions Registry; 5.3.0 has no code for a defining code. The group has leaned towards withdrawing it as userSelected is equivalent enough, but this guide recommends keeping it: userSelected claims a user chose the code, so it cannot mark an openEHR defining code, and without a marker the defining code is carried only by the order of the codings, which R5 says SHALL NOT be used to infer meaning. |
Add ~ (approximate) to Quantity.comparatorFHIR-56000 | Gino | medium | Resolved and applied in R6: ~ Approximately is in the published R6 drafts 6.0.0-ballot5 and 6.0.0-snapshot1 (July 2026). They recommend reading it as within 10% of the stated value while allowing other values, and say systems SHOULD state more with the quantity-confidenceInterval extension. Not available in an R5 instance. |
A hash-algorithm extension on AttachmentFHIR-55422 | Gino | medium | Resolved and published. The core alternate-hash extension is in the Extensions Registry 5.3.0 (trial use), keeping SHA-1 as Attachment.hash’s default; this guide carries a non-SHA-1 integrity_check in it. The R6 drafts (6.0.0-snapshot1) still define Attachment.hash as SHA-1, so the extension remains the route in R6. |
A compression-algorithm extension on AttachmentFHIR-56003 | Gino | low | Open, in discussion; no compression or content-encoding extension exists in the Extensions Registry. This guide takes the pragmatic alternative the ticket records: inline data compressed with gzip, zlib, or deflate is decompressed during conversion, because copying compressed bytes under the content’s own media type would let contentType misdescribe them. That does not remove the need entirely: content held by reference cannot be decompressed by a converter and is refused, as are compress and other. |
A FHIR representation for pk_fraction and pk_integer_fraction formattingFHIR-56001 | Gino | medium | Resolved and applied in the Extensions Registry’s source: rendered-value now allows Ratio. Not yet in a published release — 5.3.0 does not have the context — but this guide already emits it for pk_fraction and pk_integer_fraction, so a validator using 5.3.0 rejects those instances until the next release. A rendering is not a kind, so the inbound direction stays unmapped. |
A thumbnail extension on AttachmentFHIR-56002 | Gino | medium | Resolved and applied in the Extensions Registry’s source: attachment-thumbnail attaches a thumbnail Attachment to an Attachment, attachment-isThumbnail flags one, and documentreference-thumbnail is retired in their favour. Not yet in a published release — 5.3.0 defines neither — but this guide already carries DV_MULTIMEDIA.thumbnail in attachment-thumbnail, so a validator using 5.3.0 rejects those instances until the next release. |
| Item | Owner | Priority | Status |
|---|---|---|---|
Relax the normal_status binding from required to extensible | openEHR | high | In progress. Ticket filed November 2025; the principle is agreed. |
Merge LINK and PARTY_IDENTIFIED onto a common Reference Model class | openEHR | medium | Open. Strong consensus on the need; OBJECT_REF identified as the right structure. A Reference Model change is required. This guide maps the RM as published today. |
A DV_IDENTIFIER cluster archetype carrying use, period, and several types | Modelling team | medium | Done; needs to be uploaded for review. |
A narrative cluster archetype for the COMPOSITION extension slot | Modelling team | medium | Done; needs to be uploaded for review. |
Constraining units_system in Archetype Designer, and an RM Money type | Ian | low | Will not do as an archetype — implementation guidance is more appropriate, because the tooling does not currently allow the binding to be set even though ADL permits it. Two change requests are open instead. |
Add whitespace restrictions to CODE_PHRASE.code_string | openEHR | low | Proposed September 2025; the group agreed to propose it. No ticket confirmed. Without it, a code_string containing whitespace has no valid FHIR code form at all, so this guide produces nothing for one rather than an instance a validator rejects — see the code_string[whitespace] row on Coded Data. |
Relax the TERM_MAPPING.purpose binding from required to extensible | openEHR IG | medium | In progress. A binding-relaxation ticket was filed November 2025; the specific TERM_MAPPING change is not confirmed. The current required binding is considered incorrect. |
| Support both FHIR value sets — data-absent-reason and v3 NullFlavor | openEHR | medium | Planned; agreed February 2026. The back-transformation is keyed on which code system is present. ConceptMaps not yet created. |
| Item | Owner | Priority | Status |
|---|---|---|---|
| Publish an ISO 8601 ↔ UCUM duration conversion reference library | Severin | medium | In progress. The conversion table was delivered February 2026 and is implemented in this guide’s reference implementation; a standalone library is not yet published. If one is, it supersedes the reference helper rather than conflicting with it. |
| Write the ConceptMaps for null_flavour ↔ data-absent-reason and ↔ NullFlavor | Group | medium | Open; agreed as needed February 2026. The narrative correspondence tables in Coded Data are the input, so the remaining work is transcription. |
| Re-review the data-absent-reason → null_flavour code assignments against THO | Group | medium | Open; raised by the FHIR-side review, October 2026. Several inbound assignments disagree with the THO data-absent-reason hierarchy or definitions: asked-declined is a child of unknown but is assigned 272; not-a-number and the two infinities are children of error but are assigned 253 while error is assigned 271; not-permitted (not permitted in this context) is assigned 272 masked; and unsupported (the source system cannot support the element) is assigned 273 not applicable. This guide keeps the current assignments until the group re-reviews them; the ConceptMaps above depend on the outcome. |
Decide whether DV_PARAGRAPH maps through its markdown DV_TEXT replacement | Group | low | Proposed by the FHIR-side review, October 2026. The Reference Model deprecates DV_PARAGRAPH in favour of markdown-formatted DV_TEXT and says it "should be supported in at least a basic way". The proposal: render the items as markdown paragraphs, with hyperlinks as markdown links, and map the result as DV_TEXT ↔ markdown does; item codings, term mappings, and per-item language would be dropped, and the reverse direction would produce a DV_TEXT, never the deprecated type. Not adopted: the mapping stays not discussed until the group decides. |
Decide whether the time specifications map to Timing through their shared HL7 v3 basis | Group | low | Proposed by the FHIR-side review, October 2026. DV_GENERAL_TIME_SPECIFICATION is based on HL7 v3 GTS and DV_PERIODIC_TIME_SPECIFICATION on PIVL and EIVL; R5’s own RIM mappings give Timing as QSET<TS> (GTS) and Timing.repeat as PIVL or EIVL, and Timing.code accepts the v3 GTSAbbreviation codes. The proposal: parse the v3 literal syntax in the DV_PARSABLE value and map it through that shared basis, separately from the archetype-level scheduling deferred on Temporal Data. Not adopted: the mapping stays not discussed until the group decides. |
A standardised DV_AMOUNT mapping pattern document | Group | high | Addressed by this guide. The policy — every inherited field promotes to the Observation level — was agreed January 2026, and the pattern is now stated once on Cross-Cutting Concerns and applied per type. |
Choose the system + version → terminology_id format | Group | high | Open. Trade-offs discussed September 2025; the pipe form has support; the decision is deferred. This guide adopts nothing — the reference helpers take the format as a required parameter with no default, and no registered converter calls them. |
Use openEHR’s published FHIR CodeSystems as the system for openehr codes | Group | medium | Raised by the FHIR-side review, October 2026. A CODE_PHRASE from openEHR’s own terminology reaches Coding.system as the bare openehr, and R5 asks for "an absolute reference to some definition that establishes the system clearly and unambiguously". openEHR now publishes a FHIR CodeSystem per vocabulary — TERM 3.1.0, for example https://specifications.openehr.org/fhir/codesystem-instruction_states — so each code has a canonical to name. Choosing it needs the vocabulary a code belongs to, which terminology_id alone does not say, and it bears on the format decision above. This guide changes nothing yet. |
A default strategy for a missing mandatory terminology_id or code_string | Group | high | Open. Options brainstormed September 2025 and February 2026; no formal decision. The candidates are stated on Coded Data and none is chosen. |
| A detailed ISO 8601 subset comparison | Group | medium | Addressed by this guide. Acknowledged as roughly 90% aligned in January 2026; the comparison is now published on Cross-Cutting Concerns, generated from the code that implements the conversion. |
| Document the general case of cross-version extensions | Gino | medium | Open. The agreed handling: where FHIR supplies no value but does supply an extension, use the value from the extension; for coded values, use TERM_MAPPING to carry the several values. |
Decide how DV_PARSABLE.formalism reaches FHIR, if it can | Group | high | Reopened by review. The working group recorded a Decision made to carry the formalism in the mimeType extension. That extension declares its context as Questionnaire.item and ElementDefinition and exists to constrain the attachments an element permits, so it cannot carry an instance’s syntax and the decision is not supported by the definition it names. This guide publishes the gap rather than an instance no validator accepts, which makes DV_PARSABLE ↔ string one-directional until the question is settled. The FHIR-side review found partial routes, each covering some formalisms: a Coding whose system names the syntax — HGVS has the THO-registered identifier http://varnomen.hgvs.org — an Attachment, whose contentType names it where the formalism is a MIME type, and an Expression, whose language and expression are the structural twin of formalism and value where the target element is typed Expression and the formalism is an expression language such as text/cql. None carries an arbitrary formalism such as GLIF 1.0 into a string. |
Decide where a DV_TIME UTC offset goes, given FHIR time has no home for one | Group | high | Reopened by review. The timezone extension admits time as a context but is a code required-bound to the IANA zone names, and an offset is neither a zone name nor derivable from one. The guide therefore publishes the offset as a named drop and recommends dateTime where the offset is clinically significant. Whether to request a FHIR extension that carries an offset on a time is undecided. |