View raw Markdown
type: docsource: source/types.html

[%settitle Type Framework%] [%file newheader%] [%file newnavbar%] <%atheader base%>

FHIR Type Framework

Responsible Owner: [[%wgt fhir%]]([%wg fhir%]) Work GroupStandards Status:Normative

Types Framework Cross Reference: Base Types | Datatypes | Resources | Patterns

The FHIR specification defines types in the following general categories:

  1. Datatypes
  2. Resources
  3. Logical Models

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

[%diagram datatypes/abstracts.diagram 3dt%]

Legend: see Standards Status Colors


Base

See also Detailed Descriptions, Mappings, Profiles and Extensions

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

[%adt Base 1%]

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.

Element

See also Detailed Descriptions, Mappings, Profiles and Extensions

The base definition for all elements contained inside a resource. All elements, whether defined as a Datatype (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.

[%adt Element 1%]

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

[%dt.constraints Element%]

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.

Internal Id Scope

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:

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

BackboneElement

See also Detailed Descriptions, Mappings, Profiles and Extensions

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. Datatype 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.

[%adt BackboneElement 1%]

DataType

See also Detailed Descriptions, Mappings, Profiles and Extensions

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

See FHIR Datatypes for specialization of this type.

[%adt DataType 1%]

BackboneType

See also Detailed Descriptions, Mappings, Profiles and Extensions

The base definition for the few datatypes that allow modifier extensions:

[%adt BackboneType 1%]

PrimitiveType

See also Detailed Descriptions, Mappings, Profiles and Extensions

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

[%adt PrimitiveType 1%]

[%file newfooter%] try { var currentTabIndex = sessionStorage.getItem('fhir-resource-tab-index'); } catch(exception){ } if (!currentTabIndex) currentTabIndex = '0'; $( '#tabs-Base' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Element' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-BackboneElement' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-DataType' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-BackboneType' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-PrimitiveType' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); function store(currentTab) { try { sessionStorage.setItem('fhir-resource-tab-index', currentTab); } catch(exception){ } $( '#tabs-Base' ).tabs('option', 'active', currentTab); $( '#tabs-Element' ).tabs('option', 'active', currentTab); $( '#tabs-BackboneElement' ).tabs('option', 'active', currentTab); $( '#tabs-DataType' ).tabs('option', 'active', currentTab); $( '#tabs-BackboneType' ).tabs('option', 'active', currentTab); $( '#tabs-PrimitiveType' ).tabs('option', 'active', currentTab); document.activeElement.blur(); }