Release 5 Preview #2

This page is part of the FHIR Specification (v4.4.0: R5 Preview #2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

2.24.0 FHIR Type Framework

FHIR Infrastructure Work GroupMaturity Level: NormativeStandards Status: Partially Normative
This page has been approved as part of an ANSI standard. See the Infrastructure Package for further details.

The FHIR specification defines many different types in the following general categories:

  1. Data Types
  2. Resources
  3. Logical Models

This page defines the base abstract types that provide the foundation for all those types:

BaseElementUnique id for the element within a resource (for internal references). This may be any string value that does not contain spacesid : string [0..1]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 manageable, 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 extensionextension : Extension [0..*]BackboneElementMay 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 manageable, 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) (this element modifies the meaning of other elements)modifierExtension : Extension [0..*]DataTypeResourceThe logical id of the resource, as used in the URL for the resource. Once assigned, this value never changesid : id [0..1]The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resourcemeta : Meta [0..1]A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc (this element modifies the meaning of other elements)implicitRules : uri [0..1]The base language in which the resource is writtenlanguage : code [0..1] « A human language. (Strength=Preferred)CommonLanguages? »DomainResourceA human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safetytext : Narrative [0..1]These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scopecontained : Resource [0..*]May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, 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 extensionextension : Extension [0..*]May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to 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) (this element modifies the meaning of other elements)modifierExtension : Extension [0..*]PrimitiveTypeBackboneTypeMay 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 manageable, 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) (this element modifies the meaning of other elements)modifierExtension : Extension [0..*]CanonicalResource «Interface»An absolute URI that is used to identify this {{title}} when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this {{title}} is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the {{title}} is stored on different serversurl : uri [0..1]A formal identifier that is used to identify this {{title}} when it is represented in other formats, or referenced in a specification, model, design or an instanceidentifier : Identifier [0..*]The identifier that is used to identify this version of the {{title}} when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the {{title}} author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequenceversion : string [0..1]A natural language name identifying the {{title}}. This name should be usable as an identifier for the module by machine processing applications such as code generationname : string [0..1]A short, descriptive, user-friendly title for the {{title}}title : string [0..1]The status of this {{title}}. Enables tracking the life-cycle of the content (this element modifies the meaning of other elements)status : code [1..1] « The lifecycle status of an artifact. (Strength=Required)PublicationStatus! »A Boolean value to indicate that this {{title}} is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usageexperimental : boolean [0..1]The date (and optionally time) when the {{title}} was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the {{title}} changesdate : dateTime [0..1]The name of the organization or individual that published the {{title}}publisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A free text natural language description of the {{title}} from a consumer's perspectivedescription : markdown [0..1]The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate {{title}} instancesuseContext : UsageContext [0..*]A legal or geographic region in which the {{title}} is intended to be usedjurisdiction : CodeableConcept [0..*] « Countries and regions within which this artifact is targeted for use. (Strength=Extensible)Jurisdiction ValueSet+ »Explanation of why this {{title}} is needed and why it has been designed as it haspurpose : markdown [0..1]A copyright statement relating to the {{title}} and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the {{title}}copyright : markdown [0..1]MetadataResource «Interface»The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usageapprovalDate : date [0..1]The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval datelastReviewDate : date [0..1]The period during which the {{title}} content was or is planned to be in active useeffectivePeriod : Period [0..1]

Legend: see Standards Status Colors


See also Detailed Descriptions, Mappings, Profiles & Extensions and R3 Conversions.

The Base type that all other types specialize. This type has no properties or constraints.

UML Diagram (Legend)

Changes since Release 3

This complex-type did not exist in Release 2

UML Diagram (Legend)

Changes since Release 3

This complex-type did not exist in Release 2

Specializations:

In addition, this type is used in Logical Models that don't have or want id/extension.

Note: implementations often use this type to introduce the navigation features defined in the FHIRPath specification .

See also Detailed Descriptions, Mappings, Profiles & Extensions and R3 Conversions.

The base definition for all elements contained inside a resource. All elements, whether defined as a Data Type (including primitives) or as part of a resource structure, have this base content:

There are 3 kinds of descendant types that specialize Element:

Note that resources themselves all specialize the base type Resource.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Element«I»NBaseBase for all elements
+ Rule: All FHIR elements must have a @value or children
Elements defined in Ancestors:
... id0..1stringUnique id for inter-element referencing
... extension0..*ExtensionAdditional content defined by implementations

doco Documentation for this format

Changes since Release 3

Element
  • No Changes

See the Full Difference for further information

As the base type for all elements included in a resource, Element is an important structural element of FHIR. Even the primitive types inherit the base features and representation rules that apply to the Element type.

Constraints

idLevelLocationDescriptionExpression
ele-1Rule (base)All FHIR elements must have a @value or childrenhasValue() or (children().count() > id.count())

This constraint exists to reduce syntactical variation in resource contents. If an element has no children, then it is always omitted from the resource, as opposed to optionally present without any content.

XML

Elements are represented by an XML element. The name of the element comes from the context in which it is used, not from the type. The internal id is represented as an attribute (similar to xml:id, but see below about scope). Extensions are represented as XML elements. E.g., for example, where the element is named use:

  <use id="[internal id]">
    <extension url="..."/>
      ... if there are any extensions
    <extension>
    .. elements for sub-type...
  </use>

JSON

Elements (except for primitive types, see below) are represented by a JSON object property. The name of the property comes from the context in which it is used, not from the type. The internal id is represented as a JSON string property named "id". Extensions are represented in a JSON array of objects named "extension". E.g., for example, where the element is named use:

  {
    "use" : {
      "id" : "[internal id]",
      "extension" : [
        ..extensions, if present...
      ],
      .. properties for sub-type...
    }
  }

Note that there are special rules for representation of Primitive types - see below.

The id property of the element is defined to allow implementers to build implementation functionality that makes use of internal references inside the resource. This specification does not define any general use for the internal id, though some resources (e.g. StructureDefinition) and extensions (e.g. originalText, narrativeLink) make use of it.

The internal id is unique within the scope of the resource that contains it. Specifically, this means:

  • The id SHALL be unique within a given resource
  • The uniqueness boundary extends into contained resources. i.e. a contained resource cannot have the same id as any element in the resource that contains it or any other contained resource
  • The uniqueness boundary is broken at Bundle.entry.resource and Parameters.parameter.resource, since these are elements that aggregate different resources
  • The id element does not have extensions itself

These rules ensure that there is no need to change internal identifiers while exchanging resources.

See also Detailed Descriptions, Mappings, Profiles & Extensions and R3 Conversions.

The base definition for complex elements defined as part of a resource definition - that is, elements that have children that are defined in the resource. Data Type elements do not use this type. For instance, Patient.contact is an element that is defined as part of the patient resource, so it automatically has the type BackboneElement.

Note that the descendant types of BackboneElement are all declared implicitly as part of the definitions of the resources.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. BackboneElement«I»NElementBase for elements defined inside a resource
Elements defined in Ancestors: id, extension
... modifierExtension?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized

doco Documentation for this format

UML Diagram (Legend)

Changes since Release 3

BackboneElement
  • No Changes

See the Full Difference for further information

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. BackboneElement«I»NElementBase for elements defined inside a resource
Elements defined in Ancestors: id, extension
... modifierExtension?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized

doco Documentation for this format

UML Diagram (Legend)

Changes since Release 3

BackboneElement
  • No Changes

See the Full Difference for further information

 

See also Detailed Descriptions, Mappings, Profiles & Extensions and R3 Conversions.

The base definition for the useable types defined by the FHIR Specification.

See FHIR Data Types for specialization of this type.

Changes since Release 3

This complex-type did not exist in Release 2

 

See also Detailed Descriptions, Mappings, Profiles & Extensions and R3 Conversions.

The base definition for the few data types that allow modifier extensions:

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. BackboneType«I»NElementBase for datatypes that can carry modifier extensions
Elements defined in Ancestors: id, extension
... modifierExtension?!Σ0..*ExtensionExtensions that cannot be ignored even if unrecognized

doco Documentation for this format

Changes since Release 3

This complex-type did not exist in Release 2

 

See also Detailed Descriptions, Mappings, Profiles & Extensions and R3 Conversions.

The base type for all re-useable types defined that have a simple property. See Primitive Types for the list of defined primitives types.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. PrimitiveType«I»NDataTypeParent type for DataTypes with a simple value
Elements defined in Ancestors: id, extension

doco Documentation for this format

Changes since Release 3

This complex-type did not exist in Release 2

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. PrimitiveType«I»NDataTypeParent type for DataTypes with a simple value
Elements defined in Ancestors: id, extension

doco Documentation for this format

Changes since Release 3

This complex-type did not exist in Release 2

 

XML

The actual primitive value appears as an XML attribute named value. For example, a property of type code named status will be represented like this:

  <status id="[internal id]" value="[value of code]"">
    <extension url="..."/>
        
    <extension>
  </status>

JSON

The actual primitive value appears as a JSON string or number property with the name of the element. If an internal id or extensions are present, they appear as a JSON object with the name of the primitive value property with "_" prepended. For example, a property of type code named status will be represented like this:

  {
    "status" : "[value of code]",
    "_status" : {
      "id" : "[internal id]",
      "extension" : [
        ... extensions, if present ...
      ]
    }
  }

The exact use of this pattern is described here.