FHIR Extensions Pack
5.4.0 - May 2026 International flag

FHIR Extensions Pack, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 5.4.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-extensions/ and changes regularly. See the Directory of published versions

Extension: Relative Date Criteria

Official URL: http://hl7.org/fhir/StructureDefinition/relative-date Version: 5.4.0
Standards status: Trial-use Maturity Level: 3 Computable Name: RelativeDateCriteria
Other Identifiers: OID:2.16.840.1.113883.4.642.5.1791

Specifies that a date is relative to some event. The event happens [Duration] after [Event].

Context of Use

This extension may be used on the following element(s)

Usage info

Usages:

  • This Extension is not used by any profiles in this Specification

You can also check for usages in the FHIR IG Statistics

Changes since version 5.3.0:

  • The data elements list has changed
  • One or more text definitions, invariants or bindings have changed (Extension, Extension.extension:targetReference, Extension.extension:targetCode)
  • Formal Views of Extension Content

    Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

    This structure is derived from Extension

    Summary

    Complex Extension: Specifies that a date is relative to some event. The event happens [Duration] after [Event].

    • targetReference: Reference: The specific event that the date(time) is relative to - e.g. an Encounter, an Observation, a Procedure, etc.
    • targetCode: CodeableConcept: The generic type of event that the date(time) is relative to.
    • targetPath: string: The path to the element of the target that specifies the anchoring date or timeframe for the relative date.
    • relationship: code: [Deprecated] Defines the relationship between the event and the date.
    • offset: Duration, Range: The duration before or after the event that the element on which this extension appears is asserted to be.

    Maturity: 3

    This structure is derived from Extension

    NameFlagsCard.TypeDescription & Constraints    Filter: doco
    Extension C 0..1 Extension Relative Date Criteria
    Constraints: rdt-1
    Extension.Slices for extension Content/Rules for all slices
    Extension.Slices for extension.extension:targetReference C 0..1 Extension Specific event that the date is relative to
    Extension.Slices for extension.extension:targetReference.extension 0..0 Extension
    Extension.Slices for extension.extension:targetReference.url 1..1 uri "targetReference"
    Extension.Slices for extension.extension:targetReference.value[x] 1..1 Reference() Value of extension
    Extension.Slices for extension.extension:targetCode C 0..1 Extension Kind of event that the date is relative to
    Extension.Slices for extension.extension:targetCode.extension 0..0 Extension
    Extension.Slices for extension.extension:targetCode.url 1..1 uri "targetCode"
    Extension.Slices for extension.extension:targetCode.value[x] 1..1 CodeableConcept Value of extension
    Extension.Slices for extension.extension:targetPath 0..1 Extension Relative to which element on the event
    Extension.Slices for extension.extension:targetPath.extension 0..0 Extension
    Extension.Slices for extension.extension:targetPath.url 1..1 uri "targetPath"
    Extension.Slices for extension.extension:targetPath.value[x] 1..1 string Value of extension
    Extension.Slices for extension.extension:relationship XD 0..1 Extension before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end
    Extension.Slices for extension.extension:relationship.extension 0..0 Extension
    Extension.Slices for extension.extension:relationship.url 1..1 uri "relationship"
    Extension.Slices for extension.extension:relationship.value[x] 1..1 code Value of extension
    Binding: ActionRelationshipType (preferred)
    Extension.Slices for extension.extension:offset 1..1 Extension Duration before or after the event
    Extension.Slices for extension.extension:offset.extension 0..0 Extension
    Extension.Slices for extension.extension:offset.url 1..1 uri "offset"
    Extension.Slices for extension.extension:offset.value[x] 1..1 Value of extension
    Extension.Slices for extension.extension:offset.value[x].valueDuration Duration
    Extension.Slices for extension.extension:offset.value[x].valueRange Range
    Extension.url 1..1 uri "http://hl7.org/fhir/StructureDefinition/relative-date"
    Extension.value[x] 0..0 Value of extension

    doco Documentation for this format
    NameFlagsCard.TypeDescription & Constraints    Filter: doco
    Extension C 0..1 Extension Relative Date Criteria
    Constraints: rdt-1
    Extension.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension 1..* Extension Additional content defined by implementations
    Slice: Unordered, Open by value:url
    Extension.Slices for extension.extension:targetReference C 0..1 Extension Specific event that the date is relative to
    Extension.Slices for extension.extension:targetReference.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:targetReference.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:targetReference.url 1..1 uri "targetReference"
    Extension.Slices for extension.extension:targetReference.value[x] 1..1 Reference() Value of extension
    Extension.Slices for extension.extension:targetCode C 0..1 Extension Kind of event that the date is relative to
    Extension.Slices for extension.extension:targetCode.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:targetCode.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:targetCode.url 1..1 uri "targetCode"
    Extension.Slices for extension.extension:targetCode.value[x] 1..1 CodeableConcept Value of extension
    Extension.Slices for extension.extension:targetPath 0..1 Extension Relative to which element on the event
    Extension.Slices for extension.extension:targetPath.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:targetPath.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:targetPath.url 1..1 uri "targetPath"
    Extension.Slices for extension.extension:targetPath.value[x] 1..1 string Value of extension
    Extension.Slices for extension.extension:relationship XD 0..1 Extension before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end
    Extension.Slices for extension.extension:relationship.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:relationship.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:relationship.url 1..1 uri "relationship"
    Extension.Slices for extension.extension:relationship.value[x] 1..1 code Value of extension
    Binding: ActionRelationshipType (preferred)
    Extension.Slices for extension.extension:offset 1..1 Extension Duration before or after the event
    Extension.Slices for extension.extension:offset.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:offset.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:offset.url 1..1 uri "offset"
    Extension.Slices for extension.extension:offset.value[x] 1..1 Value of extension
    Extension.Slices for extension.extension:offset.value[x].valueDuration Duration
    Extension.Slices for extension.extension:offset.value[x].valueRange Range
    Extension.url 1..1 uri "http://hl7.org/fhir/StructureDefinition/relative-date"

    doco Documentation for this format

    This structure is derived from Extension

    Summary

    Complex Extension: Specifies that a date is relative to some event. The event happens [Duration] after [Event].

    • targetReference: Reference: The specific event that the date(time) is relative to - e.g. an Encounter, an Observation, a Procedure, etc.
    • targetCode: CodeableConcept: The generic type of event that the date(time) is relative to.
    • targetPath: string: The path to the element of the target that specifies the anchoring date or timeframe for the relative date.
    • relationship: code: [Deprecated] Defines the relationship between the event and the date.
    • offset: Duration, Range: The duration before or after the event that the element on which this extension appears is asserted to be.

    Maturity: 3

    Differential View

    This structure is derived from Extension

    NameFlagsCard.TypeDescription & Constraints    Filter: doco
    Extension C 0..1 Extension Relative Date Criteria
    Constraints: rdt-1
    Extension.Slices for extension Content/Rules for all slices
    Extension.Slices for extension.extension:targetReference C 0..1 Extension Specific event that the date is relative to
    Extension.Slices for extension.extension:targetReference.extension 0..0 Extension
    Extension.Slices for extension.extension:targetReference.url 1..1 uri "targetReference"
    Extension.Slices for extension.extension:targetReference.value[x] 1..1 Reference() Value of extension
    Extension.Slices for extension.extension:targetCode C 0..1 Extension Kind of event that the date is relative to
    Extension.Slices for extension.extension:targetCode.extension 0..0 Extension
    Extension.Slices for extension.extension:targetCode.url 1..1 uri "targetCode"
    Extension.Slices for extension.extension:targetCode.value[x] 1..1 CodeableConcept Value of extension
    Extension.Slices for extension.extension:targetPath 0..1 Extension Relative to which element on the event
    Extension.Slices for extension.extension:targetPath.extension 0..0 Extension
    Extension.Slices for extension.extension:targetPath.url 1..1 uri "targetPath"
    Extension.Slices for extension.extension:targetPath.value[x] 1..1 string Value of extension
    Extension.Slices for extension.extension:relationship XD 0..1 Extension before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end
    Extension.Slices for extension.extension:relationship.extension 0..0 Extension
    Extension.Slices for extension.extension:relationship.url 1..1 uri "relationship"
    Extension.Slices for extension.extension:relationship.value[x] 1..1 code Value of extension
    Binding: ActionRelationshipType (preferred)
    Extension.Slices for extension.extension:offset 1..1 Extension Duration before or after the event
    Extension.Slices for extension.extension:offset.extension 0..0 Extension
    Extension.Slices for extension.extension:offset.url 1..1 uri "offset"
    Extension.Slices for extension.extension:offset.value[x] 1..1 Value of extension
    Extension.Slices for extension.extension:offset.value[x].valueDuration Duration
    Extension.Slices for extension.extension:offset.value[x].valueRange Range
    Extension.url 1..1 uri "http://hl7.org/fhir/StructureDefinition/relative-date"
    Extension.value[x] 0..0 Value of extension

    doco Documentation for this format

    Snapshot View

    NameFlagsCard.TypeDescription & Constraints    Filter: doco
    Extension C 0..1 Extension Relative Date Criteria
    Constraints: rdt-1
    Extension.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension 1..* Extension Additional content defined by implementations
    Slice: Unordered, Open by value:url
    Extension.Slices for extension.extension:targetReference C 0..1 Extension Specific event that the date is relative to
    Extension.Slices for extension.extension:targetReference.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:targetReference.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:targetReference.url 1..1 uri "targetReference"
    Extension.Slices for extension.extension:targetReference.value[x] 1..1 Reference() Value of extension
    Extension.Slices for extension.extension:targetCode C 0..1 Extension Kind of event that the date is relative to
    Extension.Slices for extension.extension:targetCode.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:targetCode.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:targetCode.url 1..1 uri "targetCode"
    Extension.Slices for extension.extension:targetCode.value[x] 1..1 CodeableConcept Value of extension
    Extension.Slices for extension.extension:targetPath 0..1 Extension Relative to which element on the event
    Extension.Slices for extension.extension:targetPath.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:targetPath.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:targetPath.url 1..1 uri "targetPath"
    Extension.Slices for extension.extension:targetPath.value[x] 1..1 string Value of extension
    Extension.Slices for extension.extension:relationship XD 0..1 Extension before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end
    Extension.Slices for extension.extension:relationship.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:relationship.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:relationship.url 1..1 uri "relationship"
    Extension.Slices for extension.extension:relationship.value[x] 1..1 code Value of extension
    Binding: ActionRelationshipType (preferred)
    Extension.Slices for extension.extension:offset 1..1 Extension Duration before or after the event
    Extension.Slices for extension.extension:offset.id 0..1 id Unique id for inter-element referencing
    Extension.Slices for extension.extension:offset.extension 0..0 Extension
    Slice: Unordered, Open by value:url

    Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
    Extension.Slices for extension.extension:offset.url 1..1 uri "offset"
    Extension.Slices for extension.extension:offset.value[x] 1..1 Value of extension
    Extension.Slices for extension.extension:offset.value[x].valueDuration Duration
    Extension.Slices for extension.extension:offset.value[x].valueRange Range
    Extension.url 1..1 uri "http://hl7.org/fhir/StructureDefinition/relative-date"

    doco Documentation for this format

     

    Other representations of profile: CSV, Excel, Schematron

    Terminology Bindings

    Path Status Usage ValueSet Version Source
    Extension.extension:relationship.​value[x] Base preferred Action Relationship Type 📦5.0.0 FHIR Std.

    Constraints

    Id Grade Path(s) Description Expression
    ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
    ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
    rdt-1 error Extension At least one of targetReference or targetCode SHALL be present extension('targetReference').exists() or extension('targetCode').exists()

    R4B

    The extension is unchanged in R4B

    R4

    The extension is unchanged in R4

    R3

    The extension is unchanged in R3

    Search Parameters for this Extension

    (none found)