Skip to content
DEXPRADEXPRA home

Guide · Interoperability

FHIR Implementation: What a Project Involves Beyond the API

A FHIR server answers its first request in an afternoon. Profiles, terminology and the implementation guide are the actual project, and none of them is the API.

DEXPRA · · 17 min read

Two hours in, something works

Nothing else in healthcare interoperability makes a good first impression. A developer who has never seen a clinical standard can point a browser at a public FHIR server, ask it for a patient by name, and get back JSON that a junior engineer could have designed. No association negotiation, no positional parsing, no reference information model to study first.

That first impression is accurate about the technology and badly misleading about the work. The API is genuinely simple, deliberately so. What is not simple is the agreement underneath it: which fields a receiver may rely on, which code systems the values come from, what a missing element means, and who is allowed to ask.

What a FHIR project involves above and below the APIAbove a waterline, the API: read, search, create and update, JSON over REST, working in an afternoon. Below the line, five larger blocks: resources and identity, where an id is a handle on one server and not a record number; search, a grammar every server implements in part; profiles, with binding strength, slicing and must support; terminology, run as a service; and implementation guides, versioned packages validated in continuous integration. A closing line says the API is a small fraction of the effort.THE APIRead, search, create, update. JSON over REST. A first requestworks in an afternoon.BELOW THE LINE: THE PROJECTRESOURCES AND IDENTITY145 resource types in R4. An id is a handle onone server, not a record number.SEARCHA grammar every server implements in part. Nota contract.PROFILESBinding strength, slicing and must support:where most of the work goes.TERMINOLOGYCodeSystem, ValueSet and ConceptMap, runas a service rather than a table.IMPLEMENTATION GUIDESVersioned packages, validated in continuous integration.The API work is a small fraction of the effort. Profiling, terminology and validation are the majority of it.
What works in an afternoon, and what the project actually is.

The optionality problem moved

Part 3 of this series set out the central weakness of HL7 v2. The standard leaves almost everything optional, so two systems can both be perfectly conformant and still be unable to exchange a usable message. The negotiation gets pushed into a per-site interface specification that nobody outside the project can read, and that is why a v2 interface is a project rather than a configuration.

FHIR did not remove that problem. It relocated it. Base resources are still permissive, and the negotiation still has to happen. What changed is where it is written down: in a published, versioned, machine-readable implementation guide rather than in a document exchanged between two vendors.

That is a real improvement, and it is worth being precise about why. A guide can be validated against automatically. It can be reused by a whole country rather than one project. It ships as an installable package with a version number. But it is not plug-and-play, and a plan that budgets for the API and not for the guide has budgeted for the wrong half of the work.

The API work is a small fraction of the effort on most FHIR projects. Profiling, terminology and validation are the majority of it. That is not a planning failure; it is what the work is.

What a resource actually is

The unit of exchange is the resource: a small, self-contained object with a type, an identity and a URL. R4 defines 145 of them. Patient, Observation, Encounter, Condition, MedicationRequest, DiagnosticReport, ServiceRequest and DocumentReference cover most of what a first project touches.

Base resources are built to a stated design rule. An element belongs in the base resource if roughly 80% of implementations everywhere in the world would use it, and everything else goes in an extension. That is why Patient has no field for ethnicity, religion or preferred ward, and it is why the base resources stayed small enough to learn in an afternoon. It is also why a base resource is almost never sufficient on its own.

The extension mechanism is the clearest single improvement FHIR made over its predecessors. An extension carries a URL that resolves to its own definition, so a receiver meeting one it has never seen can look up what it means. Set that beside the v2 Z-segment, which HL7 itself describes as opaque without prior manual explanation by the sender. Both let a site add local data; only one tells a stranger what the data is.

The identifier rule that will bite you

A resource id is not a medical record number. It is a handle assigned by one server, unique within that server and meaningless anywhere else. The same patient has a different id on every system that holds them.

One patient on three FHIR serversThree servers hold the same patient: an EHR as Patient/123, a lab system as Patient/a9f2c, and a data platform as Patient/7781. Each record carries the same business identifier, a medical record number 48213 issued under the system north.example.org/mrn. A band joining the three identifiers is marked as the link; the differing ids are marked as local handles.EHRidPatient/123↑ LOCAL HANDLEidentifiernorth.example.org/mrnvalue 48213LAB SYSTEMidPatient/a9f2c↑ LOCAL HANDLEidentifiernorth.example.org/mrnvalue 48213DATA PLATFORMidPatient/7781↑ LOCAL HANDLEidentifiernorth.example.org/mrnvalue 48213SAME PERSON: MATCH HERELink records on the identifier, system and value together. The id is a handle that one server assigned, andit means nothing anywhere else.
One patient, three servers, three ids and one identifier.

Business identifiers live in the identifier element, each carrying a system URL that names who issued it: the hospital that owns the MRN, the national scheme, the payer. This is the v2 patient identifier list with the assigning authority in a field that cannot be misread, and it is the reason cross-system matching is possible at all. Every deduplication and linkage design that starts from the resource id gets rebuilt later, usually after the duplicates are already in production.

Nine interactions, and three details

The RESTful API reached Normative status in R4 and is small enough to hold in your head. Nine interactions cover ordinary resources: read, vread, update, patch, delete, create, search, history and capabilities. Three more sit beside them: transaction, batch, and the $-prefixed operations for what REST cannot express, such as validating an instance or expanding a value set.

Call the last of the nine first. A GET on the server’s metadata endpoint returns a CapabilityStatement declaring which resources it exposes, which interactions it allows, which search parameters it actually implements and which profiles it claims. Servers routinely omit parameters the specification defines, and that document is where it is declared rather than discovered in integration testing.

The FHIR RESTful interactionsA grid of the nine interactions for ordinary resources: read, vread, update, patch, delete, create, search, history and capabilities. Capabilities is highlighted with a note to call it first, because its CapabilityStatement declares the resources, interactions, search parameters and profiles the server actually supports. Beside the grid, three more: transaction, batch, and dollar-prefixed operations for what REST cannot express, such as validating an instance or expanding a value set.NORMATIVE IN R4 · SMALL ENOUGH TO HOLD IN YOUR HEADNINE FOR ORDINARY RESOURCESreadvreadupdatepatchdeletecreatesearchhistorycapabilitiesGET [base]/metadataCAPABILITYSTATEMENTCall it first. Its CapabilityStatementdeclares the resources, interactions,search parameters and profiles thisserver actually supports.THREE MORE BESIDE THEMtransactionbatch$operationsFor what REST cannot express, such asvalidating an instance or expanding avalue set.
Nine interactions, three beside them, and the one to call first.

Three details separate a working client from a fragile one.

  • Delete does not mean gone. A deleted resource returns 410 on read, but its history remains addressable and a later update can bring it back. Anything you build for a retention or erasure requirement has to be designed at the storage layer.
  • Update is a whole-resource replace. A client that reads a Patient, changes the phone number and writes back only the three fields it understands has just deleted the other twenty. Read, modify what you read, write it back in full, or use PATCH.
  • Concurrency is available and almost never used. Every read returns an ETag carrying the version id. Send it back as If-Match and the server rejects a write that would clobber a concurrent one. Two systems writing to the same record without it overwrite each other quietly, at a rate proportional to traffic.
A partial write through FHIR updateOn the left, a Patient as read: twenty-three fields, three of them the ones a client understands. An arrow labeled PUT says the client changed the phone number and sent the three fields it understands. On the right, the Patient as stored after the PUT: three fields kept and twenty drawn as empty dashed squares, deleted. A note says to read, modify what you read and write it back in full, or use PATCH, and to send the ETag back as If-Match so a concurrent write is refused.THE SERVER DID EXACTLY WHAT UPDATE MEANSREAD · 23 FIELDSSTORED AFTER PUTPUT Patient/123The client changesthe phone numberand sends the threefields itunderstands.■ THE 3 IT KNOWS20 FIELDS DELETED✓ THE FIXRead, modify what you read, write itback in full, or use PATCH. Send theETag back as If-Match so a concurrentwrite is refused rather than clobbered.
Write back three fields and the server stores three fields.

Search is not a contract

Search is where FHIR stops resembling a generic REST API. The query grammar is large and defined per resource type, and four features decide whether a screen renders in forty milliseconds or times out: _include to pull referenced resources into the same response, _revinclude to pull in what points back at you, chaining to filter on a property of the referenced resource, and following the server’s own paging links rather than constructing offsets.

The part that surprises people is that a server is permitted to return more than you asked for. It may ignore a parameter it does not support, and it applies its own matching rules for string parameters. The specification is explicit that clients must be prepared for this. Filtering that matters clinically or legally has to be re-applied on the client, and the alternative is a screen that is silently wrong against one vendor and correct against another.

Profiling is the project

A base resource says what may be sent. A profile says what must be. It is a StructureDefinition that constrains a resource for a context: tightening cardinality, binding an element to a value set, adding extensions, and marking which elements a conforming system has to be able to handle.

Profiles constrain rather than extend. A profile can make an optional element required or forbid one outright, but it cannot invent a new element outside the extension mechanism and cannot relax anything the base resource requires. That restriction is what keeps a profiled instance readable by a generic client: degraded, but readable.

Three pieces of the mechanism account for most of the difficulty.

The parts of a profile that projects underestimate.
MechanismWhat it doesWhere it goes wrong
Binding strengthSays how firmly an element is tied to a value set: required, extensible, preferred or exampleAn example binding carries no obligation at all, and is regularly read as though it did
SlicingSplits a repeating element into named cases with their own rules, told apart by a discriminatorA wrong discriminator makes validation pass everything or fail everything, which is why first profiles break here
Must supportFlags an element a conforming system has to be able to populate and processBase FHIR does not define the flag at all. Its meaning comes from the guide, and it does not mean the element will be present

Must support is worth one further sentence, because it is the most consistently misread word in the specification. The base standard says in terms that a guide using the flag must define what supporting an element obliges a system to do. US Core defines it precisely: a conforming system must be able to populate the element when it has the data and process it when it arrives, and where the data is genuinely absent it may have to say so explicitly rather than omit the element, so that "we do not have this" stays distinguishable from "we do not support this".

Terminology is a service, not a table

The structure of a resource is the easy half of its meaning. The other half is in the codes, and terminology is reliably the workstream discovered late and estimated low. A blood pressure is not interoperable because it is an Observation. It is interoperable because it carries a LOINC code, with components in mmHg expressed in UCUM.

FHIR models this as first-class resources rather than lookup tables. A CodeSystem defines codes, a ValueSet selects the ones usable in a particular place, and a ConceptMap relates one system’s codes to another’s. Around them sits a small set of operations a terminology server implements and your application calls: expanding a value set, validating a code against one, looking a code up, testing whether one code subsumes another, and translating between systems.

FHIR terminology: three resources and five operationsThree resources at the top: CodeSystem defines the codes, ValueSet selects the codes usable in one place, and ConceptMap relates one system's codes to another's. Below, the five operations a terminology server implements and an application calls: expand a value set, validate a code against one, look a code up, test whether one code subsumes another, and translate between systems. A footer says a blood pressure is interoperable because it carries a LOINC code with UCUM units, not because it is an Observation.FIRST-CLASS RESOURCES, NOT LOOKUP TABLESCodeSystemDefines the codes.ValueSetSelects the codes usable inone place.ConceptMapRelates one system’s codesto another’s.WHAT YOUR APPLICATION CALLS ON A TERMINOLOGY SERVER$expandExpand a value set$validate-codeValidate a code against one$lookupLook a code up$subsumesDoes one code subsume another$translateTranslate between systemsA blood pressure is interoperable because it carries a LOINC code, with components in mmHg expressedin UCUM, not because it is an Observation.
Three resources, and five operations a terminology server answers.

Four things surprise teams, in roughly this order.

  • Terminology has licensing. LOINC is free with registration. SNOMED CT requires a license, covered nationally in member countries and not elsewhere. CPT is licensed by the American Medical Association. These are procurement questions with lead times, not sprint tasks.
  • Value sets are not static. An expansion is a point-in-time answer against a particular version. Two systems validating against the same value set at different times can legitimately disagree.
  • CodeableConcept is not a code. It is a set of codings from possibly several systems, in no guaranteed order, plus free text that may be the only accurate part. Reading the first coding and ignoring the rest is a common source of quietly wrong analytics.
  • Units are a terminology too. UCUM is a grammar rather than a list, and mg/dL is not interchangeable with mmol/L without a conversion that depends on the analyte. Numeric comparisons across sources without unit handling produce results that look fine and are not.

Guides ship as packages

An implementation guide is not a PDF. It is a versioned package of machine-readable conformance resources published at a canonical URL and installable by a tool, and this is the mechanical fact that separates FHIR from every previous attempt at healthcare specification. Guides depend on other guides the way libraries depend on libraries, and they are pinned by version for the same reason. Claiming conformance to US Core without a version number is about as precise as saying you use React.

The authoring chain is ordinary software tooling. Profiles are written in FHIR Shorthand, a small text language that lives in version control and produces a reviewable diff. A compiler turns that into conformance resources, and the IG Publisher validates them, generates the human-readable site and produces the installable package. The website a person reads and the package a validator consumes are generated from one source, so they cannot disagree.

Which makes conformance something you can put in continuous integration, and that is the point. Pin the guide version, run the validator against your examples and a sample of real output, and a breaking change appears in a build rather than in a partner’s bug report six months later.

How a FHIR implementation guide is builtA build chain left to right. FHIR Shorthand, text in version control with a reviewable diff, goes to a compiler that turns it into conformance resources, then to the IG Publisher, which validates them and builds two outputs from one source: the website a person reads and the versioned package a validator installs. Below, a continuous integration step: pin the guide version and run the validator against your examples and a sample of real output with terminology checking on, so a breaking change appears in a build rather than in a partner's bug report.ONE SOURCE, SO THE SITE AND THE PACKAGE CANNOT DISAGREEFHIR SHORTHANDText in versioncontrol. Areviewable diff.COMPILERTurns it intoconformanceresources.IG PUBLISHERValidates themand builds bothoutputs.WEBSITEWhat a person readsPACKAGEVersioned, installable by atoolCONTINUOUS INTEGRATION · VALIDATOR AGAINST THE PINNED PACKAGEPin the guide version and run the validator against your examples and a sample of real output, withterminology checking on. A breaking change appears in a build, not in a partner’s bug report.
One source for the site and the package, and a validator in the build.
An instance that passes base FHIR validation has proved almost nothing, because base FHIR permits nearly everything. The meaningful question is whether it validates against the profile in the guide you claim, with terminology checking switched on.

Which release, and why R4

FHIR has been through six numbered releases in twelve years, and the version question has a boring answer worth stating before the detail: build on R4. Not because it is newest, but because it is the one regulation names, the one the guides target, and the one every production server speaks.

The releases, and what each is good for in 2026.
ReleaseStatus
DSTU1 and DSTU2Historical. DSTU2 is still found behind older apps
STU3Deployed in places, particularly outside the United States
R4 (4.0.1)The one to build on. First release with Normative content, and the exact version US regulation names
R4BA maintenance release between R4 and R5, not a migration target
R5Published and stable. Adoption is thin, because nothing requires it and the guides have not moved
R6In ballot as of mid-2026. Not published, and not something to build against

US Core reached STU 9 in May 2026 and still builds on R4, which is a useful signal about where the center of gravity actually is. The reason is not technical conservatism. One US certification criterion names five specifications by version number, including FHIR 4.0.1, and every certified electronic health record ships that API or loses its certification. Regulation is what moves this ecosystem, and it has not moved.

Scale, and what FHIR is not

REST is built for one patient at a time. A quality measure, a research cohort or a training set needs a million, and the way to get them is not a loop over the API. Bulk Data Access exists for exactly this: a kick-off request, a 202 with a polling URL, and eventually a manifest of newline-delimited JSON files to land in object storage. Using it rather than the REST API is the largest single performance decision most data projects make.

A FHIR Bulk Data export, step by stepA sequence between three parties: the platform, the FHIR server and the file server. The platform kicks off an export with a GET to the Group export operation and the header Prefer: respond-async. The server answers 202 Accepted with a Content-Location header giving a status URL. The platform polls the status URL; while the export runs the server answers 202 with optional X-Progress and Retry-After headers, and 429 if polled too often. When the export is complete the server answers 200 OK with a manifest listing transactionTime, the output files and any error files. The platform fetches each output file, which is newline-delimited FHIR JSON, one resource per line. Finally the platform sends DELETE to the status URL, answered 202, after which the files may be removed. The platform keeps transactionTime as the _since value for its next export.THE PLATFORMBulk Data clientFHIR SERVERThe EHR, usuallyFILE SERVERMay be elsewhereREPEATGET [base]/Group/[id]/$exportPrefer: respond-async202 AcceptedContent-Location: the status URLGET [status URL]202 · X-Progress · Retry-AfterPoll too often and the answer is 429GET [status URL]200 OK + manifesttransactionTime, output[ ], error[ ]GET [file URL] for each outputapplication/fhir+ndjsonOne resource per lineDELETE [status URL]202 AcceptedFiles may now be removedKEEP transactionTimeIt is the _since of the next export, which is how a nightly load stays incremental.
Kick off, poll, collect: a million records without a loop over the API.

What happens to those files is the second surprise. Resources are deeply nested, heavily polymorphic and full of repeating elements, which is right for exchange and hostile to a SQL analyst. Keeping the originals for provenance and replay is correct; treating them as the storage model for an analytics platform is the expensive mistake, and it is usually made by default rather than decided. Project them deliberately, once, whether into declared views or into a clinical data model of your own.

The same restraint applies to what FHIR claims. It is an interchange format, not a database schema. It defines what is exchanged and deliberately not who may ask, which is what SMART on FHIR supplies with OAuth 2.0 and OpenID Connect. And it is not a migration path off v2: there is no business case, no regulatory driver and no vendor roadmap for switching off working interfaces. The realistic architecture is v2 in the core and FHIR at the edges, with a mapping layer between them that you will own. How that layer is built is on the FHIR Front for HL7 v2 Systems page.

What FHIR gives a machine learning project

FHIR is described often enough as the foundation of clinical AI that it is worth being precise. It gives a machine learning project three real things: a population extractable in bulk, a vocabulary that means the same thing at two sites, and a route back into the clinician’s workflow. It gives no model registry, no feature store and no training format, and no supplement proposes one.

Output belongs in the record, in a resource that carries its own provenance. A derived value or classification is an Observation, with derivedFrom pointing at the inputs. A predicted probability over a stated horizon is a RiskAssessment, which is where risk scores belong and where they are routinely not filed. A flag for human attention is a DetectedIssue. Provenance records what produced the result and from which inputs, and Device identifies the software and its version. There is no resource for a model itself, and Device describes the software that ran rather than the thing that was trained.

Where a model’s output goes in a FHIR recordThree resources for output. Observation for a derived value or classification, with derivedFrom pointing at the inputs. RiskAssessment, highlighted, for a probability over a stated horizon, where risk scores belong and are routinely not filed. DetectedIssue for a flag for human attention. Below, two resources that record origin: Provenance, for what produced the result and from which inputs, and Device, for the software that ran and its version rather than the thing that was trained. A footer says there is no resource for a model, and a result reaches a clinician as a resource in the record or a CDS Hooks card.THE OUTPUT, IN A RESOURCE THAT CARRIES ITS OWN PROVENANCEObservationA DERIVED VALUE ORCLASSIFICATIONderivedFrom points at theinputs.RiskAssessmentA PROBABILITY OVER AHORIZONWhere risk scores belong,and are routinely not filed.DetectedIssueA FLAG FOR HUMAN ATTENTIONRaised for a person to act on.WHAT RECORDS WHERE IT CAME FROMProvenanceWhat produced the result, and from whichinputs.DeviceThe software that ran, and its version. Not thething that was trained.There is no resource for a model. A result reaches a clinician as a resource in the record or a CDS Hookscard at the moment of decision. Everything else is a dashboard.
A resource for each kind of output, and two for where it came from.

Two dataset traps are worth naming because they validate beautifully and fail in deployment. The last-updated timestamp in a resource’s metadata records when it was written to that server, not when anything happened clinically; the clinical time is in the effective, onset and recorded fields. And status matters: entered-in-error, preliminary, amended and canceled are all normal states in a live record, and a cohort that treats them as final includes data the clinicians have already retracted.

A model that writes to its own database is invisible to care, exactly as a segmentation written to a storage bucket rather than back into the study is invisible to a radiologist. The two routes that put an inference in front of a clinician are a resource written into the record and a CDS Hooks card raised at the moment of the decision. Everything else is a dashboard.

Four standards, one hospital

FHIR does not arrive in an empty building. It arrives in a hospital already running v2 interfaces, exchanging C-CDA documents, and storing images in an archive that speaks DICOM. Each of those is still the current answer to a job the others do badly.

Real-time notification inside the enterprise is v2, and there is no pressure changing that. Attested, signed, human-readable artifacts are documents, and a CDA document travels inside a FHIR DocumentReference unchanged. Imaging is DICOM: a FHIR ImagingStudy is an index that points at the study and its retrieval endpoint, not a container for pixels. Anything new, anything crossing an organizational boundary, and everything regulation names is FHIR.

The imaging seam is where this whole series meets. The order and the patient are HL7’s, the study and the pixels are DICOM’s, the identifiers have to cross the line intact, and the profile specifying exactly how is IHE’s. Part 1 covers the imaging standard, Part 2 the profile that specifies the handoff, and Part 3 the four generations of HL7 that FHIR is the youngest of.

The full 26-page paper goes further in every direction: the search features that decide an architecture, slicing and discriminators, the accelerator programs that produce the domain guides, the SMART launch sequence and backend services, the export flow end to end, and nine mistakes that are all cheaper to avoid than to discover in integration testing.

If you want the whole of it, FHIR 101: The API Is the Easy Part is the paper behind this piece. It covers resources and references, profiles and the maturity model, the search grammar, Bulk Data, SMART on FHIR, and why conformance to the specification is not interoperability. It is free.

Questions about something here?

Ask about an article, a white paper or a tool, or tell us what you would like covered next.

Get in touch