RelativeTime
type: StructureDefinition
node role: treeRoot
id:
  v: RelativeTime
text:
  status:
    v: generated
  div:
    v: Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> <img src="[binary]" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> RelativeTime ΣN Element Expresses a time or time period as relative to the time of an event + Rule: A RelativeTime can have either a contextReference or contextDefinition but not both + Rule: If RelativeTime has a contextPath, it SHALL have either a contextReference or a contextDefinition Elements defined in Ancestors: id, <a href="types.html#Element" title="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.">extension, <a href="types.html#BackboneType" title="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.#xA;#xA;Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).">modifierExtension #xD; <img src="[binary]" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Reference to a…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: normative
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
    l: structuredefinition-wg
  value: Code
    v: fhir
url:
  v: http://hl7.org/fhir/StructureDefinition/RelativeTime
  l: RelativeTime
version:
  v: 6.0.0-ballot4
name:
  v: RelativeTime
status:
  v: active
experimental:
  v: false
date:
  v: 2026-07-10T02:01:08+00:00
publisher:
  v: HL7 International / FHIR Infrastructure
contact:
  telecom:
    system:
      v: url
    value:
      v: http://hl7.org/fhir
contact:
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/fiwg
description:
  v: RelativeTime Type: RelativeTime expresses a time or time period as relative to the time of an event defined in data types other than dateTime.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
    display:
      v: World
fhir version:
  v: 6.0.0-ballot4
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
kind:
  v: complex-type
abstract:
  v: false
type:
  v: RelativeTime
  l: RelativeTime
base definition:
  v: http://hl7.org/fhir/StructureDefinition/BackboneType
  l: BackboneType
derivation:
  v: specialization
snapshot:
  element:
    id:
      v: RelativeTime
    path:
      v: RelativeTime
    short:
      v: Expresses a time or time period as relative to the time of an event
    definition:
      v: RelativeTime expresses a time or time period as relative to the time of an event defined in data types other than dateTime.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: RelativeTime
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: ele-1
      severity:
        v: error
      human:
        v: All FHIR elements must have a @value or children
      expression:
        v: hasValue() or (children().count() > id.count())
      source:
        v: http://hl7.org/fhir/StructureDefinition/Element
        l: Element
    constraint:
      key:
        v: rlt-1
      severity:
        v: error
      human:
        v: A RelativeTime can have either a contextReference or contextDefinition but not both
      expression:
        v: contextReference.empty() or contextDefinition.empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/RelativeTime
        l: RelativeTime
    constraint:
      key:
        v: rlt-2
      severity:
        v: error
      human:
        v: If RelativeTime has a contextPath, it SHALL have either a contextReference or a contextDefinition
      expression:
        v: contextPath.empty() or contextReference.exists() or contextDefinition.exists()
      source:
        v: http://hl7.org/fhir/StructureDefinition/RelativeTime
        l: RelativeTime
    is modifier:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: n/a
  element:
    id:
      v: RelativeTime.id
    path:
      v: RelativeTime.id
    representation:
      v: xmlAttr
    short:
      v: Unique id for inter-element referencing
    definition:
      v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
    min:
      v: 0
    max:
      v: 1
    base:
      path:
        v: Element.id
      min:
        v: 0
      max:
        v: 1
    type:
      extension:
        value: Url
      code:
        v: http://hl7.org/fhirpath/System.String
        l: System.String
    condition:
      v: ele-1
    is modifier:
      v: false
    is summary:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: n/a
  element:
    id:
      v: RelativeTime.extension
    path:
      v: RelativeTime.extension
    slicing:
      description:
        v: Extensions are always sliced by (at least) url
      rules:
        v: open
    short:
      v: Additional content defined by implementations
    definition:
      v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
    comment:
      v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
    alias:
      v: extensions

Url
v: string
l: string

v: value

v: url

v: user content

v: 0

v: *

path:
  v: Element.extension
min:
  v: 0
max:
  v: *

code:
  v: Extension
  l: Extension

key:
  v: ele-1
severity:
  v: error
human:
  v: All FHIR elements must have a @value or children
expression:
  v: hasValue() or (children().count() > id.count())
source:
  v: http://hl7.org/fhir/StructureDefinition/Element
  l: Element

v: false

v: false

identity:
  v: rim
map:
  v: n/a

id:
  v: RelativeTime.modifierExtension
path:
  v: RelativeTime.modifierExtension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneType.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: RelativeTime.contextReference
path:
  v: RelativeTime.contextReference
short:
  v: The specific event occurrence or resource context used as a base point (reference point) in time
definition:
  v: The specific event occurrence or resource context used as a base point (reference point) in time. This establishes the context in which the 'path' is evaluated.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: RelativeTime.contextReference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    l: Resource
condition:
  v: rlt-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: RelativeTime.contextDefinition
path:
  v: RelativeTime.contextDefinition
short:
  v: The type of event used as a base point
definition:
  v: The type of event used as a base point. Instances of this definition will establish the context for evaluating the path to determine the base time for the offset.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: RelativeTime.contextDefinition
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: canonical
    l: canonical
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ActivityDefinition
    l: ActivityDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/EventDefinition
    l: EventDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PlanDefinition
    l: PlanDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/ObservationDefinition
    l: ObservationDefinition
condition:
  v: rlt-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: RelativeTime.contextPath
path:
  v: RelativeTime.contextPath
short:
  v: Path to the element defining the basis for the relative time
definition:
  v: Path to the element defining the basis for the relative time. Any valid FHIRPath expression.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: RelativeTime.contextPath
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
condition:
  v: rlt-2
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: RelativeTime.contextCode
path:
  v: RelativeTime.contextCode
short:
  v: Coded representation of the event used as a base point (reference point) in time
definition:
  v: Coded representation of the event used as a base point (reference point) in time.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: RelativeTime.contextCode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/binding-definition
      l: binding-definition
    value: Markdown
      v: The event used as a base point (reference point) in time.
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: RelativeTimeCodes
  strength:
    v: example
  description:
    v: The event used as a base point (reference point) in time.
  value set:
    v: http://hl7.org/fhir/ValueSet/relativetime-codes
    l: relativetime-codes

id:
  v: RelativeTime.offset[x]
path:
  v: RelativeTime.offset[x]
short:
  v: An offset or offset range before (negative values) or after (positive values) the event
definition:
  v: An offset or offset range before (negative values) or after (positive values) the event. Range is limited to time-valued quantities (Durations).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: RelativeTime.offset[x]
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Duration
    l: Duration
type:
  code:
    v: Range
    l: Range
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: RelativeTime.text
path:
  v: RelativeTime.text
short:
  v: Free-text description
definition:
  v: Free-text (human-readable) description.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: RelativeTime.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
    l: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: true

element:
  id:
    v: RelativeTime
  path:
    v: RelativeTime
  short:
    v: Expresses a time or time period as relative to the time of an event
  definition:
    v: RelativeTime expresses a time or time period as relative to the time of an event defined in data types other than dateTime.
  min:
    v: 0
  max:
    v: *
  constraint:
    key:
      v: rlt-2
    severity:
      v: error
    human:
      v: If RelativeTime has a contextPath, it SHALL have either a contextReference or a contextDefinition
    expression:
      v: contextPath.empty() or contextReference.exists() or contextDefinition.exists()
    source:
      v: http://hl7.org/fhir/StructureDefinition/RelativeTime
      l: RelativeTime
  constraint:
    key:
      v: rlt-1
    severity:
      v: error
    human:
      v: A RelativeTime can have either a contextReference or contextDefinition but not both
    expression:
      v: contextReference.empty() or contextDefinition.empty()
    source:
      v: http://hl7.org/fhir/StructureDefinition/RelativeTime
      l: RelativeTime
element:
  id:
    v: RelativeTime.contextReference
  path:
    v: RelativeTime.contextReference
  short:
    v: The specific event occurrence or resource context used as a base point (reference point) in time
  definition:
    v: The specific event occurrence or resource context used as a base point (reference point) in time. This establishes the context in which the 'path' is evaluated.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Reference
      l: Reference
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Resource
      l: Resource
  condition:
    v: rlt-1
  is summary:
    v: true
element:
  id:
    v: RelativeTime.contextDefinition
  path:
    v: RelativeTime.contextDefinition
  short:
    v: The type of event used as a base point
  definition:
    v: The type of event used as a base point. Instances of this definition will establish the context for evaluating the path to determine the base time for the offset.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: canonical
      l: canonical
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/ActivityDefinition
      l: ActivityDefinition
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/EventDefinition
      l: EventDefinition
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/PlanDefinition
      l: PlanDefinition
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/ObservationDefinition
      l: ObservationDefinition
  condition:
    v: rlt-1
  is summary:
    v: true
element:
  id:
    v: RelativeTime.contextPath
  path:
    v: RelativeTime.contextPath
  short:
    v: Path to the element defining the basis for the relative time
  definition:
    v: Path to the element defining the basis for the relative time. Any valid FHIRPath expression.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: string
      l: string
  condition:
    v: rlt-2
  is summary:
    v: true
element:
  id:
    v: RelativeTime.contextCode
  path:
    v: RelativeTime.contextCode
  short:
    v: Coded representation of the event used as a base point (reference point) in time
  definition:
    v: Coded representation of the event used as a base point (reference point) in time.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: CodeableConcept
      l: CodeableConcept
  is summary:
    v: true
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/tools/StructureDefinition/binding-definition
        l: binding-definition
      value: Markdown
        v: The event used as a base point (reference point) in time.
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
        l: elementdefinition-bindingName
      value: String
        v: RelativeTimeCodes
    strength:
      v: example
    description:
      v: The event used as a base point (reference point) in time.
    value set:
      v: http://hl7.org/fhir/ValueSet/relativetime-codes
      l: relativetime-codes
element:
  id:
    v: RelativeTime.offset[x]
  path:
    v: RelativeTime.offset[x]
  short:
    v: An offset or offset range before (negative values) or after (positive values) the event
  definition:
    v: An offset or offset range before (negative values) or after (positive values) the event. Range is limited to time-valued quantities (Durations).
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Duration
      l: Duration
  type:
    code:
      v: Range
      l: Range
  is summary:
    v: true
element:
  id:
    v: RelativeTime.text
  path:
    v: RelativeTime.text
  short:
    v: Free-text description
  definition:
    v: Free-text (human-readable) description.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: string
      l: string
  is summary:
    v: true