Inferensys

Glossary

FHIR Data Type

A reusable, complex building block in FHIR, such as CodeableConcept or Identifier, that defines the structure of a common data pattern used across many resources.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
COMPLEX DATA STRUCTURES

What is FHIR Data Type?

A FHIR data type defines a reusable, structured pattern of data elements that can be used as a building block across multiple FHIR resources, ensuring consistency for common patterns like identifiers, human names, and coded concepts.

A FHIR Data Type is a formal specification for a complex, reusable data structure that standardizes how a common pattern of information is represented across all FHIR resources. Unlike a FHIR Resource, a data type does not stand alone; it exists only as a component within a resource. Examples include the CodeableConcept for representing coded text, the Identifier for business identifiers, and the HumanName for parsing name parts. These types define the structural grammar for healthcare data exchange.

Data types enforce rigorous constraints on primitive values, such as limiting string lengths or defining precision for decimals. They are the mechanism by which FHIR achieves syntactic consistency, ensuring that an Address or a Period is represented identically whether it appears in a Patient resource or a Location resource. This reusability is fundamental to the 80/20 rule of the FHIR specification, allowing implementers to compose complex clinical documents from a small set of well-understood, validated building blocks.

BUILDING BLOCKS

Key Characteristics of FHIR Data Types

FHIR data types are reusable, complex structures that define common data patterns—like identifiers, quantities, and coded concepts—used consistently across all FHIR resources to ensure semantic interoperability.

01

Complex Value Encapsulation

Unlike simple primitives, FHIR data types bundle multiple related elements into a single logical unit. For example, a Quantity data type carries both a numerical value and a unit of measure, preventing the ambiguity that arises when these are stored as separate, disconnected fields. This encapsulation ensures that meaning is preserved when data moves between systems.

02

CodeableConcept: Human & Machine Readability

The CodeableConcept data type is the primary mechanism for representing coded clinical concepts. It contains an array of coding elements, each linking to a specific CodeSystem (like SNOMED CT or LOINC), alongside a text field for the human-readable description. This dual representation allows systems to process structured codes while preserving the original narrative for display.

03

Identifier: Cross-System Uniqueness

The Identifier data type provides a structured way to represent business identifiers, such as a Medical Record Number or a National Provider Identifier. It combines a value with a system URI that defines the identifier's namespace, ensuring global uniqueness. This prevents collisions when integrating data from multiple healthcare organizations.

04

HumanName: Parsed Name Components

Rather than storing a name as a single string, the HumanName data type breaks it down into discrete, searchable components:

  • family for surname
  • given for first and middle names
  • prefix and suffix for titles and credentials This granular structure supports accurate patient matching and international name formatting.
05

Period & Timing: Temporal Precision

FHIR uses dedicated data types to handle time with clinical precision. Period defines a span with explicit start and end timestamps. Timing is more complex, handling recurring events with a structured repeat element that defines frequency, period, and bounds. This allows precise modeling of medication schedules and encounter durations.

06

Extension: The Built-in Escape Hatch

Every FHIR data type and resource can be extended using the Extension mechanism without breaking conformance to the base specification. An extension is itself a data type containing a url that defines its meaning and a value[x] that holds the custom data. This allows implementers to add domain-specific information, such as a patient's preferred language for communication, where no standard element exists.

TYPE SYSTEM COMPARISON

Primitive vs. Complex Data Types

Structural comparison of FHIR's two fundamental data type categories, contrasting their value representation, internal complexity, and usage patterns across resources.

FeaturePrimitive TypesComplex Types

Value Representation

Single scalar value

Composed of multiple elements

Internal Structure

Atomic, no child elements

Hierarchical, contains nested elements

String Example

"Smith" (string type)

HumanName with family, given, prefix

Has Extensions

Has an 'id' Attribute

Direct JSON Representation

JSON string, number, or boolean

JSON object with nested properties

XML Representation

XML attribute or text content

XML element with child elements

Common Use Case

Simple values like booleans, integers, dates

Structured data like CodeableConcept, Identifier, Address

BUILDING BLOCKS

Common Complex FHIR Data Types

FHIR defines a library of reusable, complex data types that structure common patterns like identifiers, human names, and coded concepts. These types ensure consistency across all FHIR resources.

01

CodeableConcept

The primary type for representing coded clinical data. It allows a concept to be described using multiple codings from different terminologies simultaneously, along with a plain text representation.

  • coding: An array of Coding elements, each specifying a system (e.g., http://snomed.info/sct) and a code.
  • text: A human-readable string, essential when no suitable code exists.
  • Mechanism: Enables terminology translation by sending a SNOMED CT code and an ICD-10-CM code for the same diagnosis in one field.
02

Identifier

A structured data type used to uniquely identify a real-world entity, such as a patient's medical record number or a national provider identifier. It binds an identifier value to a specific system and assigns a use context.

  • system: A URI that defines the namespace for the identifier (e.g., urn:oid:2.16.840.1.113883.4.1 for NPI).
  • value: The actual identifier string.
  • use: A code specifying the context, such as usual, official, temp, or secondary.
03

HumanName

A complex type for representing human names with full internationalization support. It parses a name into its constituent parts rather than treating it as a single string, enabling reliable indexing and display.

  • Parts: Includes family, given, prefix, and suffix elements.
  • Period: Allows tracking of name changes over time with an effective date range.
  • use: Indicates the context, such as official, usual, maiden, or anonymous.
04

Address

A data type for representing postal addresses with global applicability. It supports both structured components and a formatted text representation for systems that cannot parse the individual parts.

  • Structured Parts: Includes line, city, district, state, postalCode, and country.
  • type: Distinguishes between postal, physical, and both.
  • use: Specifies context like home, work, temp, or old.
05

Period

A simple but critical type that defines a time interval with a start and an end boundary. It is used across resources to specify durations for events, names, addresses, and clinical observations.

  • Boundaries: Both start and end are optional, allowing for open-ended intervals.
  • Precision: Boundaries are dateTime values, supporting varying precision from year down to second.
  • Usage: Found in Observation.effectivePeriod, Patient.name.period, and MedicationRequest.dispenseRequest.validityPeriod.
06

Quantity

A measured amount with a numeric value and a coded unit. It is the foundation for representing lab results, vital signs, and medication dosages, ensuring semantic interoperability of measurements.

  • value: A decimal number.
  • unit: A human-readable representation of the unit (e.g., mg/dL).
  • system and code: A machine-processable UCUM code (e.g., mg/dL as mg/dL).
  • Comparator: Optional operators like <, >, <=, >= for ranges.
FHIR DATA TYPE CLARIFICATIONS

Frequently Asked Questions

Clear, technical answers to common questions about the structure, purpose, and application of FHIR data types in healthcare interoperability.

A FHIR data type is a reusable, complex building block that defines the structure of a common data pattern, such as CodeableConcept or Identifier, used across many resources. A FHIR Resource, in contrast, is a discrete, modular unit of data representing a complete clinical or administrative concept, like Patient or Observation. The key distinction is scope and independence: a resource is a standalone entity with its own identity and lifecycle, while a data type is a dependent component that provides a consistent structure for elements within a resource. For example, the Patient.name element uses the HumanName data type, and Patient.identifier uses the Identifier data type. Data types ensure structural consistency across the entire FHIR specification without duplicating definitions.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.