What is FHIR, and when would you still be dealing with HL7 v2?
FHIR is a resource-oriented REST API with a defined set of resources, constrained for real use by profiles and implementation guides. HL7 v2 is the older pipe-delimited messaging standard that still carries most of the event traffic inside hospitals, so the two coexist and an integration engine translates between them.
What the interviewer is scoring
- Does the candidate describe v2 as a live production standard rather than a legacy curiosity awaiting migration
- Whether the difference in interaction model - pushed events versus queried resources - is understood as the reason both survive
- That profiles, terminology bindings and implementation guides are named as where interoperability is actually won
- Whether the candidate can say what an integration engine does beyond "transforms messages", including replay and audit
- Does the candidate treat extensions as a cost to be justified rather than a convenient escape hatch
Answer
Two standards with different shapes
HL7 v2 is a messaging standard. A system emits a message when something happens, encoded as lines of segments with fields separated by pipes and components by carets, and the receiver acknowledges it. The message type says what happened: ADT messages carry admission, discharge and transfer events, ORU carries observation results, order and scheduling messages have their own types. The classical transport is a framed stream over TCP with an application-level acknowledgement, so an interface is a long-lived connection with a queue behind it, not a request-response API.
FHIR is a resource-oriented API. Clinical and administrative concepts are modelled as a defined set of named resources - Patient, Encounter, Observation, MedicationRequest, Condition and so on - each with a specified structure, a JSON and XML representation, and a URL. You interact with them over HTTP using the ordinary verbs plus a search syntax, you compose several resources into a Bundle when you need them together or need them applied atomically, and resources reference each other by URL. R4 is the version most production deployments target; R5 is published and adoption of it trails well behind.
MSH|^~\&|EPIC|HOSP1|LIS|LAB1|20260726120000||ADT^A01|MSG00001|P|2.5.1
PID|1||1234567^^^HOSP1^MR||SMITH^JANE^A||19800214|F
{
"resourceType": "Patient",
"identifier": [{ "system": "http://hospital1.example.org/mrn", "value": "1234567" }],
"name": [{ "family": "Smith", "given": ["Jane", "A"] }],
"gender": "female",
"birthDate": "1980-02-14"
}
The same patient, twice. The difference that matters is not verbosity: in the v2 segment HOSP1 names the assigning authority by a string whose meaning lives in a document agreed between two parties, whereas the FHIR identifier system is a URI, so the namespace is self-describing and two systems that have never spoken can tell whether they mean the same identifier space.
Why v2 has not gone away
v2 predates the web and has been deployed continuously ever since, so the internal nervous system of most hospitals is a v2 event fabric: registration tells the laboratory, radiology, pharmacy, billing and the bed board that a patient has arrived, and each of those interfaces was commissioned, tested and signed off as safe to use on patients. Replacing one is not a technology refresh but a clinical safety project with validation and downtime risk attached, and it delivers no new capability. Nobody funds that.
The interaction models also differ in a way that makes them complements rather than substitutes. v2 is push: the receiver learns about the discharge because it was told, immediately, without polling. FHIR's centre of gravity is pull, which is exactly right for a patient-facing app, a clinician's mobile view, a decision-support tool or a payer wanting one slice. FHIR does have publish mechanisms and a bulk export for population-scale extraction, but the everyday reality is that FHIR is the query surface at the edge of the enterprise while v2 remains the event spine inside it. Regulatory pressure has pushed hard on that edge, which is why a modern FHIR API in front of a decades-old v2 backbone is the normal case rather than a sign of neglect.
What an integration engine does
Sitting between all of this is an integration engine, and in healthcare it is not optional plumbing but the place most of the domain logic lives. It terminates the inbound interfaces, persists every message on receipt, then transforms, routes by content and delivers with retry. The properties that matter are the unglamorous ones: durable store-and-forward, so a laboratory system rebooting does not lose results; selective replay, so a mapping bug can be corrected and yesterday afternoon reprocessed; a searchable archive of every message in and out, because when a clinician says the result never arrived someone has to prove where it stopped; and terminology mapping, translating a local test code into a standard one the receiver can interpret.
It is also where v2 becomes FHIR. A pragmatic FHIR facade is very often an engine subscribing to the existing v2 feeds, mapping them into resources, and serving those - which is why a FHIR API can be entirely genuine and still expose only the data the underlying feeds happen to carry.
Profiling and extensions, which is where the real work is
The base FHIR specification is deliberately loose: it aims at the elements most implementations need, leaves most fields optional, and pushes the rest into local agreement. So two conformant servers can be mutually useless, because a resource where everything is optional guarantees nothing.
A profile closes that gap. It is a StructureDefinition that constrains a resource for a context: tightening cardinalities so a field becomes mandatory, binding a coded element to a specific value set with a stated strength, flagging elements as must-support so implementers know what a consumer will rely on, and slicing repeating elements so each occurrence has a defined meaning. Profiles ship in bundles called implementation guides, national and specialty, along with their value sets and expected server capabilities. When somebody asks whether your system is interoperable, the answerable form of the question is which implementation guide you conform to - and an instance can be validated against it mechanically.
An extension is the escape hatch for data the base resource has no element for. It is itself defined by a StructureDefinition and identified by a URL, so it is discoverable and validatable rather than an ad hoc field, which is a real improvement on the locally-invented segments v2 interfaces accumulated. But it remains a private vocabulary: a generic client will carry it through and never understand it. So the discipline is to look for a published profile that already defines the concept before minting your own, and to treat each extension as a bilateral agreement wearing standard clothing.
The claim that separates a strong answer
The weak version is "FHIR replaced v2, so v2 is legacy", which is wrong on the facts. The subtler trap catches experienced candidates: treating "we both speak FHIR R4" as meaning the integration is solved. It is not, and the reasons are consistent - each side binds the same coded element to a different code system, one populates an element the other never reads, identifier systems are asserted differently for the same real-world namespace, or one side's mandatory element is optional in the other's profile. Naming conformance, terminology binding and identifier semantics as the real integration work is what distinguishes someone who has delivered a healthcare interface from someone who has read about one.
Likely follow-ups
- Two systems both claim to support FHIR R4 Patient and still cannot exchange data. What are the likely reasons?
- What does must-support mean in a profile, and how is it different from a minimum cardinality of one?
- How would you get five years of history for a whole population out of a FHIR server?
- An ADT feed stops delivering discharge messages overnight. How do you find out and what do you replay?
Related questions
- How would you model sex and gender in a patient record?hardAlso on fhir6 min
- Service A needs something from service B. When should that be a synchronous call and when should it be an event?mediumAlso on integration3 min
- The electronic record will be down for a four-hour upgrade, and it also fails without warning. How does a ward keep working?hardAlso on integration5 min
- A dashboard has been showing the same temperature for two days and nobody noticed. Walk the path and tell me what would have caught it.hardSame kind of round: concept6 min
- Everyone in the business calls it the fax queue, and nothing has been faxed since 2014. Do you keep that name in the code?mediumSame kind of round: concept4 min
- How does your order placement change on a venue that allocates pro rata within a price level instead of first in, first out?hardSame kind of round: concept6 min
- Your A/B test came back not significant. What do you do next?hardSame kind of round: concept4 min
- Leadership wants DORA metrics on a dashboard for every team. How do you use them well, and how would each one be gamed?hardSame kind of round: concept4 min