Back to all articles
HealthcareHealthTech

FHIR Resources Explained: Types, Structure and Examples

Alex MorganNovember 30, 202619 min read

Learn FHIR resources step by step: what each resource type holds, how IDs, references and extensions work, and how to choose the right ones.

FHIR Resources Explained: Types, Structure and Examples

The HL7 FHIR standard expanded from 49 resources in its early draft to 145 resources in the release history documented by the Office of the National Coordinator for Health Information Technology, and the 2020 ONC 21st Century Cures Act Final Rule established FHIR R4 as the required standard for certified health IT APIs in the United States. Developers building EHR integrations often hit mapping errors because they treat base FHIR resources as a complete contract, overlooking where a regional profile, target server, or local data model adds stricter rules.

A FHIR resource is a typed, independently addressable unit of healthcare information exchanged over standard REST APIs. This guide breaks down how resources are structured, which core types carry clinical and administrative records, how US Core profiles and Bundles govern exchanges, and how to verify server and profile constraints before you map a single field.

What FHIR resources are and where they come from

Under the permanent HL7 FHIR R4 specification (version 4.0.1), a resource is a distinct, addressable unit of healthcare data, such as Patient, Observation, Encounter, or MedicationRequest, as defined in the HL7 FHIR R4 Resource specification. The FHIR REST API applies standard interactions (read, create, update, delete, search, and history) directly to each resource type. Because every type specifies its own element tree, identifiers, references, cardinalities, datatypes, and search behavior, your integration can't treat FHIR as one flat database schema.

FHIR R4 defines more than 140 resource types, cataloged in the HL7 FHIR R4 Resource List. Published in 2019, R4 was the first release to include normative content alongside trial-use resources. Core building blocks such as Patient, Observation, the RESTful API, and the XML and JSON representations became normative in R4, giving engineering teams stable structures that avoid breaking changes.

The diagram below shows how clinical systems connect through modular FHIR R4 resource types rather than monolithic records.

An infographic illustrating FHIR R4 healthcare data standards connecting various clinical systems to patient, observation, medication, and practitioner resources.

How modular resources differ from legacy messaging

Earlier hospital interfaces rely on pipe-delimited HL7 v2 event messages where positional segments bundle patient demographics, visit details, and results into a single string; our overview of FHIR compared to HL7 v2 details how those transport models diverge. FHIR separates each clinical or administrative entity into its own HTTP-addressable resource with explicit JSON or XML keys.

What the base specification fixes and what it leaves open

Every element in a resource sits inside three layers of decision, and mapping errors usually come from confusing them. The base R4 definition fixes the element names, datatypes, and minimum cardinalities for each type. A published profile can tighten those rules further, and an individual server or local data model can impose additional behavior on top. Before mapping any field, check each layer:

  • Base R4 defines: the element tree, datatypes, reference targets, and the floor cardinality for every element in each resource type.
  • A profile decides: whether optional elements become required, which terminology bindings apply, and which extensions must appear.
  • A server or local data model decides: which resource types and interactions it supports, how it resolves references, and what it accepts or rejects at write time.

Once you sort a constraint into the right layer, you can describe what a resource holds and match any clinical fact to its intended resource type before reading an endpoint's payload.

IDs, meta, elements, references and extensions

Every FHIR resource shares a predictable structural envelope defined in the HL7 FHIR Resource definition. Understanding these common building blocks prevents identity collisions, lost updates, and brittle data models across EHR servers.

  1. The resourceType field is a required string (1..1) that declares the exact type of the payload, such as "Patient" or "Observation". Parsers and validators read this key first to apply the right schema.
  2. The id element holds the server-assigned logical identifier, forming a location-based address such as [base]/[resourceType]/[id]. Because a logical id can change whenever a resource is copied or migrated between servers, never treat it as a permanent cross-system primary key.
  3. The meta object stores infrastructure-managed interoperability metadata, including versionId, lastUpdated, profile, security, and tag. Application code should treat meta as server and governance context rather than clinical content.
  4. The identifier array carries stable business identifiers, such as a medical-record number or lab accession number, each paired with a system URI and a value. Always persist and reconcile business identifiers separately from FHIR logical IDs.
  5. Typed elements hold the domain data, each governed by a cardinality (0..1, 1..1, 0..*, or 1..*) and a primitive or complex datatype such as CodeableConcept, Reference, or Period.
  6. References connect resources into a graph through Reference elements like subject or patient, pointing to another resource with a relative value such as "Patient/example-patient-001" that resolves on the server.
  7. Extensions carry local or jurisdiction-specific fields missing from the base resource. Each extension pairs a url pointing to its published definition with a typed value[x] element (or nested sub-extensions).

Hypothetical Patient resource and linked query

The hypothetical JSON example below uses fake data to show how logical identity, version metadata, business identifiers, and demographics sit together in a single R4 Patient resource.

{
  "resourceType": "Patient",
  "id": "example-patient-001",
  "meta": {
    "versionId": "1"
  },
  "identifier": [
    {
      "system": "http://example.org/fhir/mrn",
      "value": "EX-0001"
    }
  ],
  "name": [
    {
      "family": "Example",
      "given": ["Jane"]
    }
  ],
  "gender": "female",
  "birthDate": "1980-04-12",
  "telecom": [
    {
      "system": "phone",
      "value": "555-0100"
    }
  ]
}

Other clinical resources link back to this record without duplicating demographics. A blood pressure Observation, for example, sets subject.reference to "Patient/example-patient-001" so any client can traverse from the reading to the patient.

To retrieve all observations tied to this hypothetical patient, a client issues a standard REST search:

GET [base]/Observation?patient=Patient/example-patient-001

The server responds with a searchset Bundle containing matching Observation entries. Exact search parameter names like patient aren't guessed from JSON element paths; they're defined explicitly in the Search Parameters table on each resource's R4 specification page.

Resource categories and how the specification groups them

The official R4 resource list arranges resources into thematic families to help readers orient themselves. Treat those groupings as a navigation aid rather than a rigid programming hierarchy, because group headings can change between FHIR releases and should always be checked on the live specification page before citing them.

In day-to-day integration work, developers organize resources into four functional buckets:

  • Clinical resources (Patient, Observation, Condition, and AllergyIntolerance) record who receives care and what clinicians measured, diagnosed, or noted about them.
  • Administrative and workflow resources (Practitioner, Encounter, and Appointment) capture who delivered care, where it occurred, and when visits were scheduled or completed.
  • Financial resources (Coverage and Claim) represent insurance coverage and claims records. This guide focuses strictly on technical data modeling and provides no billing advice.
  • Infrastructure and conformance resources (Bundle, CapabilityStatement, and StructureDefinition) govern message packaging, server capabilities, and profile rules. Conformance resources describe rules and system contracts, so developers inspect them during integration rather than writing patient records into them.

Two-step lookup for unfamiliar concepts

When a workflow requires a clinical or operational concept you haven't modeled before, avoid guessing a resource name or stuffing data into Observation. Follow a quick lookup sequence instead:

  1. Search the R4 resource list for the concept name or closest healthcare term to locate candidate types.
  2. Open each candidate's specification page and read its Scope and Usage section alongside its element table before choosing it.

Commonly used resources and what each one holds

Most healthcare integrations rely heavily on a compact subset of core types. Use the table below as a starting reference for the eight resources developers encounter first. Everything in it comes from the base R4 specification: it tells you which elements exist on each resource, but not which ones you must populate. Cardinalities, required bindings, and mandatory fields are decided by the profile you implement, the server you connect to, and your local data model, so confirm those constraints on the corresponding specification and profile pages before writing code.

Resource What it holds Key elements
Patient Demographics and identity of the person receiving care identifier, name, gender, birthDate, address, telecom
Practitioner Clinicians and other people who provide care identifier, name, qualification, telecom, communication
Encounter A single interaction or episode of care status, class, type, subject, participant, period, location
Observation Measurements, vital signs, lab results and assessments status, category, code, subject, effective[x], value[x], referenceRange
Condition Problems, diagnoses and health concerns clinicalStatus, verificationStatus, category, code, subject, onset[x]
MedicationRequest An order or prescription for a medication status, intent, medication[x], subject, requester, dosageInstruction
AllergyIntolerance A recorded allergy or intolerance and its reactions clinicalStatus, verificationStatus, code, patient, reaction, criticality
DiagnosticReport A report that groups results, such as a lab panel or imaging read status, category, code, subject, effective[x], issued, result, conclusion

Adoption data shows how common these interfaces have become. The ONC 2026 Annual Meeting interoperability briefing reports that the share of hospitals with FHIR-based APIs implemented rose from 84% in 2019 to 93% in 2024, and that 85% of digital health companies surveyed in 2022 reported using FHIR, although not every API they connect to is FHIR-based.

The practical lesson: standard authorization and reusable resource interfaces stop being optional as soon as an app expands beyond a single EHR environment, because the same handful of resource types will be read and written at every new site.

Separating neighboring resources

New FHIR developers frequently mix up adjacent types that share similar vocabulary. Medication and MedicationRequest cause the most confusion: Medication defines the pharmaceutical product itself (ingredients, form, and codes), whereas MedicationRequest represents an actual clinical order or prescription instructing a patient to take that product.

When choosing between neighboring clinical resources, anchor your decision on the clinical question being recorded:

  • A patient's ongoing problem, diagnosis, or health concern maps to Condition.
  • A discrete visit, inpatient stay, or telehealth interaction maps to Encounter.
  • An individual measurement, vital sign, or lab analyte value maps to Observation.
  • A formal report that bundles individual results with an overall interpretation maps to DiagnosticReport.

A concrete example makes the split easier to apply. Take a patient-facing tool such as the clinic AI assistant: when a patient asks for a slot with their clinician, that request belongs in administrative scheduling resources such as Appointment (and, once the visit happens, Encounter), while a symptom the patient describes in the same chat is clinical content that maps to Observation or, once diagnosed, Condition. One conversation, two different resource families. Keeping that boundary clean in the mapping layer is what lets the same backend serve both the front desk schedule and the clinical record without either one polluting the other.

Profiles and US Core requirements for US implementations

Base FHIR resources are intentionally permissive so they can work across countries and specialties. A profile is a StructureDefinition resource that constrains a base resource for a specific jurisdiction or workflow. Profiles tighten cardinalities to make optional elements mandatory, prohibit unused fields, bind coded elements to required value sets, and attach standardized extensions.

That distinction creates a common integration failure: an Observation payload can pass base R4 validation cleanly while still failing a regional profile because a required category, code, performer, or value[x] element is missing.

The illustration below contrasts an unconstrained base Patient resource against the tighter rules applied by a US Core profile.

An infographic illustration showing the relationship between a base FHIR Patient resource and a US Core Patient profile.

For United States deployments, the HL7 US Core Implementation Guide defines the profile requirements for core resources and supports the United States Core Data for Interoperability (USCDI). Under ONC/ASTP certification rules as of 2026, USCDI version 3 serves as the baseline for certified health IT from January 1, 2026.

When reading US Core profiles, pay close attention to Must Support elements alongside mandatory cardinalities (1..1 or 1..*). A mandatory element must always appear in a valid instance, while a Must Support element means the system must be capable of populating, storing, or displaying that element when the data exists. Always verify the exact US Core version cited in the target implementation guide, because element rules evolve across versions.

Three checks that prove profile conformance

Relying on a vendor's verbal claim of FHIR compatibility leaves semantic gaps undetected until production testing. Our Epic FHIR API guide shows what these checks look like against one major EHR. Verify conformance through three technical checks:

  1. Inspect meta.profile on sample instances to see which canonical profile URLs the sender declares.
  2. Query the server's CapabilityStatement (GET [base]/metadata) to confirm which profiles, interactions, and search parameters the endpoint actively supports. If you are still choosing a server, our FHIR server comparison covers what each option declares.
  3. Run automated validation against the declared profile and its terminology bindings, rather than stopping at base R4 JSON syntax validation.

Certification scopes and regulatory obligations vary by product role, so confirm compliance requirements with qualified regulatory and legal advisors.

How Bundles group resources in one exchange

Many clinical workflows need to move several related resources together instead of issuing isolated HTTP calls. A Bundle is itself a FHIR resource that wraps multiple resources inside its entry array. Each entry can carry a fullUrl, the embedded resource, and HTTP request or response details when submitted to a server for processing.

The illustration below shows how a single Bundle packages multiple resource cards for exchange between systems.

A hand-drawn illustration showing a FHIR Bundle grouping healthcare resource cards for data exchange.

FHIR defines specific Bundle.type values that dictate how servers and clients handle the enclosed entries:

  1. transaction processes all entries as a single atomic unit, so every entry succeeds or the entire group rolls back.
  2. batch executes each entry independently, allowing valid operations to succeed even if another entry fails.
  3. searchset returns query matches from a REST search and marks each item with entry.search.mode.
  4. history lists prior resource versions returned from a history interaction.
  5. document packages a complete, self-contained clinical document that starts with a Composition resource.
  6. message supports event-driven messaging workflows beginning with a MessageHeader resource.
  7. collection groups resources together with no special server-side processing rules.

Hypothetical transaction flow and failure handling

Consider a hypothetical clinic intake integration that needs to write one new Encounter and two linked Observation records for an existing Patient in a single request. Because the new Encounter doesn't have a server-assigned logical id yet, the client assigns it a temporary fullUrl using a urn:uuid: placeholder inside the transaction Bundle. Both Observation entries then set their encounter.reference to that exact urn:uuid: value, and all three resources reference the existing Patient/[id].

When the FHIR server commits the transaction, it mints permanent logical IDs for the new records and automatically rewrites every matching urn:uuid: reference to the permanent Encounter/[id] path. If one Observation fails profile validation, the server rejects the entire transaction and writes nothing, so the client must fix the error and retry the full Bundle. Designing idempotent retries and clear failure boundaries is a core piece of reliable EHR integration API architecture.

Choosing the right resources for a use case

Resource selection is a layered decision. Some constraints come from the base specification, some come from a published profile such as US Core, and some are choices your target server or local data model makes. Mapping goes wrong when a team treats one layer as if it covered the others, so the safest workflow checks each layer in order:

  1. Name the exact clinical or administrative fact your software needs to read or persist.
  2. Match that fact to a resource type from the core reference table by asking whether it represents a state, an event, a measured result, an order, or a grouped report.
  3. Open the R4 resource page and any required profile, such as US Core, to confirm mandatory cardinalities and Must Support elements. The resource page defines what the base standard offers; the profile narrows it down to what an implementation must carry.
  4. Map fields into base elements first. Introduce an extension only when no base element fits, and always reference a published extension definition URL.
  5. Confirm that the target server declares the resource type, profile, and required search parameters in its CapabilityStatement before coding the client, because that declaration is the server-side part of the contract.

Mapping mistakes to avoid

A payload can pass every syntax check and still misbehave in production. Three defects account for much of that damage:

  • Mutable identity keys. Using patient name or birth date as an identity key causes duplicate records after legal name updates; store and match on a business identifier carrying both system and value.
  • Codes trapped in display text. Writing a local code strictly into free-text display breaks downstream analytics and profile validation; populate CodeableConcept.coding with a code from a published code system.
  • Status-blind medication reads. Reading medication orders without checking MedicationRequest.status surfaces canceled or entered-in-error prescriptions as active therapy; filter on status fields on every read.

None of these are syntax errors. Each one is a modeling decision the base specification permits but the integration contract forbids, which is why passing validation against FHIR R4 structure alone is not enough.

In regulated workflows, the required resources and profiles come directly from federal rules and their associated implementation guides rather than from local preference. Under the CMS Interoperability and Prior Authorization final rule, finalized on January 17, 2024, impacted payers must implement and maintain an HL7 FHIR Prior Authorization API built on FHIR Release 4.0.1 to expose covered items and services, identify documentation requirements, and support electronic prior-authorization requests and responses. The same rule sets the principal API compliance timeline for January 1, 2027 for most payers, with exact dates varying by payer type and requirement.

Exposing a generic FHIR endpoint does not satisfy that rule. Teams building healthcare interoperability integrations collect concrete delivery evidence: supported implementation-guide versions, CapabilityStatement declarations, conformance test outputs, and payer-validated request and response fixtures.

Resource boundaries also govern access control. Under the SMART on FHIR scopes specification, applications request granular, resource-level permissions such as patient/Observation.rs for read and search access rather than requesting unnecessary write scopes. The base FHIR standard defines the resources; the SMART layer decides who may touch each one, and your local authorization server enforces it. The guide to SMART on FHIR authorization breaks down how launch contexts and token claims enforce those scopes in practice.

Choosing the right resource, then, is never a single lookup. It is a three-part check: what the base standard defines, what the applicable profile requires, and what the target server supports. Skip any one of the three and the integration may validate today yet fail the first time a payer, auditor, or production server inspects it closely.

FHIR integration

Mapping your data to FHIR or connecting to an EHR?

We design FHIR resource mappings, validate against US Core and the target server, and build production EHR integrations with SMART on FHIR authorization.

Prefer to pick a time? Book a call directly

Conclusion

Check the contract before the first field moves. The base specification names which elements a resource may carry, and at what cardinality. A profile can tighten those rules for a jurisdiction or workflow. A server can support only part of that profile. Your local data model still decides which columns, codes, and statuses exist before anything is sent.

Take one resource you already exchange, such as Patient. Place the base definition, the profile you must satisfy, and the server's declared support beside your schema. Mark each fact as base-defined, profile-constrained, server-supported, or local-only. If a value has no place in the base resource, leave it unmapped instead of forcing it into a nearby element.

That comparison is the step to finish before you map. Ekipa AI builds FHIR and HL7 integrations, from resource mapping and profile validation to production EHR connections. If you are planning one, talk to our integration engineers.

Frequently asked questions

Which FHIR version should a new US build target?

Target FHIR R4 (version 4.0.1) for US production implementations. The 2020 ONC 21st Century Cures Act Final Rule adopted FHIR R4 for certified health IT APIs, and CMS specifies Release 4.0.1 for its Prior Authorization API standards. Newer versions such as R4B and R5 exist, so confirm the required release against applicable regulations and the target server's CapabilityStatement before starting development.

What is the difference between a resource and a profile?

A resource is the base data structure defined on the HL7 FHIR R4 resource list, such as Patient or Observation. A profile is a StructureDefinition that constrains that base resource for a specific jurisdiction or workflow, such as tightening cardinalities, fixing terminology bindings, or defining extensions in US Core. A payload can satisfy the base resource definition and still fail profile validation.

How do I stop one client from silently overwriting another client's update?

Use optimistic concurrency control with HTTP preconditions. As specified in the HL7 FHIR RESTful API documentation, a versioning server maps meta.versionId to the HTTP ETag header and meta.lastUpdated to Last-Modified. When a client sends If-Match with the ETag captured during its preceding read, the server rejects the update if another actor modified the resource in the meantime.

How do I confirm which profiles a server supports?

Read the server's CapabilityStatement at its /metadata endpoint to see which resource types, profiles, and search parameters the server declares. Validate your resource instances directly against the canonical profile listed in meta.profile, rather than relying only on base R4 schema checks. Retaining conformance validation outputs against that declared profile gives you verifiable evidence that your integration matches server expectations.

Do I always need a Bundle to write several resources?

No, single-resource REST requests (POST or PUT) remain valid whenever records can be created or updated independently. Use a transaction Bundle when linked resources, such as an Encounter and its associated Observation records, must succeed or roll back together as one unit. If you want to submit multiple independent operations in one HTTP call without all-or-nothing rollback, use a batch Bundle instead.

FHIR resource typesFHIR BundlesFHIR resourcesUS Core profilesHL7 FHIR
Share:

Related Articles

Ready to Work with Our Team?

Connect with our team to explore how AI expertise can transform your business.