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

Temporal Data

Page standards status: Informative

Temporal data

openEHR's temporal values inherit from the abstract DV_TEMPORAL class: DV_DATE, DV_TIME, DV_DATE_TIME, and DV_DURATION. FHIR uses the date, dateTime, instant, and time primitives, plus Duration (a constrained Quantity) and Period.

Both systems use ISO 8601, which makes this category look easier than it is. Six facts govern the rows.

The two ISO 8601 subsets are not the same subset. openEHR permits compact forms — 20250301, T143000 — while FHIR requires the extended form — 2025-03-01, 14:30:00. Compact values SHALL be expanded before mapping to FHIR. The precise comparison is published as a machine-generated table on Cross-Cutting Concerns, rendered directly from the code that implements the conversion, so the guide and the reference implementation cannot disagree about it.

Partial precision is meaningful and SHALL be preserved. Where an openEHR value is partial — year and month only — the FHIR lexical form is truncated to match, never padded. 202604 becomes 2026-04, not 2026-04-01. Padding invents a day that the source did not record.

That rule holds for every partial form the FHIR regexes admit, which is every date and every dateTime down to the year. It cannot hold in one place: FHIR time makes seconds mandatory, and FHIR dateTime makes them mandatory once a time is present, so an openEHR 14:30 or 2026-03-01T14:30 has no shorter FHIR form to truncate to. Those two values SHALL be completed to 14:30:00 and 2026-03-01T14:30:00, and the completion is a named loss — DV_TIME.value[minute-precision] and DV_DATE_TIME.value[minute-precision] — not a silent one. FHIR additionally requires a UTC offset alongside a time in a dateTime: that offset SHALL come from the source or its context, and a data-type conversion never invents one. A DV_DATE_TIME that states a time and no offset is therefore refused — nothing is produced, rather than a value padded with Z that would state a time zone the source did not. That gap is the DV_DATE_TIME.value[no-offset] row below. It is a narrative rule rather than a lexical one: R5's published dateTime regex makes the zone group optional, and only the sentence beside it requires the offset.

Fractional seconds differ in width. FHIR allows up to nine decimal digits; openEHR restricts to three. Excess precision is truncated when mapping FHIR → openEHR, which is a named drop rather than a rounding decision.

FHIR time cannot carry a time zone, and no extension rescues it. dateTime and instant carry an offset directly; time does not. The timezone extension does admit time as a context, but it declares value[x]: code 1..1 with a required binding to http://hl7.org/fhir/ValueSet/timezones, whose codes are IANA zone names. +01:00 is not a permissible code, and a zone name is not an offset — one zone name denotes different offsets across daylight saving. A DV_TIME offset is therefore a named drop, published at DV_TIME.value[timezone], and where the offset is clinically significant the value SHOULD be mapped to a dateTime instead. The question of how else to carry it is open.

Some FHIR resources split a date and its time across two elements. Patient.birthDate is a date, with the time conveyed by the patient-birthTime extension. A mapping engine has to know these element-specific patterns; they are not derivable from the data type alone.

Duration needs a real conversion. ISO 8601 durations and UCUM quantities are different representations, and not every ISO 8601 duration has a UCUM equivalent. The conversion is implemented in the reference implementation and the non-convertible cases are reported rather than silently approximated. Two properties of that conversion are easy to miss. Durations may be negative, and the sign belongs before the P: openEHR's Iso8601_duration gives -P3M as its own example while requiring every individual component to be non-negative, so -P3M is legal and P-3M is not. And a millisecond-coded Duration does not come back as one: openEHR has no millisecond designator, so 5 ms can only be written PT0.005S, which reads back as 0.005 seconds — a different stated number in a different unit. That is published as its own Duration.value[ms] gap rather than folded into the value row's verdict. DV_DURATION is also a DV_AMOUNT and a Duration is a Quantity, so the inherited comparator, accuracy, and reference-range attributes follow the DV_AMOUNT pattern as they do for any quantity.

Date and time intervals map to Period and are covered here. Numeric intervals map to Range and are covered in Quantities.

See Conventions for how to read the tables.

Summary

openEHR typeFHIR type→ FHIR→ openEHRMaturityScope
DV_DATEdate | dateTimelosslesslosslesssettleddatatype
DV_TIMEtimelossylossyopendatatype
DV_DATE_TIMEdateTime | instantlossylossyopendatatype
DV_DURATIONDurationlossylossyopendatatype
DV_GENERAL_TIME_SPECIFICATION / DV_PERIODIC_TIME_SPECIFICATIONTimingunmappedunmappednot-discusseddatatype

DV_DATE and date / dateTime

Sources: openEHR RM — DV_DATE · openEHR BASE — ISO 8601 time types · FHIR R5 — date

openEHR fieldFHIR target→ FHIR→ openEHRMaturityNotes
DV_DATE.value 1..1when the target element is typed date: date
when the target element is typed dateTime and carries only a date: dateTime
losslesslosslesssettledopenEHR permits compact forms (20260301, 202603) and FHIR requires the extended form, so a compact value SHALL be expanded before mapping. Partial precision is preserved by truncating the FHIR lexical form, never padding it: 202604 becomes 2026-04, not 2026-04-01. Some FHIR resources split a date from its time — Patient.birthDate is a date with the time in the patient-birthTime extension — and a mapping engine has to know those patterns, because they are not derivable from the data type.

Worked example - a partial date

Year-and-month precision is preserved by truncating the FHIR lexical form, never by padding it.

{
  "_type": "DV_DATE",
  "value": "2026-04"
}
"2026-04"

DV_TIME and time

Sources: openEHR RM — DV_TIME · openEHR BASE — ISO 8601 time types · FHIR R5 — time

openEHR fieldFHIR target→ FHIR→ openEHRMaturityNotes
DV_TIME.value 1..1time.valuelosslesslossysettled→ openEHR: drops time.value[fractional-seconds] — FHIR permits up to nine fractional-second digits and openEHR restricts to three, so anything finer than a millisecond is truncated FHIR time also requires seconds, so an openEHR 14:30 is completed to 14:30:00. That sub-case is a named drop in its own right and is stated on the row below, not folded into this one. What this row drops inbound is only the sub-second precision beyond three digits, not the value: the time of day itself carries in both directions.
DV_TIME.value[minute-precision] 1..1—
no counterpart (inventory)
lossyunmappedsettled→ FHIR: drops DV_TIME.value[minute-precision] — an openEHR 14:30 is completed to 14:30:00, so the FHIR value states a precision the source did not. This is the one case the guide’s "truncate, never pad" rule cannot cover, because FHIR offers no shorter time form to truncate to → openEHR: Nothing arrives to map back: a completed 14:30:00 is indistinguishable from one the source stated in full. The sub-case is split out so the round-trip matrix can police it: the completion is reported at this path, and the parent DV_TIME.value row keeps its lossless claim for every value that already states seconds.
DV_TIME.value[hour-precision] 1..1—
no counterpart (inventory)
lossyunmappedsettled→ FHIR: drops DV_TIME.value[hour-precision] — valid_iso8601_time publishes hh as a partial form, so an openEHR 14 is a conformant DV_TIME. It is completed to 14:00:00, so the FHIR value states two levels of precision the source did not — the minute and the second. As with minute precision, FHIR offers no shorter time form to truncate to → openEHR: Nothing arrives to map back: a completed 14:00:00 is indistinguishable from one the source stated in full. Hour precision is a second completion sub-case, not the minute one restated. The row above adds seconds to 14:30; this row adds minutes and seconds to 14, and the two drops are reported at different paths so a reader can tell how much precision the FHIR value claims that the source did not.
DV_TIME.value[timezone] 0..1—
no counterpart (inventory)
lossyunmappedopen→ FHIR: drops DV_TIME.value[timezone] — the time of day itself carries; the UTC offset does not, because no FHIR time element or extension has a home for one. Where the offset matters, the value belongs in a dateTime, which carries an offset directly → openEHR: Nothing arrives to map back, because nothing was emitted. An incoming FHIR time states no offset, so the local offset has to come from the enclosing resource or from deployment context. (owner: session:dv-time-offset) dateTime and instant can carry an offset, and a DV_TIME whose offset is clinically significant SHOULD be mapped to one of those rather than to time. openEHR data without a time zone is rare in practice, which is what makes this gap worth an open item rather than a footnote.

Worked example - a time with an offset

{
  "_type": "DV_TIME",
  "value": "14:30:00+01:00"
}
{
  "value": "14:30:00"
}

DV_DATE_TIME and dateTime / instant

Sources: openEHR RM — DV_DATE_TIME · openEHR RM — DV_TEMPORAL · FHIR R5 — dateTime · FHIR R5 — instant

openEHR fieldFHIR target→ FHIR→ openEHRMaturityNotes
DV_DATE_TIME.value 1..1when the target element is typed dateTime: dateTime
when the value is fully precise and the target element is typed instant: instant
losslesslosslesssettledUnlike time, dateTime carries a UTC offset directly, and its R5 regex admits partial precision down to the year, so 2026-03 is truncated, never padded. What the regex does not admit is a time without seconds; that sub-case is a named drop on the row below. R5 separately requires an offset once hours and minutes are present, so a source stating a time and no offset is refused rather than padded with Z — the row after next.
DV_DATE_TIME.value[minute-precision] 1..1—
no counterpart (inventory)
lossyunmappedsettled→ FHIR: drops DV_DATE_TIME.value[minute-precision] — an openEHR 2026-03-01T14:30 is completed to 2026-03-01T14:30:00, so the FHIR value states a precision the source did not. FHIR additionally requires a UTC offset alongside a time: that offset SHALL come from the source or its context and is never invented by a data-type conversion → openEHR: Nothing arrives to map back: a completed …T14:30:00 is indistinguishable from one the source stated in full. Partial precision above the time — 2026, 2026-03, 2026-03-01 — is a different case entirely and is carried by truncation, losslessly, on the row above. Only the minute-without-seconds form has no FHIR representation.
DV_DATE_TIME.value[hour-precision] 1..1—
no counterpart (inventory)
lossyunmappedsettled→ FHIR: drops DV_DATE_TIME.value[hour-precision] — valid_iso8601_date_time publishes YYYY-MM-DDThh and YYYYMMDDThh as partial forms, so an openEHR 2026-03-01T14 is conformant. It is completed to 2026-03-01T14:00:00, so the FHIR value states two levels of precision the source did not. FHIR additionally requires a UTC offset alongside a time: that offset SHALL come from the source or its context and is never invented by a data-type conversion, so a source stating neither an offset nor the minutes produces nothing at all → openEHR: Nothing arrives to map back: a completed …T14:00:00 is indistinguishable from one the source stated in full. The drop is reported even when the offset rule then refuses the whole value, so a reader is told both things that are wrong with 2026-03-01T14 rather than only the first. Where the source does carry an offset, the completion happens and a dateTime is produced, exactly as for minute precision above.
DV_DATE_TIME.value[no-offset] 1..1—
no counterpart (inventory)
unmappedunmappedopen→ FHIR: Nothing is produced. The offset has to come from the source or from the surrounding template, and a data-type conversion sees neither: padding with Z would state a time zone the source did not, and emitting the value without an offset would publish an invalid FHIR primitive as a faithful conversion. (owner: working-group) → openEHR: Nothing arrives to map back, because nothing was emitted. (owner: working-group) This is a narrative rule, not a lexical one, which is why a regex-only reading of R5 misses it. Where the offset is known to the mapping engine — from the composition, the template, or deployment configuration — it SHOULD be applied before the data-type conversion runs, at which point the value takes the ordinary DV_DATE_TIME.value row above. openEHR data without a time zone is rare in practice, which is what keeps this an open item rather than a blocking gap.
DV_DATE_TIME.accuracy 0..1—
no counterpart (inventory)
unmappedunmappedsettled→ FHIR: Dropped. accuracy and magnitude_status, inherited from DV_TEMPORAL and DV_QUANTIFIED, have no FHIR home on a temporal primitive; where the source value is partial, that precision is preserved by truncating the lexical form instead. → openEHR: Nothing arrives, because nothing was emitted.

DV_DURATION and Duration

Sources: openEHR RM — DV_DURATION · openEHR BASE — Iso8601_duration · FHIR R5 — Duration · FHIR R5 — Age

openEHR fieldFHIR target→ FHIR→ openEHRMaturityNotes
DV_DURATION.value 1..1Duration.valuelosslesslosslessopenA UCUM quantity carries one unit, so a single-component duration converts cleanly: a ↔ P{n}Y, mo ↔ P{n}M, wk ↔ P{n}W, d ↔ P{n}D, h ↔ PT{n}H, min ↔ PT{n}M, and s ↔ PT{n}S. Durations may be negative, and the sign belongs before the P: openEHR’s Iso8601_duration gives -P3M — an age of minus three months, for a very premature newborn — as its own example, while its Years_valid … Seconds_valid invariants require every individual component to be non-negative, so P-3M is not a legal openEHR duration. A negative Duration.value is legal FHIR; invariant drt-1 constrains only the code. An element typed Age is stricter — see the [not-positive-age] sub-case below. A millisecond-coded Duration is the one case that does not carry: it is the Duration.value[ms] row below, not this one. Note that M means months before the T separator and minutes after it. UCUM defines a as the Julian year of 365.25 days and mo as one twelfth of it, while ISO 8601 Y and M are calendar units, so P1Y ↔ 1 a round-trips as written but is not interchangeable in date arithmetic. Even within UCUM, date and time conversions are not straightforward, and sub-millisecond precision may be lost. A standalone conversion library is planned by the working group; if one is published it supersedes the reference helper rather than conflicting with it.
—
no counterpart (inventory)
when the magnitude, which is rescaled to seconds: Duration.value[ms]
when the unit, which reads back as s: Duration.code[ms]
unmappedunmappedopen→ FHIR: No DV_DURATION produces a millisecond-coded Duration: with no ms designator to parse, an ISO 8601 duration always reads back as seconds. (owner: working-group) → openEHR: The magnitude is rescaled with the unit — {value: 5, code: "ms"} becomes PT0.005S, and reading that back gives {value: 0.005, code: "s"}. The duration is the same length of time and the stated number is not the same number, so the millisecond form itself does not survive. (owner: working-group) A FHIR-sourced gap, in the pattern of Quantity.comparator[ad] and Attachment.size[overflow]: the conversion still produces a DV_DURATION, and the row says the FHIR feature — a magnitude stated in milliseconds — has no openEHR form. It is deliberately not an openEHR-side path: nothing in DV_DURATION emits it, and declaring one would make every ordinary duration fixture report a loss it does not make.
DV_DURATION.value[multi-component] 1..1—
no counterpart (inventory)
unmappedunmappedopen→ FHIR: Nothing is produced. Combining the components would invent a precision the source does not have, and an empty Duration is an invalid instance claiming to be a partial success. (owner: working-group) → openEHR: Nothing arrives, because nothing was emitted. (owner: working-group) Split out from the value row so the round-trip matrix polices it: a single-component duration converts cleanly and keeps its lossless claim, and this sub-case is where the conversion stops.
DV_DURATION.value[not-positive-age] 1..1—
no counterpart (inventory)
unmappedunmappedsettled→ FHIR: A zero or negative duration — openEHR’s own example -P3M, an age of minus three months for a very premature newborn, among them — cannot be carried in an element typed Age, such as Condition.onsetAge. An element typed Duration carries it. → openEHR: An Age is always positive, so nothing arrives. archetype scope: the sub-case arises only where the target element is typed Age, which the element decides, not the data type.
DV_DURATION.value[designator] 1..1Duration.codelosslesslosslesssettledAn ISO 8601 duration names its unit inside the value — the designator Y, M, W, D, H, M, or S — so openEHR has no separate field for it. The UCUM code is derived from the designator and folded back into it, and Duration.system is UCUM, as drt-1 requires.
DV_DURATION.magnitude_status 0..1Duration.comparatorlosslesslosslesssettledAs for Quantity: <, <=, >, and >= are direct, and openEHR = is the point value, represented in FHIR by the absence of comparator.
DV_DURATION.magnitude_status[~] 0..1—
no counterpart (inventory)
unmappedunmappedopen→ FHIR: An approximate duration cannot be carried in an R5 Duration. FHIR-56000 adds ~ in the published R6 drafts; it is not applied in R5. (owner: FHIR-56000) → openEHR: Nothing in an R5 instance carries the approximate marker back. (owner: FHIR-56000) The same R6-era item as DV_QUANTITY.magnitude_status[~], recorded as a forward reference and not presented as an R5 mapping; the quantity-confidenceInterval extension is not used for it, for the same reason.
—
no counterpart (inventory)
Duration.comparator[ad]unmappedunmappedopen→ FHIR: No openEHR value produces ad. (owner: working-group) → openEHR: A Duration with comparator = ad has no faithful DV_DURATION form; the comparator is dropped and the duration alone would misstate the value. (owner: working-group) The same gap as Quantity.comparator[ad], which the group read as unclear.
DV_DURATION.accuracy 0..1Duration.extension[quantity-accuracy]† (extension)losslesslosslessopenThe extension’s context is Quantity, which a Duration is. As for Quantity, accuracy_is_percent is carried by the accuracy quantity’s unit — UCUM % for a relative accuracy, the duration’s own unit otherwise. A duration’s unit is always a unit of time, never %, so the ambiguity Quantity publishes as a sub-case cannot arise here.
DV_DURATION.normal_range 0..1Observation.referenceRangelosslesslosslesssettledarchetype scope, as for Quantity: carried with referenceRange.type = normal where the duration is an Observation.valueQuantity.
DV_DURATION.other_reference_ranges 0..*Observation.referenceRangelosslesslosslesssettledarchetype scope, as for Quantity. REFERENCE_RANGE.meaning becomes referenceRange.type, which is ≠ normal for these.
DV_DURATION.normal_status 0..1Observation.interpretationlosslesslossyopen→ openEHR: drops Observation.interpretation — openEHR binds normal_status to its normal_statuses code system with required strength, so an interpretation coded outside that set cannot be carried; a change request to relax the binding to extensible is open archetype scope, as for Quantity.
DV_DURATION.value 1..1Timing.repeatunmappedunmappedopen→ FHIR: Deferred; see below. (owner: working-group) → openEHR: Deferred; see below. (owner: working-group) archetype scope. Complex scheduling — dosage and treatment plans — is handled in openEHR by a combination of four archetypes: daily timing, non-daily timing, service direction, and therapeutic direction, the last two differing only in whether the use is medication-related. The full timing and dosage mapping is acknowledged as the hardest mapping problem and is deferred to a dedicated archetype-level session, not least because both standards are changing: the R6 approach to Timing appears closer to the openEHR one. A row whose own note defers the work may not also claim lossless, so nothing is asserted in either direction — the same treatment DV_GENERAL_TIME_SPECIFICATION gets two rows below.

Worked example - six months

{
  "_type": "DV_DURATION",
  "value": "P6M"
}
{
  "value": 6,
  "system": "http://unitsofmeasure.org",
  "code": "mo"
}

Time specifications and Timing

Sources: openEHR RM — Time specification package · FHIR R5 — Timing

openEHR fieldFHIR target→ FHIR→ openEHRMaturityNotes
DV_GENERAL_TIME_SPECIFICATION.value 1..1—
no counterpart (inventory)
unmappedunmappednot-discussed→ FHIR: Not yet discussed. No mapping is asserted, because none has been agreed. (owner: working-group) → openEHR: Not yet discussed. (owner: working-group) Timing.code’s preferred TimingAbbreviation value set includes the v3 GTSAbbreviation codes — BID, TID, Q4H, and the like — so the two sides share a vocabulary as well as a basis. Any mapping has to parse the v3 literal syntax the DV_PARSABLE value carries. Complex scheduling, which openEHR models with timing archetypes rather than these types, is deferred on DV_DURATION ↔ Duration; a route through the shared v3 basis is proposed on Open Items.
DV_PERIODIC_TIME_SPECIFICATION.value 1..1—
no counterpart (inventory)
unmappedunmappednot-discussed→ FHIR: Not yet discussed. (owner: working-group) → openEHR: Not yet discussed. (owner: working-group)