openEHR to FHIR Data Type Mapping
0.1.0 - ci-build International flag

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

Open Items

Page standards status: Informative

Open items and review coverage

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:

  • Reviewer coverage — which mappings have been reviewed from the openEHR side, from the FHIR side, from both, or from neither. Coverage is uneven. A mapping reviewed on one side only carries more risk of an unsupported claim than one reviewed on both, and hiding that would misrepresent the guide's maturity.
  • The open-items register — every unresolved action, who owns it, and what its current status is.

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.

Reviewer coverage

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.

MappingCategoryopenEHR reviewFHIR reviewNotes
DV_QUANTITY ↔ QuantityQuantities✓ Diego, Ian✓ Gino
DV_COUNT ↔ CountQuantities✓ Diego, Ian✓ Gino
DV_PROPORTION ↔ RatioQuantities✓ Diego, Ian✓ Gino
DV_INTERVAL ↔ Range / Period / QuantityQuantities✓ Diego, Ian✓ Gino
DV_QUANTITY ↔ Money / MoneyQuantityQuantitiesunchecked✓ GinoFHIR: 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 ↔ SimpleQuantityQuantities✓ Diego, Ian✓ GinoFHIR: 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.componentQuantities✓ Diego, Ian✓ Gino
DV_SCALE ↔ Observation.componentQuantities✓ Diego, Ian✓ Gino
CODE_PHRASE ↔ CodingCoded Data✓ Severin✓ Gino
DV_CODED_TEXT ↔ CodeableConcept / CodingCoded Data✓ Severin✓ Gino
TERM_MAPPING ↔ CodeableConcept.codingCoded Data✓ Severin✓ Gino
null_flavour ↔ data-absent-reasonCoded Data✓ Severin✓ GinoFHIR: 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 ↔ booleanBoolean Dataunchecked✓ GinoFHIR: 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 ↔ integerNumeric Primitivesunchecked✓ GinoFHIR: 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 ↔ integer64Numeric Primitivesunchecked✓ GinoFHIR: 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 ↔ decimalNumeric Primitivesunchecked✓ GinoFHIR: 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 / markdownTextual Data✓ Ciprian✓ Gino
DV_PARAGRAPH ↔ markdown / stringTextual Dataunchecked✓ GinoFHIR: 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 ↔ IdentifierResource-Locator Data and References✓ Severin✓ Gino
DV_URI / DV_EHR_URI ↔ uri / urlResource-Locator Data and Referencesunchecked✓ GinoFHIR: 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 / CodeableReferenceResource-Locator Data and References✓ Severin✓ GinoFHIR: 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 / dateTimeTemporal Data✓ Ciprian✓ Gino
DV_TIME ↔ timeTemporal Data✓ Ciprian✓ Gino
DV_DATE_TIME ↔ dateTime / instantTemporal Data✓ Ciprian✓ Gino
DV_DURATION ↔ DurationTemporal Data✓ Diego, Ian, Ciprian✓ GinoFHIR: 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 ↔ TimingTemporal Dataunchecked✓ GinoFHIR: 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 ↔ AttachmentOther Dataunchecked✓ GinoFHIR: 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 ↔ stringOther Dataunchecked✓ GinoFHIR: 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 ↔ CodeableConceptOther Data✓ Severin✓ GinoFHIR: 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 counterpartGapsunchecked✓ GinoFHIR: 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 discussedGapsunchecked✓ GinoFHIR: 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.

The register

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.

FHIR-side actions

ItemOwnerPriorityStatus
Add defining_code to the coding-purpose code system
HTA-170
Brett EslerhighOpen; 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.comparator
FHIR-56000
GinomediumResolved 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 Attachment
FHIR-55422
GinomediumResolved 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 Attachment
FHIR-56003
GinolowOpen, 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 formatting
FHIR-56001
GinomediumResolved 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 Attachment
FHIR-56002
GinomediumResolved 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.

openEHR-side actions

ItemOwnerPriorityStatus
Relax the normal_status binding from required to extensibleopenEHRhighIn progress. Ticket filed November 2025; the principle is agreed.
Merge LINK and PARTY_IDENTIFIED onto a common Reference Model classopenEHRmediumOpen. 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 typesModelling teammediumDone; needs to be uploaded for review.
A narrative cluster archetype for the COMPOSITION extension slotModelling teammediumDone; needs to be uploaded for review.
Constraining units_system in Archetype Designer, and an RM Money typeIanlowWill 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_stringopenEHRlowProposed 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 extensibleopenEHR IGmediumIn 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 NullFlavoropenEHRmediumPlanned; agreed February 2026. The back-transformation is keyed on which code system is present. ConceptMaps not yet created.

Documentation and tooling

ItemOwnerPriorityStatus
Publish an ISO 8601 ↔ UCUM duration conversion reference librarySeverinmediumIn 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 ↔ NullFlavorGroupmediumOpen; 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 THOGroupmediumOpen; 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 replacementGrouplowProposed 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 basisGrouplowProposed 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 documentGrouphighAddressed 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 formatGrouphighOpen. 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 codesGroupmediumRaised 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_stringGrouphighOpen. 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 comparisonGroupmediumAddressed 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 extensionsGinomediumOpen. 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 canGrouphighReopened 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 oneGrouphighReopened 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.