This page is part of the FHIR Specification (v0.05: DSTU 1 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
The FHIR data types include primitive types imported from XML schema and additional data types that capture patterns that are ubiquitous throughout the scope of the healthcare data that will be exchanged.
The data types defined on this page on this page are categorised as "Primitive Types", "Types" or "Structures". Primitive Types are those either drawn from W3C Schema types or directly derived from them. Types and Structures are more complex, made up of multiple properties. "Structures" are higher level concepts that some systems internally treat differently from Types. There is no functional difference between the two categories, and systems are not required to treat them any differently.
The following table summarises the primitive types that are used by are used in the exchange specifications and are directly imported from w3c schema (though sometimes aliased). The possible values for these types are those specified in the W3C Schema specification part 2. All elements that contain text content have one of these primitive types. Elements of this type can only be empty if they have a dataAbsentReason attribute on them (and only where that attribute is allowed).
Type | Base type | Description | Spec | Example | Default value |
---|---|---|---|---|---|
boolean | xs:boolean | Values can be either true or false | {true, false} | true | false |
integer | xs:int | A signed 32-bit integer (for larger values, use decimal) | {-2147483648,...,-2,-1,0,1,2,...,2147483647} | 1066 | 0 |
decimal | xs:decimal | A rational number. Do not use a IEEE type floating point type, instead use something that works like a true decimal, with inbuilt precision (e.g. Java BigDecimal) | ('-'? [1-9][0-9]* '.' [0-9]+) | '0' | -1.23, 12678967.543233 | 0 |
base64Binary | xs:base64Binary | A stream of bytes, base64 encoded | see Wikipedia | cGxlYXN1cmUu | null / empty |
instant | xs:dateTime | An instant in time - known at least to the second and always includes a timezone. Note: This type is for system times, not human times (see below). | yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? ('Z' | (('+' | '-') hh ':' ss)) | 2002-10-10T17:00:00Z | N/A - systems must track missing/null |
string | xs:string | A sequence of Unicode characters. Note that FHIR strings may not exceed 1MB in size | null / empty | ||
uri | xs:anyURI | A Uniform Resource Identifier Reference. It can be absolute or relative, and may have an optional fragment identifier. | See RFC 3986 | http://www.hl7.org/fhir | null / no reference |
The default value specifies the implicit semantic meaning of a missing element. Note that some implementations are able to distinguish between missing values and the default values, but the semantic meaning is still required anyway. The string patterns that follow share the same default value as the string type, and all the rest of the types have a default value of null.
Implementations that convert the xml described in this specification to other formats such as JSON or some object based notation will have to find equivalent types.
In addition to these assumed primitive types, this specification defines a few simple string patterns that are commonly used:
Type | Description | Spec | Example |
---|---|---|---|
code | A string which has at least one character and no whitespace | [^\s]+([\s]+[^\s]+)* | ++, asked |
oid | An ISO oid (ISO/IEC 8824:1990(E)) | ([1-9][0-9]*)(\.[1-9][0-9]*)* | 1.20.134.5.6 |
uuid | A UUID (Open Group, CDE 1.1 Remote Procedure Call specification, Appendix A), sometimes called a GUID. Always represented in lowercase. | [0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12} | 0ff343ac-ae48-3c92-2385e35e34ac |
sid | A system id, which is a uri taken from the list of known definition systems. sid values never contain a '#' | [A-Za-z]+:[^s]* | http://snomed.info |
id | A whole number in the range 0 to 2^64-1, optionally represented in hex, a uuid, an oid, or any other combination of lowercase letters, numerals, "-" and ".", with a length limit of 36 characters | [a-z0-9\-\.]{1,36} | lab-report.3445 |
date | A date, or partial date (e.g. just year or year + month) as used in human communication. There is no time zone. Dates must be valid dates. | [0-9]{4}(\-((0[1-9])|(1[0-2]))(\-((0[1-9])|([1-2][0-9])|(3[0-1])))?)? | 2012, 1997-09, 1972-11-30 |
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 must be populated. Seconds may be provided but may also be ignored. Dates must be valid dates. | [0-9]{4}(\-((0[1-9])|(1[0-2]))(\-((0[1-9])|([1-2][0-9])|(3[0-1]))(T(([0-1][0-9])|(2[0-3])):[0-5][0-9]:[0-5][0-9]((\+|-)(0[0-9]|1[0-4]):(0|3|4)(0|5)|Z)?)?)?)? | 2012-01, 2012-10-22T12:04:43 |
Examples
date (e.g. Date of birth):
<x>1951-06-04</x>
This type is for containing 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.
<x xmlns="http://hl7.org/fhir"> <mimeType><!-- 1..1 code Mime type of the content --></mimeType> <data><!-- 0..1 base64Binary Data inline, base64ed --></data> <url><!-- 0..1 uri Uri where the data can be found --></url> <hash><!-- 0..1 base64Binary sha-256 hash of the data (base64 ) --></hash> <lang><!-- 0..1 code ISO 639-3 language code --></lang> <title><!-- 0..1 string Label to display in place of the data --></title> </x>
Terminology Bindings
The mimeType element must always be populated. 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, they must point to the same content. The reference can never be reused to point to different data (which means that the reference is version specific). The url reference must point to a location that resolves to actual data; some uris such as cid: meet this requirement.
The hash is included so that applications can verify that the contents of a location have not changed and also so that a signature of the xml content can implicitly sign the content of an image without having to include the data or reference the url in the signature. The lang element can help a consumer choose between multiple different Attachment elements.
In many cases where Attachment is used, the cardinality is >1; repeats are used to convey the same content in different mime types and languages.
Use
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 lang 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.
Examples
A PDF document:
<x> <mimeType>application/pdf</mimeType> <data>/9j/4...KAP//Z</data> <!-- covers many lines --> <lang>eng</lang> <title>Definition of Procedure</title> </x>
A reference to a DICOM image:
<x> <mimeType>application/dicom</mimeType> <url>http://10.1.2.3:1000/wado?requestType=WADO&wado details...</url> <hash>EQH/..AgME</hash> </x>
An identifier defined by some external system.
<x xmlns="http://hl7.org/fhir"> <system><!-- 0..1 uri The namespace for the identifier --></system> <id><!-- 0..1 string The actual identifier --></id> </x>
The system may be either a specific application or a recognised concept for which the specific application may be implicit. The system is a URI that may be an OID (oid:) or a UUID (uuid:), a sid (a specially defined URI from the named systems list) or a URL that references a definition of the identifier. OIDs and UUIDs may be registered in the HL7 OID registry and should be if the content is shared or exchanged across institutional boundaries.
In some cases, the system may not be known - only the id is known (e.g. a simple device that scans a barcode). In this case, no useful matching may be performed using the id unless the system can be safely inferred by the context.
Note that the system defines the scheme that controls uniqueness of the id. The id must be unique within the defined system. If the id itself is actually an OID, a UUID, or a URI, then the system will be either "http://hl7.org/fhir/sid/oid", "http://hl7.org/fhir/sid/uuid" or "http://hl7.org/fhir/sid/uri" respectively and the OID, UUID or URI would be in the id element. Ids are always case sensitive. UUIDs must be represented in lower case.
Use
Examples
A primary key from an application table (an OID in the space allocated by HL7 to some organisation to further sub-allocate):
<x> <system>oid:2.16.840.1.113883.16.4.3.2.5</system> <id>123</id> </x>
An identifier of a patient FHIR resource on a particular system:
<x> <system>http://pas-server/xxx/patient</system> <id>443556</id> </x>
A guid:
<x> <system>http://hl7.org/fhir/sid/uuid</system> <id>a76d9bbf-f293-4fb7-ad4c-2851cac77162</id> </x>
A full URL as the identifier:
<x> <system>http://hl7.org/fhir/sid/uri</system> <id>http://server.acme.com/fhir/people/@1</id> </x>
A "coding" is a representation of a defined concept using a symbol from a defined "code system" - which may be an enumeration, a list of codes, a full terminology such as SNOMED-CT or LOINC or a formal ontology.
<x xmlns="http://hl7.org/fhir"> <code><!-- 0..1 code Symbol in syntax defined by the system --></code> <system><!-- 1..1 uri Identity of the terminology system --></system> <display><!-- 0..1 string Representation defined by the system --></display> </x>
There must be a system that identifies the terminology or ontology the code is defined by. The system is a URI that may be an OID (oid:) a UUID (uuid:), a specially defined URI from the named systems list, a url that references a definition of the system or any other URI. OIDs and UUIDs may be registered in the HL7 OID registry and should be if the content is shared or exchanged across institutional boundaries.
If present, the code must be a syntactically correct symbol as defined by the system. In some code systems such as SNOMED-CT, the code may be an expression composed of other codes. Note that codes are case sensitive unless specified otherwise by the code system. If no code is present and there is no dataAbsentReason, the coding should be interpreted to mean that the concept cannot be encoded in the identified system. The display is a text representation of the code defined by the system and can be used to display the meaning of the code by an application that is not aware of the system.
If two Codings have the same the system and code then they have the same meaning. If either the system or the code differs, then how they are related can only be determined by consulting the definitions of the system(s) and any mappings available.
The correct value of the system for a given code system can be determined by:
Use
Unless the Coding element has a dataAbsentReason flag, it must contain a system element and it should contain a display if it contains a code.
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.
Examples
A simple code for headache, in ICD-10:
<x> <code>G44.1</code> <system>http://hl7.org/fhir/sid/icd-10</system> </coding> </x>
A SNOMED-CT expression:
<x> <code>128045006:{363698007=56459004}</code> <system>http://snomed.info</system> </x>
A Coding is a simple direct reference to a code in a code system. The following type, CodeableConcept is a complex type that may include multiple Coding and/or a text representation. The interplay between one or more coding systems and a text representation is an extremely common pattern encountered in healthcare data and the CodeableConcept caters for the general case. Accordingly, it is usually used in resources in preference to the simpler Coding. Some resource definitions use Coding directly because the interplay between text and codes is inherently part of the resource model. In such cases, these resource definitions have to make allowance for the design issues directly.
A CodeableConcept represents a represents a field that is usually defined by formal 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.
<x xmlns="http://hl7.org/fhir"> <coding><!-- 0..* Coding Code defined by a terminology system --></coding> <text><!-- 0..1 string Plain text representation of the concept --></text> <primary><!-- 0..1 idref Which code was chosen directly by the user --></primary> </x>
Each "coding" is a representation of the concept using a symbol from a defined "code system" - which may be an enumeration, a list of codes, a full terminology such as SNOMED-CT or LOINC, or a formal ontology. 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.
Whether or not coding elements are present, the text is 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 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 that the user actually chose directly. If present, the value of the primary element is an ID that must match an id attribute on one of the codings.
Use
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.
The ordering of Codings within a CodeableConcept is undefined. Conformant systems shall not depend on Codings appearing in a particular sequence.
Examples
A simple code for headache initially coded in SNOMED-CT and translated to ICD-10:
<x> <coding> <code>R51</code> <system>http://hl7.org/fhir/sid/icd-10</system> </coding> <coding id="1"> <code>25064002</code> <system>http://snomed.info</system> </coding> <text>general headache</text> <primary>1</primary> </x>
A concept represented in an institution's local coding systems for unit for which no UCUM equivalent exists:
<x> <coding> <code>tab</code> <system>oid:2.16.840.1.113883.19.5.2</system> <display>Tablet</display> </coding> <coding> <system>http://unitsofmeasure.org</system> </coding> </x>
A SNOMED-CT expression:
<x> <coding> <code>128045006:{363698007=56459004}</code> <system>http://snomed.info</system> </coding> <text>Cellulitis of the foot</text> </x>
A code taken from a short list of codes that are not defined in a formal code system. Choice is generally used for things like pain scales, questionnaires or formally defined assessment indexes. The possible codes may be ordered with some arbitrarily defined scale. Note: Choice is not an appropriate data type to use when the possible codes are defined as a value set from a formal code system or otherwise stored on a terminology server.
<x xmlns="http://hl7.org/fhir"> <code><!-- 0..1 code Selected code --></code> <value> <!-- 2..* List of possible code values --> <code><!-- 1..1 code Possible code --></code> <display><!-- 0..1 string Display for the code --></display> </value> <isOrdered><!-- 0..1 boolean If order of the values has meaning --></isOrdered> </x>
The code is the selected value. A list of possible values must be provided; at least a code must be provided for each value. The selected code must be found in the list of possible codes.
If isOrdered is true, then the values have an inherent meaningful order and the list of values must be provided in the correct order.
Use
Example
The results on a urinalysis strip:
<x> <code>+</code> <value> <code>neg</code> </value> <value> <code>trace</code> </value> <value> <code>+</code> </value> <value> <code>++</code> </value> <value> <code>+++</code> </value> <isOrdered>true</isOrdered> </x>
A measured amount (or an amount that can potentially be measured).
<x xmlns="http://hl7.org/fhir"> <value><!-- 0..1 decimal Numerical value (with implicit precision) --></value> <range><!-- 0..1 code Proximity of measured value to actual --></range> <units><!-- 0..1 string Unit representation --></units> <code><!-- 0..1 code Coded form of the unit --></code> <system><!-- 0..1 uri System that defines coded unit form --></system> </x>
Terminology Bindings
< | The actual value is less than the given value | |
<= | The actual value is less than or equal to the given value | |
>= | The actual value is greater than or equal to the given value | |
> | The actual value is greater than the given value |
The value contains the numerical value of the quantity, including an implicit precision. The range indicates how the value should be understood and represented. If no range is specified, the value is a point value (i.e. '='). The range element can never be ignored.
The units element must contain a displayable unit that defines what is measured. The units may additionally be coded in the code and the system, which is a URI, OID or a SID that defines the code (see CodeableConcept for further information about system).
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 it does.
Use
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 range.
These are used as types in resource content models, but they are really just Quantity with some rules:
Duration | The unit must be an amount of time and a UCUM unit must be provided. |
Distance | The unit must be an amount of length and a UCUM unit must be provided. |
Count | The value must a whole number and the UCUM unit must be "1" |
Money | The unit must be a currency and the code must from ISO 4217 (system = "http://hl7.org/fhir/sid/iso-4217") |
Examples
A duration:
<x> <value>25</value> <unit>sec</unit> <code>s</code> <system>http://unitsofmeasure.org</system> </x>
A concentration where the value was out of range:
<x> <value>40000</value> <range>></range> <unit>mcg/L</unit> <code>ug</code> <system>http://unitsofmeasure.org</system> </x>
An amount of prescribed medication:
<x> <value>3</value> <unit>capsules</unit> <code>385049006</code> <system>http://snomed.info</system> </x>
A price:
<x> <value>25.45</value> <unit>US$</unit> <code>USD</code> <system>http://hl7.org/fhir/sid/iso-4217</system> </x>
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").
<x xmlns="http://hl7.org/fhir"> <low><!-- 0..1 Quantity Low limit --></low> <high><!-- 0..1 Quantity High limit --></high> </x>
The units and code/system elements of the low or high elements must 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 range. A dataAbsentReason flag must be provided on the Range in this case.
The range flag on the low or high elements cannot have the values <, <=, =>, or >. Note that the Range type should not be used to represent measurements where the range flag might 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.
Use
Examples
Range of Quantity (distance):
<x> <low> <value>2.8</value> <unit>m</unit> </low> <high> <value>4.6</value> <unit>m</unit> </high> </x>
A ratio of two Quantity values - a numerator and a denominator.
<x xmlns="http://hl7.org/fhir"> <numerator><!-- 0..1 Quantity The numerator --></numerator> <denominator><!-- 0..1 Quantity The denominator --></denominator> </x>
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 numerics" and 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.
Use
The context of use may require particular types of Quantity for the numerator or denominator.
Examples
Titer (Ratio of integer:integer)
<x> <numerator> <value>1</value> </numerator> <denominator> <value>128</value> </denominator> </x>
Unit cost (Ratio of Money:Quantity):
<x> <numerator> <value>103.50</value> <unit>US$</unit> <code>USD</code> <system>http://hl7.org/fhir/sid/iso-4217</system> </numerator> <denominator> <value>128</value> <unit>day</unit> <code>day</code> <system>http://unitsofmeasure.org</system> </denominator> </x>
A time period defined by a start and end 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").
<x xmlns="http://hl7.org/fhir"> <start><!-- 0..1 dateTime The start of the period --></start> <end><!-- 0..1 dateTime The end of the period, if not ongoing --></end> </x>
If the low or high elements are missing, the meaning is that the low or high boundaries are not known. If the low element is missing, a dataAbsentReason flag must be provided on the Period element in this case. If the high is missing, it means that the period is ongoing.
The high 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.
Use
Examples
23rd May 2011 to 27th May, including 27th May:
<x> <low> <date>2011-05-23</date> </low> <high> <date>2011-05-27</date> </high> </x>
An identifier that humans use. This is different from a system identifier because identifiers that humans use are regularly changed or retired due to human intervention and error. Note that a human identifier may be a system identifier on some master system, but becomes a human identifier elsewhere due to how it is exchanged between humans. Driver's license numbers are a good example of this. Also, because human mediated identifiers are often invoked as implicit links to external business processes, such identifiers are often associated with multiple different resources. Human identifiers often have some type associated with them that is important to allow the identifier to be picked as a basis for exchange elsewhere, either in other electronic interchanges or paper forms.
<x xmlns="http://hl7.org/fhir"> <type><!-- 0..1 Coding Code for identifier type --></type> <identifier><!-- 0..1 Identifier Actual identifier --></identifier> <period><!-- 0..1 Period Time period when id was valid for use --></period> <assigner><!-- 0..1 Resource(Organization) Organisation that issued id --></assigner> </x>
Terminology Bindings
account | Account number | |
credit | Credit Card Number | |
microchip | Microchip Number | |
registry | A Registry Number | |
insurance | Insurance Scheme Member Number | |
national | National Healthcare Identifier | |
ssn | National Social Security Number (or equivalent) | |
jurisdiction | Jurisdictional Healthcare Identifier | |
patient | Patient identifier | |
facility | Facility ID | |
provider | Provider number |
Note that in many cases, the assigner is used to indicate what registry/state/facility/etc. assigned the identifier. Another possible source for the type of an identifier is HL7 v2 table 0203.
The resource elements often use HumanId for an identifier that may be an external human mediated reference, that may also come from a direct unambiguous reference to a resource or may be from a separate workflow, possibly human mediated. When the identifier is actually a direct resource reference, the type should be a resource type, the identifier.system should be the URL of the source system or, if a particular end point is not known, then "http://hl7.org/fhir/sid/fhir/[X]" where "[X]" is the resource name , and the identifier.id should be the resource id.
Use
If the HumanId is mandatory, then either an identifier.system or an type must be provided (In some cases, the type of the identifier will be known, but not the identifier.system. For instance, a driver's license number, where the state, province or country that issues the license identifier (or at least the appropriate system uri for a known license provider) is unknown).
The assigner.id may be replaced with assigner.text when used with the dataAbsentReason "astext".
Examples
A US SSN:
<x> <type> <code>ssn</code> <system>http://hl7.org/fhir/sid/fhir/identifier-type</system> </type> <identifier> <system>http://hl7.org/fhir/sid/us-ssn</system> <id>000111111</id> </identifier> </x>
Notes:
A medical record number assigned on 5-July 2009:
<x> <type> <code>patient</code> <system>http://hl7.org/fhir/sid/fhir/identifier-type</system> </type> <identifier> <system>oid:0.1.2.3.4.5.6.7</system> <id>2356</id> </identifier> <period> <low>2009-06-05</low> </period> </x>
A name of a human with 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 does not always matter. 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 must care about name parts around the world varies widely.
<x xmlns="http://hl7.org/fhir"> <use><!-- 0..1 code The use of this name --></use> <text><!-- 0..1 string Text representation of the full name --></text> <part> <!-- 0..* A part of a name --> <type><!-- 0..1 code Type of name part (see below) --></type> <value><!-- 1..1 string The content of the name part --></value> </part> <period><!-- 0..1 Period Time period when name was/is in use --></period> </x>
Terminology Bindings
usual | Known as/conventional/the one you normally use | |
official | The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called "legal name". | |
temp | A temporary name. A name valid time can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations. | |
anonymous | Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons) | |
old | This name is no longer in use (or was never correct, but retained for records) | |
maiden | A name used prior to marriage. Marriage naming customs vary greatly around the world. This name use is for use by applications that collect and store "maiden" names. Though the concept of maiden name is often gender specific, the use of this term is not gender specific. The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically. |
family | Family name, this is the 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. | |
given | Given name. NOTE: Not to be called "first name" since given names do not always come first. | |
suffix | Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that comes at the end of the name | |
prefix | Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that comes at the start of the name |
The text element specifies the entire name as it should be represented. This may be provided instead of or as well as specific part elements. Every part must have a value.
Note that the order of the parts within a given part type has significance and must be observed. The different part types may be re-ordered between different contexts of use and the order between part types is not expected to be meaningful.
Use
Example
Full name of Peter James Chalmers.
<x> <use>usual</use> <part> <type>given</type> <value>Peter</value> </part> <part> <type>given</type> <value>James</value> </part> <part> <type>family</type> <value>Chalmers</value> </part> </x>
See further examples
A postal address. There are a variety of postal address formats defined around the world. This format defines a superset that is the basis for addresses all around the world. Postal addresses are often used to record a location that can be visited to find a patient or person.
<x xmlns="http://hl7.org/fhir"> <use><!-- 0..1 code The use of this address --></use> <text><!-- 0..1 string Text representation of the address --></text> <part> <!-- 0..* --> <type><!-- 0..1 code Type of address part (see below) --></type> <value><!-- 1..1 string The content of the address part --></value> </part> <period><!-- 0..1 Period Time period when address was/is in use --></period> </x>
Terminology Bindings
home | A communication address at a home | |
work | An office address. First choice for business related contacts during business hours | |
temp | A temporary address. The period can provide more detailed information | |
old | This address is no longer in use (or was never correct, but retained for records) |
part | Part of an address line (typically used with an extension that further defines the meaning of the part). | |
line | A line of an address (typically used for street names & numbers, unit details, delivery hints, etc.) . | |
city | The name of the city, town, village, or other community or delivery centre. | |
state | Sub-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). | |
country | Country. ISO 3166 3 letter codes can be used in place of a full country name. | |
zip | A postal code designating a region defined by the postal service. | |
dpid | A value that uniquely identifies the postal address. (Often used in barcodes). |
The text element specifies the entire address as it should be represented. This may be provided instead of or as well as specific part elements. Every part must have a value.
Use
Example
HL7 office's address.
<x> <use>work</use> <text> 1050 W Wishard Blvd RG 5th floor Indianapolis, IN 46240 </html> </text> <part> <type>city</type> <value>Indianapolis</value> </part> <part> <type>state</type> <value>IN</value> </part> <part> <type>zip</type> <value>46240</value> </part> </x>
All kinds of technology-mediated contact details for a person or organisation, including telephone, email, etc.
<x xmlns="http://hl7.org/fhir"> <system><!-- 0..1 code What kind of contact this is --></system> <value><!-- 0..1 string The actual contact details --></value> <use><!-- 0..1 code How to use this address --></use> <period><!-- 0..1 Period Time period when the contact was/is in use --></period> </x>
Terminology Bindings
phone | The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. | |
fax | The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. | |
The value is an email address | ||
url | The value is a url. This is intended for various personal contacts including blogs, Twitter, Facebook, etc. Do not use for email addresses |
home | A communication contact at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. | |
work | An office contact. First choice for business related contacts during business hours. | |
temp | A temporary contact. The period can provide more detailed information. | |
old | This contact is no longer in use (or was never correct, but retained for records) | |
mobile | A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business |
If capturing a phone, fax or similar contact, 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.
Use
Example
Home phone number:
<x> <system>phone</system> <value>+15556755745</value> <use>home</use> </x>
A schedule that specifies an event that may occur multiple times. Schedules are not used for recording when things did happen, but when they are expected or requested to occur. A 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.
Note: a possible enhancement to this is to have the repeat content repeat with each event. This is richer and more complex - is the added functionality useful?
<x xmlns="http://hl7.org/fhir"> <event><!-- 0..* Period When the event occurs --></event> <repeat> <!-- Only if there is none or one event --> <frequency><!-- 0..1 integer Event occurs frequency times per duration --></frequency> <when><!-- 0..1 code Event occurs duration from common life event --></when> <duration><!-- 1..1 Duration Repeating or event-related duration --></duration> <count><!-- 0..1 integer Number of times to repeat --></count> <end><!-- 0..1 dateTime When to stop repeats --></end> </repeat> </x>
Terminology Bindings
HS | event occurs duration before the hour of sleep (or trying to) | |
WAKE | event occurs duration after waking | |
AC | event occurs duration before a meal (from the Latin ante cibus) | |
ACM | event occurs duration before breakfast (from the Latin ante cibus matutinus) | |
ACD | event occurs duration before lunch (from the Latin ante cibus diurnus) | |
ACV | event occurs duration before dinner (from the Latin ante cibus vespertinus) | |
PC | event occurs duration after a meal (from the Latin post cibus) | |
PCM | event occurs duration after breakfast (from the Latin post cibus matutinus) | |
PCD | event occurs duration after lunch (from the Latin post cibus diurnus) | |
PCV | event occurs duration after dinner (from the Latin post cibus vespertinus) |
If events are specified, at least a low must be specified for each event. If no high is specified, the event is assumed to last a limited but unknown time as clinically relevant.
If the 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 schedule can be specified, either by specifying a count number of times it can occur or a date at which to end the schedule. If no end condition is specified, the Schedule will terminate on some criteria that are expressed elsewhere.
There are 3 rules concerning the contents of a Schedule:
Use
Example
A series of appointments for radiotherapy:
<x> <event> <low>2012-01-07T09:00</low> <high>2012-01-07T13:00</high> </event> <event> <low>2012-01-14T09:00</low> <high>2012-01-14T13:00</high> </event> <event> <low>2012-01-22T11:00</low> <high>2012-01-22T15:00</high> </event> </x>
BID (twice a day) (no start or end specified):
<x> <repeat> <frequency>2</frequency> <duration> <value>1</value> <units>day</units> <code>d</code> <system>http://unitsofmeasure.org</system> </duration> </repeat> </x>
1/2 an hour before breakfast for 10 days from 23-Dec 2011:
<x> <event> <low>2011-12-23</low> </event> <repeat> <when>ACM</when> <duration> <value>30</value> <units>min</units> <code>min</code> <system>http://unitsofmeasure.org</system> </duration> <end>2012-01-02</end> </repeat> </x>
Note that the end date is inclusive like the high date of a Period.
With regard to the UML models, see notes about the UML Object models, and particularly the note regarding the UML representation of dataAbsentReason
This is an old version of FHIR retained for archive purposes. Do not use for anything else
Implementers are welcome to experiment with the content defined here, but should note that the contents are subject to change without prior notice.
© HL7.org 2011 - 2012. FHIR v0.05 generated on Sun, Sep 9, 2012 03:28+1000. License