Elements and data types
The Health Data Exchange Map (FHIR): Elements and data types.
Same patterns, reused everywhere
A resource is made of elements. The elements are not invented one by one. They are built from datatypes, which are reusable patterns.
Primitive and complex types
The specification defines five categories of datatype. The two you meet first are primitive types and general purpose complex types. Primitive types are single elements with a value, such as boolean, date, date time and code. Complex types are reusable clusters of elements, such as coding, codeable concept, quantity, period and identifier. The others are base abstract types, metadata types, and special purpose types such as reference and extension.
A CodeableConcept holds codes and text
Take the codeable concept. It is a concept, referenced to a terminology or just text. It has a coding element: zero or more codes defined by terminology systems. And it has a text element: at most one plain text version. Systems often need to exchange several codes, and the original text, so the type holds both.
- coding (0..) · Codes from terminologies · tag
- text (0..1) · A plain text version · text
Dates can be partial
A primitive up close: the date type allows partial dates. A year alone, such as 2018. A year and month, such as 1973 06. Or a full date, such as 1905 08 23. A date carries no timezone offset.
- Year only · 2018 · A year alone. · calendar
- Year and month · 1973-06 · Adds the month. · calendar
- Full date · 1905-08-23 · Adds the day. · calendar
Cardinality: how often an element appears
Every element states how many times it may appear. Zero to one means optional, at most one, like a patient's birth date. Zero to many means any number, including none, like a patient's names. And one to one means required, exactly one, like the type of a bundle.
- 0..1 · at most one · for example, Patient birthDate · tag
- 0.. · any number · for example, Patient name · people
- 1..1 · exactly one · for example, Bundle type · lock
A CodeableConcept, as data
Here is a line on a form: the words chest pain, and a code written beside them. Turn it over. This is a codeable concept as data. Coding is a list: zero or more codes. Each has a system, here a made up address, and a code from that system. And text holds the words as written, at most one version. The code system and code are made up for teaching.
Check yourself
Pause and think. What does the cardinality zero to many mean for an element? The answer: it may appear any number of times, including none.
- It may appear any number of times, including none
- It must appear exactly once
- It may appear at most once
- It must appear at least once
Keep these in mind
Elements are built from reusable datatypes. Primitive types hold one value, and complex types are clusters. A codeable concept can carry codes and plain text. And cardinality says how many times an element appears.
- Elements are built from reusable datatypes
- Primitive types hold one value; complex types are clusters
- A CodeableConcept can carry codes and plain text
- Cardinality says how many times an element appears
SNOMED CT®, LOINC®, ICD और अन्य terminologies अपने-अपने स्वामियों की संपत्ति हैं और लाइसेंस के अंतर्गत केवल शिक्षा के लिए दिखाई गई हैं। लाइसेंस और attributions