---
type: "doc"
source: "source/datatypes-examples.html"
---
\[%settitle Datatype Examples%\] \[%file newheader%\] \[%file newnavbar%\] <%dtheader examples%>
## Datatype Examples
| Responsible Owner: [\[%wgt fhir%\]]([%wg fhir%]) Work Group | [Standards Status](versions#std-process):[Informative](versions#std-process) |
| --- | --- |
This page includes additional examples of the datatypes, based on common usages and questions
**Datatypes Index**
**Primitive Types**
\[%diagram datatypes/allprimitivetypes.diagram 1dt%\]
**General-Purpose Datatypes**
\[%diagram datatypes/alltypes.diagram 2dt%\]
**Metadata Types**
\[%diagram datatypes/metadatatypes.diagram 3dt%\]
**Special Purpose Datatypes**
\[%diagram datatypes/specialtypes.diagram 4dt%\]
### Primitive Types
\[%example-start%\]
A boolean true value:
A negative integer value:
A high-precision decimal value:
A stream of bytes, base64 encoded:
A Unicode string:
A URI that points to a website:
A URI that is a urn:
A date of birth:
An approximate date of birth:
The instant a document was created, including timezone:
The instant a document was created, expressed in UTC, with milliseconds:
2:35pm in the afternoon:
\[%example-json%\]
A boolean true value:
"active" : true
A negative integer value:
"score" : -14
A high-precision decimal value:
"pi" : 3.14159265358979323846264338327950288419716939937510
A stream of bytes, base64 encoded:
"data" : "/9j/4...KAP//Z" "!-- covers many lines -->
A Unicode string:
"caption" : "Noodles are called ?? in Chinese"
A URI that points to a website:
"reference" : "http://hl7.org/fhir"
A URI that is a urn:
"id" : "urn:isbn:0451450523"
A date of birth:
"date" : "1951-06-04"
An approximate date of birth:
"date" : "1951-06"
The instant a document was created, including timezone:
"instant" : "2013-06-08T10:57:34+01:00"
The instant a document was created, expressed in UTC, with milliseconds:
"instant" : "2013-06-08T09:57:34.2112Z"
2:35pm in the afternoon:
"time" : "14:35:00"
\[%example-end%\]
### String Patterns
\[%example-start%\]
A URI that is the root oid of HL7:
A URI that is a uuid:
A code:
A code with single internal space:
A numeric id:
An alphanumeric id:
\[%example-json%\]
A URI that is the root oid of HL7:
"root" : "urn:oid:2.16.840.1.113883"
A URI that is a uuid:
"id" : "urn:uuid:a5afddf4-e880-459b-876e-e4591b0acc11"
A code:
"code" : "acq4+acq5"
A code with single internal space:
"code" : "Question 4b"
A numeric id:
"id" : "314"
An alphanumeric id:
"id" : "alpha-gamma-14"
\[%example-end%\]
### Primitive Extensions and Ids
A text representation of a date:
\[%example-start%\]
<**birthDate** id="314159" value="1970-03-30" >
**birthDate**\>
\[%example-json%\]
"birthDate": "1970-03-30",
"\_birthDate": {
"id": "314159",
"extension" : \[ {
"url" : "http://example.org/fhir/StructureDefinition/text",
"valueString" : "Easter 1970"
}\]
}
\[%example-end%\]
### Attachment
See also [Base Definition](datatypes#Attachment), [Detailed Descriptions](datatypes-definitions#Attachment), [Mappings](datatypes-mappings#Attachment), [Profiles](datatypes-profiles#Attachment) and [Extensions]([%extensions-location%]extensions-datatypes#Attachment)
A PDF document:
\[%example-start%\]
\[%example-json%\]
"document" : {
"contentType" : "application/pdf",
"language" : "en",
"data" : "/9j/4...KAP//Z",
"title" : "Definition of Procedure"
}
\[%example-end%\]
Since the JSON examples have the same structure as the XML, only XML is shown for the rest of the examples.
A reference to a DICOM image via WADO:
\[%example-start%\]
\[%example-json%\]
"image" : {
"contentType" : "application/dicom",
"url" : "http://10.1.2.3:1000/wado?requestType=WADO&wado\_details...",
"hash" : "EQH/..AgME"
}
\[%example-end%\]
### Identifier
See also [Base Definition](datatypes#Identifier), [Detailed Descriptions](datatypes-definitions#Identifier), [Mappings](datatypes-mappings#Identifier), [Profiles](datatypes-profiles#Identifier) and [Extensions]([%extensions-location%]extensions-datatypes#Identifier)
**Examples**
A primary key from an application table (an OID in the space allocated by HL7 to some organization to further sub-allocate):
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"use" : "official",
"system" : "urn:oid:2.16.840.1.113883.16.4.3.2.5",
"value" : "123"
}
\[%example-end%\]
A patient identifier defined by a hospital:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"use" : "official",
"system" : "http://www.acmehosp.com/patients",
"value" : "44552",
"period" : {
"start" : "2003-05-03"
}
}
\[%example-end%\]
In this case, the period is used to track when the identifier was first assigned to the patient.
An identifier that refers to a patient FHIR resource on a particular system:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"system" : "urn:ietf:rfc:3986",
"value" : "http://pas-server/xxx/Patient/443556"
}
\[%example-end%\]
This is not a resource reference - it's a logical reference by the patient identifier.
A UUID:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"use" : "temp",
"system" : "urn:ietf:rfc:3986",
"value" : "urn:uuid:a76d9bbf-f293-4fb7-ad4c-2851cac77162"
}
\[%example-end%\]
UUIDs are often used for temporary identifiers, though this is not necessary.
A DICOM OID:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"system" : "urn:dicom:uid",
"value" : "urn:oid:2.16.124.113543.6003.189642796.63084.16748.2599092901"
}
\[%example-end%\]
The system value `urn:dicom:uid` can be used for any OID issued under the DICOM arrangements for OIDs. Such OIDs are typically found in DICOM messages, but this is not a requirement for using `urn:dicom:uid`
A US SSN:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"use" : "usual",
"type" : {
"coding" : \[{
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
"code" : "SSN"
}\]
},
"system" : "http://hl7.org/fhir/sid/us-ssn",
"value" : "000111111"
}
\[%example-end%\]
A bank card with Identifier.type.text communicating the human readable name of the identifier:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"use" : "usual",
"type" : {
"coding" : \[{
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
"code" : "BC"
}\],
"text" : "Visa"
},
"value" : "4111111111111111"
}
\[%example-end%\]
Notes:
- US SSNs are often presented like this: 000-11-1111, the dashes are for presentation and should be removed, as specified in the [definition of ssn-us](terminologies-systems#identifiersystems)
- The use of "usual" means that this institution prefers to use SSN when identifying the patient
A medical record number assigned on 5-July 2009:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"use" : "usual",
"type" : {
"coding" : \[{
"system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
"code" : "MRN"
}\]
},
"system" : "urn:oid:0.1.2.3.4.5.6.7",
"value" : "2356",
"period" : {
"start" : "2009-07-05"
}
}
\[%example-end%\]
#### V3 Mapping Examples for Identifier
A root only:
becomes:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"system" : "urn:ietf:rfc:3986",
"value" : "urn:oid:0.1.2.3.4.5"
}
\[%example-end%\]
A root with an extension:
becomes:
\[%example-start%\]
\[%example-json%\]
"identifier" : {
"system" : "urn:oid:0.1.2.3.4.5",
"value" : "13412"
}
\[%example-end%\]
See [v3 Mapping Notes](datatypes-mappings#ii)
### Coding
See also [Base Definition](datatypes#Coding), [Detailed Descriptions](datatypes-definitions#Coding), [Mappings](datatypes-mappings#Coding), [Profiles](datatypes-profiles#Coding) and [Extensions]([%extensions-location%]extensions-datatypes#Coding)
**Examples**
A simple code for headache, in ICD-10:
\[%example-start%\]
\[%example-json%\]
"code" : {
"system" : "http://hl7.org/fhir/sid/icd-10",
"code" : "G44.1"
}
\[%example-end%\]
A SNOMED CT expression:
\[%example-start%\]
\[%example-json%\]
"problem" : {
"system" : "http://snomed.info/sct",
"code" : "128045006:{363698007=56459004}"
}
\[%example-end%\]
### CodeableConcept
See also [Base Definition](datatypes#CodeableConcept), [Detailed Descriptions](datatypes-definitions#CodeableConcept), [Mappings](datatypes-mappings#CodeableConcept), [Profiles](datatypes-profiles#CodeableConcept) and [Extensions]([%extensions-location%]extensions-datatypes#CodeableConcept)
**Examples**
A simple code for headache initially coded in SNOMED CT (by picking the SNOMED CT code from a pick-list), and then translated to ICD-10:
\[%example-start%\]
\[%example-json%\]
"concept" : {
"coding" : \[{
"system" : "http://hl7.org/fhir/sid/icd-10",
"code" : "R51"
}, {
"system" : "http://snomed.info/sct",
"code" : "25064002",
"display" : "Headache",
"userSelected" : "true"
}\],
"text" : "general headache"
}
\[%example-end%\]
A concept represented in an institution's local coding systems for unit for which no UCUM equivalent exists:
\[%example-start%\]
\[%example-json%\]
"unit" : {
"coding" : \[{
"system" : "urn:oid:2.16.840.1.113883.19.5.2",
"code" : "tab",
"display" : "Tablet"
}, {
"system" : "http://unitsofmeasure.org"
}\]
}
\[%example-end%\]
A SNOMED CT expression:
\[%example-start%\]
\[%example-json%\]
"diagnosis" : {
"coding" : \[{
"system" : "http://snomed.info/sct",
"code" : "128045006:{363698007=56459004}"
}\],
"text" : "Cellulitis of the foot"
}
\[%example-end%\]
In this case, there is no display element, because no display is defined for SNOMED CT expressions.
Using the value set:
The results on a urinalysis strip:
\[%example-start%\]
\[%example-json%\]
"valueCoding" : {
"system" : "http://example.org/codes/simple-grades",
"code" : "+"
}
\[%example-end%\]
And where the value set would be something like this:
\[%example-start%\]
Possible Clinistix codes: neg, trace, +, ++, and +++
\[%example-json%\]
{
"resourceType" : "ValueSet",
"url" : "http://hl7.org/fhir/ValueSet/clinistix",
"name" : "Codes for Clinistix",
"publisher" : "HL7",
"contact" : \[{
"name" : "FHIR project team",
"telecom" : \[{
"system" : "url",
"value" : "http://hl7.org/fhir"
}\]
}\],
"description" : "Clinistix Codes",
"status" : "draft",
"experimental" : "true",
"date" : "2013-10-01",
"compose" : {
"include" : \[{
"system" : "http://example.org/codes/simple-grades",
"concept" : \[{
"code" : "neg"
}, {
"code" : "trace"
}, {
"code" : "+"
}, {
"code" : "+"
}, {
"code" : "++"
}, {
"code" : "+++"
}\]
}\]
}
}
\[%example-end%\]
### Quantity
See also [Base Definition](datatypes#Quantity), [Detailed Descriptions](datatypes-definitions#Quantity), [Mappings](datatypes-mappings#Quantity), [Profiles](datatypes-profiles#Quantity) and [Extensions]([%extensions-location%]extensions-datatypes#Quantity)
**Examples**
A duration:
\[%example-start%\]
\[%example-json%\]
"time" : {
"value" : "25",
"unit" : "sec",
"system" : "http://unitsofmeasure.org",
"code" : "s"
}
\[%example-end%\]
A concentration where the value was out of range:
\[%example-start%\]
\[%example-json%\]
"result" : {
"value" : "40000",
"comparator" : ">",
"unit" : "ug/L",
"system" : "http://unitsofmeasure.org",
"code" : "ug"
}
\[%example-end%\]
An amount of prescribed medication:
\[%example-start%\]
\[%example-json%\]
"dose" : {
"value" : "3",
"unit" : "capsules",
"system" : "http://snomed.info/sct",
"code" : "385049006"
}
\[%example-end%\]
### Money
See also [Base Definition](datatypes#Money), [Detailed Descriptions](datatypes-definitions#Money), [Mappings](datatypes-mappings#Money), [Profiles](datatypes-profiles#Money) and [Extensions]([%extensions-location%]extensions-datatypes#Money)
**Examples**
US Dollars:
\[%example-start%\]
\[%example-json%\]
"time" : {
"value" : "25.00",
"currency" : "USD"
}
\[%example-end%\]
Vietnamese Dong:
\[%example-start%\]
\[%example-json%\]
"result" : {
"value" : "410000",
"currency" : "VND"
}
\[%example-end%\]
A quantity that represents a currency amount - used in Ratio where Money is not used:
\[%example-start%\]
\[%example-json%\]
"numerator" : {
"value" : "25.45",
"unit" : "US$",
"system" : "urn:iso:std:iso:4217",
"code" : "USD"
}
\[%example-end%\]
(See full example on [Ratio](#Ratio))
### Range
See also [Base Definition](datatypes#Range), [Detailed Descriptions](datatypes-definitions#Range), [Mappings](datatypes-mappings#Range), [Profiles](datatypes-profiles#Range) and [Extensions]([%extensions-location%]extensions-datatypes#Range)
**Examples**
Range of Quantity (distance):
\[%example-start%\]
\[%example-json%\]
"estimate" : {
"low" : {
"value" : "1.6",
"unit" : "m"
},
"high" : {
"value" : "1.9",
"unit" : "m"
}
}
\[%example-end%\]
### Ratio
See also [Base Definition](datatypes#Ratio), [Detailed Descriptions](datatypes-definitions#Ratio), [Mappings](datatypes-mappings#Ratio), [Profiles](datatypes-profiles#Ratio) and [Extensions]([%extensions-location%]extensions-datatypes#Ratio)
**Examples**
Titer (Ratio of integer:integer)
\[%example-start%\]
\[%example-json%\]
"result" : {
"numerator" : {
"value" : "1"
},
"denominator" : {
"value" : "128"
}
}
\[%example-end%\]
Unit cost (Ratio of Money(as Quantity):Quantity):
\[%example-start%\]
\[%example-json%\]
"charge" : {
"numerator" : {
"value" : "103.50",
"unit" : "US$",
"code" : "USD",
"system" : "urn:iso:std:iso:4217"
},
"denominator" : {
"value" : "1",
"unit" : "day",
"code" : "day",
"system" : "http://unitsofmeasure.org"
}
}
\[%example-end%\]
### RatioRange
See also [Base Definition](datatypes#RatioRange), [Detailed Descriptions](datatypes-definitions#RatioRange), [Mappings](datatypes-mappings#RatioRange), [Profiles](datatypes-profiles#RatioRange) and [Extensions]([%extensions-location%]extensions-datatypes#RatioRange)
**Examples**
Titer (Range of Ratio of integer:integer)
\[%example-start%\]
\[%example-json%\]
"result" : {
"lowNumerator" : {
"value" : "1"
},
"highNumerator" : {
"value" : "2"
},
"denominator" : {
"value" : "128"
}
}
\[%example-end%\]
Unit cost (Range of Ratio of Money(as Quantity):Quantity):
\[%example-start%\]
\[%example-json%\]
"charge" : {
"lowNumerator" : {
"value" : "103.50",
"unit" : "US$",
"code" : "USD",
"system" : "urn:iso:std:iso:4217"
},
"highNumerator" : {
"value" : "210.99",
"unit" : "US$",
"code" : "USD",
"system" : "urn:iso:std:iso:4217"
},
"denominator" : {
"value" : "1",
"unit" : "day",
"code" : "day",
"system" : "http://unitsofmeasure.org"
}
}
\[%example-end%\]
Range of strengths
\[%example-start%\]
\[%example-json%\]
"result" : {
"lowNumerator" : {
"value" : "10",
"unit" : "milliliter",
"code" : "mL",
"system" : "http://unitsofmeasure.org"
},
"highNumerator" : {
"value" : "15",
"unit" : "milliliter",
"code" : "mL",
"system" : "http://unitsofmeasure.org"
},
"denominator" : {
"value" : "100",
"unit" : "gram",
"code" : "g",
"system" : "http://unitsofmeasure.org"
}
}
\[%example-end%\]
### Period
See also [Base Definition](datatypes#Period), [Detailed Descriptions](datatypes-definitions#Period), [Mappings](datatypes-mappings#Period), [Profiles](datatypes-profiles#Period) and [Extensions]([%extensions-location%]extensions-datatypes#Period)
**Examples**
23rd May 2011 to 27th May, including 27th May:
\[%example-start%\]
\[%example-json%\]
"coverage" : {
"start" : "2011-05-23",
"end" : "2011-05-27"
}
\[%example-end%\]
### SampledData
See also [Base Definition](datatypes#SampledData), [Detailed Descriptions](datatypes-definitions#SampledData), [Mappings](datatypes-mappings#SampledData), [Profiles](datatypes-profiles#SampledData) and [Extensions]([%extensions-location%]extensions-datatypes#SampledData)
**Example**
The output from an EKG device:
\[%example-start%\]
\[%example-json%\]
"sampledData" : {
"origin" : {
"value" : "0",
"unit" : "μV",
"system" : "http://unitsofmeasure.org",
"code" : "uV"
},
"interval" : "2",
"factor" : "2.5",
"dimensions" : "1",
"data" : "-4 -13 -18 -18 -18 -17 -16 -16 -16 -16 -16 -17 -18 -18 -18 ...."
}
\[%example-end%\]
### HumanName
See also [Base Definition](datatypes#HumanName), [Detailed Descriptions](datatypes-definitions#HumanName), [Mappings](datatypes-mappings#HumanName), [Profiles](datatypes-profiles#HumanName) and [Extensions]([%extensions-location%]extensions-datatypes#HumanName)
A Simple example
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Everyman",
"given" : \["Adam", "A."\]
}
\[%example-end%\]
Composite names
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Contrata",
"given" : \["Mary Jane"\]
}
\[%example-end%\]
These cases can be quite ambiguous - is "Mary Jane" one name, or two? Different systems, and data enterers may treat this differently, and the person themselves might not know. Parts are allowed to contain spaces, but systems should consider how to treat these cases. Composite names separated by "-" should be treated as a single name part.
A common pattern: a person is called by a name other than that expected from their official name (first given name in most cultures).
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "official",
"family" : "Chalmers",
"given" : \["Peter", "James"\]
}, {
"use" : "usual",
"given" : \["Jim"\]
}\]
\[%example-end%\]
This same pattern is often encountered with immigrants, who retain their real name for official use, but adopt a localized name for everyday use:
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "official",
"family" : "Sczypinski",
"given" : \["Piotr", "Andre"\]
}, {
"use" : "usual",
"family" : "Skipper",
"given" : \["Jim"\]
}\]
\[%example-end%\]
Some people may also have a nickname that needs to be recorded:
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "official",
"family" : "Brown",
"given" : \["Steven"\]
}, {
"use" : "nickname",
"given" : \["Junior"\]
}\]
\[%example-end%\]
Note that there is some ambiguity in real life as to whether a non-official name is the patient's `usual` name, or whether it's their `nickname`. In principle, nick names are used occasionally and informally, whereas the usual name is used consistently, and in formal contexts. However, there is no formal criteria for the differentiating these usages, and even within a culture, people may vary in their cases.
Karen van Hentenryck is of Dutch origin, and the "van" is a voorvoegsel.
\[%example-start%\]
\[%example-json%\]
"name" : {
"use" : "official",
"family" : "van Hentenryck",
"\_family" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString" : "van"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-name",
"valueString" : "Hentenryck"
}\]
},
"given" : \["Karen"\]
}
\[%example-end%\]
See [the Extensibility Example for more information](extensibility-examples) about the use of extensions.
Complex example from Germany: Dr.phil. Regina Johanna Maria von Hochheim-Weilenfels, NCFSA. This example shows extensive use of multiple given names, prefixes, suffixes, for academic degrees, nobility titles, and professional designations.
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "official",
"family" : "von Hochheim-Weilenfels",
"\_family" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString" : "von"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-own-name",
"valueString" : "Hochheim-Weilenfels"
}\]
},
"given" : \["Regina", "Johanna", "Maria"\],
"prefix" : \["Dr. phil."\],
"\_prefix" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode" : "AC"
}\]
}\],
"suffix" : \["NCFSA"\]
}, {
"use" : "maiden",
"family" : "Hochheim"
}\]
\[%example-end%\]
This example makes use of the ISO 21090 extensions to carry the rarely used ISO 21090 qualifier attribute "AC".
Japanese example in the three forms: ideographic (Kanji), syllabic (Hiragana) and alphabetic (Romaji).
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation",
"valueCode" : "IDE"
}\],
"family" : "木村",
"given" : \["通男"\]
}, {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation",
"valueCode" : "SYL"
}\],
"family" : "きむら",
"given" : \["みちお"\]
}, {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation",
"valueCode" : "ABC"
}\],
"family" : "KIMURA",
"given" : \["MICHIO"\]
}\]
\[%example-end%\]
The three forms may be differentiated by the character subset each contains, but some systems require the differentiation to be made manually, which can be done using the ED representation extension.
Russian example in the two forms: Cyrillic and Latin:
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"family" : "ЕМЕЛИН",
"given" : \["ИВАН", "ВЛАДИМИРОВИЧ"\]
}, {
"family" : "EMELIN",
"given" : \["IVAN", "VLADIMIROVICH"\]
}\]
\[%example-end%\]
In Russian usage, these names are known as the domestic and foreign names respectively. The two forms are differentiated by the character subset each contains.
Scandinavian example: Erikson is the family name. Jan Erik are the given names, and Östlund the family name of the mother, which is taken as a Mellannamn.
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "official",
"family" : "Erikson",
"given" : \["Jan", "Erik", "Östlund"\],
"\_given" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCoding" : {
"code" : "MID",
"system" : "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartQualifierR2"
}
}\]
}\]
}\]
\[%example-end%\]
This example makes use of the ISO 21090 extension to carry the culture specific ISO 21090 qualifier attribute "MID" for the Mellannamn.
Then Jan Erikson has a daughter, Karin, with his wife Margrete Hansen. The first communication of the new born name is "Margrete Jente" (Margrete's Girl) and the mother's family name, not the given name (Karin). The father's Family name is not used at all. This is a known temporary name assigned directly after the birth of the child.
\[%example-start%\]
\[%example-json%\]
"name" : {
"use" : "temp",
// use could be OR+OLD, depends how record keeping is done
"family" : "Hansen",
"given" : \["Margrete Jente"\]
}
\[%example-end%\]
The baby's name is subsequently changed to the fathers' family name, and to use the mother's name as mellomnamn.
\[%example-start%\]
\[%example-json%\]
"name" : {
"use" : "official",
"family" : "Erikson",
"given" : \["Karin", "Hansen"\],
"\_given" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinitioniso-20190#name-qualifier",
"valueCoding" : {
"code" : "MID",
"system" : "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartQualifier2"
}
}\]
}\]
}
\[%example-end%\]
Later, Karin gets married to Per Berg, and decides to adopt Berg as her family name, and also decides to use Erikson as the mellom navn. (Note: Karin could have chosen to use another mellom navn, e.g., the family name of her mother, her father or other family names as specified by naming laws of the country in question).
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "old",
"family" : "Erikson",
"given" : \["Karin", "Hansen"\],
"\_given" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinitioniso-20190#name-qualifier",
"valueCoding" : {
"code" : "MID",
"system" : "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartQualifier2"
}
}\]
}\]
}, {
"use" : "official",
"family" : "Berg",
"given" : \["Karin", "Erikson"\],
"\_given" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinitioniso-20190#name-qualifier",
"valueCoding" : {
"code" : "MID",
"system" : "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartQualifier2"
}
}\]
}\]
}, {
"use" : "usual",
"family" : "Berg",
"given" : \["Karin"\]
}\]
\[%example-end%\]
#### W3C International Examples
These examples are taken from the [W3C International Examples](http://www.w3.org/International/questions/qa-personal-names), which should be consulted for further information.
A patronymic is "The part of a name that links to the genealogy":
\[%example-start%\]
\[%example-json%\]
"name" : {
"text" : "Björk Guðmundsdóttir",
"family" : "Guðmundsdóttir",
"given" : \["Björk"\]
}
\[%example-end%\]
A patronymic with a "son/daughter of" appellation:
\[%example-start%\]
\[%example-json%\]
"name" : {
"text" : "Isa bin Osman",
"family" : "bin Osman",
"given" : \["Isa"\]
}
\[%example-end%\]
A Chinese name with a generational name:
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"text" : "毛泽东", // left to right
"family" : "毛",
"given" : \["泽东"\]
}, {
"text" : "Mao Ze Dong", // left to right
"family" : "Mao",
"given" : \["Ze Dong"\]
}\]
\[%example-end%\]
Note that many systems in China do not store family and given names separately, and just use `text`.
Additional Western name (see also example above):
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"use" : "official",
"family" : "Yao",
"given" : \["Ming"\]
}, {
"use" : "usual",
"given" : \["Fred"\]
}\]
\[%example-end%\]
Composite Family name:
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Carreño Quiñones",
"\_family" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-fathers",
"valueString" : "Carreño"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-mothers",
"valueString" : "Quiñones"
}\]
},
"given" : \["María-Jose"\]
}
\[%example-end%\]
Note that it is optional whether to break down the family name to mother's and father's parts, and not always of value, as in this Brazilian Example:
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Santos Tavares Melo Silva",
"given" : \["José", "Eduardo"\]
}
\[%example-end%\]
Note that this naming pattern can become quite extreme ("Pedro de Alcântara João Carlos Leopoldo Salvador Bibiano Francisco Xavier de Paula Leocádio Miguel Gabriel Rafael Gonzaga"). A more practical example is
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Costa Teixeira",
"\_family" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-fathers",
"valueString" : "Costa"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-mothers",
"valueString" : "Teixeira"
}\]
},
"given" : \["Manuel"\]
}
\[%example-end%\]
After marriage, this may change to
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Costa Teixeira Sanches",
"\_family" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-fathers",
"valueString" : "Costa"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-mothers",
"valueString" : "Teixeira"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/humanname-partners-name",
"valueString" : "Sanches"
}\]
},
"given" : \["Manuel"\]
}
\[%example-end%\]
Russian Examples (using Cyrillic):
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"family" : "Ельцин",
"given" : \["Борис", "Николаевич"\]
}, {
"family" : "Ельцина",
"given" : \["Наина", "Иосифовна"\]
}\]
\[%example-end%\]
Example with Initial:
\[%example-start%\]
\[%example-json%\]
"name" : {
"family" : "Public",
"given" : \["John", "Q."\]
}
\[%example-end%\]
Other Examples:
\[%example-start%\]
\[%example-json%\]
"name" : \[{
"text" : "Velikkakathu Sankaran Achuthanandan",
"family" : "Velikkakathu",
"given" : \["Sankaran", "Achuthanandan"\]
}, {
"text" : "Kogaddu Birappa Timappa Nair",
"family" : "Nair",
"given" : \["Birappa", "Timappa"\],
"prefix" : \["Kogaddu"\]
}, {
"text" : "Aditya Pratap Singh Chauhan",
"family" : "Singh",
"given" : \["Aditya", "Pratap"\],
"suffix" : \["Chauhan"\]
}, {
"text" : "Madurai Mani Iyer",
"given" : \["Mani"\],
"prefix" : \["Madurai"\],
"suffix" : \["Iyer"\]
}, {
"text" : "Abu Karim Muhammad al-Jamil ibn Nidal ibn Abdulaziz al-Filistini",
"family" : "ibn Nidal ibn Abdulaziz",
"given" : \["Muhammad", "al-Jamil"\],
"prefix" : \["Abu Karim"\],
"suffix" : \["al-Filistini"\]
}\]
\[%example-end%\]
Note that collecting and storing the _text_ element makes the primary purpose of the structured parts for index/searching, and fidelity of the name parts is not critical.
### Address
See also [Base Definition](datatypes#Address), [Detailed Descriptions](datatypes-definitions#Address), [Mappings](datatypes-mappings#Address), [Profiles](datatypes-profiles#Address) and [Extensions]([%extensions-location%]extensions-datatypes#Address)
Note about these examples: the most important element in an address is the 'text' element - this defines what is printed on the envelope, the actual postal address. The other data elements are provided to support either data analysis based on a patient's address, or for the many systems that exchange fully structured addresses specific to a particular culture. For this reason, these examples focus on the structured data elements of the address.
**Example**
HL7 office's address.
\[%example-start%\]
\[%example-json%\]
"address" : {
"use" : "work",
"text" : "1050 W Wishard Blvd
RG, 5th floor
Indianapolis, IN 46240",
"line" : \["1050 W Wishard Blvd", "RG 5th floor"\],
"city" : "Indianapolis",
"state" : "IN",
"postalCode" : "46240"
}
\[%example-end%\]
HL7 office's address with the codedString extension present
\[%example-start%\]
\[%example-json%\]
"address" : {
"use" : "work",
"text" : "1050 W Wishard Blvd
RG,
5th floor
Indianapolis, IN 46240",
"line" : \["1050 W Wishard Blvd", "RG 5th floor"\],
"city" : "Indianapolis",
"state" : "IN",
"\_state" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-codedString",
"valueCoding" : {
"system" : "urn:iso:std:iso:3166",
"code" : "IN"
}
}\]
},
"postalCode" : "46240",
"country" : "United States",
"\_country" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-codedString",
"valueCoding" :{
"system" : "urn:iso:std:iso:3166",
"code" : "IN"
}
}\]
}
}
\[%example-end%\]
A UK example address, with the county 'HUDDERSFIELD'.
\[%example-start%\]
\[%example-json%\]
"address" : {
"text" : "1 Back Lane
Holmfirth
HUDDERSFIELD
HD7 1HQ",
"line" : \["1 Back Lane"\],
"city" : "Holmfirth",
"district" : "HUDDERSFIELD",
"postalCode" : "HD7 1HQ"
}
\[%example-end%\]
A temporary postal address - i.e., an address that it doesn't make sense to try and visit.
\[%example-start%\]
\[%example-json%\]
"address" : {
"use" : "temp" ,
"type" : "postal",
"line" : \["PO Box 31445"\],
"city" : "Erewhon",
"postalCode" : "0001"
}
\[%example-end%\]
An example of an address with the codedString extension present
\[%example-start%\]
\[%example-json%\]
"address" : {
"use" : "work",
"text" : "1050 W Wishard Blvd
RG,
5th floor
Indianapolis, IN 46240",
"line" : \["1050 W Wishard Blvd", "RG 5th floor"\],
"city" : "Indianapolis",
"state" : "IN",
"postalCode" : "46240"
}
\[%example-end%\]
The next set of examples are taken from the official [international postal union](http://www.upu.int) examples.
| Rue Lougoraïa 12, app. 10 | thoroughfare type, name and number, apartment |
| --- | --- |
| Korolevo | locality |
| 223016 NOVY DVOR | postcode + post office name |
| Minsk | District name of district |
| Minsk | Region name of region |
| BELARUS | Country |
\[%example-start%\]
\[%example-json%\]
"address" : {
"line" : \["Rue Lougoraïa 12, app. 10"\],
"city" : "Korolevo",
"district" : "Minsk",
"state" : "Minsk",
"country" : "BELARUS"
}
\[%example-end%\]
| Protea Apt 12 | apartment number |
| --- | --- |
| 22 Ally Hassan Mwinyi | premise + street |
| 14111 MSASANI | postcode + locality |
| DAR ES SALAM | province |
| TANZANIA | country |
\[%example-start%\]
\[%example-json%\]
"address" : {
"line" : \["Protea Apt 12", "22 Ally Hassan Mwinyi"\],
"city" : "MSASANI",
"state" : "DAR ES SALAM",
"postalCode" : "14111",
"country" : "TANZANIA"
}
\[%example-end%\]
| 15 Shiri | premise + sub-locality 2 |
| --- | --- |
| Kimashuku Village | sub-locality |
| 25204 MACHAME KUSINI | postcode + locality |
| HAI | sub-province |
| KILIMANJARO | province |
| TANZANIA | country |
\[%example-start%\]
\[%example-json%\]
"address" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueCode" : "Kimashuku Village"
}\],
"line" : \["15 Shiri"\],
"city" : "MACHAME KUSINI",
"district" : "HAI",
"state" : "KILIMANJARO",
"postalCode" : "25204",
"country" : "TANZANIA"
}
\[%example-end%\]
| 705-1104 | building number + door |
| --- | --- |
| 56, Dalgubeol-daero 323beon-gil, Suseong-gu | street |
| Daegu | city |
| Rep. OF KOREA | country |
| 706-907 | postcode |
\[%example-start%\]
\[%example-json%\]
"address" : {
"line" : \["705-1104", "56, Dalgubeol-daero 323beon-gil, Suseong-gu"\],
"city" : "Daegu",
"country" : "Rep. OF KOREA",
"postalCode" : "706-907"
}
\[%example-end%\]
| 3F | building floor |
| --- | --- |
| 42, Toegye-ro 77beon-gil | street |
| Chuncheon-si | city |
| Gangwon-do | province |
| Rep. OF KOREA | country |
| 200-066 | postcode |
\[%example-start%\]
\[%example-json%\]
"address" : {
"line" : \["3F", "42, Toegye-ro 77beon-gil"\],
"city" : "Chuncheon-si",
"state" : "Gangwon-do",
"country" : "Rep. OF KOREA",
"postalCode" : "200-066"
}
\[%example-end%\]
| Ga-B101 | building number + door |
| --- | --- |
| 136, Sesil-ro | street |
| Busan | city |
| Rep. OF KOREA | country |
| 612-837 | postcode |
\[%example-start%\]
\[%example-json%\]
"address" : {
"line" : \["Ga-B101", "136, Sesil-ro"\],
"city" : "Busan",
"country" : "Rep. OF KOREA",
"postalCode" : "612-837"
}
\[%example-end%\]
Some of the extensions that provide further analysis of the parts of the address require duplication of address content.
\[%example-start%\]
\[%example-json%\]
"address" : {
"line" : \["Care of: Dr Smith", "123 Somewhere Street NW"\],
"\_line" : \[{
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-careOf",
"valueString" : "Dr. Smith"
},{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber",
"valueString" : "123"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase",
"valueString" : "Somewhere"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase",
"valueString" : "Street"
}, {
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase",
"valueString" : "NW"
}\]
}\]
}
\[%example-end%\]
In some case, this may mean that the extension repeats the full value of the address line. However, this is not a given for all lines of the specified type in all jurisdictions, and thus the convention of repeating the 'part' of the line that applies in the extension, even if it might be the whole line.
### ContactPoint
See also [Base Definition](datatypes#ContactPoint), [Detailed Descriptions](datatypes-definitions#ContactPoint), [Mappings](datatypes-mappings#ContactPoint), [Profiles](datatypes-profiles#ContactPoint) and [Extensions]([%extensions-location%]extensions-datatypes#ContactPoint)
**Example**
Home phone number:
\[%example-start%\]
\[%example-json%\]
"telecom" : {
"system" : "phone",
"value" : "(555) 675 5745",
"use" : "home"
}
\[%example-end%\]
In ISO 21090, [CDA](http://www.hl7.org/implement/standards/product_brief.cfm?product_id=7) and other [HL7 v3](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=186) specifications, the TEL datatype requires that the telephone number be represented as a formal URI in [RFC 3166](http://www.ietf.org/rfc/rfc3966.txt) syntax. Many CDA documents violate this rule, since the telephone numbers are not collected from the user in conformance with the underlying rules (particularly around extensions, notes about use, etc.), so the base FHIR type does not require the phone number to be conformant. An ISO 21090 extension can be used to convey this if desired:
**Example**
Formally correct URI:
\[%example-start%\]
\[%example-json%\]
"telecom" : {
"extension" : \[{
"url" : "http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address",
"valueUri" : "tel:+15556755745"
}\],
"system" : "phone",
"value" : "(555) 675 5745",
"use" : "home"
}
\[%example-end%\]
### Timing
See also [Base Definition](datatypes#Timing), [Detailed Descriptions](datatypes-definitions#Timing), [Mappings](datatypes-mappings#Timing), [Profiles](datatypes-profiles#Timing) and [Extensions]([%extensions-location%]extensions-datatypes#Timing)
**Example**
A series of appointments for radiotherapy:
\[%example-start%\]
\[%example-json%\]
"schedule" : {
"event" : \["2012-01-07T09:00:00+10:00", "2012-01-14T09:00:00+10:00", "2012-01-22T11:00:00+10:00"\]
}
\[%example-end%\]
BID (twice a day) (no start or end specified):
\[%example-start%\]
\[%example-json%\]
"schedule" : {
"repeat" : {
"frequency" : "2",
"period" : "1",
"periodUnit" : "d"
}
}
\[%example-end%\]
1/2 an hour before breakfast for 10 days from 23-Dec 2011:
\[%example-start%\]
\[%example-json%\]
"schedule" : {
"repeat" : {
"boundsPeriod" : {
"start" : "2011-12-23",
"end" : "2012-01-02"
},
"when" : \["ACM"\],
"offset" : "30"
}
}
\[%example-end%\]
Note that the end date is inclusive like the end date of a Period.
TID, for 14 days:
\[%example-start%\]
\[%example-json%\]
"schedule" : {
"repeat" : {
"boundsDuration" : {
"value" : "14",
"unit" : "d",
"system" : "http://unitsofmeasure.org",
"code" : "d"
},
"frequency" : "3",
"period" : "1",
"periodUnit" : "d"
}
}
\[%example-end%\]
BID, start on 7/1/2015 at 1:00 PM:
\[%example-start%\]
\[%example-json%\]
"schedule" : {
"repeat" : {
"boundsPeriod" : {
"start" : "2015-07-01T13:00:00"
},
"frequency" : "2",
"period" : "1",
"periodUnit" : "d"
}
}
\[%example-end%\]
Take just once, with no specified time
\[%example-start%\]
\[%example-json%\]
"schedule" : {
"repeat" : {
"count" : "1"
}
}
\[%example-end%\]
### RelativeTime
See also [Base Definition](datatypes#RelativeTime), [Detailed Descriptions](datatypes-definitions#RelativeTime), [Mappings](datatypes-mappings#RelativeTime), [Profiles](datatypes-profiles#RelativeTime) and [Extensions]([%extensions-location%]extensions-datatypes#RelativeTime)
**Example**
Start a treatment the day after surgery:
\[%example-start%\]
\[%example-json%\]
{
"contextCode" : {
"coding" : \[{
"system" : "http://snomed.info/sct",
"code" : "38102005",
"display" : "Removal of gallbladder"
}\]
},
"offsetDuration" : {
"value" : 1,
"system" : "http://unitsofmeasure.org",
"code" : "d"
}
}
\[%example-end%\]
### Signature
See also [Base Definition](datatypes#Signature), [Detailed Descriptions](datatypes-definitions#Signature), [Mappings](datatypes-mappings#Signature), [Profiles](datatypes-profiles#Signature) and [Extensions]([%extensions-location%]extensions-datatypes#Signature)
**Example**
\[%example-start%\]
\[%example-json%\]
"signature" : {
"type" : \[{
"system" : "urn:iso-astm:E1762-95:2013",
"code" : "1.2.840.10065.1.12.1.1",
"display" : "Author's Signature"
}\],
"when" : "2022-02-08T10:16:32.000+10:00",
"who" : {
"reference" : "Practitioner/example"
},
"targetFormat" : "application/fhir+xml",
"data" : "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPEVudmVsb3BlIHhtbG5zPSJ1cm46ZW52ZWxvcGUiPgogIDxTaWduYXR1cmUgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPgogICAgPFNpZ25lZEluZm8+CiAgICAgIDxDYW5vbmljYWxpemF0aW9uTWV0aG9kIAogICAgICAgICAgIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMteG1sLWMxNG4tCjIwMDEwMzE1I1dpdGhDb21tZW50cyIvPgogICAgICA8U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS8KeG1sZHNpZyNkc2Etc2hhMSIvPgogICAgICA8UmVmZXJlbmNlIFVSST0iIj4KICAgICAgICA8VHJhbnNmb3Jtcz4KICAgICAgICAgIDxUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5Lwp4bWxkc2lnI2VudmVsb3BlZC1zaWduYXR1cmUiLz4KICAgICAgICA8L1RyYW5zZm9ybXM+CiAgICAgICAgPERpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkvCnhtbGRzaWcjc2hhMSIvPgogICAgICAgIDxEaWdlc3RWYWx1ZT51b29xYldZYTVWQ3FjSkNidXltQktxbTE3dlk9PC9EaWdlc3RWYWx1ZT4KICAgICAgPC9SZWZlcmVuY2U+CiAgICA8L1NpZ25lZEluZm8+CjxTaWduYXR1cmVWYWx1ZT4KS2VkSnVUb2I1Z3R2WXg5cU0zazNnbTdrYkxCd1ZiRVFSbDI2UzJ0bVhqcU5ORDdNUkd0b2V3PT0KICAgIDwvU2lnbmF0dXJlVmFsdWU+CiAgICA8S2V5SW5mbz4KICAgICAgPEtleVZhbHVlPgogICAgICAgIDxEU0FLZXlWYWx1ZT4KICAgICAgICAgIDxQPgovS2FDem80U3lyb203OHozRVE1U2JiQjRzRjdleTgwZXRLSUk4NjRXRjY0QjgxdVJwSDV0OWpRVHhlCkV1MEltYnpSTXF6VkRaa1ZHOXhEN25OMWt1Rnc9PQogICAgICAgICAgPC9QPgogICAgICAgICAgPFE+bGk3ZHpEYWN1bzY3Smc3bXRxRW0yVFJ1T01VPTwvUT4KICAgICAgICAgIDxHPlo0UnhzbnFjOUU3cEdrbkZGSDJ4cWFyeVJQQmFRMDFraHBNZExSUW5HNTQxQXd0eC8KWFBhRjVCcHN5NHBOV01PSENCaU5VME5vZ3BzUVc1UXZubE1wQT09CiAgICAgICAgICA8L0c+CiAgICAgICAgICA8WT5xVjM4SXFyV0pHMFYvCm1aUXZSVmkxT0h3OVpqODRuREM0ak84UDBheGkxZ2I2ZCs0NzV5aE1qU2MvCkJySVZDNThXM3lkYmtLK1JpNE9LYmFSWmxZZVJBPT0KICAgICAgICAgPC9ZPgogICAgICAgIDwvRFNBS2V5VmFsdWU+CiAgICAgIDwvS2V5VmFsdWU+CiAgICA8L0tleUluZm8+CiAgPC9TaWduYXR1cmU+CjwvRW52ZWxvcGU+IA=="
}
\[%example-end%\]
### Annotation
See also [Base Definition](datatypes#Annotation), [Detailed Descriptions](datatypes-definitions#Annotation), [Mappings](datatypes-mappings#Annotation), [Profiles](datatypes-profiles#Annotation) and [Extensions]([%extensions-location%]extensions-datatypes#Annotation)
**Example**
\[%example-start%\]
\[%example-json%\]
"Annotation" : {
"authorReference" : {
"reference" : "Patient/example"
},
"time" : "2022-02-08T10:18:14.034+10:00",
"text" : "I don't think that this is true, or what I said, and it should be corrected"
}
\[%example-end%\]
\[%file newfooter%\] try { var currentTabIndex = sessionStorage.getItem('fhir-example-tab-index'); } catch(exception){ } if (!currentTabIndex) currentTabIndex = '0'; \[%example-init%\] function store(currentTab) { try { sessionStorage.setItem('fhir-resource-tab-index', currentTab); } catch(exception){ } \[%example-change%\] document.activeElement.blur(); }