Release 4B 5

This page is part of the FHIR Specification (v4.3.0: R4B (v5.0.0: R5 - STU ). The This is the current published version which supercedes in it's permanent home (it will always be available at this version is 5.0.0 . URL). For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R5 R4B R4 R3 R2

2.24.0 2.1.28.0 Data Types Datatypes

FHIR Infrastructure Modeling and Methodology icon Work Group Maturity Level : Normative Standards Status : Partially Normative
This page has been approved as part of an ANSI

Types Framework Cross Reference: Base Types standard. See the Infrastructure | Datatypes | Resources Package for further details. | Patterns

The FHIR specification defines a set of data types datatypes that are used for the resource elements. There are four five categories of data types: datatypes:

  1. The base abstract types that provide the foundation for all types
  2. Simple / primitive types, which are single elements with a primitive value ( below )
  3. General-purpose complex types, which are re-usable clusters of elements ( below )
  4. Metadata types: MetaDatatypes : A set of types for use with metadata resources
  5. Special purpose data types datatypes - defined elsewhere in the specification for specific usages usages: Reference , Meta , Narrative , Extension , xhtml , ElementDefinition and Dosage .

This page describes the general-purpose data types datatypes (categories 1 and 2).

Data Types Datatypes Summary .

Legend: see Standards Status Colors

A limited set of these data types datatypes may appear in extensions. All data types datatypes (including primitives) may have extensions, but only the following data types datatypes may include Modifier Extensions :

Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string PrimitiveType [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 extension extension : Extension [0..*] instant Actual value attribute of the data type datatype value : xs:dateTime 0..1 time Actual value attribute of the data type datatype value : xs:time 0..1 date Actual value attribute of the data type datatype value : xs:gYear | xs:gYearMonth | xs:date 0..1 dateTime Actual value attribute of the data type datatype value : xs:gYear | xs:gYearMonth | xs:date | xs:dateTime 0..1 decimal Actual value attribute of the data type datatype value : xs:decimal | xs:double 0..1 boolean Actual value attribute of the data type datatype value : xs:boolean 0..1 integer Actual value attribute of the data type datatype value : xs:int 0..1 string Actual value attribute of the data type datatype value : xs:string 0..1 uri Actual value attribute of the data type datatype value : xs:anyURI 0..1 base64Binary Actual value attribute of the data type datatype value : xs:base64Binary 0..1 code id oid unsignedInt positiveInt markdown url canonical uuid integer64 Actual value attribute of the datatype value : xs:long 0..1

The following table describes the primitive types that are used in this specification. Primitive types are those that specialize PrimitiveType , with only a value, and no additional elements as children (though, like all types, they have id and extensions ). See also the Examples .

string A sequence of Unicode characters xs:string Note that strings SHALL NOT exceed 1MB (1024*1024 characters) in size. Strings SHOULD not contain Unicode character points below 32, except for u0009 (horizontal tab), u0010 (carriage return) and u0013 (line feed). Leading and Trailing whitespace url A Uniform Resource Locator ( RFC 1738 ). Note URLs are accessed directly using the specified protocol. Common URL protocols are http{s}: , ftp: , mailto: and mllp: , though many others are defined xs:anyURI A JSON string - a URL base64Binary A stream of bytes, base64 encoded ( RFC 4648 ) xs:base64Binary A JSON string - base64 content There is no specified upper limit to the size of a binary, but systems will have to impose some implementation based limit to the size they support. This should be clearly documented, though there is no computable for this at this time Note: Regex: ([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))
Primitive Types
FHIR Name Value Domain XML Representation JSON representation
boolean base64Binary true | false xs:boolean, except that 0 and 1 are not valid values JSON boolean (true or false) Regex: true|false integer A stream of bytes, base64 encoded ( RFC 4648 icon ). base64Binary content does not include any whitespace or line feeds, but reading applications should ignore whitespace characters (per RFC 4648 icon ) A signed integer in the range −2,147,483,648..2,147,483,647 (32-bit; for larger values, use decimal) xs:int, except that leading 0 digits are not allowed xs:base64Binary A JSON number (with no decimal point) string - base64 content
Regex: [0]|[-+]?[1-9][0-9]* (?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)? XML Definition JSON String Definition
There is allowed, but SHOULD be removed when using no specified upper limit to the XML format . Note: This means that a string that consists only size of whitespace could be trimmed a binary, but systems will have to nothing, which would be treated as an invalid element value. Therefore strings SHOULD always contain non-whitespace content impose some implementation based limit to the size they support. This data type can should be bound to a ValueSet Regex: [ \r\n\t\S]+ (see notes below) clearly documented, though there is no computable way for this at this time
decimal boolean Rational numbers that have a decimal representation. See below about the precision of the number true | false union of xs:decimal xs:boolean, except that 0 and xs:double (see below for limitations) A JSON number (see below for limitations) Regex: -?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)? uri A Uniform Resource Identifier Reference ( RFC 3986 ). Note: URIs 1 are case sensitive. For UUID (urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7) use all lowercase xs:anyURI not valid values A JSON string - a URI boolean (true or false)
Regex: \S* true|false (This regex is very permissive, but URIs must be valid. Implementers are welcome to use more specific regex statements for a URI in specific contexts) URIs can be absolute or relative, and may have an optional fragment identifier This data type can be bound to a ValueSet XML Definition JSON Definition
canonical A URI that refers to a resource by its canonical URL ( resources with a url property ). The canonical type differs from a uri in that it has special meaning in this specification, and in that it may have a version appended, separated by a vertical bar (|). Note that the type canonical is not used for the actual canonical URLs that are the target of these references, but for the URIs that refer to them, and may have the version suffix in them. Like other URIs, elements of type canonical may also have #fragment references references. Unlike other URIs, canonical URLs are never relative - they are either absolute URIs, or fragment identifiers xs:anyURI A JSON string - a canonical URL
Regex: (\s*([0-9a-zA-Z\+\=]){4}\s*)+ \S* XML Definition JSON Definition
instant code An instant in time in the format YYYY-MM-DDThh:mm:ss.sss+zz:zz (e.g. 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z). The time SHALL specified at least to Indicates that the second and SHALL include a time zone. Note: This value is intended for when precisely observed times are required (typically system logs etc.), and not human-reported times - taken from a set of controlled strings defined elsewhere (see Using codes for those, use date or dateTime (which can be as precise as instant , but further discussion). Technically, a code is not required restricted to be). instant is a more constrained dateTime string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces in the contents xs:dateTime xs:token A JSON string - an xs:dateTime
Regex: [^\s]+( [^\s]+)*
This type is for system times, not human times (see date and dateTime below). datatype can be bound to a ValueSet
XML Definition JSON Definition
date A date, or partial date (e.g. just year or year + month) as used in human communication. The format is YYYY, YYYY-MM, or YYYY-MM-DD, e.g. 2018, 1973-06, or 1905-08-23. There SHALL be no time zone timezone offset . Dates SHALL be valid dates dates. union of xs:date, xs:gYearMonth, xs:gYear A JSON string - a union of xs:date, xs:gYearMonth, xs:gYear
Regex: ([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)? ([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])
)?)?
XML Definition JSON Definition
dateTime A date, date-time or partial date (e.g. just year or year + month) as used in human communication. The format is YYYY, YYYY-MM, YYYY-MM-DD or YYYY-MM-DDThh:mm:ss+zz:zz, e.g. 2018, 1973-06, 1905-08-23, 2015-02-07T13:28:17-05:00 or 2017-01-01T00:00:00.000Z. If hours and minutes are specified, a time zone timezone offset SHALL be populated. Actual timezone codes can be sent using the Timezone Code extension, if desired. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored at receiver discretion. Milliseconds are optionally allowed. Dates SHALL be valid dates. The time "24:00" is not allowed . Leap Seconds are allowed - see below union of xs:dateTime, xs:date, xs:gYearMonth, xs:gYear A JSON string - a union of xs:dateTime, xs:date, xs:gYearMonth, xs:gYear
Regex: ([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)? ([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])
(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]{1,9})?)?)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-
5][0-9]|14:00)?)?)?
XML Definition JSON Definition
time decimal Rational numbers that have a decimal representation. Decimals in FHIR cannot have more than 18 digits and a decimal point. See below about the precision of the number union of xs:decimal and xs:double (see below for limitations) A JSON number (see below for limitations)
Regex: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,17})?([eE][+-]?[0-9]{1,9}})? XML Definition JSON Definition
id Any combination of upper- or lower-case ASCII letters ('A'..'Z', and 'a'..'z', numerals ('0'..'9'), '-' and '.', with a length limit of 64 characters. (This might be an integer, an un-prefixed OID, UUID or any other identifier pattern that meets these constraints.) xs:string JSON string
Regex: [A-Za-z0-9\-\.]{1,64} XML Definition JSON Definition
instant An instant in time during the day, in the format hh:mm:ss. There is no date specified. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored at receiver discretion. YYYY-MM-DDThh:mm:ss.sss+zz:zz (e.g. 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z). The time "24:00" SHALL NOT be used. A time zone specified at least to the second and SHALL NOT include a timezone offset. Actual timezone codes can be present . Times sent using the [[[http://hl7.org/fhir/StructureDefinition/timezone extension]]], if desired. Note: This is intended for when precisely observed times are required (typically system logs etc.), and not human-reported times - for those, use date or dateTime (which can be converted as precise as instant , but is not required to be). instant is a Duration since midnight. more constrained dateTime xs:time xs:dateTime A JSON string - an xs:time xs:dateTime
Note: This type is for system times, not human times (see date and dateTime below).
Regex: ([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)? ([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])T(
[01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]{1,9})?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]
|14:00))
XML Definition JSON Definition
code integer Indicates A signed integer in the range −2,147,483,648..2,147,483,647 (32-bit; for larger values, use decimal) xs:int, except that leading 0 digits are not allowed JSON number (with no decimal point)
Regex: [0]|[-+]?[1-9][0-9]* XML Definition JSON Definition
integer64 A signed integer in the value range -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 (64-bit).
This type is taken from a set of controlled strings defined elsewhere (see Using codes to allow for further discussion). Technically, a code is restricted record/time counters that can get very large
xs:long, except that leading 0 digits are not allowed JSON String (due to a issues with precision in floating point libraries)
Regex: [0]|[-+]?[1-9][0-9]* XML Definition JSON Definition
markdown A FHIR string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces (see below) that may contain markdown syntax for optional processing by a markdown presentation engine, in the contents GFM extension of CommonMark format (see below) xs:token xs:string JSON string
Regex: [^\s]+(\s[^\s]+)* ^[\s\S]+$ (can't put size limit in the regex - too large) This data type can be bound XML Definition to a ValueSet JSON Definition
oid An OID represented as a URI ( RFC 3001 icon ); e.g. urn:oid:1.2.3.4.5 xs:anyURI JSON string - uri
Regex: urn:oid:[0-2](\.(0|[1-9][0-9]*))+ XML Definition JSON Definition
id string Any combination A sequence of upper- or lower-case ASCII letters ('A'..'Z', Unicode characters xs:string JSON String
Note that strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size. Because UTF-8 characters can be expressed with more than one byte, the string size may be more than 1MB. Strings SHOULD not contain Unicode character points below 32, except for u0009 (horizontal tab), u000D (carriage return) and 'a'..'z', numerals ('0'..'9'), '-' u000A (line feed). Leading and '.', with Trailing whitespace is allowed, but SHOULD be removed when using the XML format . Note: This means that a length limit string that consists only of 64 characters. (This might whitespace could be trimmed to nothing, which would be treated as an integer, an un-prefixed OID, UUID or any other identifier pattern that meets these constraints.) invalid element value. Therefore strings SHOULD always contain non-whitespace content
This datatype can be bound to a ValueSet
Regex: ^[\s\S]+$ (see notes below) XML Definition JSON Definition
xs:string positiveInt Any positive integer in the range 1..2,147,483,647 xs:positiveInteger JSON string number
Regex: [A-Za-z0-9\-\.]{1,64} [1-9][0-9]* XML Definition JSON Definition
markdown time A FHIR string (see above) that may contain markdown syntax for optional processing by a markdown presentation engine, time during the day, in the GFM extension of CommonMark format (see below) hh:mm:ss. There is no date specified. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored at receiver discretion. The time "24:00" SHALL NOT be used. A timezone offset SHALL NOT be present . Times can be converted to a Duration since midnight. xs:string xs:time A JSON string - an xs:time
Regex: \s*(\S|\s)* ([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]{1,9})? (can't put size limit in the regex - too large) XML Definition JSON Definition
unsignedInt Any non-negative integer in the range 0..2,147,483,647 xs:nonNegativeInteger JSON number
Regex: [0]|([1-9][0-9]*) XML Definition JSON Definition
positiveInt uri Any positive integer A Uniform Resource Identifier Reference ( RFC 3986 icon ). Note: URIs are case sensitive. For UUID (urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7) use all lowercase xs:anyURI A JSON string - a URI
Regex: \S* (This regex is very permissive, but URIs must be valid. Implementers are welcome to use more specific regex statements for a URI in specific contexts) XML Definition JSON Definition
URIs can be absolute or relative, and may have an optional fragment identifier
This datatype can be bound to a ValueSet
url A Uniform Resource Locator ( RFC 1738 icon ). Note URLs are accessed directly using the range 1..2,147,483,647 specified protocol. Common URL protocols are http{s}: , ftp: , mailto: and mllp: , though many others are defined xs:positiveInteger xs:anyURI A JSON number string - a URL
Regex: +?[1-9][0-9]* \S* XML Definition JSON Definition
uuid A UUID (aka GUID) represented as a URI ( RFC 4122 icon ); e.g. urn:uuid:c757873d-ec9a-4326-a141-556f43239520 xs:anyURI JSON string - uri
Regex: urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} XML Definition JSON Definition

Notes:

  • For all the types, the XML, JSON and Turtle representations of the primitive values are the same except for different escaping in XML and JSON
  • For string content, parsers and serializers MAY retain, escape or strip unescaped non-supported UNICODE characters. If the characters are retained, a subsequent application-layer process can then determine appropriate handling based on context.
  • For decimal values, the XML special values INF , -INF and NaN are not allowed, and JSON is restricted to the precision limits documented in XML schema for xs:double and xs:decimal icon
  • The precision of the decimal value has significance:
    • e.g. 0.010 is regarded as different to 0.01, and the original precision should be preserved
    • Implementations SHALL handle decimal values in ways that preserve and respect the precision of the value as represented for presentation purposes purposes.
    • Implementations are not required to perform calculations with these numbers differently, though they may choose to do so (i.e. preserve significance) significance).
    • See implementation comments for XML , JSON and RDF .
    • In object code, implementations that might meet this constraint are GMP implementations or equivalents to Java BigDecimal that implement arbitrary precision, or a combination of a (64 bit) floating point value with a precision field field.
    • Note that large and/or highly precise values are extremely rare in medicine. One element where highly precise decimals may be encountered is the Location coordinates. Irrespective of this, the limits documented in XML Schema apply apply.
  • Boolean values can also be represented using coded values (such as HL7 v2 V2 Table 0136 ). See Observation for one such use use.
  • Issues with the specified regexes:
    • The regexes are provided to assist with tooling, but are informative, not normative . There are several issues with the regexes regexes.
    • The string regex has problems with unicode Unicode - specifically, it might or might not allow unicode Unicode whitespace to some degree depending on unicode Unicode support in the regex engine being used. The regexes [\r\n\t\x{0020}-\x{FFFF}]* or [\r\n\t\u0020-\uFFFF]* are better expressions of the constraints on string, but poorly supported (see Regex Tutorial icon for details). The string regex also applies to markdown as well. The regex does not enforce the length limit
    • The unicode Unicode issues also apply to the regex for code .
    • The regexes should be qualified with start of string and end of string anchors based on the regex implementation used (e.g. caret '^' and dollar-sign '$' for JavaScript, POSIX, XML and XPath; '\A' and '\Z' for .NET, Java, Python and others; please verify these definitions with the regex implementation used).
    • The regexes may allow a broader set of values than are actually valid (e.g. leap years) so additional validation is always needed needed.
  • Leap second are allowed in the datetime, instant and time types. Note, though, that many systems and libraries do not support leap seconds. Applications reading times SHOULD accept and handle leap seconds gracefully, and applications producing them MAY choose to avoid encoding leap seconds seconds.
  • About the id datatype:
    • Ids are case sensitive. UUIDs SHALL be sent using lowercase letters letters.
    • The ID type includes identifiers consistent with ISO 18232 icon , but also includes other identifier formats as well, and is not case insensitive like ISO 18232.
    • In a typical FHIR URL, like http://example.com/fhir/Patient/ 1234 , the last part "1234" (highlighted in red) is the part that is an id datatype datatype.
    • A full UUID is a uri , not an id . UUIDs in URIs SHALL also be represented in lowercase (urn:uuid:59bf0ef4-e89c-4628-9b51-12ae3fdbe22b) (urn:uuid:59bf0ef4-e89c-4628-9b51-12ae3fdbe22b).
  • About the uri , url and canonical datatypes:
    • They all contain URIs, but differ in how applications resolve the reference reference.
    • Although the url and canonical are specializations of uri , they are never substituted for each other other.
    • They are all case sensitive for comparison purposes. Applications SHOULD not create URIs that only differ by case case.
    • A general URI may be either a URL or a canonical URL or some other kind of URI URI.
  • About the markdown datatype:
    • Markdown is a string, and subject to the same rules (e.g. length limit, valid characters)
    • This specification requires and uses the GFM (Github Flavored Markdown) icon extensions on CommonMark icon format format, with the exception of support for inline HTML which is not supported.
    • Note Processors SHALL treat embedded XML tags as string content, not as tags. This may be done by pre-processing and escaping any ">" characters preceding character content ( ">" becomes "\>" ) before processing the content or by using a markdown processor-specific flag that accomplishes the same effect. This means that GFM prohibits Raw HTML content cannot be embedded in markdown to influence rendering.
    • Systems are not required to have markdown support, so the content of a string should be readable without markdown processing, per markdown philosophy Markdown content SHALL NOT contain Unicode character points below 32, except for u0009 (horizontal tab), u0010 (carriage return) and u0013 (line feed) Markdown is a string , and subject to the same rules (e.g. length limit) philosophy.
    • Converting an element that has the type string to markdown in a later version of this FHIR specification is not considered a non-breaking change for elements with a single type. It is a breaking change (neither for multi-type/choice elements because the type name is adding reflected in the element name. (Adding markdown as a an additional choice to an optional a multi-type element that already has is not a choice breaking change). The impact of a lack of escaping on existing string data types) on safe rendering should be considered in evaluating changes from string to markdown - see next bullet.
    • WARNING: Because markdown renderers will interpret certain characters as formatting characters and strip them from the display, it is essential that systems transmitting plain string data in a markdown field take steps to appropriately escape the string to avoid loss of information when rendering for human display.

Implementation Note: A simple way to convert plain text to be safe as markdown is to prefix any of the characters *, &, #, [, <, >, and ` with a backslash (\). When presenting markdown as plain text, implementers may wish to reverse this transform.

All elements using these primitive types may have one or more of a value as described above, an internal identity (e.g. xml:id), and extensions. For an example, take an element of name "count" and type "integer".

XML

The value is represented in XML as an attribute named "value":

  <count value="2"/>

The full representation, with id, extensions and value:

  <count id="a1" value="2">
    <extension url="...">
      <valueXX.../>
    </extension>
  </count>

JSON

In JSON, for convenience, the value is represented as the property itself:

  "count" : 2

The full representation, with id, extensions and value, showing the id and extensions in the sibling property:

  "count" : 2
  "_count" : {
    "id" : "a1",
    "extension" : [{
      "url" : "...",
      "valueXXX" : "...."
    }]
  }

RDF

The value is represented in RDF as a relationship with the URI "http://h;7.org/fhir/value". "http://hl7.org/fhir/value". Using the normal prefix, this becomes:

  fhir:Type.count [ fhir:value "2"^^xsd:integer ]

For the types date and DateTime, the type must be specified explicitly. For all other types, it is optional. The full representation, with id, extensions and value:

  fhir:Type.count [
    Element.id "a1";
    fhir:value "2"^^xsd:integer;
    Element.extension [
      fhir:Extension.url "..";
      fhir:Extension.valueXX...
    ]
  ]

For additional details, see the XML , JSON and Turtle format definitions. When the value is missing, and there are no extensions, the element is not represented at all. This means that in xml, attributes are never present with a length of 0 (value=""), and properties are never a 0 length string or null in JSON ("name" : "" is not valid). (note: there is one specific use of the null in the JSON representation).

According to XML schema, leading and trailing whitespace in the value attribute is ignored for the types boolean, integer, decimal, base64Binary, instant, uri, date, dateTime, oid, and uri. Note that this means that the schema aware XML libraries give different attribute values to non-schema aware libraries when reading the XML instances. For this reason, the value attribute for these types SHOULD not have leading and trailing spaces. String values should only have leading and trailing spaces if they are part of the content of the value. In JSON and Turtle whitespace in string values is always significant. Primitive types other than string SHALL NOT have leading or trailing whitespace.


In XML, these types are represented as XML Elements with child elements with the name of the defined elements of the type. The name of the element is defined where the type is used. In JSON, the data type datatype is represented by an object with properties named the same as the XML elements. Since the JSON representation is almost exactly the same, only the first example has an additional explicit JSON representation.

Complex data types datatypes may be "profiled". A Structure Definition or type "constraint" makes a set of rules about which elements SHALL have values and what the possible values are.

UML Diagrams of the Data types Datatypes

Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*] Quantity The value of the measured amount. The value includes an implicit precision in the presentation of the value value : decimal [0..1] How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value (this element modifies the meaning of other elements) comparator : code [0..1] « How the Quantity should be understood and represented. (Strength=Required) QuantityComparator ! » A human-readable form of the unit unit : string [0..1] The identification of the system that provides the coded form of the unit system : uri [0..1] « This element has or is affected by some invariants C » A computer processable form of the unit in some unit representation system code : code [0..1] « This element has or is affected by some invariants C » Age Distance Duration Count MoneyQuantity SimpleQuantity Attachment Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate contentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » « This element has or is affected by some invariants C » The human language of the content. The value can be any valid value according to BCP 47 language : code [0..1] « A IETF language tag for a human language. (Strength=Preferred) (Strength=Required) CommonLanguages ? AllLanguages ! » The actual data of the attachment - a sequence of bytes, base64 encoded data : base64Binary [0..1] « This element has or is affected by some invariants C » A location where the data can be accessed url : url [0..1] The number of bytes of data that make up this attachment (before base64 encoding, if that is done) size : unsignedInt integer64 [0..1] The calculated hash of the data using SHA-1. Represented using base64 hash : base64Binary [0..1] A label or set of text to display in place of the data title : string [0..1] The date that the attachment was first created creation : dateTime [0..1] Height of the image in pixels (photo/video) height : positiveInt [0..1] Width of the image in pixels (photo/video) width : positiveInt [0..1] The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required frames : positiveInt [0..1] The duration of the recording in seconds - for audio and video duration : decimal [0..1] The number of pages when printed pages : positiveInt [0..1] Range The low limit. The boundary is inclusive low : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The high limit. The boundary is inclusive high : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » Period The start of the period. The boundary is inclusive start : dateTime [0..1] « This element has or is affected by some invariants C » The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time end : dateTime [0..1] « This element has or is affected by some invariants C » Ratio The value of the numerator numerator : Quantity [0..1] « This element has or is affected by some invariants C » The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » RatioRange The value of the low limit numerator lowNumerator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The value of the high limit numerator highNumerator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » CodeableConcept A reference to a code defined by a terminology system coding : Coding [0..*] A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user text : string [0..1] Coding The identification of the code system that defines the meaning of the symbol in the code system : uri [0..1] The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged version : string [0..1] A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) code : code [0..1] « This element has or is affected by some invariants C » A representation of the meaning of the code in the system, following the rules of the system display : string [0..1] « This element has or is affected by some invariants C » Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays) userSelected : boolean [0..1] Annotation The individual responsible for making the annotation author[x] : Element DataType [0..1] « Reference ( Practitioner | PractitionerRole | Patient | RelatedPerson | Organization )| string » Indicates when this particular annotation was made time : dateTime [0..1] The text of the annotation in markdown format text : markdown [1..1] Money Numerical value (with implicit precision) value : decimal [0..1] ISO 4217 Currency Code currency : code [0..1] « A code indicating the currency, taken from ISO 4217. (Strength=Required) Currencies ! »
Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*] Identifier The purpose of this identifier (this element modifies the meaning of other elements) use : code [0..1] « Identifies the purpose for this identifier, if known . (Strength=Required) IdentifierUse ! » A coded type for the identifier that can be used to determine which identifier to use for a specific purpose type : CodeableConcept [0..1] « A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. (Strength=Extensible) Identifier Type IdentifierTypeCodes + » Establishes the namespace for the value - that is, a an absolute URL that describes a set values that are unique system : uri [0..1] The portion of the identifier typically relevant to the user and which is unique within the context of the system value : string [0..1] « This element has or is affected by some invariants C » Time period during which identifier is/was valid for use period : Period [0..1] Organization that issued/manages the identifier assigner : Reference [0..1] « Organization » HumanName Identifies the purpose for this name (this element modifies the meaning of other elements) use : code [0..1] « The use of a human name. (Strength=Required) NameUse ! » Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts text : string [0..1] The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father family : string [0..1] Given name given : string [0..*] Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name prefix : string [0..*] Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name suffix : string [0..*] Indicates the period of time when this name was valid for the named person period : Period [0..1] Address The purpose of this address (this element modifies the meaning of other elements) use : code [0..1] « The use of an address. (Strength=Required) AddressUse ! » Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both type : code [0..1] « The type of an address (physical / postal). (Strength=Required) AddressType ! » Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts text : string [0..1] This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information line : string [0..*] The name of the city, town, suburb, village or other community or delivery center city : string [0..1] The name of the administrative area (county) district : string [0..1] Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes) state : string [0..1] A postal code designating a region defined by the postal service postalCode : string [0..1] Country - a nation as commonly understood or generally accepted country : string [0..1] Time period when address was/is in use period : Period [0..1] ContactPoint Telecommunications form for contact point - what communications system is required to make use of the contact system : code [0..1] « Telecommunications form for contact point. (Strength=Required) ContactPointSystem ! » « This element has or is affected by some invariants C » The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address) value : string [0..1] « This element has or is affected by some invariants C » Identifies the purpose for the contact point (this element modifies the meaning of other elements) use : code [0..1] « Use of contact point. (Strength=Required) ContactPointUse ! » Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values rank : positiveInt [0..1] Time period when the contact point was/is in use period : Period [0..1] Timing Identifies specific times when the event occurs event : dateTime [0..*] A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code) code : CodeableConcept [0..1] « Code for a known / defined timing pattern. (Strength=Preferred) TimingAbbreviation ? » Repeat Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule bounds[x] : Element DataType [0..1] « Duration | Range | Period » A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values count : positiveInt [0..1] « This element has or is affected by some invariants C » If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times countMax : positiveInt [0..1] « This element has or is affected by some invariants C » How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration duration : decimal [0..1] « This element has or is affected by some invariants C » If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length durationMax : decimal [0..1] « This element has or is affected by some invariants C » The units of time for the duration, in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence durationUnit : code [0..1] « A unit of time (units from UCUM). (Strength=Required) UnitsOfTime ! » « This element has or is affected by some invariants C » The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency frequency : positiveInt [0..1] If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range frequencyMax : positiveInt [0..1] Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length period : decimal [0..1] « This element has or is affected by some invariants C » If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days periodMax : decimal [0..1] « This element has or is affected by some invariants C » The units of time for the period in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence periodUnit : code [0..1] « A unit of time (units from UCUM). (Strength=Required) UnitsOfTime ! » « This element has or is affected by some invariants C » If one or more days of week is provided, then the action happens only on the specified day(s) dayOfWeek : code [0..*] « (Strength=Required) DaysOfWeek ! » Specified time of day for action to take place timeOfDay : time [0..*] « This element has or is affected by some invariants C » An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur when : code [0..*] « Real world Real-world event relating to the schedule. (Strength=Required) EventTiming ! » « This element has or is affected by some invariants C » The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event offset : unsignedInt [0..1] « This element has or is affected by some invariants C » Signature An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document type : Coding [1..*] [0..*] « An indication of the reason that an entity signed the object. (Strength=Preferred) SignatureTypeCodes ? » When the digital signature was signed when : instant [1..1] [0..1] A reference to an application-usable description of the identity that signed (e.g. the signature used their private key) who : Reference [1..1] [0..1] « Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization » A reference to an application-usable description of the identity that is represented by the signature onBehalfOf : Reference [0..1] « Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization » A mime type that indicates the technical format of the target resources signed by the signature targetFormat : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc sigFormat : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty data : base64Binary [0..1] SampledData The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series origin : Quantity ( SimpleQuantity ) [1..1] The length Amount of time intervalUnits between sampling times, measured in samples, e.g. milliseconds for time-based sampling period interval : decimal [0..1] « This element has or is affected by some invariants C » The measurement unit in which the sample interval is expressed intervalUnit : code [1..1] « Units of measure allowed for an element. (Strength=Required) UCUMCodes ! » A correction factor that is applied to the sampled data points before they are added to the origin factor : decimal [0..1] The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit) lowerLimit : decimal [0..1] The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit) upperLimit : decimal [0..1] The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once dimensions : positiveInt [1..1] Reference to ConceptMap that defines the codes used in the data codeMap : canonical [0..1] « ConceptMap » A series of data points which are decimal values separated by a single space (character u20). The special units in which the offsets are expressed are found in intervalUnit. The absolute point at which the measurements begin SHALL be conveyed outside the scope of this datatype, e.g. Observation.effectiveDateTime for a timing offset offsets : string [0..1] « This element has or is affected by some invariants C » A series of data points which are decimal values or codes separated by a single space (character u20). The special codes "E" (error), "L" (below detection limit) and "U" (above detection limit) can are also be defined for used in place of a decimal value values data : string [0..1] BackboneElement BackboneType 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 manageable, 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) (this element modifies the meaning of other elements) modifierExtension : Extension [0..*] RatioRange The value of the low limit numerator lowNumerator : Quantity ( SimpleQuantity ) [0..1] The value of the high limit numerator highNumerator : Quantity ( SimpleQuantity ) [0..1] The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] A set of rules that describe when the event is scheduled repeat [0..1]
FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

This type is for containing or referencing attachments - additional data content defined in other formats. The most common use of this type is to include images or reports in some report format such as PDF. However, it can be used for any data that has a MIME type.

Structure

Name Flags Card. Type Description & Constraints doco
. . Attachment N Element Content in a format defined elsewhere
+ Rule: If the Attachment has data, it SHALL have a contentType

Elements defined in Ancestors: id , extension
. . . contentType Σ C 0..1 code Mime type of the content, with charset etc.
Binding: MimeType Mime Types ( Required )
. . . language Σ 0..1 code Human language of the content (BCP-47)
Common Binding: All Languages ( Preferred but limited to AllLanguages Required )
Additional Bindings Purpose
Common Languages Starter Set

. . . data C 0..1 base64Binary Data inline, base64ed
. . . size Σ 0..1 unsignedInt integer64 Number of bytes of content (if url provided)
. . . hash Σ 0..1 base64Binary Hash of the data (sha-1, base64ed)
. . . title Σ T 0..1 string Label to display in place of the data
. . . creation Σ 0..1 dateTime Date attachment was first created
. . . height TU 0..1 positiveInt Height of the image in pixels (photo/video)
... width TU 0..1 positiveInt Width of the image in pixels (photo/video)
... frames TU 0..1 positiveInt Number of frames if > 1 (photo)
... duration TU 0..1 decimal Length in seconds (audio / video)
... pages TU 0..1 positiveInt Number of printed pages

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Attachment Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate contentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » « This element has or is affected by some invariants C » The human language of the content. The value can be any valid value according to BCP 47 language : code [0..1] « A IETF language tag for a human language. (Strength=Preferred) (Strength=Required) CommonLanguages ? AllLanguages ! » The actual data of the attachment - a sequence of bytes, base64 encoded data : base64Binary [0..1] « This element has or is affected by some invariants C » A location where the data can be accessed url : url [0..1] The number of bytes of data that make up this attachment (before base64 encoding, if that is done) size : unsignedInt integer64 [0..1] The calculated hash of the data using SHA-1. Represented using base64 hash : base64Binary [0..1] A label or set of text to display in place of the data title : string [0..1] The date that the attachment was first created creation : dateTime [0..1] Element Height of the image in pixels (photo/video) height : positiveInt [0..1] Unique id for Width of the element within a resource (for internal references). This may be any string value that does not contain spaces image in pixels (photo/video) id width : string positiveInt [0..1] May be used to represent additional information that is not part of the basic definition of the element. To make the use The number of extensions safe and manageable, there frames in a photo. This is used with a strict set of governance applied to the definition and use of extensions. Though any implementer can define multi-page fax, or an extension, imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a set of requirements value in order to alert interface software that SHALL be met as part a multi-frame capable rendering widget is required frames : positiveInt [0..1] The duration of the definition recording in seconds - for audio and video duration : decimal [0..1] The number of the extension pages when printed extension pages : Extension positiveInt [0..*] [0..1] DataType

XML Template

< xmlns="http://hl7.org/fhir">

<Attachment xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <
 <
 <

 <contentType value="[code]"/><!-- I 0..1 Mime type of the content, with charset etc. -->
 <language value="[code]"/><!-- 0..1 Human language of the content (BCP-47) -->
 <data value="[base64Binary]"/><!-- I 0..1 Data inline, base64ed -->

 <url value="[url]"/><!-- 0..1 Uri where the data can be found -->
 <

 <size value="[integer64]"/><!-- 0..1 Number of bytes of content (if url provided) -->

 <hash value="[base64Binary]"/><!-- 0..1 Hash of the data (sha-1, base64ed) -->
 <title value="[string]"/><!-- 0..1 Label to display in place of the data -->
 <creation value="[dateTime]"/><!-- 0..1 Date attachment was first created -->
</[name]>

 <height value="[positiveInt]"/><!-- 0..1 Height of the image in pixels (photo/video) -->
 <width value="[positiveInt]"/><!-- 0..1 Width of the image in pixels (photo/video) -->
 <frames value="[positiveInt]"/><!-- 0..1 Number of frames if > 1 (photo) -->
 <duration value="[decimal]"/><!-- 0..1 Length in seconds (audio / video) -->
 <pages value="[positiveInt]"/><!-- 0..1 Number of printed pages -->
</Attachment>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:contentType [ code ] ; # 0..1 I Mime type of the content, with charset etc.
  fhir:language [ code ] ; # 0..1 Human language of the content (BCP-47)
  fhir:data [ base64Binary ] ; # 0..1 I Data inline, base64ed
  fhir:url [ url ] ; # 0..1 Uri where the data can be found
  fhir:size [ integer64 ] ; # 0..1 Number of bytes of content (if url provided)
  fhir:hash [ base64Binary ] ; # 0..1 Hash of the data (sha-1, base64ed)
  fhir:title [ string ] ; # 0..1 Label to display in place of the data
  fhir:creation [ dateTime ] ; # 0..1 Date attachment was first created
  fhir:height [ positiveInt ] ; # 0..1 Height of the image in pixels (photo/video)
  fhir:width [ positiveInt ] ; # 0..1 Width of the image in pixels (photo/video)
  fhir:frames [ positiveInt ] ; # 0..1 Number of frames if > 1 (photo)
  fhir:duration [ decimal ] ; # 0..1 Length in seconds (audio / video)
  fhir:pages [ positiveInt ] ; # 0..1 Number of printed pages

]

Changes since Release 3

Changes from both R4 and R4B

Attachment
Attachment.language
Attachment.size
  • Type changed from unsignedInt to integer64
Attachment.height
  • Added Element
Attachment.width
  • Added Element
Attachment.frames
  • Added Element
Attachment.duration
  • Added Element
Attachment.pages
  • Added Element

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Attachment N Element Content in a format defined elsewhere
+ Rule: If the Attachment has data, it SHALL have a contentType

Elements defined in Ancestors: id , extension
. . . contentType Σ C 0..1 code Mime type of the content, with charset etc.
Binding: MimeType Mime Types ( Required )
. . . language Σ 0..1 code Human language of the content (BCP-47)
Common Binding: All Languages ( Preferred but limited to AllLanguages Required )
Additional Bindings Purpose
Common Languages Starter Set

. . . data C 0..1 base64Binary Data inline, base64ed
. . . size Σ 0..1 unsignedInt integer64 Number of bytes of content (if url provided)
. . . hash Σ 0..1 base64Binary Hash of the data (sha-1, base64ed)
. . . title Σ T 0..1 string Label to display in place of the data
. . . creation Σ 0..1 dateTime Date attachment was first created
. . . height TU 0..1 positiveInt Height of the image in pixels (photo/video)
... width TU 0..1 positiveInt Width of the image in pixels (photo/video)
... frames TU 0..1 positiveInt Number of frames if > 1 (photo)
... duration TU 0..1 decimal Length in seconds (audio / video)
... pages TU 0..1 positiveInt Number of printed pages

doco Documentation for this format icon

UML Diagram ( Legend )

Attachment Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate contentType : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » « This element has or is affected by some invariants C » The human language of the content. The value can be any valid value according to BCP 47 language : code [0..1] « A IETF language tag for a human language. (Strength=Preferred) (Strength=Required) CommonLanguages ? AllLanguages ! » The actual data of the attachment - a sequence of bytes, base64 encoded data : base64Binary [0..1] « This element has or is affected by some invariants C » A location where the data can be accessed url : url [0..1] The number of bytes of data that make up this attachment (before base64 encoding, if that is done) size : unsignedInt integer64 [0..1] The calculated hash of the data using SHA-1. Represented using base64 hash : base64Binary [0..1] A label or set of text to display in place of the data title : string [0..1] The date that the attachment was first created creation : dateTime [0..1] Element Height of the image in pixels (photo/video) height : positiveInt [0..1] Unique id for Width of the element within a resource (for internal references). This may be any string value that does not contain spaces image in pixels (photo/video) id width : string positiveInt [0..1] May be used to represent additional information that is not part of the basic definition of the element. To make the use The number of extensions safe and manageable, there frames in a photo. This is used with a strict set of governance applied to the definition and use of extensions. Though any implementer can define multi-page fax, or an extension, imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a set of requirements value in order to alert interface software that SHALL be met as part a multi-frame capable rendering widget is required frames : positiveInt [0..1] The duration of the definition recording in seconds - for audio and video duration : decimal [0..1] The number of the extension pages when printed extension pages : Extension positiveInt [0..*] [0..1] DataType

XML Template

< xmlns="http://hl7.org/fhir">

<Attachment xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <
 <
 <

 <contentType value="[code]"/><!-- I 0..1 Mime type of the content, with charset etc. -->
 <language value="[code]"/><!-- 0..1 Human language of the content (BCP-47) -->
 <data value="[base64Binary]"/><!-- I 0..1 Data inline, base64ed -->

 <url value="[url]"/><!-- 0..1 Uri where the data can be found -->
 <

 <size value="[integer64]"/><!-- 0..1 Number of bytes of content (if url provided) -->

 <hash value="[base64Binary]"/><!-- 0..1 Hash of the data (sha-1, base64ed) -->
 <title value="[string]"/><!-- 0..1 Label to display in place of the data -->
 <creation value="[dateTime]"/><!-- 0..1 Date attachment was first created -->
</[name]>

 <height value="[positiveInt]"/><!-- 0..1 Height of the image in pixels (photo/video) -->
 <width value="[positiveInt]"/><!-- 0..1 Width of the image in pixels (photo/video) -->
 <frames value="[positiveInt]"/><!-- 0..1 Number of frames if > 1 (photo) -->
 <duration value="[decimal]"/><!-- 0..1 Length in seconds (audio / video) -->
 <pages value="[positiveInt]"/><!-- 0..1 Number of printed pages -->
</Attachment>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:contentType [ code ] ; # 0..1 I Mime type of the content, with charset etc.
  fhir:language [ code ] ; # 0..1 Human language of the content (BCP-47)
  fhir:data [ base64Binary ] ; # 0..1 I Data inline, base64ed
  fhir:url [ url ] ; # 0..1 Uri where the data can be found
  fhir:size [ integer64 ] ; # 0..1 Number of bytes of content (if url provided)
  fhir:hash [ base64Binary ] ; # 0..1 Hash of the data (sha-1, base64ed)
  fhir:title [ string ] ; # 0..1 Label to display in place of the data
  fhir:creation [ dateTime ] ; # 0..1 Date attachment was first created
  fhir:height [ positiveInt ] ; # 0..1 Height of the image in pixels (photo/video)
  fhir:width [ positiveInt ] ; # 0..1 Width of the image in pixels (photo/video)
  fhir:frames [ positiveInt ] ; # 0..1 Number of frames if > 1 (photo)
  fhir:duration [ decimal ] ; # 0..1 Length in seconds (audio / video)
  fhir:pages [ positiveInt ] ; # 0..1 Number of printed pages

]

Changes since Release 3

Changes from both R4 and R4B

Attachment
Attachment.language
Attachment.size
  • Type changed from unsignedInt to integer64
Attachment.height
  • Added Element
Attachment.width
  • Added Element
Attachment.frames
  • Added Element
Attachment.duration
  • Added Element
Attachment.pages
  • Added Element

See the Full Difference for further information

The actual content of an Attachment can be conveyed directly using the data element or a URL reference can be provided. If both are provided, the reference SHALL point to the same content as found in the data. The reference can never be reused to point to some different data (i.e. the reference is version specific). The URL reference SHALL point to a location that resolves to actual data; some URIs such as cid: meet this requirement. If the URL is a relative reference, it is interpreted in the same way as a resource reference .

The contentType element SHALL always be populated when an Attachment contains data , and MAY be populated when there is a url . It can include charset information and other mime type extensions as appropriate. If there is no character set in the contentType then the correct course of action is undefined, though some media types may define a default character set and/or the correct character set may be able to be determined by inspection of the content.

The hash is included so that applications can verify that the content returned by the URL has not changed. The hash and size relate to the data before it is represented in base64 form. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see Provenance.signature for mechanism to protect a resource with a digital signature.

Attachment data are not constrained, and therefore can be of any content type and encoding. Therefore extra care needs to be taken to validate the content against malicious or malformed content. For more details see Security of Narrative .

In many cases where Attachment is used, the cardinality is >1. A valid use of repeats is to convey the same content in different mime types and languages. Guidance on the meaning of repeating elements SHALL be provided in the definition of the repeating resource element or extension that references this type. The language element describes the language of the attachment using the codes defined in BCP 47 icon .

Constraints

id Level Location Description Expression
att-1 img  att-1 Rule (base) If the Attachment has data, it SHALL have a contentType data.empty() or contentType.exists()

If neither data nor a URL is provided, the value should be understood as an assertion that no content for the specified mimeType and/or language is available for the combination of language and contentType .

The context of use may frequently make rules about the kind of attachment (and therefore, the kind of mime types) that can be used.

Terminology Bindings

A human language.
Path Definition ValueSet Type Reference Documentation
Attachment.contentType The mime type of an attachment. Any MimeTypes (a valid mime type is allowed. code from urn:ietf:bcp:13 ) Required Mime Types

This value set includes all possible codes from BCP-13 (see http://tools.ietf.org/html/bcp13)

Attachment.language Preferred , but limited to AllLanguages (a valid code from Tags for the Identification of Languages icon ) Required

This value set includes all possible codes from BCP-47 (see http://tools.ietf.org/html/bcp47)

  CommonLanguages Common Languages starter

Attachment is used in the following places: RelatedArtifact , ProdCharacteristic , AdministrableProductDefinition , BiologicallyDerivedProduct , BodyStructure , Citation , Claim , ClaimResponse , Communication , CommunicationRequest , Consent , Contract , Device , DeviceDefinition , DiagnosticReport , DocumentReference , ExplanationOfBenefit , HealthcareService , Library , ManufacturedItemDefinition , Media MedicationKnowledge , MedicinalProductDefinition , MolecularSequence , NutritionProduct , Observation , PackagedProductDefinition , Parameters , Patient , Person , Practitioner , Questionnaire , QuestionnaireResponse , RelatedPerson , StructureMap , SubstanceDefinition , SubstanceNucleicAcid , SubstancePolymer and Task SubstanceProtein

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A Coding is a representation of a defined concept using a symbol from a defined "code system" - see Using Codes in resources for more details.

This data type datatype can be bound to a ValueSet .

Structure

Name Flags Card. Type Description & Constraints doco
. . Coding Σ N Element A reference to a code defined by a terminology system
+ Warning: A Coding SHOULD NOT have a display unless a code is also present. Computation on Coding.display alone is generally unsafe. Consider using CodeableConcept.text

Elements defined in Ancestors: id , extension
. . . system Σ 0..1 uri Identity of the terminology system
. . . version Σ 0..1 string Version of the system - if relevant
. . . code Σ C 0..1 code Symbol in syntax defined by the system
. . . userSelected Σ 0..1 boolean If this coding was chosen directly by the user

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Coding The identification of the code system that defines the meaning of the symbol in the code system : uri [0..1] The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged version : string [0..1] A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) code : code [0..1] « This element has or is affected by some invariants C » A representation of the meaning of the code in the system, following the rules of the system display : string [0..1] « This element has or is affected by some invariants C » Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays) userSelected : boolean [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Coding xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <system value="[uri]"/><!-- 0..1 Identity of the terminology system -->
 <version value="[string]"/><!-- 0..1 Version of the system - if relevant -->
 <
 <

 <code value="[code]"/><!-- I 0..1 Symbol in syntax defined by the system -->
 <display value="[string]"/><!-- I 0..1 Representation defined by the system -->

 <userSelected value="[boolean]"/><!-- 0..1 If this coding was chosen directly by the user -->
</[name]>

</Coding>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:system [ uri ] ; # 0..1 Identity of the terminology system
  fhir:version [ string ] ; # 0..1 Version of the system - if relevant
  fhir:code [ code ] ; # 0..1 I Symbol in syntax defined by the system
  fhir:display [ string ] ; # 0..1 I Representation defined by the system
  fhir:userSelected [ boolean ] ; # 0..1 If this coding was chosen directly by the user

]

Changes since Release 3

Changes from both R4 and R4B

Coding
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Coding Σ N Element A reference to a code defined by a terminology system
+ Warning: A Coding SHOULD NOT have a display unless a code is also present. Computation on Coding.display alone is generally unsafe. Consider using CodeableConcept.text

Elements defined in Ancestors: id , extension
. . . system Σ 0..1 uri Identity of the terminology system
. . . version Σ 0..1 string Version of the system - if relevant
. . . code Σ C 0..1 code Symbol in syntax defined by the system
. . . userSelected Σ 0..1 boolean If this coding was chosen directly by the user

doco Documentation for this format icon

UML Diagram ( Legend )

Coding The identification of the code system that defines the meaning of the symbol in the code system : uri [0..1] The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged version : string [0..1] A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) code : code [0..1] « This element has or is affected by some invariants C » A representation of the meaning of the code in the system, following the rules of the system display : string [0..1] « This element has or is affected by some invariants C » Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays) userSelected : boolean [0..1] Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Coding xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <system value="[uri]"/><!-- 0..1 Identity of the terminology system -->
 <version value="[string]"/><!-- 0..1 Version of the system - if relevant -->
 <
 <

 <code value="[code]"/><!-- I 0..1 Symbol in syntax defined by the system -->
 <display value="[string]"/><!-- I 0..1 Representation defined by the system -->

 <userSelected value="[boolean]"/><!-- 0..1 If this coding was chosen directly by the user -->
</[name]>

</Coding>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:system [ uri ] ; # 0..1 Identity of the terminology system
  fhir:version [ string ] ; # 0..1 Version of the system - if relevant
  fhir:code [ code ] ; # 0..1 I Symbol in syntax defined by the system
  fhir:display [ string ] ; # 0..1 I Representation defined by the system
  fhir:userSelected [ boolean ] ; # 0..1 If this coding was chosen directly by the user

]

Changes since Release 3

Changes from both R4 and R4B

Coding
  • No Changes

See the Full Difference for further information

The meaning of the Coding is defined by the code. The system provides the source of the definition of the code, along with an optional version reference. The display is a human display for the text defined by the system - it is not intended for computation.

The system is a an absolute URI that identifies the code system that defines the code . Choosing the correct system is important; for more information about the code system URI, read Managing Terminology System URIs . If the code is taken from a CodeSystem resource, CodeSystem.url is the correct value for the system element. Resolvable URLs are generally preferred by implementers over non-resolvable URNs, particularly opaque URNs such as OIDs (urn:oid:) or UUIDs (urn:uuid:). The system URI SHALL NOT contain a reference to a value set (e.g. ValueSet.url ), since value sets just define the set of codes which are intended for use in a specific context, not the meaning of the codes themselves.

A code system version may also be supplied. If the meaning of codes within the code system is consistent across releases, this is not required. The version SHOULD be exchanged when the system does not maintain consistent definitions across versions. Note that the following systems SHOULD always have a version specified:

  • National releases of SNOMED CT (consistency of definitions varies amongst jurisdictions, and some jurisdictions may make their own rules on this)
  • Various versions of ICD (note: the major releases are labeled as different code systems altogether, but there is variation within versions)

More generally, any classification (e.g. a code system that includes concepts with relative definitions such as "not otherwise coded" will require a version. See the discussion of code system versions in the Code System resource for further discussion on versioning.

If present, the code SHALL be a syntactically correct symbol as defined by the system . In some code systems such as SNOMED CT, the symbol may be an expression composed of other predefined symbol (e.g. post-coordination). Note that codes are case sensitive unless specified otherwise by the code system. The display is a text representation of the code defined by the system and is used to display the meaning of the code by an application that is not aware of the system .

If the 'display' element is populated, the string used in display SHALL be one of the display strings defined for that code by the code system (code system. Code systems may define multiple display strings for a single code). code, by use of:

  • CodeSystem.concept.display
  • CodeSystem.concept.designation.value (including in supplements)

Note that displays defined in value sets ( ValueSet.include.concept.display and ValueSet.include.concept.designation.value ) are not allowed in Coding.display .

If one of the available display strings is labeled as preferred, it SHOULD be used. used (note that CodeSystem.concept.display is preferred for the base resource language if it is populated, but other display strings may be preferred in other languages, or for other usages). If the code system does not define a text representation for display (e.g. SNOMED CT Expressions) then the 'display' element cannot be populated, and the meaning of the code won't be accessible to systems that don't understand the code expression.

In some cases, the system might not be known - only the code is known. In this case, no useful processing of the code may be performed unless the system can be safely inferred by the context. This practice should be avoided where possible, as information sharing in a wider context is very likely to arise eventually, and codes cannot be used in the absence of a known system.

If the system is present, and there is no code, then this is understood to mean that there is no suitable code in the system in which to represent the code. concept. The implication of this is that implementers SHOULD never provide a system without a code unless this is the intended meaning AND it is appropriate for the code system and version. (E.g. the code system does not have an 'OTHER' concept.) This approach cannot be used if an appropriate code might exist within the code system but does not exist within the bound ValueSet.

If two codings have the same system , version and code then they have the same meaning. If the version information is missing, or the system , version or the code elements differ, then how the codes are related can only be determined by consulting the definitions of the system(s) and any mappings available.

A coding may be marked as a "userSelected" if a user selected the particular coded value in a user interface (e.g. the user selects an item in a pick-list). If a user selected coding exists, it is the preferred choice for performing translations etc.

Constraints

id Level Location Description Expression
img  cod-1 Warning (base) A Coding SHOULD NOT have a display unless a code is also present. Computation on Coding.display alone is generally unsafe. Consider using CodeableConcept.text code.exists().not() implies display.exists().not()

The context of use (as defined in the resource or applicable profile) usually makes rules about what codes and systems are allowed or required in a particular context by binding the element to a value set.

Coding is used in the following places: Meta , DataRequirement , ElementDefinition , VirtualServiceDetail , UsageContext , Signature , CodeableConcept , ActivityDefinition , ActorDefinition , Appointment , AuditEvent , BiologicallyDerivedProduct , CanonicalResource , CapabilityStatement , ChargeItemDefinition , Citation , CodeSystem , CompartmentDefinition , ConceptMap , ConditionDefinition , Consent , Contract , DeviceDefinition , DocumentReference , Encounter EventDefinition , Endpoint Evidence , EvidenceVariable , ExampleScenario , ExplanationOfBenefit , GraphDefinition , ImagingSelection , ImagingStudy , ImplementationGuide , InventoryItem , Library , Location , Measure , MedicinalProductDefinition , MessageDefinition , MessageHeader , Parameters NamingSystem , ObservationDefinition , OperationDefinition , Permission , PlanDefinition , Questionnaire , QuestionnaireResponse , Requirements , SearchParameter , SpecimenDefinition , StructureDefinition , StructureMap , Task Subscription , SubscriptionTopic , TerminologyCapabilities , TestPlan , TestScript and ValueSet

Implementation Note: This specification defines two types for representing coded values:

  • Coding : a simple direct reference to a code defined by a code system
  • CodeableConcept : a text description and/or a list of Codings (i.e. a list of references to codes defined by code systems)

The Coding data type datatype corresponds to the simple case of selecting a single code from a code list. However, this type is rarely used in the FHIR specifications; long experience with exchanging coded values in HL7 shows that in the general case, systems need to able to exchange multiple translation codes, and/or an original text.

The Coding data type datatype is used directly when there is certainty that the value must be selected directly from one of the available codes, and the list of possible codes is agreed to by all participants. This is not usually the case in the context of FHIR - general interoperability - so Coding is mostly used in extensions, which are usually intended to be defined for a well-controlled context of use.

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A CodeableConcept represents a value that is usually supplied by providing a reference to one or more terminologies or ontologies but may also be defined by the provision of text. This is a common pattern in healthcare data.

This data type datatype can be bound to a ValueSet .

Structure

Name Flags Card. Type Description & Constraints doco
. . CodeableConcept Σ N Element Concept - reference to a terminology or just text

Elements defined in Ancestors: id , extension
. . . coding Σ 0..* Coding Code defined by a terminology system

. . . text Σ T 0..1 string Plain text representation of the concept

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

CodeableConcept A reference to a code defined by a terminology system coding : Coding [0..*] A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user text : string [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<CodeableConcept xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <coding><!-- 0..* Coding Code defined by a terminology system --></coding>
 <text value="[string]"/><!-- 0..1 Plain text representation of the concept -->
</[name]>

</CodeableConcept>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:coding  ( [ Coding ] ... ) ; # 0..* Code defined by a terminology system
  fhir:text [ string ] ; # 0..1 Plain text representation of the concept

]

Changes since Release 3

Changes from both R4 and R4B

CodeableConcept
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . CodeableConcept Σ N Element Concept - reference to a terminology or just text

Elements defined in Ancestors: id , extension
. . . coding Σ 0..* Coding Code defined by a terminology system

. . . text Σ T 0..1 string Plain text representation of the concept

doco Documentation for this format icon

UML Diagram ( Legend )

CodeableConcept A reference to a code defined by a terminology system coding : Coding [0..*] A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user text : string [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<CodeableConcept xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <coding><!-- 0..* Coding Code defined by a terminology system --></coding>
 <text value="[string]"/><!-- 0..1 Plain text representation of the concept -->
</[name]>

</CodeableConcept>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:coding  ( [ Coding ] ... ) ; # 0..* Code defined by a terminology system
  fhir:text [ string ] ; # 0..1 Plain text representation of the concept

]

Changes since Release 3

Changes from both R4 and R4B

CodeableConcept
  • No Changes

See the Full Difference for further information

Additional Codes

More than one code may be used in CodeableConcept . The concept may be coded multiple times in different code systems (or even multiple times in the same code systems, where multiple forms are possible, such as with SNOMED CT). Each coding (also referred to as a 'translation') is a representation of the concept as described above and may have slightly different granularity due to the differences in the definitions of the underlying codes. There is no meaning associated with the ordering of coding within a CodeableConcept . A typical use of CodeableConcept is to send the local code that the concept was coded with, and also one or more translations to publicly defined code systems such as LOINC or SNOMED CT. Sending local codes is useful and important for the purposes of debugging and integrity auditing.

For example, many qualitative laboratory test results values are typically represented with coded presence/absence concepts. Using the coded value for 'negative' with a standard SNOMED CT code translation, valueCodeableConcept would be:


	"valueCodeableConcept": {
		"coding": [
			{
				"system": "http://snomed.info/sct",
				"code": "260385009",
				"display": "Negative"
			}, {
				"system": "https://acme.lab/resultcodes",
				"code": "NEG",
				"display": "Negative"
			}
		],
		"text": "Negative for Chlamydia Trachomatis rRNA"
	}

Note that these concepts may be cross mapped using the ConceptMap resource instead of or in addition to being represented as translations directly in the in CodeableConcept .

Using Text in CodeableConcept

The text is the representation of the concept as entered or chosen by the user, and which most closely represents the intended meaning of the user or concept. Very often the text is the same as a display of one of the codings. One or more of the codings may be flagged as the user selected code - the code or concept that the user actually selected directly. Note that in all but a few cases, only one of the codings may be flagged as the coding.userSelected = true - the code or concept that the user actually selected directly. If more than one code is marked as user selected, this means the user explicitly chose multiple codes. When none of the coding elements is marked as user selected, the text (if present) is the preferred source of meaning. Even if a coding is flagged as user-selected, it is good practice to put the specific text the user chose in CodeableConcept.text.

A free text only representation of the concept without any coding elements is permitted if there is no appropriate code and only free text is available (and not prohibited by the implementation). For example, using text only, the Observation.valueCodeableConcept element would be:


	"valueCodeableConcept": {
		"text": "uncoded free text result"
	}

Constraints

The context of use usually makes rules about what codes and systems are allowed or required in a particular context by binding the element to a value set.

CodeableConcept is used in the following places: DataRequirement , Dosage , MonetaryComponent , MarketingStatus , Identifier , Population TriggerDefinition , RelatedArtifact , ProductShelfLife , UsageContext , CodeableReference , Timing , ProdCharacteristic ExtendedContactDetail , Account , ActivityDefinition , ActorDefinition , AdministrableProductDefinition , AdverseEvent , AllergyIntolerance , Appointment , AppointmentResponse , ArtifactAssessment , AuditEvent , Basic , BiologicallyDerivedProduct , BiologicallyDerivedProductDispense , BodyStructure , CanonicalResource , CapabilityStatement , CarePlan , CareTeam , CatalogEntry , ChargeItem , ChargeItemDefinition , Citation , Claim , ClaimResponse , ClinicalImpression , ClinicalUseDefinition , CodeSystem , Communication , CommunicationRequest , Composition , ConceptMap , Condition , ConditionDefinition , Consent , Contract , Coverage , CoverageEligibilityRequest , CoverageEligibilityResponse , DetectedIssue , Device , DeviceAssociation , DeviceDefinition , DeviceDispense , DeviceMetric , DeviceRequest , DeviceUseStatement DeviceUsage , DiagnosticReport , DocumentManifest , DocumentReference , Encounter , EncounterHistory , Endpoint , EpisodeOfCare , EventDefinition , Evidence , EvidenceReport , EvidenceVariable , ExampleScenario , ExplanationOfBenefit , FamilyMemberHistory , Flag , FormularyItem , GenomicStudy , Goal , GraphDefinition , Group , GuidanceResponse , HealthcareService , ImagingSelection , ImagingStudy , Immunization , ImmunizationEvaluation , ImmunizationRecommendation , ImplementationGuide , Ingredient , InsurancePlan , InventoryItem , InventoryReport , Invoice , Library , List , Location , ManufacturedItemDefinition , Measure , MeasureReport , Media , Medication , MedicationAdministration , MedicationDispense , MedicationKnowledge , MedicationRequest , MedicationStatement , MedicinalProductDefinition , MessageDefinition , MessageHeader , MetadataResource , MolecularSequence , NamingSystem , NutritionIntake , NutritionOrder , NutritionProduct , Observation , ObservationDefinition , OperationDefinition , OperationOutcome , Organization , OrganizationAffiliation , PackagedProductDefinition , Parameters , Patient , PaymentNotice , PaymentReconciliation , Permission , Person , PlanDefinition , Practitioner , PractitionerRole , Procedure , Provenance , Questionnaire , RegulatedAuthorization , RelatedPerson , RequestGroup , ResearchDefinition RequestOrchestration , ResearchElementDefinition Requirements , ResearchStudy , ResearchSubject , RiskAssessment , Schedule , SearchParameter , ServiceRequest , Slot , Specimen , SpecimenDefinition , StructureDefinition , StructureMap , SubscriptionStatus , SubscriptionTopic , Substance , SubstanceDefinition , SubstanceNucleicAcid , SubstancePolymer , SubstanceProtein , SubstanceReferenceInformation , SubstanceSourceMaterial , SupplyDelivery , SupplyRequest , Task , TerminologyCapabilities , TestPlan , TestScript , Transport , ValueSet , VerificationResult and VisionPrescription

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions and , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A measured amount (or an amount that can potentially be measured).

This data type datatype can be bound to a ValueSet .

Structure

Name Flags Card. Type Description & Constraints doco
. . Quantity Σ N Element A measured or measurable amount
+ Rule: If a code for the unit is present, the system SHALL also be present

Elements defined in Ancestors: id , extension
. . . value Σ 0..1 decimal Numerical value (with implicit precision)
. . . comparator ?! Σ 0..1 code < | <= | >= | > | ad - how to understand the value
Binding: QuantityComparator ( Required )
. . . unit Σ T 0..1 string Unit representation
. . . code Σ C 0..1 code Coded form of the unit

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Quantity The value of the measured amount. The value includes an implicit precision in the presentation of the value value : decimal [0..1] How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value (this element modifies the meaning of other elements) comparator : code [0..1] « How the Quantity should be understood and represented. (Strength=Required) QuantityComparator ! » A human-readable form of the unit unit : string [0..1] The identification of the system that provides the coded form of the unit system : uri [0..1] « This element has or is affected by some invariants C » A computer processable form of the unit in some unit representation system code : code [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Quantity xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <value value="[decimal]"/><!-- 0..1 Numerical value (with implicit precision) -->
 <

 <comparator value="[code]"/><!-- 0..1 < | <= | >= | > | ad - how to understand the value -->

 <unit value="[string]"/><!-- 0..1 Unit representation -->
 <
 <
</[name]>

 <system value="[uri]"/><!-- I 0..1 System that defines coded unit form -->
 <code value="[code]"/><!-- I 0..1 Coded form of the unit -->
</Quantity>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:value [ decimal ] ; # 0..1 Numerical value (with implicit precision)
  fhir:comparator [ code ] ; # 0..1 < | <= | >= | > | ad - how to understand the value
  fhir:unit [ string ] ; # 0..1 Unit representation
  fhir:system [ uri ] ; # 0..1 I System that defines coded unit form
  fhir:code [ code ] ; # 0..1 I Coded form of the unit

]

Changes since Release 3

Changes from both R4 and R4B

Quantity
Quantity.comparator
  • No Changes Add code ad

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Quantity Σ N Element A measured or measurable amount
+ Rule: If a code for the unit is present, the system SHALL also be present

Elements defined in Ancestors: id , extension
. . . value Σ 0..1 decimal Numerical value (with implicit precision)
. . . comparator ?! Σ 0..1 code < | <= | >= | > | ad - how to understand the value
Binding: QuantityComparator ( Required )
. . . unit Σ T 0..1 string Unit representation
. . . code Σ C 0..1 code Coded form of the unit

doco Documentation for this format icon

UML Diagram ( Legend )

Quantity The value of the measured amount. The value includes an implicit precision in the presentation of the value value : decimal [0..1] How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value (this element modifies the meaning of other elements) comparator : code [0..1] « How the Quantity should be understood and represented. (Strength=Required) QuantityComparator ! » A human-readable form of the unit unit : string [0..1] The identification of the system that provides the coded form of the unit system : uri [0..1] « This element has or is affected by some invariants C » A computer processable form of the unit in some unit representation system code : code [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Quantity xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <value value="[decimal]"/><!-- 0..1 Numerical value (with implicit precision) -->
 <

 <comparator value="[code]"/><!-- 0..1 < | <= | >= | > | ad - how to understand the value -->

 <unit value="[string]"/><!-- 0..1 Unit representation -->
 <
 <
</[name]>

 <system value="[uri]"/><!-- I 0..1 System that defines coded unit form -->
 <code value="[code]"/><!-- I 0..1 Coded form of the unit -->
</Quantity>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:value [ decimal ] ; # 0..1 Numerical value (with implicit precision)
  fhir:comparator [ code ] ; # 0..1 < | <= | >= | > | ad - how to understand the value
  fhir:unit [ string ] ; # 0..1 Unit representation
  fhir:system [ uri ] ; # 0..1 I System that defines coded unit form
  fhir:code [ code ] ; # 0..1 I Coded form of the unit

]

Changes since Release 3

Changes from both R4 and R4B

Quantity
Quantity.comparator
  • No Changes Add code ad

See the Full Difference for further information

The value contains the numerical value of the quantity, including an implicit precision. If no comparator is specified, the value is a point value (i.e. '='). The comparator element can never be ignored.

The unit element contains a displayable unit that defines what is measured. The unit may additionally be coded in some formal way using the code and the system (see Coding for further information about how to use the system element).

If the unit can be coded in UCUM and a code is provided, it SHOULD be a UCUM code. If a UCUM unit is provided in the code , then a canonical value can be generated for purposes of comparison between quantities. Note that the unit element will often contain text that is a valid UCUM unit, but it cannot be assumed that the unit actually contains a valid UCUM unit.

Constraints

id Level Location Description Expression
qty-3 img  qty-3 Rule (base) If a code for the unit is present, the system SHALL also be present code.empty() or system.exists()

The context of use may frequently define what kind of measured quantity this is and therefore what kind of unit can be used. The context of use may additionally require a code from a particular system , or a value set - see Using Terminologies for information about binding a Quantity to a value set to constrain the unit codes. The context of use may also restrict the values for the value or comparator .

Terminology Bindings

Path Definition ValueSet Type Reference Documentation
Quantity.comparator How the Quantity should be understood and represented. QuantityComparator Required QuantityComparator

How the Quantity should be understood and represented.

Quantity is used in the following places: Count , Ratio , ElementDefinition , Distance , Age , Duration , ProductShelfLife , UsageContext , ProdCharacteristic , AdministrableProductDefinition , ArtifactAssessment , AuditEvent , BiologicallyDerivedProduct , BodyStructure , ChargeItem , Claim , ClaimResponse , ConceptMap , ConditionDefinition , Contract , Device , DeviceDefinition , DeviceMetric , DeviceRequest , Evidence , EvidenceReport , EvidenceVariable , ExplanationOfBenefit , Goal , Group , Ingredient , InsurancePlan , InventoryItem , InventoryReport , ManufacturedItemDefinition , MeasureReport , Medication , MedicationKnowledge , MedicinalProductDefinition , MolecularSequence , Observation , PackagedProductDefinition , Parameters , PlanDefinition , Questionnaire , QuestionnaireResponse , ServiceRequest , StructureMap , SubstanceDefinition , SupplyRequest SubstancePolymer , SubstanceReferenceInformation and Task SupplyRequest

There are several additional data types datatypes that are specializations of Quantity that only introduce new restrictions on the existing elements defined as part of the Quantity data type. datatype.

The types Age, Distance and Count are marked as Trial Use because they are not used in this specification (though they may be used in extensions). These types may be converted back to a profile (see R2 definitions icon ).

Type Name Rules Formal Definitions
Distance
id Level Location Description Expression
dis-1 img  dis-1 Rule (base) There SHALL be a code if there is a value and it SHALL be an expression of length. If system is present, it SHALL be UCUM. (code.exists() or value.empty()) and (system.empty() or system = %ucum)

Terminology Bindings

Appropriate units for Distance.
Path Definition ValueSet Type Reference Documentation
Distance CommonUCUMCodesForDistance Extensible , but limited to AllUCUMExpressionForDistance CommonUCUMCodesForDistance

Unified Code for Units of Measure (UCUM). This value set includes all common UCUM codes used for distance - that it is, all commonly used units which have the same canonical unit as 'm' (meter)

  All UCUM Expression for Distance maximum

XML , JSON
Usage: Parameters , StructureMap and Task (not used as yet)

Implementation Note: If the duration value is specified as a whole number (e.g. 1 month), then when the duration is added or subtracted to a given date(time), the outcome should be rounded to the nearest natural calendar division - e.g. Feb. 1 + 1 mo = March 1, not March 2 or 3 (since 1 month in is defined in UCUM as 30 days).

Age
id Level Location Description Expression
age-1 img  age-1 Rule (base) There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. If value is present, it SHALL be positive. (code.exists() or value.empty()) and (system.empty() or system = %ucum) and (value.empty() or value.hasValue().not() or value > 0)

Terminology Bindings

Appropriate units for Age.
Path Definition ValueSet Type Reference Documentation
Age CommonUCUMCodesForAge Extensible , but limited to AllUCUMExpressionForTime CommonUCUMCodesForAge

Unified Code for Units of Measure (UCUM). This value set includes all common UCUM codes used for Age - that it is, all commonly used units which have the same canonical unit as 'a' (year)

  All UCUM Expression for Time maximum

XML , JSON
Note: Age intentionally carries the semantics of a duration of time during which an organism (or a process) has existed.
Usage: ActivityDefinition , AllergyIntolerance , Condition , FamilyMemberHistory , Parameters , PlanDefinition , Procedure , RequestGroup , StructureMap and Task RequestOrchestration
Count
id Level Location Description Expression
cnt-3 img  cnt-3 Rule (base) There SHALL be a code with a value of "1" if there is a value. If system is present, it SHALL be UCUM. If present, the value SHALL be a whole number. (code.exists() or value.empty()) and (system.empty() or system = %ucum) and (code.empty() or code = '1') and (value.empty() or value.hasValue().not() or value.toString().contains('.').not())
XML , JSON
Usage: Parameters , StructureMap and Task Device
Duration
id Level Location Description Expression
drt-1 img  drt-1 Rule (base) There SHALL be a code if there is a value and it SHALL be an expression of time. If system is present, it SHALL be UCUM. value.exists() code.exists() implies ((system = %ucum) and code.exists()) value.exists())

Terminology Bindings

Appropriate units for Duration.
Path Definition ValueSet Type Reference Documentation
Duration CommonUCUMCodesForDuration Extensible , but limited to AllUCUMExpressionForTime CommonUCUMCodesForDuration

Unified Code for Units of Measure (UCUM). This value set includes all common UCUM codes used for Duration - that it is, all commonly used units which have the same canonical unit as 'a' (year)

  All UCUM Expression for Time maximum

XML , JSON
Note: Duration intentionally carries the semantics of a length of time.
Usage: DataRequirement , ProductShelfLife , Timing , ActivityDefinition , AdministrableProductDefinition , Device , Encounter , EncounterHistory , Goal , InventoryItem , MeasureReport , MedicationKnowledge , MedicationRequest , PackagedProductDefinition , Parameters , PlanDefinition , RequestGroup , ResearchElementDefinition RequestOrchestration , Specimen , SpecimenDefinition , StructureMap and Task SpecimenDefinition

In addition to the specializations, there is one constraint on Quantity used in several resources:

Profile Name Rules Formal Definitions
Simple Quantity
id Level Location Description Expression
sqty-1 Rule (base) The comparator is not used on a SimpleQuantity comparator.empty() )
XML , JSON
Usage: Dosage , RatioRange , SampledData , Ratio , Range , ActivityDefinition , CarePlan BiologicallyDerivedProductDispense , Claim , ClaimResponse , Contract , Coverage , CoverageEligibilityRequest , DeviceDispense , Evidence , ExplanationOfBenefit , Immunization , InventoryItem , MedicationAdministration , MedicationDispense , MedicationKnowledge , MedicationRequest , NutritionIntake , NutritionOrder , NutritionProduct , Observation , QuestionnaireResponse , Specimen , SpecimenDefinition , Substance , SupplyDelivery and VisionPrescription

Note that the constraint is different from the other specializations of Quantity because it is not a type, just rules applied where the Quantity type is used. There's another constraint - see Money immediately below.

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions and , Mappings , Profiles & , Extensions and R2 R4 Conversions .

An amount of currency.

Structure

Name Flags Card. Type Description & Constraints doco
. . Money Σ N Element An amount of economic utility in some recognized currency

Elements defined in Ancestors: id , extension
. . . value Σ 0..1 decimal Numerical value (with implicit precision)
. . . currency Σ 0..1 code ISO 4217 Currency Code
Binding: CurrencyCode Currencies ( Required )

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Money Numerical value (with implicit precision) value : decimal [0..1] ISO 4217 Currency Code currency : code [0..1] « A code indicating the currency, taken from ISO 4217. (Strength=Required) Currencies ! » Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Money xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <value value="[decimal]"/><!-- 0..1 Numerical value (with implicit precision) -->
 <currency value="[code]"/><!-- 0..1 ISO 4217 Currency Code -->
</[name]>

</Money>

JSON Template

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:value [ decimal ] ; # 0..1 Numerical value (with implicit precision)
  fhir:currency [ code ] ; # 0..1 ISO 4217 Currency Code

]

Changes since Release 3

Changes from both R4 and R4B

Money
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Money Σ N Element An amount of economic utility in some recognized currency

Elements defined in Ancestors: id , extension
. . . value Σ 0..1 decimal Numerical value (with implicit precision)
. . . currency Σ 0..1 code ISO 4217 Currency Code
Binding: CurrencyCode Currencies ( Required )

doco Documentation for this format icon

UML Diagram ( Legend )

Money Numerical value (with implicit precision) value : decimal [0..1] ISO 4217 Currency Code currency : code [0..1] « A code indicating the currency, taken from ISO 4217. (Strength=Required) Currencies ! » Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Money xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <value value="[decimal]"/><!-- 0..1 Numerical value (with implicit precision) -->
 <currency value="[code]"/><!-- 0..1 ISO 4217 Currency Code -->
</[name]>

</Money>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:value [ decimal ] ; # 0..1 Numerical value (with implicit precision)
  fhir:currency [ code ] ; # 0..1 ISO 4217 Currency Code

]

Changes since Release 3

Changes from both R4 and R4B

Money
  • No Changes

See the Full Difference for further information

The value contains the amount of the currency, including an implicit precision. Precision is always important for financial amounts. The currency element contains an ISO 4217 code for the currency.

Money is used in the following places: ChargeItem MonetaryComponent , ChargeItemDefinition Account , Claim , ClaimResponse , Contract , Coverage , CoverageEligibilityRequest , CoverageEligibilityResponse , ExplanationOfBenefit , InsurancePlan , Invoice , MedicationKnowledge , Parameters , PaymentNotice , PaymentReconciliation , StructureMap and Task PaymentReconciliation

There are also circumstances where a financial amount must be represented as the numerator or denominator in a Ratio, where the type is currency. In this context, the Money amount is represented as a Quantity , using the MoneyQuantity constraint:

Profile Name Rules Formal Definitions
Money Quantity
id Level Location Description Expression
mqty-1 mtqy-1 Rule (base) There SHALL be a code if there is a value and it SHALL be an expression of currency. If system is present, it SHALL be ISO 4217 (system = "urn:iso:std:iso:4217" - currency). (code.exists() or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217') )
XML , JSON
Usage: (not used as yet)

Note that the profile is different from the other specializations because it is not a type, just rules applied where the Quantity type is used to represent Money amounts.

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A set of ordered Quantity values defined by a low and high limit.

A Range specifies a set of possible values; usually, one value from the range applies (e.g. "give the patient between 2 and 4 tablets"). Ranges are typically used in instructions.

Structure

Name Flags Card. Type Description & Constraints doco
. . Range Σ N Element Set of values bounded by low and high
+ Rule: If present, low SHALL have a lower value than high

Elements defined in Ancestors: id , extension
. . . low Σ C 0..1 SimpleQuantity Low limit
. . . high Σ C 0..1 SimpleQuantity High limit

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Range The low limit. The boundary is inclusive low : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The high limit. The boundary is inclusive high : Quantity ( SimpleQuantity ) [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Range xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <</low>
 <</high>
</[name]>

 <low><!-- I 0..1 Quantity(SimpleQuantity) Low limit --></low>
 <high><!-- I 0..1 Quantity(SimpleQuantity) High limit --></high>
</Range>

JSON Template

{doco
  // from Element: extension
  "
  "

  "low" : { Quantity(SimpleQuantity) }, // I Low limit
  "high" : { Quantity(SimpleQuantity) } // I High limit

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:low [ Quantity(SimpleQuantity) ] ; # 0..1 I Low limit
  fhir:high [ Quantity(SimpleQuantity) ] ; # 0..1 I High limit

]

Changes since Release 3

Changes from both R4 and R4B

Range
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Range Σ N Element Set of values bounded by low and high
+ Rule: If present, low SHALL have a lower value than high

Elements defined in Ancestors: id , extension
. . . low Σ C 0..1 SimpleQuantity Low limit
. . . high Σ C 0..1 SimpleQuantity High limit

doco Documentation for this format icon

UML Diagram ( Legend )

Range The low limit. The boundary is inclusive low : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The high limit. The boundary is inclusive high : Quantity ( SimpleQuantity ) [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Range xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <</low>
 <</high>
</[name]>

 <low><!-- I 0..1 Quantity(SimpleQuantity) Low limit --></low>
 <high><!-- I 0..1 Quantity(SimpleQuantity) High limit --></high>
</Range>

JSON Template

{doco
  // from Element: extension
  "
  "

  "low" : { Quantity(SimpleQuantity) }, // I Low limit
  "high" : { Quantity(SimpleQuantity) } // I High limit

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:low [ Quantity(SimpleQuantity) ] ; # 0..1 I Low limit
  fhir:high [ Quantity(SimpleQuantity) ] ; # 0..1 I High limit

]

Changes since Release 3

Changes from both R4 and R4B

Range
  • No Changes

See the Full Difference for further information

The unit and code / system elements of the low or high elements SHALL match. If the low or high elements are missing, the meaning is that the low or high boundaries are not known and therefore neither is the complete range.

The comparator flag on the low or high elements cannot be present. Note that the Range type should not be used to represent out of range measurements: A quantity type with the comparator element should be used instead.

The low and the high values are inclusive and are assumed to have arbitrarily high precision; e.g. the range 1.5 to 2.5 includes 1.50, and 2.50 but not 1.49 or 2.51.

Constraints

id Level Location Description Expression
rng-2 img  rng-2 Rule (base) If present, low SHALL have a lower value than high low.empty() low.value.empty() or high.empty() high.value.empty() or (low low.lowBoundary().comparable(high.highBoundary()).not() or (low.lowBoundary() <= high) high.highBoundary())

Range is used in the following places: Dosage , Population , UsageContext , Timing , ActivityDefinition , AllergyIntolerance , AuditEvent , BiologicallyDerivedProduct , ClinicalUseDefinition , Condition , Device , DeviceDefinition , DeviceRequest , Evidence , EvidenceReport , EvidenceVariable , FamilyMemberHistory , Goal , Group , InventoryItem , MeasureReport , MedicationKnowledge , MolecularSequence , Observation , ObservationDefinition , Parameters , PlanDefinition , Procedure , RequestGroup RequestOrchestration , RiskAssessment , ServiceRequest , SpecimenDefinition , StructureMap , SupplyRequest SubstanceReferenceInformation and Task SupplyRequest

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A relationship between two Quantity values expressed as a numerator and a denominator.

The Ratio datatype should only be used to express a relationship of two numbers if the relationship cannot be suitably expressed using a Quantity and a common unit. Where the denominator value is known to be fixed to "1", Quantity should be used instead of Ratio.

Structure

Name Flags Card. Type Description & Constraints doco
. . Ratio Σ N Element A ratio of two Quantity values - a numerator and a denominator
+ Rule: Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present

Elements defined in Ancestors: id , extension
. . . numerator Σ C 0..1 Quantity Numerator value
. . . denominator Σ C 0..1 Quantity SimpleQuantity Denominator value

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Ratio The value of the numerator numerator : Quantity [0..1] « This element has or is affected by some invariants C » The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Ratio xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <</numerator>
 <</denominator>
</[name]>

 <numerator><!-- I 0..1 Quantity Numerator value --></numerator>
 <denominator><!-- I 0..1 Quantity(SimpleQuantity) Denominator value --></denominator>
</Ratio>

JSON Template

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:numerator [ Quantity ] ; # 0..1 I Numerator value
  fhir:denominator [ Quantity(SimpleQuantity) ] ; # 0..1 I Denominator value

]

Changes since Release 3

Changes from both R4 and R4B

Ratio
Ratio.denominator
  • No Changes Type changed from Quantity to Quantity(http://hl7.org/fhir/StructureDefinition/SimpleQuantity)

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Ratio Σ N Element A ratio of two Quantity values - a numerator and a denominator
+ Rule: Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present

Elements defined in Ancestors: id , extension
. . . numerator Σ C 0..1 Quantity Numerator value
. . . denominator Σ C 0..1 Quantity SimpleQuantity Denominator value

doco Documentation for this format icon

UML Diagram ( Legend )

Ratio The value of the numerator numerator : Quantity [0..1] « This element has or is affected by some invariants C » The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Ratio xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <</numerator>
 <</denominator>
</[name]>

 <numerator><!-- I 0..1 Quantity Numerator value --></numerator>
 <denominator><!-- I 0..1 Quantity(SimpleQuantity) Denominator value --></denominator>
</Ratio>

JSON Template

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:numerator [ Quantity ] ; # 0..1 I Numerator value
  fhir:denominator [ Quantity(SimpleQuantity) ] ; # 0..1 I Denominator value

]

Changes since Release 3

Changes from both R4 and R4B

Ratio
Ratio.denominator
  • No Changes Type changed from Quantity to Quantity(http://hl7.org/fhir/StructureDefinition/SimpleQuantity)

See the Full Difference for further information

Examples where a Quantity is typically used are rates, densities, concentrations. Examples where a Ratio is used are: titers (e.g. 1:128); concentration ratios where the denominator is significant (e.g. 5mg/10mL); observed frequencies (e.g. 2 repetitions/8 hr), and where the numerator or denominator is an amount of a currency (no UCUM code for $ etc.).

Common factors in the numerator and denominator are not automatically cancelled out. Ratios are not simply "structured numbers" - for example, blood pressure measurements (e.g. "120/60") are not ratios.

A proper ratio has both a numerator and a denominator; however, these are not mandatory in order to allow an invalid ratio with an extension with further information.

Constraints

id Level Location Description Expression
rat-1 img  rat-1 Rule (base) Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present (numerator.exists() and denominator.exists()) or (numerator.empty() and denominator.empty() and extension.exists())

The context of use may require particular types of Quantity for the numerator or denominator.

Ratio is used in the following places: Dosage , AdministrableProductDefinition , AuditEvent , BiologicallyDerivedProduct , Goal , Ingredient , InventoryItem , Medication , MedicationAdministration , MedicationKnowledge , NutritionOrder , NutritionProduct , Observation , Parameters PlanDefinition , ServiceRequest , StructureMap , Substance , SubstanceDefinition and Task SubstanceDefinition

FHIR Infrastructure icon Work Group Maturity Level : 3 Standards Status : Trial Use

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

A range of ratios of two Quantity values expressed as a low numerator, a high numerator, and a denominator.

The RatioRange datatype should only be used to express a range of ratios if the relationship cannot be suitably expressed using a Range and a common unit. Where the denominator value is known to be fixed to "1", Range should be used instead of RatioRange.

Structure

Name Flags Card. Type Description & Constraints doco
. . RatioRange Σ TU Element Range of ratio values
+ Rule: One of lowNumerator or highNumerator and denominator SHALL be present, or all are absent. If all are absent, there SHALL be some extension present
+ Rule: If present, lowNumerator SHALL have a lower value than highNumerator

Elements defined in Ancestors: id , extension
. . . lowNumerator Σ C 0..1 SimpleQuantity Low Numerator limit
. . . highNumerator Σ C 0..1 SimpleQuantity High Numerator limit
. . . denominator Σ C 0..1 SimpleQuantity Denominator value

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

RatioRange The value of the low limit numerator lowNumerator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The value of the high limit numerator highNumerator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<RatioRange xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <</lowNumerator>
 <</highNumerator>
 <</denominator>
</[name]>

 <lowNumerator><!-- I 0..1 Quantity(SimpleQuantity) Low Numerator limit --></lowNumerator>
 <highNumerator><!-- I 0..1 Quantity(SimpleQuantity) High Numerator limit --></highNumerator>
 <denominator><!-- I 0..1 Quantity(SimpleQuantity) Denominator value --></denominator>
</RatioRange>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:

  fhir:lowNumerator [ Quantity(SimpleQuantity) ] ; # 0..1 I Low Numerator limit
  fhir:highNumerator [ Quantity(SimpleQuantity) ] ; # 0..1 I High Numerator limit
  fhir:denominator [ Quantity(SimpleQuantity) ] ; # 0..1 I Denominator value

]

Changes since Release 3

Changes from both R4 and R4B

This complex-type did not exist in Release 3 R4

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . RatioRange Σ TU Element Range of ratio values
+ Rule: One of lowNumerator or highNumerator and denominator SHALL be present, or all are absent. If all are absent, there SHALL be some extension present
+ Rule: If present, lowNumerator SHALL have a lower value than highNumerator

Elements defined in Ancestors: id , extension
. . . lowNumerator Σ C 0..1 SimpleQuantity Low Numerator limit
. . . highNumerator Σ C 0..1 SimpleQuantity High Numerator limit
. . . denominator Σ C 0..1 SimpleQuantity Denominator value

doco Documentation for this format icon

UML Diagram ( Legend )

RatioRange The value of the low limit numerator lowNumerator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The value of the high limit numerator highNumerator : Quantity ( SimpleQuantity ) [0..1] « This element has or is affected by some invariants C » The value of the denominator denominator : Quantity ( SimpleQuantity ) [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<RatioRange xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <</lowNumerator>
 <</highNumerator>
 <</denominator>
</[name]>

 <lowNumerator><!-- I 0..1 Quantity(SimpleQuantity) Low Numerator limit --></lowNumerator>
 <highNumerator><!-- I 0..1 Quantity(SimpleQuantity) High Numerator limit --></highNumerator>
 <denominator><!-- I 0..1 Quantity(SimpleQuantity) Denominator value --></denominator>
</RatioRange>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:

  fhir:lowNumerator [ Quantity(SimpleQuantity) ] ; # 0..1 I Low Numerator limit
  fhir:highNumerator [ Quantity(SimpleQuantity) ] ; # 0..1 I High Numerator limit
  fhir:denominator [ Quantity(SimpleQuantity) ] ; # 0..1 I Denominator value

]

Changes since Release 3

Changes from both R4 and R4B

This complex-type did not exist in Release 3 R4

See the Full Difference for further information

Common factors in the numerator and denominator are not automatically cancelled out. Ratios are not simply "structured numbers" - for example, blood pressure measurements (e.g. "120/60") are not ratios.

A proper ratio range has one of the numerators and a denominator; however, these are not mandatory in order to allow an invalid ratio with an extension with further information.

Constraints

id Level Location Description Expression
inv-1 img  ratrng-1 Rule (base) One of lowNumerator or highNumerator and denominator SHALL be present, or all are absent. If all are absent, there SHALL be some extension present ((lowNumerator.exists() or highNumerator.exists()) and denominator.exists()) or (lowNumerator.empty() and highNumerator.empty() and denominator.empty() and extension.exists())
inv-2 img  ratrng-2 Rule (base) If present, lowNumerator SHALL have a lower value than highNumerator lowNumerator.empty() lowNumerator.hasValue().not() or highNumerator.empty() highNumerator.hasValue().not() or (lowNumerator (lowNumerator.lowBoundary() <= highNumerator) highNumerator.highBoundary())

The context of use may require particular types of Quantity for the numerators or denominator.

RatioRange is used in the following places: Ingredient

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A time period defined by a start and end date/time.

A period specifies a range of times. The context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the period applies (e.g. "give to the patient between 2 and 4 pm on 24-Jun 2013").

Structure

Name Flags Card. Type Description & Constraints doco
. . Period Σ N Element Time range defined by start and end date/time
+ Rule: If present, start SHALL have a lower or equal value than end

Elements defined in Ancestors: id , extension
. . . start Σ I C 0..1 dateTime Starting time with inclusive boundary
. . . end Σ I C 0..1 dateTime End time with inclusive boundary, if not ongoing

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Period The start of the period. The boundary is inclusive start : dateTime [0..1] « This element has or is affected by some invariants C » The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time end : dateTime [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Period xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <
 <
</[name]>

 <start value="[dateTime]"/><!-- I 0..1 Starting time with inclusive boundary -->
 <end value="[dateTime]"/><!-- I 0..1 End time with inclusive boundary, if not ongoing -->
</Period>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:start [ dateTime ] ; # 0..1 I Starting time with inclusive boundary
  fhir:end [ dateTime ] ; # 0..1 I End time with inclusive boundary, if not ongoing

]

Changes since Release 3

Changes from both R4 and R4B

Period
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Period Σ N Element Time range defined by start and end date/time
+ Rule: If present, start SHALL have a lower or equal value than end

Elements defined in Ancestors: id , extension
. . . start Σ I C 0..1 dateTime Starting time with inclusive boundary
. . . end Σ I C 0..1 dateTime End time with inclusive boundary, if not ongoing

doco Documentation for this format icon

UML Diagram ( Legend )

Period The start of the period. The boundary is inclusive start : dateTime [0..1] « This element has or is affected by some invariants C » The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time end : dateTime [0..1] « Element This element has or is affected by some invariants C » Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension DataType [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Period xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <
 <
</[name]>

 <start value="[dateTime]"/><!-- I 0..1 Starting time with inclusive boundary -->
 <end value="[dateTime]"/><!-- I 0..1 End time with inclusive boundary, if not ongoing -->
</Period>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:

  fhir:start [ dateTime ] ; # 0..1 I Starting time with inclusive boundary
  fhir:end [ dateTime ] ; # 0..1 I End time with inclusive boundary, if not ongoing

]

Changes since Release 3

Changes from both R4 and R4B

Period
  • No Changes

See the Full Difference for further information

If the start element is missing, the start of the period is not known. If the end element is missing, it means that the period is ongoing, or the start ongoing. Alternatively, this may be in the past, and the represented by having an explicit end date in the future, in which case this means that the period is expected/planned to end at the specified time time.

The end value includes any matching date/time. For example, the period 2011-05-23 to 2011-05-27 includes all the times from the start of the 23rd May through to the end of the 27th of May.

Constraints

id Level Location Description Expression
img  per-1 Rule (base) If present, start SHALL have a lower or equal value than end start.hasValue().not() or end.hasValue().not() or (start.lowBoundary() <= end.highBoundary())

Period is used in the following places: Address , DataRequirement , HumanName , ContactPoint , MarketingStatus , Identifier , Availability , Timing , ExtendedContactDetail , Account , ActivityDefinition , AdverseEvent , AllergyIntolerance , Appointment , AuditEvent , BiologicallyDerivedProduct , CarePlan , CareTeam , CatalogEntry , ChargeItem , ChargeItemDefinition , Citation , Claim , ClaimResponse , ClinicalImpression , CodeSystem , CommunicationRequest , Composition , ConceptMap , Condition , Consent , Contract , Coverage , CoverageEligibilityRequest , CoverageEligibilityResponse , DetectedIssue , DeviceAssociation , DeviceDefinition , DeviceRequest , DeviceUseStatement DeviceUsage , DiagnosticReport , DocumentReference , Encounter , EncounterHistory , Endpoint , EpisodeOfCare , EventDefinition , EvidenceReport , EvidenceVariable , ExplanationOfBenefit , FamilyMemberHistory , Flag , Group , HealthcareService , InsurancePlan , InventoryReport , Invoice , Library , Measure , MeasureReport , Media , MedicationAdministration , MedicationKnowledge , MedicationRequest , MedicationStatement , MedicinalProductDefinition , MetadataResource , NamingSystem , NutritionIntake , Observation , ObservationDefinition , Organization , OrganizationAffiliation , Parameters , Patient , PaymentReconciliation , Permission , PlanDefinition , Practitioner , PractitionerRole , Procedure , Provenance , Questionnaire , RegulatedAuthorization , RelatedPerson , RequestGroup , ResearchDefinition , ResearchElementDefinition RequestOrchestration , ResearchStudy , ResearchSubject , RiskAssessment , Schedule , ServiceRequest , Specimen , StructureMap SpecimenDefinition , SubscriptionTopic , SupplyDelivery , SupplyRequest and , Task , Transport and ValueSet

Normative Candidate Note: This DataType is not normative - it is still undergoing
FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Trial Use while more experience is gathered.

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions . Data that comes from a series of measurements taken by a device, which may have upper and lower limits. The data type also supports more than one dimension in the data.

A SampledData provides a concise way to handle the data produced by devices that sample a particular physical state at a high frequency. A typical use for this is for the output of an ECG or EKG device. The data type datatype includes a series of raw decimal values (which are mostly simple integers), integers) or codes, along with adjustments for scale and factor. These are interpreted such that

original measured value[i] = SampledData.data[i] * SampledData.scaleFactor + SampledData.origin.value

original measured value[i] = SampledData.data[i] * SampledData.factor + SampledData.origin.value

Structure

Name Flags Card. Type Description & Constraints doco
. . SampledData TU Element A series of measurements taken by a device
+ Rule: A SampledData SAHLL have either an interval and offsets but not both

Elements defined in Ancestors: id , extension
. . . origin Σ 1..1 SimpleQuantity Zero value and units
. . . period interval Σ C 1..1 0..1 decimal Number of milliseconds intervalUnits between samples
. . . factor intervalUnit Σ 0..1 1..1 decimal code Multiply data by this before adding to origin The measurement unit of the interval between samples
Binding: UCUM Codes ( Required )
. . . upperLimit lowerLimit Σ 0..1 decimal Upper Lower limit of detection
. . . dimensions upperLimit Σ 1..1 0..1 decimal Upper limit of detection
... dimensions Σ 1..1 positiveInt Number of sample points at each time point
. . . codeMap 0..1 canonical ( ConceptMap ) Defines the codes used in the data
. . . offsets C 0..1 string Offsets, typically in time, at which data values were taken
... data 0..1 string Decimal values with spaces, or "E" | "U" | "L" "L", or another code

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

SampledData The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series origin : Quantity ( SimpleQuantity ) [1..1] The length Amount of time intervalUnits between sampling times, measured in samples, e.g. milliseconds for time-based sampling period interval : decimal [0..1] « This element has or is affected by some invariants C » The measurement unit in which the sample interval is expressed intervalUnit : code [1..1] « Units of measure allowed for an element. (Strength=Required) UCUMCodes ! » A correction factor that is applied to the sampled data points before they are added to the origin factor : decimal [0..1] The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit) lowerLimit : decimal [0..1] The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit) upperLimit : decimal [0..1] The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once dimensions : positiveInt [1..1] Reference to ConceptMap that defines the codes used in the data codeMap : canonical [0..1] « ConceptMap » A series of data points which are decimal values separated by a single space (character u20). The special units in which the offsets are expressed are found in intervalUnit. The absolute point at which the measurements begin SHALL be conveyed outside the scope of this datatype, e.g. Observation.effectiveDateTime for a timing offset offsets : string [0..1] « This element has or is affected by some invariants C » A series of data points which are decimal values or codes separated by a single space (character u20). The special codes "E" (error), "L" (below detection limit) and "U" (above detection limit) can are also be defined for used in place of a decimal value values data : string [0..1] Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<SampledData xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <origin><!-- 1..1 Quantity(SimpleQuantity) Zero value and units --></origin>
 <

 <interval value="[decimal]"/><!-- I 0..1 Number of intervalUnits between samples -->
 <intervalUnit value="[code]"/><!-- 1..1 The measurement unit of the interval between samples -->

 <factor value="[decimal]"/><!-- 0..1 Multiply data by this before adding to origin -->
 <lowerLimit value="[decimal]"/><!-- 0..1 Lower limit of detection -->
 <upperLimit value="[decimal]"/><!-- 0..1 Upper limit of detection -->
 <dimensions value="[positiveInt]"/><!-- 1..1 Number of sample points at each time point -->
 <
</[name]>

 <codeMap><!-- 0..1 canonical(ConceptMap) Defines the codes used in the data --></codeMap>
 <offsets value="[string]"/><!-- I 0..1 Offsets, typically in time, at which data values were taken -->
 <data value="[string]"/><!-- 0..1 Decimal values with spaces, or "E" | "U" | "L", or another code -->
</SampledData>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:origin [ Quantity(SimpleQuantity) ] ; # 1..1 Zero value and units
  fhir:interval [ decimal ] ; # 0..1 I Number of intervalUnits between samples
  fhir:intervalUnit [ code ] ; # 1..1 The measurement unit of the interval between samples
  fhir:factor [ decimal ] ; # 0..1 Multiply data by this before adding to origin
  fhir:lowerLimit [ decimal ] ; # 0..1 Lower limit of detection
  fhir:upperLimit [ decimal ] ; # 0..1 Upper limit of detection
  fhir:dimensions [ positiveInt ] ; # 1..1 Number of sample points at each time point
  fhir:codeMap [ canonical(ConceptMap) ] ; # 0..1 Defines the codes used in the data
  fhir:offsets [ string ] ; # 0..1 I Offsets, typically in time, at which data values were taken
  fhir:data [ string ] ; # 0..1 Decimal values with spaces, or "E" | "U" | "L", or another code

]

Changes since Release 3

Changes from both R4 and R4B

SampledData
SampledData.interval
  • No Changes Added Element
SampledData.intervalUnit
  • Added Mandatory Element
SampledData.codeMap
  • Added Element
SampledData.offsets
  • Added Element
SampledData.period
  • Deleted (-> interval)

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . SampledData TU Element A series of measurements taken by a device
+ Rule: A SampledData SAHLL have either an interval and offsets but not both

Elements defined in Ancestors: id , extension
. . . origin Σ 1..1 SimpleQuantity Zero value and units
. . . period interval Σ C 1..1 0..1 decimal Number of milliseconds intervalUnits between samples
. . . factor intervalUnit Σ 0..1 1..1 decimal code Multiply data by this before adding to origin The measurement unit of the interval between samples
Binding: UCUM Codes ( Required )
. . . upperLimit lowerLimit Σ 0..1 decimal Upper Lower limit of detection
. . . dimensions upperLimit Σ 1..1 0..1 decimal Upper limit of detection
... dimensions Σ 1..1 positiveInt Number of sample points at each time point
. . . codeMap 0..1 canonical ( ConceptMap ) Defines the codes used in the data
. . . offsets C 0..1 string Offsets, typically in time, at which data values were taken
... data 0..1 string Decimal values with spaces, or "E" | "U" | "L" "L", or another code

doco Documentation for this format icon

UML Diagram ( Legend )

SampledData The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series origin : Quantity ( SimpleQuantity ) [1..1] The length Amount of time intervalUnits between sampling times, measured in samples, e.g. milliseconds for time-based sampling period interval : decimal [0..1] « This element has or is affected by some invariants C » The measurement unit in which the sample interval is expressed intervalUnit : code [1..1] « Units of measure allowed for an element. (Strength=Required) UCUMCodes ! » A correction factor that is applied to the sampled data points before they are added to the origin factor : decimal [0..1] The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit) lowerLimit : decimal [0..1] The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit) upperLimit : decimal [0..1] The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once dimensions : positiveInt [1..1] Reference to ConceptMap that defines the codes used in the data codeMap : canonical [0..1] « ConceptMap » A series of data points which are decimal values separated by a single space (character u20). The special units in which the offsets are expressed are found in intervalUnit. The absolute point at which the measurements begin SHALL be conveyed outside the scope of this datatype, e.g. Observation.effectiveDateTime for a timing offset offsets : string [0..1] « This element has or is affected by some invariants C » A series of data points which are decimal values or codes separated by a single space (character u20). The special codes "E" (error), "L" (below detection limit) and "U" (above detection limit) can are also be defined for used in place of a decimal value values data : string [0..1] Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<SampledData xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <origin><!-- 1..1 Quantity(SimpleQuantity) Zero value and units --></origin>
 <

 <interval value="[decimal]"/><!-- I 0..1 Number of intervalUnits between samples -->
 <intervalUnit value="[code]"/><!-- 1..1 The measurement unit of the interval between samples -->

 <factor value="[decimal]"/><!-- 0..1 Multiply data by this before adding to origin -->
 <lowerLimit value="[decimal]"/><!-- 0..1 Lower limit of detection -->
 <upperLimit value="[decimal]"/><!-- 0..1 Upper limit of detection -->
 <dimensions value="[positiveInt]"/><!-- 1..1 Number of sample points at each time point -->
 <
</[name]>

 <codeMap><!-- 0..1 canonical(ConceptMap) Defines the codes used in the data --></codeMap>
 <offsets value="[string]"/><!-- I 0..1 Offsets, typically in time, at which data values were taken -->
 <data value="[string]"/><!-- 0..1 Decimal values with spaces, or "E" | "U" | "L", or another code -->
</SampledData>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:origin [ Quantity(SimpleQuantity) ] ; # 1..1 Zero value and units
  fhir:interval [ decimal ] ; # 0..1 I Number of intervalUnits between samples
  fhir:intervalUnit [ code ] ; # 1..1 The measurement unit of the interval between samples
  fhir:factor [ decimal ] ; # 0..1 Multiply data by this before adding to origin
  fhir:lowerLimit [ decimal ] ; # 0..1 Lower limit of detection
  fhir:upperLimit [ decimal ] ; # 0..1 Upper limit of detection
  fhir:dimensions [ positiveInt ] ; # 1..1 Number of sample points at each time point
  fhir:codeMap [ canonical(ConceptMap) ] ; # 0..1 Defines the codes used in the data
  fhir:offsets [ string ] ; # 0..1 I Offsets, typically in time, at which data values were taken
  fhir:data [ string ] ; # 0..1 Decimal values with spaces, or "E" | "U" | "L", or another code

]

Changes since Release 3

Changes from both R4 and R4B

SampledData
SampledData.interval
  • No Changes Added Element
SampledData.intervalUnit
  • Added Mandatory Element
SampledData.codeMap
  • Added Element
SampledData.offsets
  • Added Element
SampledData.period
  • Deleted (-> interval)

See the Full Difference for further information

The digits are a set of decimal values separated by a single space (Unicode character u20). In addition to decimal values, the special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used. SampledData supports multi-dimensional data, where there is more than one measurement for each time point. If there is more than one dimension, the different dimensions are interlaced - all the data points for a particular time are represented together.

Data points are separated by by a single space (Unicode character u20). Each data point is either a decimal value or a code. Three special codes are defined:

  • E : error - no valid measurement available for this data point
  • L : below detection point - the value was below the device's detection limit ( lowerLimit , which must be provided if this code is used)
  • U : above detection point - the value was above the device's detection limit ( upperLimit , which must be provided if this code is used)

Other codes may be used. In this case, the meaning of the codes is specified by the codeMap property which references a ConceptMap that defines the codes used in the data, and maps the codes to properly defined concepts in a CodeSystem . Note that in this case, source system defined in the ConceptMap is not used in the SampledData and is ignored. There SHALL only be one group in the ConceptMap. The ConceptMap cannot define meanings for any numerical values, nor for the codes 'E', 'U', or 'L' (nor, for safety, 'e', 'u', or 'l'), since they always have the meaning as defined above. There is no escape sequences; codes cannot contain spaces. Also, to make parsing simpler, codes cannot start with numerals.

SampledData is used in the following places: Observation , Parameters , StructureMap and Task

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A string, typically numeric or alphanumeric string alphanumeric, that is associated with a single object or entity within a given system. Typically, identifiers are used to connect content in resources to external content available in other frameworks or protocols. Identifiers are associated with objects and may be changed or retired due to human or system process and errors.

Structure

Name Flags Card. Type Description & Constraints doco
. . Identifier Σ N Element An identifier intended for computation
+ Warning: Identifier with no value has limited utility. If communicating that an identifier value has been suppressed or missing, the value element SHOULD be present with an extension indicating the missing semantic - e.g. data-absent-reason

Elements defined in Ancestors: id , extension
. . . use ?! Σ 0..1 code usual | official | temp | secondary | old (If known)
Binding: IdentifierUse ( Required )
. . . type Σ 0..1 CodeableConcept Description of identifier
Binding: IdentifierType Identifier Type Codes ( Extensible )
. . . system Σ 0..1 uri The namespace for the identifier value
. . . period Σ 0..1 Period Time period when id is/was valid for use
. . . assigner Σ 0..1 Reference ( Organization ) Organization that issued id (may be just text)

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Identifier The purpose of this identifier (this element modifies the meaning of other elements) use : code [0..1] « Identifies the purpose for this identifier, if known . (Strength=Required) IdentifierUse ! » A coded type for the identifier that can be used to determine which identifier to use for a specific purpose type : CodeableConcept [0..1] « A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. (Strength=Extensible) Identifier Type IdentifierTypeCodes + » Establishes the namespace for the value - that is, a an absolute URL that describes a set values that are unique system : uri [0..1] The portion of the identifier typically relevant to the user and which is unique within the context of the system value : string [0..1] « This element has or is affected by some invariants C » Time period during which identifier is/was valid for use period : Period [0..1] Organization that issued/manages the identifier assigner : Reference [0..1] « Organization » Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Identifier xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 usual | official | temp | secondary | old (If known) -->
 <type><!-- 0..1 CodeableConcept Description of identifier --></type>
 <
 <

 <system value="[uri]"/><!-- 0..1 The namespace for the identifier value -->
 <value value="[string]"/><!-- I 0..1 The value that is unique -->

 <period><!-- 0..1 Period Time period when id is/was valid for use --></period>
 <assigner><!-- 0..1 Reference(Organization) Organization that issued id (may be just text) --></assigner>
</[name]>

</Identifier>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:use [ code ] ; # 0..1 usual | official | temp | secondary | old (If known)
  fhir:type [ CodeableConcept ] ; # 0..1 Description of identifier
  fhir:system [ uri ] ; # 0..1 The namespace for the identifier value
  fhir:value [ string ] ; # 0..1 I The value that is unique
  fhir:period [ Period ] ; # 0..1 Time period when id is/was valid for use
  fhir:assigner [ Reference(Organization) ] ; # 0..1 Organization that issued id (may be just text)

]

Changes since Release 3

Changes from both R4 and R4B

Identifier
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Identifier Σ N Element An identifier intended for computation
+ Warning: Identifier with no value has limited utility. If communicating that an identifier value has been suppressed or missing, the value element SHOULD be present with an extension indicating the missing semantic - e.g. data-absent-reason

Elements defined in Ancestors: id , extension
. . . use ?! Σ 0..1 code usual | official | temp | secondary | old (If known)
Binding: IdentifierUse ( Required )
. . . type Σ 0..1 CodeableConcept Description of identifier
Binding: IdentifierType Identifier Type Codes ( Extensible )
. . . system Σ 0..1 uri The namespace for the identifier value
. . . period Σ 0..1 Period Time period when id is/was valid for use
. . . assigner Σ 0..1 Reference ( Organization ) Organization that issued id (may be just text)

doco Documentation for this format icon

UML Diagram ( Legend )

Identifier The purpose of this identifier (this element modifies the meaning of other elements) use : code [0..1] « Identifies the purpose for this identifier, if known . (Strength=Required) IdentifierUse ! » A coded type for the identifier that can be used to determine which identifier to use for a specific purpose type : CodeableConcept [0..1] « A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. (Strength=Extensible) Identifier Type IdentifierTypeCodes + » Establishes the namespace for the value - that is, a an absolute URL that describes a set values that are unique system : uri [0..1] The portion of the identifier typically relevant to the user and which is unique within the context of the system value : string [0..1] « This element has or is affected by some invariants C » Time period during which identifier is/was valid for use period : Period [0..1] Organization that issued/manages the identifier assigner : Reference [0..1] « Organization » Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Identifier xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 usual | official | temp | secondary | old (If known) -->
 <type><!-- 0..1 CodeableConcept Description of identifier --></type>
 <
 <

 <system value="[uri]"/><!-- 0..1 The namespace for the identifier value -->
 <value value="[string]"/><!-- I 0..1 The value that is unique -->

 <period><!-- 0..1 Period Time period when id is/was valid for use --></period>
 <assigner><!-- 0..1 Reference(Organization) Organization that issued id (may be just text) --></assigner>
</[name]>

</Identifier>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:use [ code ] ; # 0..1 usual | official | temp | secondary | old (If known)
  fhir:type [ CodeableConcept ] ; # 0..1 Description of identifier
  fhir:system [ uri ] ; # 0..1 The namespace for the identifier value
  fhir:value [ string ] ; # 0..1 I The value that is unique
  fhir:period [ Period ] ; # 0..1 Time period when id is/was valid for use
  fhir:assigner [ Reference(Organization) ] ; # 0..1 Organization that issued id (may be just text)

]

Changes since Release 3

Changes from both R4 and R4B

Identifier
  • No Changes

See the Full Difference for further information

The value SHALL be unique within the defined system and have a consistent meaning wherever it appears. Identifier.system is always case sensitive. Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe. The system is a an absolute URI that defines a set of identifiers (i.e. how the value is made unique). It might be a specific application or a recognized standard/specification for a set of identifiers or a way of making identifiers unique. FHIR defines some useful or important system URIs directly . Here are some example identifier namespaces:

  • http://hl7.org/fhir/sid/us-ssn for United States Social Security Number (SSN) values
  • http://ns.electronichealth.net.au/id/hi/ihi/1.0 for Australian Individual Healthcare Identifier (IHI) numbers
  • urn:ietf:rfc:3986 for when the value of the identifier is itself a globally unique URI

If the system is a URL, it SHOULD resolve. Resolution might be to a web page that describes the identifier system and/or supports look-up of identifiers. Alternatively, it could be to a NamingSystem resource instance. Resolvable URLs are generally preferred by implementers over non-resolvable URNs, particularly opaque URNs such as OIDs (urn:oid:) or UUIDs (urn:uuid:). If used, OIDs and UUIDs may be registered in the HL7 OID registry icon and SHOULD be registered if the content is shared or exchanged across institutional boundaries.

It is up to the implementer organization to determine an appropriate URL or URN structure that will avoid collisions and to manage that space (and the resolvability of URLs) over time.

Note that the scope of a given identifier system may extend beyond identifiers that might be captured by a single resource. For example, some systems might draw all "order" identifiers from a single namespace, though some might be used on MedicationRequest while others would appear on ServiceRequest .

The value SHALL be unique within the defined system and have a consistent meaning wherever it appears. Identifier.system is always case sensitive. Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.

If the identifier value itself is naturally a globally unique URI (e.g. an OID, a UUID, or a URI with no trailing local part), then the system SHALL be " urn:ietf:rfc:3986 ", and the URI is in the value (OIDs and UUIDs using urn:oid: and urn:uuid: - see note on the V3 mapping and the examples ). Naturally globally unique identifiers are those for which no other system has been assigned and where the value of the identifier is reasonably expected to not be re-used. Typically, these are absolute URIs of some kind.

In some cases, the system might not be known - only the value is known (e.g. a simple device that scans a barcode), or the system is known implicitly (simple exchange in a limited context, often driven by barcode readers). In this case, no useful matching may be performed using the value unless the system can be safely inferred by the context. Applications should provide a system wherever possible, as information sharing in a wider context is very likely to arise eventually, and values without a system are inherently limited in use. Whether or not the proper Identifier.system is known, the human-readable label for the Identifier.value typically appears in Identifier.type.text . E.g. 'BC provincial health number'.

In addition to the system (which provides a uniqueness scope) and the value , identifiers may also have a type , which may be useful when a system encounters identifiers with unknown system values. Note, however, that the type of an identifier is not a well-controlled vocabulary with wide variations in practice. The type deals only with general categories of identifiers and SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to variations in common usage.

The assigner is used to indicate what registry/state/facility/etc. assigned the identifier. As a Reference , the assigner can include just a text description in the display .

Constraints

id Level Location Description Expression
img  ident-1 Warning (base) Identifier with no value has limited utility. If communicating that an identifier value has been suppressed or missing, the value element SHOULD be present with an extension indicating the missing semantic - e.g. data-absent-reason value.exists()

Terminology Bindings

Required Identifier.type
Path Definition ValueSet Type Reference Documentation
Identifier.use IdentifierUse Required

Identifies the purpose for this identifier, if known .

Identifier.type IdentifierUse IdentifierTypeCodes Extensible

A coded type for an identifier that can be used to determine which identifier to use for a specific purpose. Extensible Identifier Type Codes

Identifier is used in the following places: Reference , ProductShelfLife , Account , ActivityDefinition , ActorDefinition , AdministrableProductDefinition , AdverseEvent , AllergyIntolerance , Appointment , AppointmentResponse , ArtifactAssessment , Basic , BiologicallyDerivedProduct , BiologicallyDerivedProductDispense , BodyStructure , Bundle , CanonicalResource , CapabilityStatement , CarePlan , CareTeam , CatalogEntry , ChargeItem , ChargeItemDefinition , Citation , Claim , ClaimResponse , ClinicalImpression , ClinicalUseDefinition , CodeSystem , Communication , CommunicationRequest , Composition , ConceptMap , Condition , ConditionDefinition , Consent , Contract , Coverage , CoverageEligibilityRequest , CoverageEligibilityResponse , DetectedIssue , Device , DeviceAssociation , DeviceDefinition , DeviceDispense , DeviceMetric , DeviceRequest , DeviceUseStatement DeviceUsage , DiagnosticReport , DocumentManifest , DocumentReference , Encounter , EncounterHistory , Endpoint , EnrollmentRequest , EnrollmentResponse , EpisodeOfCare , EventDefinition , Evidence , EvidenceReport , EvidenceVariable , ExampleScenario , ExplanationOfBenefit , FamilyMemberHistory , Flag , FormularyItem , GenomicStudy , Goal , GraphDefinition , Group , GuidanceResponse , HealthcareService , ImagingSelection , ImagingStudy , Immunization , ImmunizationEvaluation , ImmunizationRecommendation , ImplementationGuide , Ingredient , InsurancePlan , InventoryItem , InventoryReport , Invoice , Library , List , Location , ManufacturedItemDefinition , Measure , MeasureReport , Media , Medication , MedicationAdministration , MedicationDispense , MedicationKnowledge , MedicationRequest , MedicationStatement , MedicinalProductDefinition , MessageDefinition , MessageHeader , MolecularSequence , NamingSystem , NutritionIntake , NutritionOrder , NutritionProduct , Observation , ObservationDefinition , OperationDefinition , Organization , OrganizationAffiliation , PackagedProductDefinition , Parameters , Patient , PaymentNotice , PaymentReconciliation , Person , PlanDefinition , Practitioner , PractitionerRole , Procedure , Questionnaire , QuestionnaireResponse , RegulatedAuthorization , RelatedPerson , RequestGroup , ResearchDefinition RequestOrchestration , ResearchElementDefinition Requirements , ResearchStudy , ResearchSubject , RiskAssessment , Schedule , SearchParameter , ServiceRequest , Slot , Specimen , SpecimenDefinition , StructureDefinition , StructureMap , Subscription , SubscriptionTopic , Substance , SubstanceDefinition , SubstanceNucleicAcid , SubstancePolymer , SubstanceProtein , SubstanceReferenceInformation , SubstanceSourceMaterial , SupplyDelivery , SupplyRequest , Task , TerminologyCapabilities , TestPlan , TestReport , TestScript , Transport , ValueSet and VisionPrescription

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A name of a human with text, parts and usage information.

Names may be changed or repudiated. People may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts is not always significant. With personal names, the different parts might or might not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems SHALL care about name parts around the world varies widely.

Structure

Name Flags Card. Type Description & Constraints doco
. . HumanName Σ N Element Name of a human or other living entity - parts and usage

Elements defined in Ancestors: id , extension
. . . use ?! Σ 0..1 code usual | official | temp | nickname | anonymous | old | maiden
Binding: NameUse ( Required )
. . . text Σ 0..1 string Text representation of the full name
. . . family Σ 0..1 string Family name (often called 'Surname')
. . . prefix Σ 0..* string Parts that come before the name
This repeating element order: Prefixes appear in the correct order for presenting the name
. . . suffix Σ 0..* string Parts that come after the name
This repeating element order: Suffixes appear in the correct order for presenting the name
. . . period Σ 0..1 Period Time period when name was/is in use

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

HumanName Identifies the purpose for this name (this element modifies the meaning of other elements) use : code [0..1] « The use of a human name. (Strength=Required) NameUse ! » Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts text : string [0..1] The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father family : string [0..1] Given name given : string [0..*] Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name prefix : string [0..*] Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name suffix : string [0..*] Indicates the period of time when this name was valid for the named person period : Period [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<HumanName xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 usual | official | temp | nickname | anonymous | old | maiden -->
 <text value="[string]"/><!-- 0..1 Text representation of the full name -->
 <family value="[string]"/><!-- 0..1 Family name (often called 'Surname') -->
 <given value="[string]"/><!-- 0..* Given names (not always 'first'). Includes middle names -->
 <prefix value="[string]"/><!-- 0..* Parts that come before the name -->
 <suffix value="[string]"/><!-- 0..* Parts that come after the name -->
 <period><!-- 0..1 Period Time period when name was/is in use --></period>
</[name]>

</HumanName>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:use [ code ] ; # 0..1 usual | official | temp | nickname | anonymous | old | maiden
  fhir:text [ string ] ; # 0..1 Text representation of the full name
  fhir:family [ string ] ; # 0..1 Family name (often called 'Surname')
  fhir:given  ( [ string ] ... ) ; # 0..* Given names (not always 'first'). Includes middle names
  fhir:prefix  ( [ string ] ... ) ; # 0..* Parts that come before the name
  fhir:suffix  ( [ string ] ... ) ; # 0..* Parts that come after the name
  fhir:period [ Period ] ; # 0..1 Time period when name was/is in use

]

Changes since Release 3

Changes from both R4 and R4B

HumanName
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . HumanName Σ N Element Name of a human or other living entity - parts and usage

Elements defined in Ancestors: id , extension
. . . use ?! Σ 0..1 code usual | official | temp | nickname | anonymous | old | maiden
Binding: NameUse ( Required )
. . . text Σ 0..1 string Text representation of the full name
. . . family Σ 0..1 string Family name (often called 'Surname')
. . . prefix Σ 0..* string Parts that come before the name
This repeating element order: Prefixes appear in the correct order for presenting the name
. . . suffix Σ 0..* string Parts that come after the name
This repeating element order: Suffixes appear in the correct order for presenting the name
. . . period Σ 0..1 Period Time period when name was/is in use

doco Documentation for this format icon

UML Diagram ( Legend )

HumanName Identifies the purpose for this name (this element modifies the meaning of other elements) use : code [0..1] « The use of a human name. (Strength=Required) NameUse ! » Specifies the entire name as it should be displayed e.g. on an application UI. This may be provided instead of or as well as the specific parts text : string [0..1] The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father family : string [0..1] Given name given : string [0..*] Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name prefix : string [0..*] Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name suffix : string [0..*] Indicates the period of time when this name was valid for the named person period : Period [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<HumanName xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 usual | official | temp | nickname | anonymous | old | maiden -->
 <text value="[string]"/><!-- 0..1 Text representation of the full name -->
 <family value="[string]"/><!-- 0..1 Family name (often called 'Surname') -->
 <given value="[string]"/><!-- 0..* Given names (not always 'first'). Includes middle names -->
 <prefix value="[string]"/><!-- 0..* Parts that come before the name -->
 <suffix value="[string]"/><!-- 0..* Parts that come after the name -->
 <period><!-- 0..1 Period Time period when name was/is in use --></period>
</[name]>

</HumanName>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:use [ code ] ; # 0..1 usual | official | temp | nickname | anonymous | old | maiden
  fhir:text [ string ] ; # 0..1 Text representation of the full name
  fhir:family [ string ] ; # 0..1 Family name (often called 'Surname')
  fhir:given  ( [ string ] ... ) ; # 0..* Given names (not always 'first'). Includes middle names
  fhir:prefix  ( [ string ] ... ) ; # 0..* Parts that come before the name
  fhir:suffix  ( [ string ] ... ) ; # 0..* Parts that come after the name
  fhir:period [ Period ] ; # 0..1 Time period when name was/is in use

]

Changes since Release 3

Changes from both R4 and R4B

HumanName
  • No Changes

See the Full Difference for further information

This table summarizes where common parts of a person's name are found.

Name Example Destination / Comments
Surname Smith Family Name
First name John Given Name
Title Mr. Prefix
Middle Name Samuel Subsequent Given Names
Patronymic bin Osman Family Name
Multiple family names Carreño Quiñones Family Name. See note below about decomposition of family name
Initials Q. Given Name as initial ("." recommended)
Nick Name Jock Given name, with Use = common nickname
Qualifications PhD Suffix
Honorifics Senior Suffix
Voorvoegsel / Nobility van Beethoven Family Name. See note below about decomposition of family name

For further information, including all W3C International Examples icon , consult the examples . Note: Implementers should read the name examples for a full understanding of how name works.

The multiple given parts and family name combine to form a single name. Where a person has alternate names that may be used in place of each other (e.g. Nicknames, Aliases), these are different instances of HumanName .

The text element specifies the entire name as it should be displayed e.g. in an application UI. This may be provided instead of or as well as the specific parts. Applications updating a name SHALL ensure that when both text and parts are present, no content is included in the text that isn't found in a part. The correct order of assembly of the parts is culture dependent: the order of the parts within a given part type has significance and SHALL be observed. The appropriate order between family name and given names depends on culture and context of use. Note that there is an extension for the few times name assembly order is not fixed by the culture.

The given name parts may contain whitespace, though generally they don't. Initials may be used in place of the full name if that is all that is recorded. Systems that operate across cultures should generally rely on the text form for presentation and use the parts for index/search functionality. For this reason, applications SHOULD populate the text element for future robustness.

In some cultures (e.g. German, Dutch, Spanish, Portuguese), family names are complex and composed of various parts that may need to be managed separately, e.g. they have differing significance for searching. In these cases, the full family name is populated in family , and a decomposition of the name can be provided using the family extensions own-name , own-prefix , partner-name , partner-prefix , fathers-family and mothers-family .

For robust search, servers should search the parts of a family name independently. E.g. Searching either Carreno or Quinones should match a family name of "Carreno Quinones". HL7 affiliates, and others producing implementation guides, may make more specific recommendations about how search should work in specific cultures or environments.

Constraints

Terminology Bindings

Path Definition ValueSet Type Reference Documentation
HumanName.use The use of a human name. NameUse Required NameUse

The use of a human name.

HumanName is used in the following places: Citation , InsurancePlan , Organization , Parameters ExtendedContactDetail , Patient , Person , Practitioner , RelatedPerson , StructureMap and Task RelatedPerson

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type datatype may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery. There are a variety of postal address formats defined around the world.

Structure

Name Flags Card. Type Description & Constraints doco
. . Address Σ N Element An address expressed using postal conventions (as opposed to GPS or other location definition formats)

Elements defined in Ancestors: id , extension
. . . use ?! Σ 0..1 code home | work | temp | old | billing - purpose of this address
Binding: AddressUse ( Required )
. . . type Σ 0..1 code postal | physical | both
Binding: AddressType ( Required )
. . . text Σ 0..1 string Text representation of the address
. . . city Σ 0..1 string Name of city, town etc.
. . . district Σ 0..1 string District name (aka county)
. . . state Σ 0..1 string Sub-unit of country (abbreviations ok)
. . . postalCode Σ 0..1 string Postal code for area
. . . country Σ 0..1 string Country (e.g. can may be ISO 3166 2 or 3 letter code)
. . . period Σ 0..1 Period Time period when address was/is in use

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Address The purpose of this address (this element modifies the meaning of other elements) use : code [0..1] « The use of an address. (Strength=Required) AddressUse ! » Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both type : code [0..1] « The type of an address (physical / postal). (Strength=Required) AddressType ! » Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts text : string [0..1] This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information line : string [0..*] The name of the city, town, suburb, village or other community or delivery center city : string [0..1] The name of the administrative area (county) district : string [0..1] Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes) state : string [0..1] A postal code designating a region defined by the postal service postalCode : string [0..1] Country - a nation as commonly understood or generally accepted country : string [0..1] Time period when address was/is in use period : Period [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Address xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 home | work | temp | old | billing - purpose of this address -->
 <type value="[code]"/><!-- 0..1 postal | physical | both -->
 <text value="[string]"/><!-- 0..1 Text representation of the address -->
 <line value="[string]"/><!-- 0..* Street name, number, direction & P.O. Box etc. -->
 <city value="[string]"/><!-- 0..1 Name of city, town etc. -->
 <district value="[string]"/><!-- 0..1 District name (aka county) -->
 <state value="[string]"/><!-- 0..1 Sub-unit of country (abbreviations ok) -->
 <postalCode value="[string]"/><!-- 0..1 Postal code for area -->
 <

 <country value="[string]"/><!-- 0..1 Country (e.g. may be ISO 3166 2 or 3 letter code) -->

 <period><!-- 0..1 Period Time period when address was/is in use --></period>
</[name]>

</Address>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:use [ code ] ; # 0..1 home | work | temp | old | billing - purpose of this address
  fhir:type [ code ] ; # 0..1 postal | physical | both
  fhir:text [ string ] ; # 0..1 Text representation of the address
  fhir:line  ( [ string ] ... ) ; # 0..* Street name, number, direction & P.O. Box etc.
  fhir:city [ string ] ; # 0..1 Name of city, town etc.
  fhir:district [ string ] ; # 0..1 District name (aka county)
  fhir:state [ string ] ; # 0..1 Sub-unit of country (abbreviations ok)
  fhir:postalCode [ string ] ; # 0..1 Postal code for area
  fhir:country [ string ] ; # 0..1 Country (e.g. may be ISO 3166 2 or 3 letter code)
  fhir:period [ Period ] ; # 0..1 Time period when address was/is in use

]

Changes since Release 3

Changes from both R4 and R4B

Address
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Address Σ N Element An address expressed using postal conventions (as opposed to GPS or other location definition formats)

Elements defined in Ancestors: id , extension
. . . use ?! Σ 0..1 code home | work | temp | old | billing - purpose of this address
Binding: AddressUse ( Required )
. . . type Σ 0..1 code postal | physical | both
Binding: AddressType ( Required )
. . . text Σ 0..1 string Text representation of the address
. . . city Σ 0..1 string Name of city, town etc.
. . . district Σ 0..1 string District name (aka county)
. . . state Σ 0..1 string Sub-unit of country (abbreviations ok)
. . . postalCode Σ 0..1 string Postal code for area
. . . country Σ 0..1 string Country (e.g. can may be ISO 3166 2 or 3 letter code)
. . . period Σ 0..1 Period Time period when address was/is in use

doco Documentation for this format icon

UML Diagram ( Legend )

Address The purpose of this address (this element modifies the meaning of other elements) use : code [0..1] « The use of an address. (Strength=Required) AddressUse ! » Distinguishes between physical addresses (those you can visit) and mailing addresses (e.g. PO Boxes and care-of addresses). Most addresses are both type : code [0..1] « The type of an address (physical / postal). (Strength=Required) AddressType ! » Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts text : string [0..1] This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information line : string [0..*] The name of the city, town, suburb, village or other community or delivery center city : string [0..1] The name of the administrative area (county) district : string [0..1] Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (e.g. US 2 letter state codes) state : string [0..1] A postal code designating a region defined by the postal service postalCode : string [0..1] Country - a nation as commonly understood or generally accepted country : string [0..1] Time period when address was/is in use period : Period [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Address xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 home | work | temp | old | billing - purpose of this address -->
 <type value="[code]"/><!-- 0..1 postal | physical | both -->
 <text value="[string]"/><!-- 0..1 Text representation of the address -->
 <line value="[string]"/><!-- 0..* Street name, number, direction & P.O. Box etc. -->
 <city value="[string]"/><!-- 0..1 Name of city, town etc. -->
 <district value="[string]"/><!-- 0..1 District name (aka county) -->
 <state value="[string]"/><!-- 0..1 Sub-unit of country (abbreviations ok) -->
 <postalCode value="[string]"/><!-- 0..1 Postal code for area -->
 <

 <country value="[string]"/><!-- 0..1 Country (e.g. may be ISO 3166 2 or 3 letter code) -->

 <period><!-- 0..1 Period Time period when address was/is in use --></period>
</[name]>

</Address>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:use [ code ] ; # 0..1 home | work | temp | old | billing - purpose of this address
  fhir:type [ code ] ; # 0..1 postal | physical | both
  fhir:text [ string ] ; # 0..1 Text representation of the address
  fhir:line  ( [ string ] ... ) ; # 0..* Street name, number, direction & P.O. Box etc.
  fhir:city [ string ] ; # 0..1 Name of city, town etc.
  fhir:district [ string ] ; # 0..1 District name (aka county)
  fhir:state [ string ] ; # 0..1 Sub-unit of country (abbreviations ok)
  fhir:postalCode [ string ] ; # 0..1 Postal code for area
  fhir:country [ string ] ; # 0..1 Country (e.g. may be ISO 3166 2 or 3 letter code)
  fhir:period [ Period ] ; # 0..1 Time period when address was/is in use

]

Changes since Release 3

Changes from both R4 and R4B

Address
  • No Changes

See the Full Difference for further information

The text element specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts. Applications updating an address SHALL ensure that when both text and parts are present, no content is included in the text that isn't found in a part.

Constraints

Terminology Bindings

Path Definition ValueSet Type Reference Documentation
Address.use The use of an address. AddressUse Required AddressUse

The use of an address.

Address.type The type of an address (physical / postal). AddressType Required AddressType

The type of an address (physical / postal).

Address is used in the following places: Citation ExtendedContactDetail , Claim , ClaimResponse , ExplanationOfBenefit , InsurancePlan InventoryItem , Location , Organization , Parameters , Patient , Person , Practitioner , RelatedPerson , StructureMap and Task RelatedPerson

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

Details for all kinds of technology-mediated contact points for a person or organization, including telephone, email, etc.

Structure

Name Flags Card. Type Description & Constraints doco
. . ContactPoint Σ N Element Details of a Technology mediated contact point (phone, fax, email, etc.)
+ Rule: A system is required if a value is provided.

Elements defined in Ancestors: id , extension
. . . system Σ I C 0..1 code phone | fax | email | pager | url | sms | other
Binding: ContactPointSystem ( Required )
. . . value Σ C 0..1 string The actual contact point details
. . . use ?! Σ 0..1 code home | work | temp | old | mobile - purpose of this contact point
Binding: ContactPointUse ( Required )
. . . period Σ 0..1 Period Time period when the contact point was/is in use

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

ContactPoint Telecommunications form for contact point - what communications system is required to make use of the contact system : code [0..1] « Telecommunications form for contact point. (Strength=Required) ContactPointSystem ! » « This element has or is affected by some invariants C » The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address) value : string [0..1] « This element has or is affected by some invariants C » Identifies the purpose for the contact point (this element modifies the meaning of other elements) use : code [0..1] « Use of contact point. (Strength=Required) ContactPointUse ! » Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values rank : positiveInt [0..1] Time period when the contact point was/is in use period : Period [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<ContactPoint xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <
 <

 <system value="[code]"/><!-- I 0..1 phone | fax | email | pager | url | sms | other -->
 <value value="[string]"/><!-- I 0..1 The actual contact point details -->

 <use value="[code]"/><!-- 0..1 home | work | temp | old | mobile - purpose of this contact point -->
 <rank value="[positiveInt]"/><!-- 0..1 Specify preferred order of use (1 = highest) -->
 <period><!-- 0..1 Period Time period when the contact point was/is in use --></period>
</[name]>

</ContactPoint>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:system [ code ] ; # 0..1 I phone | fax | email | pager | url | sms | other
  fhir:value [ string ] ; # 0..1 I The actual contact point details
  fhir:use [ code ] ; # 0..1 home | work | temp | old | mobile - purpose of this contact point
  fhir:rank [ positiveInt ] ; # 0..1 Specify preferred order of use (1 = highest)
  fhir:period [ Period ] ; # 0..1 Time period when the contact point was/is in use

]

Changes since Release 3

Changes from both R4 and R4B

ContactPoint
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . ContactPoint Σ N Element Details of a Technology mediated contact point (phone, fax, email, etc.)
+ Rule: A system is required if a value is provided.

Elements defined in Ancestors: id , extension
. . . system Σ I C 0..1 code phone | fax | email | pager | url | sms | other
Binding: ContactPointSystem ( Required )
. . . value Σ C 0..1 string The actual contact point details
. . . use ?! Σ 0..1 code home | work | temp | old | mobile - purpose of this contact point
Binding: ContactPointUse ( Required )
. . . period Σ 0..1 Period Time period when the contact point was/is in use

doco Documentation for this format icon

UML Diagram ( Legend )

ContactPoint Telecommunications form for contact point - what communications system is required to make use of the contact system : code [0..1] « Telecommunications form for contact point. (Strength=Required) ContactPointSystem ! » « This element has or is affected by some invariants C » The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address) value : string [0..1] « This element has or is affected by some invariants C » Identifies the purpose for the contact point (this element modifies the meaning of other elements) use : code [0..1] « Use of contact point. (Strength=Required) ContactPointUse ! » Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values rank : positiveInt [0..1] Time period when the contact point was/is in use period : Period [0..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<ContactPoint xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <
 <

 <system value="[code]"/><!-- I 0..1 phone | fax | email | pager | url | sms | other -->
 <value value="[string]"/><!-- I 0..1 The actual contact point details -->

 <use value="[code]"/><!-- 0..1 home | work | temp | old | mobile - purpose of this contact point -->
 <rank value="[positiveInt]"/><!-- 0..1 Specify preferred order of use (1 = highest) -->
 <period><!-- 0..1 Period Time period when the contact point was/is in use --></period>
</[name]>

</ContactPoint>

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:system [ code ] ; # 0..1 I phone | fax | email | pager | url | sms | other
  fhir:value [ string ] ; # 0..1 I The actual contact point details
  fhir:use [ code ] ; # 0..1 home | work | temp | old | mobile - purpose of this contact point
  fhir:rank [ positiveInt ] ; # 0..1 Specify preferred order of use (1 = highest)
  fhir:period [ Period ] ; # 0..1 Time period when the contact point was/is in use

]

Changes since Release 3

Changes from both R4 and R4B

ContactPoint
  • No Changes

See the Full Difference for further information

If capturing a phone, fax or similar contact point, the value should be a properly formatted telephone number according to ITU-T E.123 icon . However, this is frequently not possible due to legacy data and/or clerical practices when recording contact details. For this reason, phone, fax, pager, and email addresses are not handled as formal URLs. For other kinds of contact points, the system is "other" and the value SHOULD be a URL so that its use can be determined automatically. Typical URL schemes used in the value are http{s}: for web addresses, and URL schemes for various kinds of messaging systems. If the value is not a URL, then human interpretation will be required.

The rank element can be used to specify a preference for the order in which a set of contacts is used. ContactPoints with lower rank values are more preferred than those with higher rank values. Note that rank does not necessarily follow the order in which the contacts are represented in the instance.

Constraints

id Level Location Description Expression
cpt-2 img  cpt-2 Rule (base) A system is required if a value is provided. value.empty() or system.exists()

Terminology Bindings

Path Definition ValueSet Type Reference Documentation
ContactPoint.system Telecommunications form for contact point. ContactPointSystem Required ContactPointSystem

Telecommunications form for contact point.

ContactPoint.use Use of contact point. ContactPointUse Required ContactPointUse

Use of contact point.

ContactPoint is used in the following places: VirtualServiceDetail , ContactDetail , ExtendedContactDetail , CareTeam , Citation , Device , DeviceDefinition , Endpoint , HealthcareService , InsurancePlan , Location , MessageHeader , Organization , OrganizationAffiliation , Parameters , Patient , Person , Practitioner , PractitionerRole , RelatedPerson , StructureMap , Subscription and Task Subscription

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

Describes the occurrence of an event that may occur multiple times. Timing schedules are used for specifying when events are expected or requested to occur and may also be used to represent the summary of a past or ongoing event. For simplicity, the definitions of Timing components are expressed as 'future' events, but such components can also be used to describe historic or ongoing events.

A Timing schedule can be a list of events and/or criteria for when the event happens, which can be expressed in a structured form and/or as a code. When both event and a repeating specification are provided, the list of events should be understood as an interpretation of the information in the repeat structure.

Note: The Timing data type datatype allows modifier extensions .

Structure

Name Flags Card. Type Description & Constraints doco
. . Timing Σ N BackBoneElement Element A timing schedule that specifies an event that may occur multiple times

Elements defined in Ancestors: id , extension , modifierExtension
. . . event Σ 0..* dateTime When the event occurs

. . . repeat Σ I C 0..1 Element When the event is to occur
+ Rule: if there's a duration, there needs to be duration units
+ Rule: if there's a period, there needs to be period units
+ Rule: duration SHALL be a non-negative value
+ Rule: period SHALL be a non-negative value
+ Rule: If there's a periodMax, there must be a period
+ Rule: If there's a durationMax, there must be a duration
+ Rule: If there's a countMax, there must be a count
+ Rule: If there's an offset, there must be a when (and not C, CM, CD, CV)
+ Rule: If there's a timeOfDay, there cannot be a when, or vice versa
. . . . bounds[x] Σ 0..1 Length/Range of lengths, or (Start and/or end) limits
. . . . . boundsDuration Duration
. . . . . boundsRange Range
. . . . . boundsPeriod Period
. . . . count Σ C 0..1 positiveInt Number of times to repeat
. . . . countMax Σ C 0..1 positiveInt Maximum number of times to repeat
. . . . duration Σ C 0..1 decimal How long when it happens
. . . . durationMax Σ C 0..1 decimal How long when it happens (Max)
. . . . durationUnit Σ C 0..1 code s | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime ( Required )
. . . . frequency Σ 0..1 positiveInt Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period
. . . . frequencyMax Σ 0..1 positiveInt Event occurs up to frequencyMax times per period
. . . . period Σ C 0..1 decimal The duration to which the frequency applies. I.e. Event occurs frequency times per period
. . . . periodMax Σ C 0..1 decimal Upper limit of period (3-4 hours)
. . . . periodUnit Σ C 0..1 code s | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime ( Required )
. . . . dayOfWeek Σ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek Days Of Week ( Required )

. . . . timeOfDay Σ C 0..* time Time of day for action

. . . . when Σ C 0..* code Code for time period of occurrence
Binding: EventTiming ( Required )

. . . . offset Σ C 0..1 unsignedInt Minutes from event (before or after)
. . . code Σ 0..1 CodeableConcept C | BID | TID | QID | AM | PM | QD | QOD | +
Binding: TimingAbbreviation ( Preferred )

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Timing Identifies specific times when the event occurs event : dateTime [0..*] A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code) code : CodeableConcept [0..1] « Code for a known / defined timing pattern. (Strength=Preferred) TimingAbbreviation ? » Repeat Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule bounds[x] : Element DataType [0..1] « Duration | Range | Period » A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values count : positiveInt [0..1] « This element has or is affected by some invariants C » If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times countMax : positiveInt [0..1] « This element has or is affected by some invariants C » How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration duration : decimal [0..1] « This element has or is affected by some invariants C » If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length durationMax : decimal [0..1] « This element has or is affected by some invariants C » The units of time for the duration, in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence durationUnit : code [0..1] « A unit of time (units from UCUM). (Strength=Required) UnitsOfTime ! » « This element has or is affected by some invariants C » The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency frequency : positiveInt [0..1] If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range frequencyMax : positiveInt [0..1] Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length period : decimal [0..1] « This element has or is affected by some invariants C » If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days periodMax : decimal [0..1] « This element has or is affected by some invariants C » The units of time for the period in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence periodUnit : code [0..1] « A unit of time (units from UCUM). (Strength=Required) UnitsOfTime ! » « This element has or is affected by some invariants C » If one or more days of week is provided, then the action happens only on the specified day(s) dayOfWeek : code [0..*] « (Strength=Required) DaysOfWeek ! » Specified time of day for action to take place timeOfDay : time [0..*] « This element has or is affected by some invariants C » An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur when : code [0..*] « Real world Real-world event relating to the schedule. (Strength=Required) EventTiming ! » « This element has or is affected by some invariants C » The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event offset : unsignedInt [0..1] « This element has or is affected by some invariants C » BackboneElement BackboneType 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 manageable, 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) (this element modifies the meaning of other elements) modifierExtension : Extension [0..*] A set of rules that describe when the event is scheduled repeat [0..1]

XML Template

<Timing xmlns="http://hl7.org/fhir">
 <!-- from BackboneElement:  -->

 <!-- from Element: extension -->

 <event value="[dateTime]"/><!-- 0..* When the event occurs -->
 <repeat>  <!-- 0..1 When the event is to occur -->
  <bounds[x]><!-- 0..1 Duration|Range|Period Length/Range of lengths, or (Start and/or end) limits --></bounds[x]>
  <
  <
  <
  <
  <
  <

  <count value="[positiveInt]"/><!-- I 0..1 Number of times to repeat -->
  <countMax value="[positiveInt]"/><!-- I 0..1 Maximum number of times to repeat -->
  <duration value="[decimal]"/><!-- I 0..1 How long when it happens -->
  <durationMax value="[decimal]"/><!-- I 0..1 How long when it happens (Max) -->
  <durationUnit value="[code]"/><!-- I 0..1 s | min | h | d | wk | mo | a - unit of time (UCUM) -->
  <frequency value="[positiveInt]"/><!-- 0..1 Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period -->

  <frequencyMax value="[positiveInt]"/><!-- 0..1 Event occurs up to frequencyMax times per period -->
  <
  <
  <

  <period value="[decimal]"/><!-- I 0..1 The duration to which the frequency applies. I.e. Event occurs frequency times per period -->
  <periodMax value="[decimal]"/><!-- I 0..1 Upper limit of period (3-4 hours) -->
  <periodUnit value="[code]"/><!-- I 0..1 s | min | h | d | wk | mo | a - unit of time (UCUM) -->

  <dayOfWeek value="[code]"/><!-- 0..* mon | tue | wed | thu | fri | sat | sun -->
  <
  <
  <

  <timeOfDay value="[time]"/><!-- I 0..* Time of day for action -->
  <when value="[code]"/><!-- I 0..* Code for time period of occurrence -->
  <offset value="[unsignedInt]"/><!-- I 0..1 Minutes from event (before or after) -->

 </repeat>
 <</code>

 <code><!-- 0..1 CodeableConcept C | BID | TID | QID | AM | PM | QD | QOD | + --></code>

</Timing>

JSON Template

{doco
  // from BackboneElement: 

  // from Element: extension

  "event" : ["<dateTime>"], // When the event occurs
  "repeat" : { // When the event is to occur
    // bounds[x]: Length/Range of lengths, or (Start and/or end) limits. One of these 3:
    "boundsDuration" : { Duration },
    "boundsRange" : { Range },
    "boundsPeriod" : { Period },
    "
    "
    "
    "
    "
    "

    "count" : "<positiveInt>", // I Number of times to repeat
    "countMax" : "<positiveInt>", // I Maximum number of times to repeat
    "duration" : <decimal>, // I How long when it happens
    "durationMax" : <decimal>, // I How long when it happens (Max)
    "durationUnit" : "<code>", // I s | min | h | d | wk | mo | a - unit of time (UCUM)
    "frequency" : "<positiveInt>", // Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period

    "frequencyMax" : "<positiveInt>", // Event occurs up to frequencyMax times per period
    "
    "
    "

    "period" : <decimal>, // I The duration to which the frequency applies. I.e. Event occurs frequency times per period
    "periodMax" : <decimal>, // I Upper limit of period (3-4 hours)
    "periodUnit" : "<code>", // I s | min | h | d | wk | mo | a - unit of time (UCUM)

    "dayOfWeek" : ["<code>"], // mon | tue | wed | thu | fri | sat | sun
    "
    "
    "

    "timeOfDay" : ["<time>"], // I Time of day for action
    "when" : ["<code>"], // I Code for time period of occurrence
    "offset" : "<unsignedInt>" // I Minutes from event (before or after)

  },
  "

  "code" : { CodeableConcept } // C | BID | TID | QID | AM | PM | QD | QOD | +

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from BackboneElement: 
  fhir:
  fhir:
    # . One of these 3
      fhir: ]
      fhir: ]
      fhir: ]
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ];
  fhir:

 # from Element: Element.extension
  fhir:event  ( [ dateTime ] ... ) ; # 0..* When the event occurs
  fhir:repeat [ # 0..1 When the event is to occur
    # bounds[x] : 0..1 Length/Range of lengths, or (Start and/or end) limits. One of these 3
      fhir:bounds [  a fhir:Duration ; Duration ]
      fhir:bounds [  a fhir:Range ; Range ]
      fhir:bounds [  a fhir:Period ; Period ]
    fhir:count [ positiveInt ] ; # 0..1 I Number of times to repeat
    fhir:countMax [ positiveInt ] ; # 0..1 I Maximum number of times to repeat
    fhir:duration [ decimal ] ; # 0..1 I How long when it happens
    fhir:durationMax [ decimal ] ; # 0..1 I How long when it happens (Max)
    fhir:durationUnit [ code ] ; # 0..1 I s | min | h | d | wk | mo | a - unit of time (UCUM)
    fhir:frequency [ positiveInt ] ; # 0..1 Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period
    fhir:frequencyMax [ positiveInt ] ; # 0..1 Event occurs up to frequencyMax times per period
    fhir:period [ decimal ] ; # 0..1 I The duration to which the frequency applies. I.e. Event occurs frequency times per period
    fhir:periodMax [ decimal ] ; # 0..1 I Upper limit of period (3-4 hours)
    fhir:periodUnit [ code ] ; # 0..1 I s | min | h | d | wk | mo | a - unit of time (UCUM)
    fhir:dayOfWeek  ( [ code ] ... ) ; # 0..* mon | tue | wed | thu | fri | sat | sun
    fhir:timeOfDay  ( [ time ] ... ) ; # 0..* I Time of day for action
    fhir:when  ( [ code ] ... ) ; # 0..* I Code for time period of occurrence
    fhir:offset [ unsignedInt ] ; # 0..1 I Minutes from event (before or after)
  ] ;
  fhir:code [ CodeableConcept ] ; # 0..1 C | BID | TID | QID | AM | PM | QD | QOD | +

]

Changes since Release 3

Changes from both R4 and R4B

Timing
Timing.repeat.when
  • No Changes Add code IMD

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Timing Σ N BackBoneElement Element A timing schedule that specifies an event that may occur multiple times

Elements defined in Ancestors: id , extension , modifierExtension
. . . event Σ 0..* dateTime When the event occurs

. . . repeat Σ I C 0..1 Element When the event is to occur
+ Rule: if there's a duration, there needs to be duration units
+ Rule: if there's a period, there needs to be period units
+ Rule: duration SHALL be a non-negative value
+ Rule: period SHALL be a non-negative value
+ Rule: If there's a periodMax, there must be a period
+ Rule: If there's a durationMax, there must be a duration
+ Rule: If there's a countMax, there must be a count
+ Rule: If there's an offset, there must be a when (and not C, CM, CD, CV)
+ Rule: If there's a timeOfDay, there cannot be a when, or vice versa
. . . . bounds[x] Σ 0..1 Length/Range of lengths, or (Start and/or end) limits
. . . . . boundsDuration Duration
. . . . . boundsRange Range
. . . . . boundsPeriod Period
. . . . count Σ C 0..1 positiveInt Number of times to repeat
. . . . countMax Σ C 0..1 positiveInt Maximum number of times to repeat
. . . . duration Σ C 0..1 decimal How long when it happens
. . . . durationMax Σ C 0..1 decimal How long when it happens (Max)
. . . . durationUnit Σ C 0..1 code s | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime ( Required )
. . . . frequency Σ 0..1 positiveInt Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period
. . . . frequencyMax Σ 0..1 positiveInt Event occurs up to frequencyMax times per period
. . . . period Σ C 0..1 decimal The duration to which the frequency applies. I.e. Event occurs frequency times per period
. . . . periodMax Σ C 0..1 decimal Upper limit of period (3-4 hours)
. . . . periodUnit Σ C 0..1 code s | min | h | d | wk | mo | a - unit of time (UCUM)
Binding: UnitsOfTime ( Required )
. . . . dayOfWeek Σ 0..* code mon | tue | wed | thu | fri | sat | sun
Binding: DaysOfWeek Days Of Week ( Required )

. . . . timeOfDay Σ C 0..* time Time of day for action

. . . . when Σ C 0..* code Code for time period of occurrence
Binding: EventTiming ( Required )

. . . . offset Σ C 0..1 unsignedInt Minutes from event (before or after)
. . . code Σ 0..1 CodeableConcept C | BID | TID | QID | AM | PM | QD | QOD | +
Binding: TimingAbbreviation ( Preferred )

doco Documentation for this format icon

UML Diagram ( Legend )

Timing Identifies specific times when the event occurs event : dateTime [0..*] A code for the timing schedule (or just text in code.text). Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing, with the exception that .repeat.bounds still applies over the code (and is not contained in the code) code : CodeableConcept [0..1] « Code for a known / defined timing pattern. (Strength=Preferred) TimingAbbreviation ? » Repeat Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule bounds[x] : Element DataType [0..1] « Duration | Range | Period » A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values count : positiveInt [0..1] « This element has or is affected by some invariants C » If present, indicates that the count is a range - so to perform the action between [count] and [countMax] times countMax : positiveInt [0..1] « This element has or is affected by some invariants C » How long this thing happens for when it happens. If durationMax is present, this element indicates the lower bound of the allowed range of the duration duration : decimal [0..1] « This element has or is affected by some invariants C » If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length durationMax : decimal [0..1] « This element has or is affected by some invariants C » The units of time for the duration, in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence durationUnit : code [0..1] « A unit of time (units from UCUM). (Strength=Required) UnitsOfTime ! » « This element has or is affected by some invariants C » The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency frequency : positiveInt [0..1] If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range frequencyMax : positiveInt [0..1] Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length period : decimal [0..1] « This element has or is affected by some invariants C » If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days periodMax : decimal [0..1] « This element has or is affected by some invariants C » The units of time for the period in UCUM units Normal practice is to use the 'mo' code as a calendar month when calculating the next occurrence periodUnit : code [0..1] « A unit of time (units from UCUM). (Strength=Required) UnitsOfTime ! » « This element has or is affected by some invariants C » If one or more days of week is provided, then the action happens only on the specified day(s) dayOfWeek : code [0..*] « (Strength=Required) DaysOfWeek ! » Specified time of day for action to take place timeOfDay : time [0..*] « This element has or is affected by some invariants C » An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur when : code [0..*] « Real world Real-world event relating to the schedule. (Strength=Required) EventTiming ! » « This element has or is affected by some invariants C » The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event offset : unsignedInt [0..1] « This element has or is affected by some invariants C » BackboneElement BackboneType 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 manageable, 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) (this element modifies the meaning of other elements) modifierExtension : Extension [0..*] A set of rules that describe when the event is scheduled repeat [0..1]

XML Template

<Timing xmlns="http://hl7.org/fhir">
 <!-- from BackboneElement:  -->

 <!-- from Element: extension -->

 <event value="[dateTime]"/><!-- 0..* When the event occurs -->
 <repeat>  <!-- 0..1 When the event is to occur -->
  <bounds[x]><!-- 0..1 Duration|Range|Period Length/Range of lengths, or (Start and/or end) limits --></bounds[x]>
  <
  <
  <
  <
  <
  <

  <count value="[positiveInt]"/><!-- I 0..1 Number of times to repeat -->
  <countMax value="[positiveInt]"/><!-- I 0..1 Maximum number of times to repeat -->
  <duration value="[decimal]"/><!-- I 0..1 How long when it happens -->
  <durationMax value="[decimal]"/><!-- I 0..1 How long when it happens (Max) -->
  <durationUnit value="[code]"/><!-- I 0..1 s | min | h | d | wk | mo | a - unit of time (UCUM) -->
  <frequency value="[positiveInt]"/><!-- 0..1 Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period -->

  <frequencyMax value="[positiveInt]"/><!-- 0..1 Event occurs up to frequencyMax times per period -->
  <
  <
  <

  <period value="[decimal]"/><!-- I 0..1 The duration to which the frequency applies. I.e. Event occurs frequency times per period -->
  <periodMax value="[decimal]"/><!-- I 0..1 Upper limit of period (3-4 hours) -->
  <periodUnit value="[code]"/><!-- I 0..1 s | min | h | d | wk | mo | a - unit of time (UCUM) -->

  <dayOfWeek value="[code]"/><!-- 0..* mon | tue | wed | thu | fri | sat | sun -->
  <
  <
  <

  <timeOfDay value="[time]"/><!-- I 0..* Time of day for action -->
  <when value="[code]"/><!-- I 0..* Code for time period of occurrence -->
  <offset value="[unsignedInt]"/><!-- I 0..1 Minutes from event (before or after) -->

 </repeat>
 <</code>

 <code><!-- 0..1 CodeableConcept C | BID | TID | QID | AM | PM | QD | QOD | + --></code>

</Timing>

JSON Template

{doco
  // from BackboneElement: 

  // from Element: extension

  "event" : ["<dateTime>"], // When the event occurs
  "repeat" : { // When the event is to occur
    // bounds[x]: Length/Range of lengths, or (Start and/or end) limits. One of these 3:
    "boundsDuration" : { Duration },
    "boundsRange" : { Range },
    "boundsPeriod" : { Period },
    "
    "
    "
    "
    "
    "

    "count" : "<positiveInt>", // I Number of times to repeat
    "countMax" : "<positiveInt>", // I Maximum number of times to repeat
    "duration" : <decimal>, // I How long when it happens
    "durationMax" : <decimal>, // I How long when it happens (Max)
    "durationUnit" : "<code>", // I s | min | h | d | wk | mo | a - unit of time (UCUM)
    "frequency" : "<positiveInt>", // Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period

    "frequencyMax" : "<positiveInt>", // Event occurs up to frequencyMax times per period
    "
    "
    "

    "period" : <decimal>, // I The duration to which the frequency applies. I.e. Event occurs frequency times per period
    "periodMax" : <decimal>, // I Upper limit of period (3-4 hours)
    "periodUnit" : "<code>", // I s | min | h | d | wk | mo | a - unit of time (UCUM)

    "dayOfWeek" : ["<code>"], // mon | tue | wed | thu | fri | sat | sun
    "
    "
    "

    "timeOfDay" : ["<time>"], // I Time of day for action
    "when" : ["<code>"], // I Code for time period of occurrence
    "offset" : "<unsignedInt>" // I Minutes from event (before or after)

  },
  "

  "code" : { CodeableConcept } // C | BID | TID | QID | AM | PM | QD | QOD | +

}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from BackboneElement: 
  fhir:
  fhir:
    # . One of these 3
      fhir: ]
      fhir: ]
      fhir: ]
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
    fhir:
  ];
  fhir:

 # from Element: Element.extension
  fhir:event  ( [ dateTime ] ... ) ; # 0..* When the event occurs
  fhir:repeat [ # 0..1 When the event is to occur
    # bounds[x] : 0..1 Length/Range of lengths, or (Start and/or end) limits. One of these 3
      fhir:bounds [  a fhir:Duration ; Duration ]
      fhir:bounds [  a fhir:Range ; Range ]
      fhir:bounds [  a fhir:Period ; Period ]
    fhir:count [ positiveInt ] ; # 0..1 I Number of times to repeat
    fhir:countMax [ positiveInt ] ; # 0..1 I Maximum number of times to repeat
    fhir:duration [ decimal ] ; # 0..1 I How long when it happens
    fhir:durationMax [ decimal ] ; # 0..1 I How long when it happens (Max)
    fhir:durationUnit [ code ] ; # 0..1 I s | min | h | d | wk | mo | a - unit of time (UCUM)
    fhir:frequency [ positiveInt ] ; # 0..1 Indicates the number of repetitions that should occur within a period. I.e. Event occurs frequency times per period
    fhir:frequencyMax [ positiveInt ] ; # 0..1 Event occurs up to frequencyMax times per period
    fhir:period [ decimal ] ; # 0..1 I The duration to which the frequency applies. I.e. Event occurs frequency times per period
    fhir:periodMax [ decimal ] ; # 0..1 I Upper limit of period (3-4 hours)
    fhir:periodUnit [ code ] ; # 0..1 I s | min | h | d | wk | mo | a - unit of time (UCUM)
    fhir:dayOfWeek  ( [ code ] ... ) ; # 0..* mon | tue | wed | thu | fri | sat | sun
    fhir:timeOfDay  ( [ time ] ... ) ; # 0..* I Time of day for action
    fhir:when  ( [ code ] ... ) ; # 0..* I Code for time period of occurrence
    fhir:offset [ unsignedInt ] ; # 0..1 I Minutes from event (before or after)
  ] ;
  fhir:code [ CodeableConcept ] ; # 0..1 C | BID | TID | QID | AM | PM | QD | QOD | +

]

Changes since Release 3

Changes from both R4 and R4B

Timing
Timing.repeat.when
  • No Changes Add code IMD

See the Full Difference for further information

If the timing schedule has repeating criteria, the repeat can occur a given number of times per the specified duration or in relation to some repeating real-world event. If no end condition is specified, the schedule will terminate on some criteria that are expressed elsewhere.

Many systems avoid the complexity of the Timing structure by using a text field for timing instructions. This maps to Timing.code.text . For example, the text instruction "take medication in the morning on weekends and days off work' would be represented as:


  "timing": {
    "code" : {
      "text" : "Take medication in the morning on weekends and days off work"
    }
  }

Note, though, that some systems include timing details in something like 'Dosage instructions' which is wider than just Timing; those systems do not use the Timing datatype. Other systems use a set of 'common' codes - including, but usually not limited to, widely understood acronyms such as "BID". If a Timing.code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data (except for Timing.repeat.bounds , which applies to the code), and either the code or the data may be used to interpret the Timing . A structured timing specification SHOULD be provided whenever possible, unless the code is BID, TID, QID, AM or PM, which have a ubiquitous meaning.

This table summarizes some common uses of the Timing Data Type Datatype criteria.

description duration durationUnit frequency frequencyMax period periodUnit periodMax Day of Week Time Of Day when offset bounds[x] count
Every 8 hours 1 8 h
Every 7 days 1 7 d
3 times a day 3 1 d
3-4 times a day 3 4 1 d
Every 4-6 hours 1 4 h 6
Every 21 days for 1 hour 1 hr 1 21 d
Three times a week for ½ hour 0.5 hr 3 1 wk
With breakfast CM
For 5 minutes, 10 minutes before meals 5 min AC 10
1 tablet 3 times daily, 30 minutes before meals 3 1 d AC 30
BID, 30 mins before meal, for next 10 days 2 1 d AC 30 Duration = 10 days
TID, for 14 days 3 1 d Duration = 14 days
BID, start on 7/1/2015 at 1:00 PM 2 1 d Period.start = 2015-07-01T13:00:00
Mon, Wed, Fri Morning 1 1 d mon | wed | fri MORN
Every day at 10am 1 1 d 10:00
Take once, at any time 1
Take every second day, in the morning, until 20 have been taken 1 2 d MORN 20

Many systems avoid the complexity of the Timing structure by using a text field for timing instructions. This maps to Timing.code.text . For example, the text instruction "take medication in the morning on weekends and days off work' would be represented as: "timing": { "code" : { "text" : "Take medication in the morning on weekends and days off work" } } Note, though, that some systems include timing details in something like 'Dosage instructions' which is wider than just Timing; those systems do not use the Timing data type. Other systems use a set of 'common' codes - including, but usually not limited to, widely understood acronyms such as "BID". If a Timing.code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data (except for Timing.repeat.bounds , which applies to the code), and either the code or the data may be used to interpret the Timing . A structured timing specification SHOULD be provided whenever possible, unless the code is BID, TID, QID, AM or PM, which have a ubiquitous meaning. This table shows the relationship between the codes provided as part of the base specification , and the structured data portions of the Timing type:

description duration durationUnit frequency frequencyMax period periodUnit periodMax when bounds[x]
QOD 1 2 d
QD 1 1 d
BID 2 1 d
TID 3 1 d
QID 4 1 d
Q4H 1 4 h
Q6H 1 6 h
AM 1 1 d MORN
PM 1 1 d AFT or EVE

These codes SHALL be understood as having the formal meanings documented in this table. Note that BID, etc. are defined as 'at institutionally specified times'. For example, an institution may choose that BID is "always at 7am and 6pm". If it is inappropriate for this choice to be made, the code BID should not be used. Instead, a distinct organization-specific code should be used in place of the HL7-defined BID code and/or a structured representation should be used (in this case, timeOfDay ).

Constraints

id Level Location Description Expression
tim-1 img  tim-1 Rule Timing.repeat if there's a duration, there needs to be duration units duration.empty() or durationUnit.exists()
tim-2 img  tim-2 Rule Timing.repeat if there's a period, there needs to be period units period.empty() or periodUnit.exists()
tim-4 img  tim-4 Rule Timing.repeat duration SHALL be a non-negative value duration.exists() implies duration >= 0
tim-5 img  tim-5 Rule Timing.repeat period SHALL be a non-negative value period.exists() implies period >= 0
tim-6 img  tim-6 Rule Timing.repeat If there's a periodMax, there must be a period periodMax.empty() or period.exists()
tim-7 img  tim-7 Rule Timing.repeat If there's a durationMax, there must be a duration durationMax.empty() or duration.exists()
tim-8 img  tim-8 Rule Timing.repeat If there's a countMax, there must be a count countMax.empty() or count.exists()
tim-9 img  tim-9 Rule Timing.repeat If there's an offset, there must be a when (and not C, CM, CD, CV) offset.empty() or (when.exists() and ((when when.select($this in ('C' | 'CM' | 'CD' | 'CV')).not())) 'CV')).allFalse())
tim-10 img  tim-10 Rule Timing.repeat If there's a timeOfDay, there cannot be a when, or vice versa timeOfDay.empty() or when.empty()

Note that these constraints still allow for nonsensical timing specifications such as "Once per day at 2:00 and 4:00" or "every 3 days on Friday". Implementers must take care to ensure that their configuration and data collection designs do not lead to these non-interpretable timing specifications. The elements dayOfWeek , timeOfDay , and when are particularly likely to be at issue here.

Terminology Bindings

Path Definition ValueSet Type Reference Documentation
Timing.repeat.durationUnit
Timing.repeat.periodUnit
A unit of time (units from UCUM). UnitsOfTime Required UnitsOfTime

A unit of time (units from UCUM).

Timing.repeat.dayOfWeek DaysOfWeek Required DaysOfWeek

The days of the week.

Timing.repeat.when Real world event relating to the schedule. EventTiming Required EventTiming

Real-world event relating to the schedule.

Timing.code Code for a known / defined timing pattern. TimingAbbreviation Preferred TimingAbbreviation

Code for a known / defined timing pattern.

Timing is used in the following places: Dosage , TriggerDefinition , ActivityDefinition , CarePlan AdverseEvent , CareTeam , ChargeItem , Contract , DeviceMetric , DeviceRequest , DeviceUseStatement DeviceUsage , MedicationAdministration , MedicationStatement , NutritionIntake , NutritionOrder , Observation , Parameters , PlanDefinition , RequestGroup Procedure , ResearchElementDefinition RequestOrchestration , ServiceRequest , StructureMap , SupplyDelivery , SupplyRequest , Task and VerificationResult

Normative Candidate Note: This DataType is not normative - it is still undergoing
FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Trial Use while more experience is gathered.

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A Signature holds an electronic representation of a signature and its supporting context in a FHIR accessible form. The signature may either be a cryptographic type (XML DigSig or a JWS), which is able to provide non-repudiation proof, or it may be a graphical image that represents a signature or a signature digital-signature process.

Structure

Name Flags Card. Type Description & Constraints doco
. . Signature TU Element A Signature - XML DigSig, JWS, Graphical image of signature, etc.

Elements defined in Ancestors: id , extension
. . . type Σ 1..* 0..* Coding Indication of the reason the entity signed the object(s)
Binding: Signature Type Codes ( Preferred )

. . . when Σ 1..1 0..1 instant When the signature was created
. . . who Σ 1..1 0..1 Reference ( Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization ) Who signed
. . . targetFormat 0..1 code The technical format of the signed resources
Binding: MimeType Mime Types ( Required )
. . . sigFormat 0..1 code The technical format of the signature
Binding: MimeType Mime Types ( Required )
. . . data 0..1 base64Binary The actual signature content (XML DigSig. JWS, picture, etc.)

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Signature An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document type : Coding [1..*] [0..*] « An indication of the reason that an entity signed the object. (Strength=Preferred) SignatureTypeCodes ? » When the digital signature was signed when : instant [1..1] [0..1] A reference to an application-usable description of the identity that signed (e.g. the signature used their private key) who : Reference [1..1] [0..1] « Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization » A reference to an application-usable description of the identity that is represented by the signature onBehalfOf : Reference [0..1] « Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization » A mime type that indicates the technical format of the target resources signed by the signature targetFormat : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc sigFormat : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty data : base64Binary [0..1] Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:type  ( [ Coding ] ... ) ; # 0..* Indication of the reason the entity signed the object(s)
  fhir:when [ instant ] ; # 0..1 When the signature was created
  fhir:who [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 Who signed
  fhir:onBehalfOf [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 The party represented
  fhir:targetFormat [ code ] ; # 0..1 The technical format of the signed resources
  fhir:sigFormat [ code ] ; # 0..1 The technical format of the signature
  fhir:data [ base64Binary ] ; # 0..1 The actual signature content (XML DigSig. JWS, picture, etc.)

]

Changes since Release 3

Changes from both R4 and R4B

Signature
Signature.type
  • No Changes Min Cardinality changed from 1 to 0
Signature.when
  • Min Cardinality changed from 1 to 0
Signature.who
  • Min Cardinality changed from 1 to 0

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Signature TU Element A Signature - XML DigSig, JWS, Graphical image of signature, etc.

Elements defined in Ancestors: id , extension
. . . type Σ 1..* 0..* Coding Indication of the reason the entity signed the object(s)
Binding: Signature Type Codes ( Preferred )

. . . when Σ 1..1 0..1 instant When the signature was created
. . . who Σ 1..1 0..1 Reference ( Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization ) Who signed
. . . targetFormat 0..1 code The technical format of the signed resources
Binding: MimeType Mime Types ( Required )
. . . sigFormat 0..1 code The technical format of the signature
Binding: MimeType Mime Types ( Required )
. . . data 0..1 base64Binary The actual signature content (XML DigSig. JWS, picture, etc.)

doco Documentation for this format icon

UML Diagram ( Legend )

Signature An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document type : Coding [1..*] [0..*] « An indication of the reason that an entity signed the object. (Strength=Preferred) SignatureTypeCodes ? » When the digital signature was signed when : instant [1..1] [0..1] A reference to an application-usable description of the identity that signed (e.g. the signature used their private key) who : Reference [1..1] [0..1] « Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization » A reference to an application-usable description of the identity that is represented by the signature onBehalfOf : Reference [0..1] « Practitioner | PractitionerRole | RelatedPerson | Patient | Device | Organization » A mime type that indicates the technical format of the target resources signed by the signature targetFormat : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc sigFormat : code [0..1] « The mime type of an attachment. Any valid mime type is allowed. (Strength=Required) Mime Types MimeTypes ! » The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty data : base64Binary [0..1] Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:
  fhir:

  fhir:type  ( [ Coding ] ... ) ; # 0..* Indication of the reason the entity signed the object(s)
  fhir:when [ instant ] ; # 0..1 When the signature was created
  fhir:who [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 Who signed
  fhir:onBehalfOf [ Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ] ; # 0..1 The party represented
  fhir:targetFormat [ code ] ; # 0..1 The technical format of the signed resources
  fhir:sigFormat [ code ] ; # 0..1 The technical format of the signature
  fhir:data [ base64Binary ] ; # 0..1 The actual signature content (XML DigSig. JWS, picture, etc.)

]

Changes since Release 3

Changes from both R4 and R4B

Signature
Signature.type
  • No Changes Min Cardinality changed from 1 to 0
Signature.when
  • Min Cardinality changed from 1 to 0
Signature.who
  • Min Cardinality changed from 1 to 0

See the Full Difference for further information

Constraints

Notes:

  • The Signature datatype can be used to hold a digital-signature, but may also be used to hold electronic-signatures.
  • Electronic-Signatures, such as image of ink signature, do not protect the signed content from change, but do carry details about who signed, when signature happened, and what the signature means.
  • One consequence of signing the document digital-signature on a Resource (document) is that URLs, identifiers and internal references are frozen and cannot be changed. This might be a desired feature, but it may also cripple interoperability between closed ecosystems where re-identification frequently occurs. For this reason, it is recommended that systems consider carefully the impact of any signature processes. The impact of signatures on Document bundles and their related processes is the most well understood use of digital signatures.
  • Note that following common normalization procedures in XML causes consecutive whitespace within attributes to be normalized. As a result, whitespace within markdown can be changed without breaking a digital signature. For elements assign the same normalized text to resources with a type of markdown, this means that, in some cases, whitespace manipulation that results in significantly slightly different visual rendering (e.g. changing indentation levels, causing content to appear meanings, since leading whitespace matters in separate paragraphs rather than part of a single paragraph, etc.) might not be detected as a signature-breaking change. If this would present an unacceptable risk, systems should use markdown text, and the JSON signature XML representation serializes the markdown approach as it does not normalize whitespace. datatype using attributes.

 

When the signature is an XML Digital Signature (contentType = application/signature+xml), the following rules apply:

  • The Signature.data is base64 encoded XML-Signature
  • The XML-Signature is a Detached icon Signature (where the content that is signed is separate from the signature itself)
  • The Signature SHOULD conform to XAdES-X-L icon for support of Long Term signatures. signatures icon. The XAdES-X-L specification adds the timestamp of the signing, inclusion of the signing certificate, and statement of revocation
  • When FHIR Resources are signed, the signature is across the Canonical XML form of the resource(s)
  • The Signature SHOULD use the hashing algorithm SHA-256. Signature validation policy will apply to the signature and determine acceptability
  • The Signature SHALL include a "CommitmentTypeIndication" element for the Purpose(s) of Signature. The Purpose can be the action being attested to, or the role associated with the signature. The value shall come from ASTM E1762-95(2013). The Signature.type shall contain the same values as the CommitmentTypeIndication element.

There are three levels of signature verification:

  1. Verifying that the Digital Signature block itself has integrity through verifying the signature across the XML-Signature.
  2. Confirming that the signer was authentic, not revoked, and appropriate to the signature purpose.
  3. Confirming that the signed content of interest is unmodified using the hash algorithm.

Deviations from these guidelines would need to be expressed in site policy and would be enumerated in the XML-Signature block. For example, some environments may choose a different XAdES profile, hashing algorithm, policy identifier, or signature purpose vocabulary.

When the signature is an JSON Digital Signature (contentType = application/jose), the following rules apply:

  • The Signature.data is base64 encoded JWS-Signature RFC 7515: JSON Web Signature (JWS) icon
  • The signature is a Detached icon Signature (where the content that is signed is separate from the signature itself)
  • When FHIR Resources are signed, the signature is across the Canonical JSON form of the resource(s)
  • The Signature SHOULD use the hashing algorithm SHA256. SHA-256. Signature validation policy will apply to the signature and determine acceptability
  • The Signature SHALL include a "CommitmentTypeIndication" "srCms signer commitments" element for the Purpose(s) of Signature. The Purpose can be the action being attested to, or the role associated with the signature. The value shall come from ASTM E1762-95(2013). The Signature.type shall contain the same values as the CommitmentTypeIndication srCms element.
  • The Signature SHOULD conform to JAdES-XL for support of long term signatures. The JAdES-X-L specification adds the timestamp of the signing, inclusion of the signing certificate, and statement of revocation

There are three levels of signature verification:

  1. Verifying that the Digital Signature block itself has integrity through verifying the signature across the JWS-Signature.
  2. Confirming that the signer was authentic, not revoked, and appropriate to the signature purpose.
  3. Confirming that the signed content of interest is unmodified using the hash algorithm.

Deviations from these guidelines would need to be expressed in site policy and would be enumerated in the JWS-Signature block. For example, some environments may choose a different hashing algorithm, policy identifier, or signature purpose vocabulary.

Signature is used in the following places: Bundle , Contract , Parameters , Provenance , StructureMap , Task and VerificationResult

FHIR Infrastructure icon Work Group Maturity Level : 5 Standards Status : Normative

See also Examples , Detailed Descriptions , Mappings , Profiles & , Extensions and R2 R4 Conversions .

A text note which also contains information about who made the statement and when.

Structure

Name Flags Card. Type Description & Constraints doco
. . Annotation N Element Text node with attribution

Elements defined in Ancestors: id , extension
. . . author[x] Σ 0..1 Individual responsible for the annotation
. . . . authorReference Reference ( Practitioner | PractitionerRole | Patient | RelatedPerson | Organization )
. . . . authorString string
. . . time Σ 0..1 dateTime When the annotation was made
. . . text Σ 1..1 markdown The annotation - text content (as markdown)

doco Documentation for this format icon

Definition: XML | JSON

UML Diagram ( Legend )

Annotation The individual responsible for making the annotation author[x] : Element DataType [0..1] « Reference ( Practitioner | PractitionerRole | Patient | RelatedPerson | Organization )| string » Indicates when this particular annotation was made time : dateTime [0..1] The text of the annotation in markdown format text : markdown [1..1] Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Annotation xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <)|
   </author[x]>

 <author[x]><!-- 0..1 Reference(Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson)|string Individual responsible for the annotation --></author[x]>
 <time value="[dateTime]"/><!-- 0..1 When the annotation was made -->
 <text value="[markdown]"/><!-- 1..1 The annotation  - text content (as markdown) -->
</[name]>

</Annotation>

JSON Template

{doco
  // from Element: extension
  // author[x]: Individual responsible for the annotation. One of these 2:
  " },

  "authorReference" : { Reference(Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson) },
  "authorString" : "<string>",
  "time" : "<dateTime>", // When the annotation was made
  "text" : "<markdown>" // R!  The annotation  - text content (as markdown)
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  # . One of these 2
    fhir:) ]
    fhir: ]
  fhir:
  fhir:

  # author[x] : 0..1 Individual responsible for the annotation. One of these 2
    fhir:author [  a fhir:Reference ; Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ]
    fhir:author [  a fhir:string ; string ]
  fhir:time [ dateTime ] ; # 0..1 When the annotation was made
  fhir:text [ markdown ] ; # 1..1 The annotation  - text content (as markdown)

]

Changes since Release 3

Changes from both R4 and R4B

Annotation
  • No Changes

See the Full Difference for further information

Structure

Name Flags Card. Type Description & Constraints doco
. . Annotation N Element Text node with attribution

Elements defined in Ancestors: id , extension
. . . author[x] Σ 0..1 Individual responsible for the annotation
. . . . authorReference Reference ( Practitioner | PractitionerRole | Patient | RelatedPerson | Organization )
. . . . authorString string
. . . time Σ 0..1 dateTime When the annotation was made
. . . text Σ 1..1 markdown The annotation - text content (as markdown)

doco Documentation for this format icon

UML Diagram ( Legend )

Annotation The individual responsible for making the annotation author[x] : Element DataType [0..1] « Reference ( Practitioner | PractitionerRole | Patient | RelatedPerson | Organization )| string » Indicates when this particular annotation was made time : dateTime [0..1] The text of the annotation in markdown format text : markdown [1..1] Element DataType Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : 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 extension extension : Extension [0..*]

XML Template

< xmlns="http://hl7.org/fhir">

<Annotation xmlns="http://hl7.org/fhir">

 <!-- from Element: extension -->
 <)|
   </author[x]>

 <author[x]><!-- 0..1 Reference(Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson)|string Individual responsible for the annotation --></author[x]>
 <time value="[dateTime]"/><!-- 0..1 When the annotation was made -->
 <text value="[markdown]"/><!-- 1..1 The annotation  - text content (as markdown) -->
</[name]>

</Annotation>

JSON Template

{doco
  // from Element: extension
  // author[x]: Individual responsible for the annotation. One of these 2:
  " },

  "authorReference" : { Reference(Organization|Patient|Practitioner|
   PractitionerRole|RelatedPerson) },
  "authorString" : "<string>",
  "time" : "<dateTime>", // When the annotation was made
  "text" : "<markdown>" // R!  The annotation  - text content (as markdown)
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .

[
 # from Element: Element.extension
  # . One of these 2
    fhir:) ]
    fhir: ]
  fhir:
  fhir:

  # author[x] : 0..1 Individual responsible for the annotation. One of these 2
    fhir:author [  a fhir:Reference ; Reference(Organization|Patient|Practitioner|PractitionerRole|RelatedPerson) ]
    fhir:author [  a fhir:string ; string ]
  fhir:time [ dateTime ] ; # 0..1 When the annotation was made
  fhir:text [ markdown ] ; # 1..1 The annotation  - text content (as markdown)

]

Changes since Release 3

Changes from both R4 and R4B

Annotation
  • No Changes

See the Full Difference for further information

Notes:

  • Systems that do not have structured annotations simply communicate a single annotation with no author or time. This element may need to be included in narrative because of the potential for modifying information.
  • Annotations SHOULD NOT be used to communicate "modifying" information that could be computable (this is a SHOULD because enforcing user behavior is nearly impossible).
  • For communicating the author as a string value, implementers SHOULD use use Annotation.authorReference.display instead of the the anti-pattern Annotation.authorString ( authorString cannot be removed because this datatype is Normative).
  • This element may need to be included in the Resource human-readable narrative because of the potential for modifying information.

Annotation is used in the following places: AdverseEvent , AllergyIntolerance , Appointment , BiologicallyDerivedProductDispense , CarePlan , CareTeam , ChargeItem , Citation , ClinicalImpression , Communication , CommunicationRequest , Composition , Condition , Contract , DetectedIssue , Device , DeviceDefinition , DeviceDispense , DeviceRequest , DeviceUseStatement DeviceUsage , DiagnosticReport , Evidence , EvidenceReport , EvidenceVariable , FamilyMemberHistory , GenomicStudy , Goal , GuidanceResponse , ImagingStudy , Immunization , InventoryItem , InventoryReport , Invoice , List , Media , MedicationAdministration , MedicationDispense , MedicationKnowledge , MedicationRequest , MedicationStatement , NutritionIntake , NutritionOrder , NutritionProduct , Observation , Parameters , Procedure , RequestGroup RequestOrchestration , ResearchStudy , RiskAssessment , ServiceRequest , Specimen , StructureMap , SubstanceDefinition , Task , Transport and VisionPrescription

Some elements do not have a specified type. The type is represented by the wildcard symbol "*". In these cases, the element type may be one of the following:

Primitive Types Data Types Datatypes MetaDataTypes Special Types

The element name ends with "[x]", and this is replaced with the Title cased name of the data type. datatype.

Open references types are used in the following places: ElementDefinition , Parameters , Task and Transport

The following types are defined as part of the data types, datatypes, but are documented elsewhere in the specification:

Element Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces id : string DataType [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 extension extension : Extension [0..*] Extension Source of the definition for the extension code - a logical name or a URL url : uri [1..1] Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list) value[x] : * [0..1] « This element has or is affected by some invariants C » Narrative The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data status : code [1..1] « The status of a resource narrative. (Strength=Required) NarrativeStatus ! » The actual narrative content, a stripped down version of XHTML div : xhtml [1..1] Reference A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources reference : string [0..1] « This element has or is affected by some invariants C » The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. "Patient" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources) type : uri [0..1] « Aa resource (or, for logical models, the URI of the logical model). (Strength=Extensible) ResourceType + » An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference identifier : Identifier [0..1] « This element has or is affected by some invariants C » Plain text narrative that identifies the resource in addition to the resource reference display : string [0..1] « This element has or is affected by some invariants C »
  • Resource - the conceptual base class for all resources
  • Reference - for references from one resource to another
  • Extension - used to convey additional data in a resource
  • Narrative - conveys a human-readable representation of the content of a resource