2nd DSTU Draft For Comment

This page is part of the FHIR Specification (v0.4.0: DSTU 2 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

1.21.0 Data Types

The FHIR specification defines a set of data types that are used for the resource elements. There are two categories of data type: simple / primitive types, which are single elements, and complex types, which are re-usable clusters of elements. This page describes the data types. See also the Examples, Detailed Descriptions and Mappings.

ElementIdentifierHumanNameAddressContactPointTimingQuantityAttachmentRangePeriodRatioCodeableConceptCodingSampledDataAgeDistanceDurationCountMoney

The data types are available as a W3C Schema.

1.21.0.1 Primitive Types

ElementExtensions - as described for all elements: additional information that is not part of the basic definition of the resource / typeextension : Extension 0..*decimalActual value attribute of the data typevalue : xs:decimal 0..1integerActual value attribute of the data typevalue : xs:int 0..1booleanActual value attribute of the data typevalue : xs:boolean 0..1instantActual value attribute of the data typevalue : xs:dateTime 0..1dateActual value attribute of the data typevalue : xs:gYear|xs:gYearMonth|xs:date 0..1base64BinaryActual value attribute of the data typevalue : xs:base64Binary 0..1stringActual value attribute of the data typevalue : xs:string 0..1codedateTimeActual value attribute of the data typevalue : xs:gYear|xs:gYearMonth|xs:date|xs:dateTime 0..1iduriActual value attribute of the data typevalue : xs:anyURI 0..1oiduuidtimeActual value attribute of the data typevalue : xs:time 0..1

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

Primitive Types
FHIR Name Value Domain XML Representation JSON representation
boolean true | false xs:boolean, except that 0 and 1 are not valid values JSON boolean (true or false)
integer A signed 32-bit integer (for larger values, use decimal) xs:int JSON number
string A sequence of Unicode characters xs:string JSON String
Note that strings SHALL NOT exceed 1MB in size
decimal Rational numbers that have a decimal representation. See below for a decision about the precision of the number xs:decimal, except that decimals may not use exponents A JSON number, but without exponents
uri A Uniform Resource Identifier Reference (RFC 3986) xs:anyURI A JSON string - a URI
URIs can be absolute or relative, and may have an optional fragment identifier
base64Binary A stream of bytes, base64 encoded (RFC 4648) xs:base64Binary A JSON string - base64 content
Todo: is it possible to impose an upper absolute limit on a base64Binary (for denial of service reasons, like on string)
instant An instant in time - known at least to the second and always includes a time zone xs:dateTime A JSON string - an xs:dateTime
Note: This type is for system times, not human times (see date and dateTime below).
date A date, or partial date (e.g. just year or year + month) as used in human communication. There is no time zone. Dates SHALL be valid dates union of xs:date, xs:gYearMonth, xs:gYear A JSON string - a union of xs:date, xs:gYearMonth, xs:gYear
Regex: -?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1]))?)?
dateTime A date, date-time or partial date (e.g. just year or year + month) as used in human communication. If hours and minutes are specified, a time zone SHALL be populated. Seconds may be provided but may also be ignored. Dates SHALL be valid dates. The time "24:00" is not allowed 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]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?)?)?
time A time during the day, with no date specified (can be converted to a Duration since midnight). Seconds may be provided but may also be ignored. The time "24:00" is not allowed, and neither is a time zone xs:time A JSON string - an xs:time
Regex: ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?

Notes:

  • For all the types, the XML and JSON representations are the same except for different escaping in XML and JSON
  • The regexes allow a broader set of values than are actually valid (e.g. leap years) so additional validation is needed
  • The precision of the decimal value is signficant
    • e.g 0.010 is regarded as different to 0.01
    • Implementations SHALL handle decimal values in ways that preserve and respect the precision of the value as represented
    • Implementations that might meet this constraint are GMP implementations or Java BigDecimal that implement arbitrary precision, or a combination of a (64 bit) floating point value with a precision field
    • Note that there is no absolute limit to the magnitude of the value, though large and/or highly precise values are extremely rare in medicine

1.21.0.1.1 XML and JSON representations

All the primitive types have some combination of value as described above, an internal identity (e.g. xml:id), and extensions. The value is represented in XML as an attribute named "value":

  <count value="2"/>

and as the value of the property in JSON:

  "count" : 2

For additional details, including how the internal identity and extensions are represented, see the XML and JSON formats. When the value is missing, it is not represented in the instance; the XML value attribute or the JSON property are not represented at all.

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, whitespace in string values is always significant. Primitive types other than string SHALL NOT have leading or trailing whitespace.

1.21.0.1.2 Simple Restrictions

In addition to the base primitive types, a few additional primitive types are defined as restrictions on one of the other primitive types.

FHIR NameBase FHIR TypeDescription
codestringIndicates that the value is taken from a set of controlled strings defined elsewhere (see Using codes for further discussion). Technically, a code is restricted to 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
regex: [^\s]+([\s]+[^\s]+)*
oiduriAn OID represented as a URI (RFC 3001). e.g. urn:oid:1.2.3.4.5
idstringAny 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.) Ids are case sensitive. UUIDs SHALL be sent using lowercase letters.
Note: this format includes identifiers consistent with ISO 18232, but also includes other identifier formats as well, and is not case insensitive like ISO 18232.
regex: [A-Za-z0-9\-\.]{1,64}

1.21.0.2 Complex Types

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. Any of the XML elements may have an id attribute. In JSON, the data type is represented by an object with properties named the same as the XML elements. The JSON representation is almost exactly the same, so only the first example has an additional JSON representation.

Complex data types may be "profiled". A profile makes a set of rules about which elements SHALL have values, and what the possible values are.

UML Diagrams of the Data types

ElementExtensions - as described for all elements: additional information that is not part of the basic definition of the resource / typeextension : Extension 0..*QuantityThe value of the measured amount. The value includes an implicit precision in the presentation of the valuevalue : decimal 0..1How 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 representedQuantityComparator »A human-readable form of the unitsunits : string 0..1The identification of the system that provides the coded form of the unitsystem : uri 0..1A computer processable form of the units in some unit representation systemcode : code 0..1AttachmentIdentifies 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 appropriatecontentType : code 0..1 « The mime type of an attachmentMimeType »The human language of the content. The value can be any valid value according to BCP 47language : code 0..1 « A human languageLanguage »The actual data of the attachment - a sequence of bytes. In XML, represented using base64data : base64Binary 0..1An alternative location where the data can be accessedurl : uri 0..1The number of bytes of data that make up this attachmentsize : integer 0..1The calculated hash of the data using SHA-1. Represented using base64hash : base64Binary 0..1A label or set of text to display in place of the datatitle : string 0..1RangeThe low limit. The boundary is inclusivelow : Quantity 0..1The high limit. The boundary is inclusivehigh : Quantity 0..1PeriodThe start of the period. The boundary is inclusivestart : dateTime 0..1The end of the period. If the end of the period is missing, it means that the period is ongoingend : dateTime 0..1RatioThe value of the numeratornumerator : Quantity 0..1The value of the denominatordenominator : Quantity 0..1CodeableConceptA reference to a code defined by a terminology systemcoding : 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 usertext : string 0..1CodingThe identification of the code system that defines the meaning of the symbol in the codesystem : uri 0..1The 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 exchangedversion : string 0..1A 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..1A representation of the meaning of the code in the system, following the rules of the systemdisplay : string 0..1Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)primary : boolean 0..1The set of possible coded values this coding was chosen from or constrained byvalueSet : Reference(ValueSet) 0..1SampledDataThe base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement seriesorigin : Quantity 1..1The length of time between sampling times, measured in millisecondsperiod : decimal 1..1A correction factor that is applied to the sampled data points before they are added to the originfactor : decimal 0..1The 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..1The 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..1The 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 oncedimensions : integer 1..1A series of data points which are decimal values separated by a single space (character u20). The special values "E" (error), "L" (below detection limit) and "U" (above detection limit) can also be used in place of a decimal valuedata : string 1..1 ElementExtensions - as described for all elements: additional information that is not part of the basic definition of the resource / typeextension : Extension 0..*IdentifierThe purpose of this identifier (this element modifies the meaning of other elements)use : code 0..1 « Identifies the purpose for this identifier, if knownIdentifierUse »A text string for the identifier that can be displayed to a human so they can recognize the identifierlabel : string 0..1Establishes the namespace in which set of possible id values is uniquesystem : uri 0..1The portion of the identifier typically displayed to the user and which is unique within the context of the systemvalue : string 0..1Time period during which identifier is/was valid for useperiod : Period 0..1Organization that issued/manages the identifierassigner : Reference(Organization) 0..1HumanNameIdentifies the purpose for this name (this element modifies the meaning of other elements)use : code 0..1 « The use of a human nameNameUse »A full text representation of the nametext : string 0..1The 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 fatherfamily : string 0..*Given namegiven : 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 nameprefix : 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 namesuffix : string 0..*Indicates the period of time when this name was valid for the named personperiod : Period 0..1AddressThe purpose of this address (this element modifies the meaning of other elements)use : code 0..1 « The use of an addressAddressUse »A full text representation of the addresstext : string 0..1This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address informationline : string 0..*The name of the city, town, village or other community or delivery centercity : string 0..1Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)state : string 0..1A postal code designating a region defined by the postal servicepostalCode : string 0..1Country - a nation as commonly understood or generally acceptedcountry : string 0..1Time period when address was/is in useperiod : Period 0..1ContactPointTelecommunications form for contact point - what communications system is required to make use of the contactsystem : code 0..1 « Telecommunications form for contact pointContactPointSystem »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..1Identifies the purpose for the contact point (this element modifies the meaning of other elements)use : code 0..1 « Use of contact pointContactPointUse »Time period when the contact point was/is in useperiod : Period 0..1TimingIdentifies specific time periods when the event should occurevent : Period 0..*RepeatIndicates how often the event should occurfrequency : integer 0..1Identifies the occurrence of daily life that determines timingwhen : code 0..1 « Real world event that the schedule relates toEventTiming »How long each repetition should lastduration : decimal 1..1The units of time for the durationunits : code 1..1 « A unit of time (units from UCUM)UnitsOfTime »A total count of the desired number of repetitionscount : integer 0..1When to stop repeating the timing scheduleend : dateTime 0..1Identifies a repeating pattern to the intended time periodsrepeat0..1

1.21.0.3 Attachment

See also Examples, Detailed Descriptions and Mappings.

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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Attachment I1..1ElementContent in a format defined elsewhere
It the Attachment has data, it SHALL have a contentType
... contentType 0..1codeMime type of the content, with charset etc.
MimeType (Required)
... language 0..1codeHuman language of the content (BCP-47)
Language (Required)
... data 0..1base64BinaryData inline, base64ed
... url 0..1uriUri where the data can be found
... size 0..1integerNumber of bytes of content (if url provided)
... hash 0..1base64BinaryHash of the data (sha-1, base64ed )
... title 0..1stringLabel to display in place of the data

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <contentType value="[code]"/><!-- 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]"/><!-- 0..1 Data inline, base64ed -->
 <url value="[uri]"/><!-- 0..1 Uri where the data can be found -->
 <size value="[integer]"/><!-- 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 -->
</[name]>

JSON Template


{doco
  // from Element: extension
  "contentType" : "<code>", // Mime type of the content, with charset etc.
  "language" : "<code>", // Human language of the content (BCP-47)
  "data" : "<base64Binary>", // Data inline, base64ed
  "url" : "<uri>", // Uri where the data can be found
  "size" : <integer>, // Number of bytes of content (if url provided)
  "hash" : "<base64Binary>", // Hash of the data (sha-1, base64ed )
  "title" : "<string>" // Label to display in place of the data
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Attachment I1..1ElementContent in a format defined elsewhere
It the Attachment has data, it SHALL have a contentType
... contentType 0..1codeMime type of the content, with charset etc.
MimeType (Required)
... language 0..1codeHuman language of the content (BCP-47)
Language (Required)
... data 0..1base64BinaryData inline, base64ed
... url 0..1uriUri where the data can be found
... size 0..1integerNumber of bytes of content (if url provided)
... hash 0..1base64BinaryHash of the data (sha-1, base64ed )
... title 0..1stringLabel to display in place of the data

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <contentType value="[code]"/><!-- 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]"/><!-- 0..1 Data inline, base64ed -->
 <url value="[uri]"/><!-- 0..1 Uri where the data can be found -->
 <size value="[integer]"/><!-- 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 -->
</[name]>

JSON Template

{doco
  // from Element: extension
  "contentType" : "<code>", // Mime type of the content, with charset etc.
  "language" : "<code>", // Human language of the content (BCP-47)
  "data" : "<base64Binary>", // Data inline, base64ed
  "url" : "<uri>", // Uri where the data can be found
  "size" : <integer>, // Number of bytes of content (if url provided)
  "hash" : "<base64Binary>", // Hash of the data (sha-1, base64ed )
  "title" : "<string>" // Label to display in place of the data
}

The contentType element SHALL always be populated. 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 actual content of the 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 hash is included so that applications can verify that the content returned by the URL has not changed.

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.

Constraints

  • att-1: It the Attachment has data, it SHALL have a contentType (xpath: not(exists(f:data)) or exists(f:contentType))

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 reason stated.

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

Attachment is used in the following places: Communication, Practitioner, QuestionnaireAnswers, BodySite, CommunicationRequest, Observation, SupportingDocumentation, RelatedPerson, Person, Media, DocumentReference, DiagnosticReport, Contract and Patient

1.21.0.4 Coding

See also Examples, Detailed Descriptions and Mappings.

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.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Coding I1..1ElementA reference to a code defined by a terminology system
If a valueSet is provided, a system URI Is required
... system 0..1uriIdentity of the terminology system
... version 0..1stringVersion of the system - if relevant
... code 0..1codeSymbol in syntax defined by the system
... display 0..1stringRepresentation defined by the system
... primary 0..1booleanIf this code was chosen directly by the user
... valueSet 0..1ValueSetSet this coding was chosen from

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- 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]"/><!-- 0..1 Symbol in syntax defined by the system -->
 <display value="[string]"/><!-- 0..1 Representation defined by the system -->
 <primary value="[boolean]"/><!-- 0..1 If this code was chosen directly by the user -->
 <valueSet><!-- 0..1 Reference(ValueSet) Set this coding was chosen from --></valueSet>
</[name]>

JSON Template


{doco
  // from Element: extension
  "system" : "<uri>", // Identity of the terminology system
  "version" : "<string>", // Version of the system - if relevant
  "code" : "<code>", // Symbol in syntax defined by the system
  "display" : "<string>", // Representation defined by the system
  "primary" : <boolean>, // If this code was chosen directly by the user
  "valueSet" : { Reference(ValueSet) } // Set this coding was chosen from
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Coding I1..1ElementA reference to a code defined by a terminology system
If a valueSet is provided, a system URI Is required
... system 0..1uriIdentity of the terminology system
... version 0..1stringVersion of the system - if relevant
... code 0..1codeSymbol in syntax defined by the system
... display 0..1stringRepresentation defined by the system
... primary 0..1booleanIf this code was chosen directly by the user
... valueSet 0..1ValueSetSet this coding was chosen from

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- 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]"/><!-- 0..1 Symbol in syntax defined by the system -->
 <display value="[string]"/><!-- 0..1 Representation defined by the system -->
 <primary value="[boolean]"/><!-- 0..1 If this code was chosen directly by the user -->
 <valueSet><!-- 0..1 Reference(ValueSet) Set this coding was chosen from --></valueSet>
</[name]>

JSON Template

{doco
  // from Element: extension
  "system" : "<uri>", // Identity of the terminology system
  "version" : "<string>", // Version of the system - if relevant
  "code" : "<code>", // Symbol in syntax defined by the system
  "display" : "<string>", // Representation defined by the system
  "primary" : <boolean>, // If this code was chosen directly by the user
  "valueSet" : { Reference(ValueSet) } // Set this coding was chosen from
}

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 adds no other value. The Value Set reference provides context information about the selection of the code.

The system is a URI that references the code system that defines the code. The URI may be:

  • a URI defined in the named systems list
  • an OID (urn:oid:) or a UUID (urn:uuid:). OIDs and UUIDs may be registered in the HL7 OID registry
  • a URL that references a definition of the system directly, which may be a reference to a code system defined as part of ValueSet resource (i.e. the value in ValueSet.define.system)
  • or any other URI that uniquely identifies the code system definition

The correct value to use in the system for a given code system can be determined by working through the following list, in order:

  • the Named Systems List section
  • the HL7 OID Registry
  • the documentation associated with the code system
  • consulting the owner of the code system
  • asking on the HL7 vocabulary mailing list

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 this the system does not maintain consistent definitions across versions. If a value set is referenced, and the value set defines the code system, and the code system definition specifies a version, the version SHALL be the same as in the value set. Note that the following systems SHOULD always have a version specified:

  • LOINC
  • Various versions of ICD
  • National releases of SNOMED CT (consistency of definitions varies amongst jurisdictions, and some jurisdictions may make their own rules on this)

See the discussion of code system versions in the Value Set 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.

Where the code system defines multiple possible display strings, one of these SHALL be used in display. If one is labeled as preferred, it SHOULD be used. If the code system does not define a text representation (e.g. SNOMED CT Expressions) then display 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 may 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.

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 they 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 "primary" if a user selected the particular coded value in a user interface (e.g. the user selects an item in a pick-list). A primary is the preferred choice for performing translations etc.

A reference to a value set may be provided to help a user or system processing the code to understand the context in which the code arose. In some contexts, the possible set of codes from which the code was chosen influences how the code should be interpreted. A value set reference is not an acceptable substitute for a logical URI in the system. The system URI SHALL NOT contain a reference to a value set. (If the value set defines its own codes, then the correct value for the system is ValueSet.define.system, and the value set contains a direct reference to the value set resource.

Constraints

If a valueSet is provided, a system URI SHALL also be provided.

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: CodeableConcept, Signature, ValueSet, OralHealthClaim, Coverage, Composition, Conformance, Profile, StatusResponse, PharmacyClaim, Reversal, EligibilityRequest, QuestionnaireAnswers, PaymentReconciliation, ProfessionalClaim, ClaimResponse, ExplanationOfBenefit, SupportingDocumentation, InstitutionalClaim, EligibilityResponse, StatusRequest, VisionClaim, Readjudicate, PaymentNotice, Questionnaire, OperationOutcome, VisionPrescription, ExtensionDefinition, ImagingStudy, Provenance, StructureDefinition, MessageHeader, DataElement, SecurityEvent, PendedRequest, EnrollmentRequest, Contract and EnrollmentResponse

Design 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 codes systems)

The Coding data type 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 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.

1.21.0.5 CodeableConcept

See also Examples, Detailed Descriptions and Mappings.

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.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. CodeableConcept I1..1ElementConcept - reference to a terminology or just text
Only one coding in a set can be chosen directly by the user
... coding 0..*CodingCode defined by a terminology system
... text 0..1stringPlain text representation of the concept

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- 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]>

JSON Template


{doco
  // from Element: extension
  "coding" : [{ Coding }], // Code defined by a terminology system
  "text" : "<string>" // Plain text representation of the concept
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. CodeableConcept I1..1ElementConcept - reference to a terminology or just text
Only one coding in a set can be chosen directly by the user
... coding 0..*CodingCode defined by a terminology system
... text 0..1stringPlain text representation of the concept

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- 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]>

JSON Template

{doco
  // from Element: extension
  "coding" : [{ Coding }], // Code defined by a terminology system
  "text" : "<string>" // Plain text representation of the concept
}

Each coding is a representation of the concept as described above. 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). The different codings 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.

Whether or not coding elements are present, 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 of the codings may be flagged as the primary - the code or concept that the user actually selected directly. When none of the coding elements is marked as primary, the text (if present) is the preferred source of meaning.

Constraints

  • ccc-2: Only one coding in a set can be chosen directly by the user (xpath: count(f:coding[f:primary/@value='true'])<=1)

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: Condition, Supply, DeviceComponent, Communication, Group, Appointment, Slot, Contraindication, EpisodeOfCare, Composition, Conformance, NamingSystem, HealthcareService, OrderResponse, Practitioner, CarePlan, ClinicalAssessment, Substance, DeviceUseRequest, Schedule, ImagingObjectSelection, BodySite, CommunicationRequest, RiskAssessment, Observation, AllergyIntolerance, RelatedPerson, Alert, ProcedureRequest, DeviceMetric, Organization, ImmunizationRecommendation, MedicationDispense, MedicationPrescription, MedicationStatement, AppointmentResponse, Media, Other, VisionPrescription, DocumentReference, Immunization, Provenance, Device, Order, Procedure, DiagnosticReport, Medication, MessageHeader, DataElement, DocumentManifest, MedicationAdministration, Encounter, SecurityEvent, List, DeviceUseStatement, NutritionOrder, ReferralRequest, FamilyHistory, Location, Contract, Basic, Specimen, Patient, CarePlan2 and DiagnosticOrder

1.21.0.6 Quantity

See also Examples, Detailed Descriptions and Mappings.

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

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Quantity I1..1ElementA measured or measurable amount
If a code for the units is present, the system SHALL also be present
... value 0..1decimalNumerical value (with implicit precision)
... comparator M0..1code< | <= | >= | > - how to understand the value
QuantityComparator (Required)
... units 0..1stringUnit representation
... system I0..1uriSystem that defines coded unit form
... code 0..1codeCoded form of the unit

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <value value="[decimal]"/><!-- 0..1 Numerical value (with implicit precision) -->
 <comparator value="[code]"/><!-- 0..1 < | <= | >= | > - how to understand the value -->
 <units value="[string]"/><!-- 0..1 Unit representation -->
 <system value="[uri]"/><!-- ?? 0..1 System that defines coded unit form -->
 <code value="[code]"/><!-- 0..1 Coded form of the unit -->
</[name]>

JSON Template


{doco
  // from Element: extension
  "value" : <decimal>, // Numerical value (with implicit precision)
  "comparator" : "<code>", // < | <= | >= | > - how to understand the value
  "units" : "<string>", // Unit representation
  "system" : "<uri>", // C? System that defines coded unit form
  "code" : "<code>" // Coded form of the unit
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Quantity I1..1ElementA measured or measurable amount
If a code for the units is present, the system SHALL also be present
... value 0..1decimalNumerical value (with implicit precision)
... comparator M0..1code< | <= | >= | > - how to understand the value
QuantityComparator (Required)
... units 0..1stringUnit representation
... system I0..1uriSystem that defines coded unit form
... code 0..1codeCoded form of the unit

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <value value="[decimal]"/><!-- 0..1 Numerical value (with implicit precision) -->
 <comparator value="[code]"/><!-- 0..1 < | <= | >= | > - how to understand the value -->
 <units value="[string]"/><!-- 0..1 Unit representation -->
 <system value="[uri]"/><!-- ?? 0..1 System that defines coded unit form -->
 <code value="[code]"/><!-- 0..1 Coded form of the unit -->
</[name]>

JSON Template

{doco
  // from Element: extension
  "value" : <decimal>, // Numerical value (with implicit precision)
  "comparator" : "<code>", // < | <= | >= | > - how to understand the value
  "units" : "<string>", // Unit representation
  "system" : "<uri>", // C? System that defines coded unit form
  "code" : "<code>" // Coded form of the unit
}

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 units element contains a displayable unit that defines what is measured. The units 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 units are able to 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 units element will often contain text that is actually a valid UCUM unit, but it cannot be assumed that the units element actually contains a valid UCUM unit.

Constraints

  • qty-3: If a code for the units is present, the system SHALL also be present (xpath: not(exists(f:code)) or exists(f:system))

The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may additionally require a code from a particular system. The context of use may also restrict the values for the value or range.

Quantity is used in the following places: Range, Ratio, SampledData, Supply, Group, OralHealthClaim, PharmacyClaim, CarePlan, Substance, QuestionnaireAnswers, ProfessionalClaim, BodySite, Observation, InstitutionalClaim, VisionClaim, MedicationDispense, MedicationPrescription, MedicationStatement, VisionPrescription, Immunization, Medication, MedicationAdministration, NutritionOrder, Contract and Specimen

1.21.0.6.1 Defined Variations on Quantity

These are used as types in resource content models, but they are really just a Quantity with some rules:

AgeA duration (length of time) with a UCUM codeProfile (XML, JSON)
CountA count of a discrete element (no unit)Profile (XML, JSON)
MoneyAn amount of money. With regard to precision, see [[X]]Profile (XML, JSON)
DistanceA measure of distanceProfile (XML, JSON)
DurationA length of timeProfile (XML, JSON)

1.21.0.7 Range

See also Examples, Detailed Descriptions and Mappings.

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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Range I1..1ElementSet of values bounded by low and high
If present, low SHALL have a lower value than high
Quantity values cannot have a comparator when used in a Range
... low I0..1QuantityLow limit
... high I0..1QuantityHigh limit

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <low><!-- ?? 0..1 Quantity Low limit --></low>
 <high><!-- ?? 0..1 Quantity High limit --></high>
</[name]>

JSON Template


{doco
  // from Element: extension
  "low" : { Quantity }, // C? Low limit
  "high" : { Quantity } // C? High limit
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Range I1..1ElementSet of values bounded by low and high
If present, low SHALL have a lower value than high
Quantity values cannot have a comparator when used in a Range
... low I0..1QuantityLow limit
... high I0..1QuantityHigh limit

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <low><!-- ?? 0..1 Quantity Low limit --></low>
 <high><!-- ?? 0..1 Quantity High limit --></high>
</[name]>

JSON Template

{doco
  // from Element: extension
  "low" : { Quantity }, // C? Low limit
  "high" : { Quantity } // C? High limit
}

The units 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

  • rng-2: If present, low SHALL have a lower value than high (xpath: not(exists(f:low/f:value/@value)) or not(exists(f:high/f:value/@value)) or (number(f:low/f:value/@value) <= number(f:high/f:value/@value)))
  • rng-3: Quantity values cannot have a comparator when used in a Range (xpath: not(exists(f:low/f:comparator) or exists(f:high/f:comparator)))

Range is used in the following places: Group, RiskAssessment, Observation, MedicationDispense, MedicationPrescription and FamilyHistory

1.21.0.8 Ratio

See also Examples, Detailed Descriptions and Mappings.

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

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Ratio I1..1ElementA ratio of two Quantity values - a numerator and a denominator
numerator and denominator SHALL both be present, or both be absent
... numerator 0..1QuantityNumerator value
... denominator 0..1QuantityDenominator value

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <numerator><!-- 0..1 Quantity Numerator value --></numerator>
 <denominator><!-- 0..1 Quantity Denominator value --></denominator>
</[name]>

JSON Template


{doco
  // from Element: extension
  "numerator" : { Quantity }, // Numerator value
  "denominator" : { Quantity } // Denominator value
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Ratio I1..1ElementA ratio of two Quantity values - a numerator and a denominator
numerator and denominator SHALL both be present, or both be absent
... numerator 0..1QuantityNumerator value
... denominator 0..1QuantityDenominator value

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <numerator><!-- 0..1 Quantity Numerator value --></numerator>
 <denominator><!-- 0..1 Quantity Denominator value --></denominator>
</[name]>

JSON Template

{doco
  // from Element: extension
  "numerator" : { Quantity }, // Numerator value
  "denominator" : { Quantity } // Denominator value
}

Common factors in the numerator and denominator are not automatically cancelled out. The Ratio data type is used for titers (e.g., "1:128") and other quantities produced by laboratories that truly represent ratios. Ratios are not simply "structured numbers" - for example blood pressure measurements (e.g. "120/60") are not ratios. In addition, ratios are used where common factors in the numerator and denominator do not cancel out. The most common example of this is where the ratio represents a unit cost, and the numerator is a currency (e.g. 50/$10).

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

  • rat-1: numerator and denominator SHALL both be present, or both be absent (xpath: count(f:numerator) = count(f:denominator))

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

Ratio is used in the following places: Substance, Observation, MedicationDispense, MedicationPrescription, MedicationStatement, Medication, MedicationAdministration and NutritionOrder

1.21.0.9 Period

See also Examples, Detailed Descriptions and Mappings.

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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Period I1..1ElementTime range defined by start and end date/time
If present, start SHALL have a lower value than end
... start I0..1dateTimeStarting time with inclusive boundary
... end I0..1dateTimeEnd time with inclusive boundary, if not ongoing

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <start value="[dateTime]"/><!-- ?? 0..1 Starting time with inclusive boundary -->
 <end value="[dateTime]"/><!-- ?? 0..1 End time with inclusive boundary, if not ongoing -->
</[name]>

JSON Template


{doco
  // from Element: extension
  "start" : "<dateTime>", // C? Starting time with inclusive boundary
  "end" : "<dateTime>" // C? End time with inclusive boundary, if not ongoing
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Period I1..1ElementTime range defined by start and end date/time
If present, start SHALL have a lower value than end
... start I0..1dateTimeStarting time with inclusive boundary
... end I0..1dateTimeEnd time with inclusive boundary, if not ongoing

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <start value="[dateTime]"/><!-- ?? 0..1 Starting time with inclusive boundary -->
 <end value="[dateTime]"/><!-- ?? 0..1 End time with inclusive boundary, if not ongoing -->
</[name]>

JSON Template

{doco
  // from Element: extension
  "start" : "<dateTime>", // C? Starting time with inclusive boundary
  "end" : "<dateTime>" // C? End time with inclusive boundary, if not ongoing
}

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.

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

Period is used in the following places: Identifier, Supply, Coverage, EpisodeOfCare, Composition, NamingSystem, Practitioner, CarePlan, DeviceUseRequest, Schedule, PaymentReconciliation, RiskAssessment, Observation, RelatedPerson, ProcedureRequest, MedicationDispense, MedicationPrescription, MedicationStatement, DocumentReference, Provenance, Procedure, DiagnosticReport, MedicationAdministration, Encounter, PendedRequest, DeviceUseStatement, ReferralRequest, FamilyHistory, Contract, Specimen, Patient and CarePlan2

1.21.0.10 SampledData

See also Examples, Detailed Descriptions and Mappings.

Data that comes from a series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.

A SampledData provides a concise way to handle the data produced by devices that sample a physical particular state at a high frequency. A typical use for this is for the output of an ECG or EKG device.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. SampledData 1..1ElementA series of measurements taken by a device
... origin 1..1QuantityZero value and units
... period 1..1decimalNumber of milliseconds between samples
... factor 0..1decimalMultiply data by this before adding to origin
... lowerLimit 0..1decimalLower limit of detection
... upperLimit 0..1decimalUpper limit of detection
... dimensions 1..1integerNumber of sample points at each time point
... data 1..1stringDecimal values with spaces, or "E" | "U" | "L"

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <origin><!-- 1..1 Quantity Zero value and units --></origin>
 <period value="[decimal]"/><!-- 1..1 Number of milliseconds 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="[integer]"/><!-- 1..1 Number of sample points at each time point -->
 <data value="[string]"/><!-- 1..1 Decimal values with spaces, or "E" | "U" | "L" -->
</[name]>

JSON Template


{doco
  // from Element: extension
  "origin" : { Quantity }, // R! Zero value and units
  "period" : <decimal>, // R! Number of milliseconds between samples
  "factor" : <decimal>, // Multiply data by this before adding to origin
  "lowerLimit" : <decimal>, // Lower limit of detection
  "upperLimit" : <decimal>, // Upper limit of detection
  "dimensions" : <integer>, // R! Number of sample points at each time point
  "data" : "<string>" // R! Decimal values with spaces, or "E" | "U" | "L"
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. SampledData 1..1ElementA series of measurements taken by a device
... origin 1..1QuantityZero value and units
... period 1..1decimalNumber of milliseconds between samples
... factor 0..1decimalMultiply data by this before adding to origin
... lowerLimit 0..1decimalLower limit of detection
... upperLimit 0..1decimalUpper limit of detection
... dimensions 1..1integerNumber of sample points at each time point
... data 1..1stringDecimal values with spaces, or "E" | "U" | "L"

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <origin><!-- 1..1 Quantity Zero value and units --></origin>
 <period value="[decimal]"/><!-- 1..1 Number of milliseconds 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="[integer]"/><!-- 1..1 Number of sample points at each time point -->
 <data value="[string]"/><!-- 1..1 Decimal values with spaces, or "E" | "U" | "L" -->
</[name]>

JSON Template

{doco
  // from Element: extension
  "origin" : { Quantity }, // R! Zero value and units
  "period" : <decimal>, // R! Number of milliseconds between samples
  "factor" : <decimal>, // Multiply data by this before adding to origin
  "lowerLimit" : <decimal>, // Lower limit of detection
  "upperLimit" : <decimal>, // Upper limit of detection
  "dimensions" : <integer>, // R! Number of sample points at each time point
  "data" : "<string>" // R! Decimal values with spaces, or "E" | "U" | "L"
}

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. If there is more than one dimension, the different dimensions are interlaced - all the data points for a particular time are represented together. The default value for factor is 1.

SampledData is used in the following places: Observation

1.21.0.11 Identifier

See also Examples, Detailed Descriptions and Mappings.

A numeric or alphanumeric string 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. 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

NameFlagsCard.TypeDescription & Constraintsdoco
.. Identifier 1..1ElementAn identifier intended for computation
... use M0..1codeusual | official | temp | secondary (If known)
IdentifierUse (Required)
... label 0..1stringDescription of identifier
... system 0..1uriThe namespace for the identifier
... value 0..1stringThe value that is unique
... period 0..1PeriodTime period when id is/was valid for use
... assigner 0..1OrganizationOrganization that issued id (may be just text)

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 usual | official | temp | secondary (If known) -->
 <label value="[string]"/><!-- 0..1 Description of identifier -->
 <system value="[uri]"/><!-- 0..1 The namespace for the identifier -->
 <value value="[string]"/><!-- 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]>

JSON Template


{doco
  // from Element: extension
  "use" : "<code>", // usual | official | temp | secondary (If known)
  "label" : "<string>", // Description of identifier
  "system" : "<uri>", // The namespace for the identifier
  "value" : "<string>", // The value that is unique
  "period" : { Period }, // Time period when id is/was valid for use
  "assigner" : { Reference(Organization) } // Organization that issued id (may be just text)
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Identifier 1..1ElementAn identifier intended for computation
... use M0..1codeusual | official | temp | secondary (If known)
IdentifierUse (Required)
... label 0..1stringDescription of identifier
... system 0..1uriThe namespace for the identifier
... value 0..1stringThe value that is unique
... period 0..1PeriodTime period when id is/was valid for use
... assigner 0..1OrganizationOrganization that issued id (may be just text)

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 usual | official | temp | secondary (If known) -->
 <label value="[string]"/><!-- 0..1 Description of identifier -->
 <system value="[uri]"/><!-- 0..1 The namespace for the identifier -->
 <value value="[string]"/><!-- 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]>

JSON Template

{doco
  // from Element: extension
  "use" : "<code>", // usual | official | temp | secondary (If known)
  "label" : "<string>", // Description of identifier
  "system" : "<uri>", // The namespace for the identifier
  "value" : "<string>", // The value that is unique
  "period" : { Period }, // Time period when id is/was valid for use
  "assigner" : { Reference(Organization) } // Organization that issued id (may be just text)
}

The system referred to by means of a URI defines how the identifier is defined (i.e. how the value is made unique). It might be a specific application or a recognized standard/specification for a set or identifiers or a way of making identifiers unique. The value SHALL be unique within the defined system and have a consistent meaning wherever it appears. Both system and value are always case sensitive.

FHIR defines some useful URIs directly. OIDs (urn:oid:) and UUIDs (urn:uuid:) may be registered in the HL7 OID registry and should be if the content is shared or exchanged across institutional boundaries. If the identifier itself is naturally globally unique (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.

In some cases, the system may 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. This practice should be avoided where possible, as information sharing in a wider context is very likely to arise eventually, and values without a system are inherently limited in use.

The assigner is used to indicate what registry/state/facility/etc. assigned the identifier.

Identifier is used in the following places: Condition, Supply, DeviceComponent, Communication, Group, ValueSet, OralHealthClaim, Coverage, Appointment, Slot, Contraindication, EpisodeOfCare, Composition, Profile, HealthcareService, OrderResponse, StatusResponse, ConceptMap, PharmacyClaim, Reversal, Practitioner, CarePlan, Substance, DeviceUseRequest, Schedule, EligibilityRequest, QuestionnaireAnswers, PaymentReconciliation, ProfessionalClaim, ClaimResponse, BodySite, CommunicationRequest, RiskAssessment, Observation, AllergyIntolerance, ExplanationOfBenefit, SupportingDocumentation, RelatedPerson, InstitutionalClaim, Alert, EligibilityResponse, StatusRequest, Person, ProcedureRequest, VisionClaim, DeviceMetric, Organization, Readjudicate, ImmunizationRecommendation, MedicationDispense, MedicationPrescription, PaymentNotice, MedicationStatement, AppointmentResponse, Questionnaire, Media, Other, VisionPrescription, DocumentReference, Immunization, ExtensionDefinition, ImagingStudy, Device, StructureDefinition, Order, Procedure, DiagnosticReport, DataElement, DocumentManifest, MedicationAdministration, Encounter, SecurityEvent, PendedRequest, List, DeviceUseStatement, Goal, NutritionOrder, ReferralRequest, FamilyHistory, EnrollmentRequest, Location, Contract, Basic, Specimen, EnrollmentResponse, Patient, CarePlan2 and DiagnosticOrder

1.21.0.12 HumanName

See also Examples, Detailed Descriptions and Mappings.

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 may or may 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

NameFlagsCard.TypeDescription & Constraintsdoco
.. HumanName 1..1ElementName of a human - parts and usage
... use M0..1codeusual | official | temp | nickname | anonymous | old | maiden
NameUse (Required)
... text 0..1stringText representation of the full name
... family 0..*stringFamily name (often called 'Surname')
... given 0..*stringGiven names (not always 'first'). Includes middle names
... prefix 0..*stringParts that come before the name
... suffix 0..*stringParts that come after the name
... period 0..1PeriodTime period when name was/is in use

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- 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..* 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]>

JSON Template


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

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. HumanName 1..1ElementName of a human - parts and usage
... use M0..1codeusual | official | temp | nickname | anonymous | old | maiden
NameUse (Required)
... text 0..1stringText representation of the full name
... family 0..*stringFamily name (often called 'Surname')
... given 0..*stringGiven names (not always 'first'). Includes middle names
... prefix 0..*stringParts that come before the name
... suffix 0..*stringParts that come after the name
... period 0..1PeriodTime period when name was/is in use

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- 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..* 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]>

JSON Template

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

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

NameExampleDestination / Comments
SurnameSmithFamily Name
First nameJohnGiven Name
TitleMrPrefix
Middle NameSamuelSubsequent Given Names
Patronymicbin OsmanFamily Name
Multiple family namesCarreño QuiñonesFamily Name. See note below about repeats
InitialsQ.Given Name as initial ("." recommended)
Nick NameJockGiven name, with Use = common
QualificationsPhDSuffix
HonorificsSeniorSuffix

For further information, including all W3C International Examples, consult the examples.

The text element specifies the entire name as it should be represented. This may be provided instead of or as well as specific parts. The parts of a name SHOULD NOT contain whitespace. For family name, hyphenated names such as "Smith-Jones" are a single name, but names with spaces such as "Smith Jones" are broken into multiple parts. For given names, initials may be used in place of the full name if that is all that is recorded. 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. Systems that operate across cultures should generally rely on the text form for presentation, and use the parts for index/search functionality.

Applications updating a name SHALL ensure either that the text and the parts are in agreement, or that only one of the two is present. Systems that do not support as many name parts as are provided in an instance may wish to append some of the parts together using spaces

HumanName is used in the following places: Practitioner, RelatedPerson, Person, Organization and Patient

1.21.0.13 Address

See also Examples, Detailed Descriptions and Mappings.

A postal address. There is a variety of postal address formats defined around the world. Postal addresses are often also used to record a location that can be visited to find a patient or person.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Address 1..1ElementA postal address
... use M0..1codehome | work | temp | old - purpose of this address
AddressUse (Required)
... text 0..1stringText representation of the address
... line 0..*stringStreet name, number, direction & P.O. Box etc
... city 0..1stringName of city, town etc.
... state 0..1stringSub-unit of country (abreviations ok)
... postalCode 0..1stringPostal code for area
... country 0..1stringCountry (can be ISO 3166 3 letter code)
... period 0..1PeriodTime period when address was/is in use

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 home | work | temp | old - purpose of this address -->
 <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. -->
 <state value="[string]"/><!-- 0..1 Sub-unit of country (abreviations ok) -->
 <postalCode value="[string]"/><!-- 0..1 Postal code for area -->
 <country value="[string]"/><!-- 0..1 Country (can be ISO 3166 3 letter code) -->
 <period><!-- 0..1 Period Time period when address was/is in use --></period>
</[name]>

JSON Template


{doco
  "resourceType" : "Address",
  // from Element: extension
  "use" : "<code>", // home | work | temp | old - purpose of this address
  "text" : "<string>", // Text representation of the address
  "line" : ["<string>"], // Street name, number, direction & P.O. Box etc
  "city" : "<string>", // Name of city, town etc.
  "state" : "<string>", // Sub-unit of country (abreviations ok)
  "postalCode" : "<string>", // Postal code for area
  "country" : "<string>", // Country (can be ISO 3166 3 letter code)
  "period" : { Period } // Time period when address was/is in use
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Address 1..1ElementA postal address
... use M0..1codehome | work | temp | old - purpose of this address
AddressUse (Required)
... text 0..1stringText representation of the address
... line 0..*stringStreet name, number, direction & P.O. Box etc
... city 0..1stringName of city, town etc.
... state 0..1stringSub-unit of country (abreviations ok)
... postalCode 0..1stringPostal code for area
... country 0..1stringCountry (can be ISO 3166 3 letter code)
... period 0..1PeriodTime period when address was/is in use

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <use value="[code]"/><!-- 0..1 home | work | temp | old - purpose of this address -->
 <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. -->
 <state value="[string]"/><!-- 0..1 Sub-unit of country (abreviations ok) -->
 <postalCode value="[string]"/><!-- 0..1 Postal code for area -->
 <country value="[string]"/><!-- 0..1 Country (can be ISO 3166 3 letter code) -->
 <period><!-- 0..1 Period Time period when address was/is in use --></period>
</[name]>

JSON Template

{doco
  "resourceType" : "Address",
  // from Element: extension
  "use" : "<code>", // home | work | temp | old - purpose of this address
  "text" : "<string>", // Text representation of the address
  "line" : ["<string>"], // Street name, number, direction & P.O. Box etc
  "city" : "<string>", // Name of city, town etc.
  "state" : "<string>", // Sub-unit of country (abreviations ok)
  "postalCode" : "<string>", // Postal code for area
  "country" : "<string>", // Country (can be ISO 3166 3 letter code)
  "period" : { Period } // Time period when address was/is in use
}

The text element specifies the entire address as it should be represented. This may be provided instead of or as well as the specific parts. Applications updating an address SHALL ensure either that the text and the parts are in agreement, or that only one of the two is present.

Constraints

Address is used in the following places: Practitioner, RelatedPerson, Person, Organization, Location and Patient

1.21.0.14 ContactPoint

See also Examples, Detailed Descriptions and Mappings.

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

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. ContactPoint I1..1ElementDetails of a Technology mediated contact point (phone, fax, email, etc)
A system is required if a value is provided.
... system I0..1codephone | fax | email | url
ContactPointSystem (Required)
... value 0..1stringThe actual contact point details
... use M0..1codehome | work | temp | old | mobile - purpose of this contact point
ContactPointUse (Required)
... period 0..1PeriodTime period when the contact point was/is in use

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <system value="[code]"/><!-- ?? 0..1 phone | fax | email | url -->
 <value value="[string]"/><!-- 0..1 The actual contact point details -->
 <use value="[code]"/><!-- 0..1 home | work | temp | old | mobile - purpose of this contact point -->
 <period><!-- 0..1 Period Time period when the contact point was/is in use --></period>
</[name]>

JSON Template


{doco
  "resourceType" : "ContactPoint",
  // from Element: extension
  "system" : "<code>", // C? phone | fax | email | url
  "value" : "<string>", // The actual contact point details
  "use" : "<code>", // home | work | temp | old | mobile - purpose of this contact point
  "period" : { Period } // Time period when the contact point was/is in use
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. ContactPoint I1..1ElementDetails of a Technology mediated contact point (phone, fax, email, etc)
A system is required if a value is provided.
... system I0..1codephone | fax | email | url
ContactPointSystem (Required)
... value 0..1stringThe actual contact point details
... use M0..1codehome | work | temp | old | mobile - purpose of this contact point
ContactPointUse (Required)
... period 0..1PeriodTime period when the contact point was/is in use

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <system value="[code]"/><!-- ?? 0..1 phone | fax | email | url -->
 <value value="[string]"/><!-- 0..1 The actual contact point details -->
 <use value="[code]"/><!-- 0..1 home | work | temp | old | mobile - purpose of this contact point -->
 <period><!-- 0..1 Period Time period when the contact point was/is in use --></period>
</[name]>

JSON Template

{doco
  "resourceType" : "ContactPoint",
  // from Element: extension
  "system" : "<code>", // C? phone | fax | email | url
  "value" : "<string>", // The actual contact point details
  "use" : "<code>", // home | work | temp | old | mobile - purpose of this contact point
  "period" : { Period } // Time period when the contact point was/is in use
}

If capturing a phone, fax or similar contact point, the value should be a properly formatted telephone number according to ITU-T E.123. However, this is frequently not possible due to legacy data and/or recording methods.

Constraints

  • cpt-2: A system is required if a value is provided. (xpath: not(exists(f:value)) or exists(f:system))

ContactPoint is used in the following places: ValueSet, Conformance, NamingSystem, Profile, HealthcareService, ConceptMap, Practitioner, OperationDefinition, RelatedPerson, Person, Organization, Questionnaire, ExtensionDefinition, Subscription, Device, StructureDefinition, MessageHeader, DataElement, SearchParameter, Location and Patient

1.21.0.15 Timing

See also Examples, Detailed Descriptions and Mappings.

Specifies an event that may occur multiple times. Timing schedules are not used for recording when things did happen, but when they are expected or requested to occur. A Timing schedule can be either a list of events - periods on which the event occurs, or a single event with repeating criteria, or just repeating criteria with no actual event.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Timing I1..1ElementA timing schedule that specifies an event that may occur multiple times
There can only be a repeat element if there is none or one event
... event 0..*PeriodWhen the event occurs
... repeat I0..1ElementOnly if there is none or one event
At most, only one of count or end can be present
Either frequency or when SHALL be present, but not both
.... frequency I0..1integerEvent occurs frequency times per duration
.... when I0..1codeHS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events
EventTiming (Required)
.... duration I1..1decimalRepeating or event-related duration
duration SHALL be a non-negative value
.... units 1..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
UnitsOfTime (Required)
.... count I0..1integerNumber of times to repeat
.... end I0..1dateTimeWhen to stop repeats

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <event><!-- 0..* Period When the event occurs --></event>
 <repeat>  <!-- ?? 0..1 Only if there is none or one event -->
  <frequency value="[integer]"/><!-- ?? 0..1 Event occurs frequency times per duration -->
  <when value="[code]"/><!-- ?? 0..1 HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events -->
  <duration value="[decimal]"/><!-- ?? 1..1 Repeating or event-related duration -->
  <units value="[code]"/><!-- 1..1 s | min | h | d | wk | mo | a - unit of time (UCUM) -->
  <count value="[integer]"/><!-- ?? 0..1 Number of times to repeat -->
  <end value="[dateTime]"/><!-- ?? 0..1 When to stop repeats -->
 </repeat>
</[name]>

JSON Template


{doco
  "resourceType" : "Timing",
  // from Element: extension
  "event" : [{ Period }], // When the event occurs
  "repeat" : { // C? Only if there is none or one event
    "frequency" : <integer>, // C? Event occurs frequency times per duration
    "when" : "<code>", // C? HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events
    "duration" : <decimal>, // C? R! Repeating or event-related duration
    "units" : "<code>", // R! s | min | h | d | wk | mo | a - unit of time (UCUM)
    "count" : <integer>, // C? Number of times to repeat
    "end" : "<dateTime>" // C? When to stop repeats
  }
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Timing I1..1ElementA timing schedule that specifies an event that may occur multiple times
There can only be a repeat element if there is none or one event
... event 0..*PeriodWhen the event occurs
... repeat I0..1ElementOnly if there is none or one event
At most, only one of count or end can be present
Either frequency or when SHALL be present, but not both
.... frequency I0..1integerEvent occurs frequency times per duration
.... when I0..1codeHS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events
EventTiming (Required)
.... duration I1..1decimalRepeating or event-related duration
duration SHALL be a non-negative value
.... units 1..1codes | min | h | d | wk | mo | a - unit of time (UCUM)
UnitsOfTime (Required)
.... count I0..1integerNumber of times to repeat
.... end I0..1dateTimeWhen to stop repeats

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <event><!-- 0..* Period When the event occurs --></event>
 <repeat>  <!-- ?? 0..1 Only if there is none or one event -->
  <frequency value="[integer]"/><!-- ?? 0..1 Event occurs frequency times per duration -->
  <when value="[code]"/><!-- ?? 0..1 HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events -->
  <duration value="[decimal]"/><!-- ?? 1..1 Repeating or event-related duration -->
  <units value="[code]"/><!-- 1..1 s | min | h | d | wk | mo | a - unit of time (UCUM) -->
  <count value="[integer]"/><!-- ?? 0..1 Number of times to repeat -->
  <end value="[dateTime]"/><!-- ?? 0..1 When to stop repeats -->
 </repeat>
</[name]>

JSON Template

{doco
  "resourceType" : "Timing",
  // from Element: extension
  "event" : [{ Period }], // When the event occurs
  "repeat" : { // C? Only if there is none or one event
    "frequency" : <integer>, // C? Event occurs frequency times per duration
    "when" : "<code>", // C? HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events
    "duration" : <decimal>, // C? R! Repeating or event-related duration
    "units" : "<code>", // R! s | min | h | d | wk | mo | a - unit of time (UCUM)
    "count" : <integer>, // C? Number of times to repeat
    "end" : "<dateTime>" // C? When to stop repeats
  }
}

If events are specified, at least event.start SHALL be specified for each event. If no event.end is specified, the event is assumed to last a limited but unknown time as clinically relevant.

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 real world event. Also, if the event repeats, a time to end the timing can be specified, either with a count of the number of times it can occur or a date/time at which to end the schedule. If no end condition is specified, the schedule will terminate on some criteria that are expressed elsewhere.

1.21.0.16 Signature

See also Examples, Detailed Descriptions and Mappings.

todo

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Signature 1..1ElementAn XML digital Signature
... type 1..*CodingIndication of the reason the entity signed the document
ContractSignerType (Example)
... when 1..1instantWhen the signature was created
... who[x] Who signed the signature
.... whoUri1..1uri
.... whoReference1..1Practitioner | RelatedPerson | Patient
... blob 1..1base64BinaryThe actual XML Dig-Sig

UML Diagram

to do

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <type><!-- 1..* Coding Indication of the reason the entity signed the document --></type>
 <when value="[instant]"/><!-- 1..1 When the signature was created -->
 <who[x]><!-- 1..1 uri|Reference(Practitioner|RelatedPerson|Patient) Who signed the signature --></who[x]>
 <blob value="[base64Binary]"/><!-- 1..1 The actual XML Dig-Sig -->
</[name]>

JSON Template


{doco
  // from Element: extension
  "type" : [{ Coding }], // R! Indication of the reason the entity signed the document
  "when" : "<instant>", // R! When the signature was created
  // who[x]: Who signed the signature. One of these 2:
  "whoUri" : "<uri>",
  "whoReference" : { Reference(Practitioner|RelatedPerson|Patient) },
  "blob" : "<base64Binary>" // R! The actual XML Dig-Sig
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Signature 1..1ElementAn XML digital Signature
... type 1..*CodingIndication of the reason the entity signed the document
ContractSignerType (Example)
... when 1..1instantWhen the signature was created
... who[x] Who signed the signature
.... whoUri1..1uri
.... whoReference1..1Practitioner | RelatedPerson | Patient
... blob 1..1base64BinaryThe actual XML Dig-Sig

UML Diagram

todo

XML Template

<[name] xmlns="http://hl7.org/fhir"> doco
 <!-- from Element: extension -->
 <type><!-- 1..* Coding Indication of the reason the entity signed the document --></type>
 <when value="[instant]"/><!-- 1..1 When the signature was created -->
 <who[x]><!-- 1..1 uri|Reference(Practitioner|RelatedPerson|Patient) Who signed the signature --></who[x]>
 <blob value="[base64Binary]"/><!-- 1..1 The actual XML Dig-Sig -->
</[name]>

JSON Template

{doco
  // from Element: extension
  "type" : [{ Coding }], // R! Indication of the reason the entity signed the document
  "when" : "<instant>", // R! When the signature was created
  // who[x]: Who signed the signature. One of these 2:
  "whoUri" : "<uri>",
  "whoReference" : { Reference(Practitioner|RelatedPerson|Patient) },
  "blob" : "<base64Binary>" // R! The actual XML Dig-Sig
}

todo

Constraints

Signature is used in the following places: (not used as yet)

1.21.0.17 Open Type Element

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:

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

Open references are used in the following places: DataElement and Parameters

1.21.0.18 Other Types

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

ElementExtensions - as described for all elements: additional information that is not part of the basic definition of the resource / typeextension : Extension 0..*ExtensionSource of the definition for the extension code - a logical name or a URLurl : uri 1..1Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list)value[x] : * 0..1NarrativeThe 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 datastatus : code 1..1 « The status of a resource narrativeNarrativeStatus »The actual narrative content, a stripped down version of XHTMLdiv : xhtml 1..1ReferenceA 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 resourcesreference : string 0..1Plain text narrative that identifies the resource in addition to the resource referencedisplay : string 0..1
  • 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