Guides··3 min read
HL7 vs FHIR: A Plain-English Guide to EHR Integration in 2027
HL7 v2 vs FHIR explained for founders and developers: what each standard does, when to use which, SMART on FHIR, how integrations with Epic and other EHRs work, timelines and cost.
Short answer: HL7 v2 is the older standard hospitals use to push event messages between internal systems. FHIR is the modern web API standard for requesting health data as JSON. If you are building a new app, start with FHIR and SMART on FHIR; add HL7 v2 only where the data you need is not available through FHIR.
HL7 v2 vs FHIR at a glance
| HL7 v2 | FHIR (R4) | |
|---|---|---|
| Style | Event messages pushed between systems | REST API: apps request and write resources |
| Format | Pipe-delimited text segments | JSON or XML |
| Typical use | Admissions (ADT), orders (ORM), results (ORU), scheduling (SIU) | Patient apps, clinician apps, payer APIs, analytics |
| Transport | MLLP over a private network or VPN | HTTPS with OAuth 2.0 |
| Consistency | Varies by hospital; each interface needs mapping | More uniform, especially with US Core profiles |
| Developer experience | Needs an interface engine and specialist knowledge | Familiar to any web or mobile developer |
| Best for | Real-time feeds inside a health system | Third-party apps and patient access |
How widely available is FHIR?
Widely. In the United States, certified EHRs must offer a standardized FHIR API under federal health IT rules. About 9 in 10 hospitals enabled patient access to their data through an API in 2024, according to the federal health IT office (ASTP/ONC), and 2 in 3 hospitals reported using a FHIR API for patient access in 2022 (ONC Data Brief 68). Smaller, rural and independent hospitals lag behind, so check each target customer.
The pieces you will meet
- FHIR resources. The building blocks: Patient, Practitioner, Encounter, Appointment, Observation, Condition, MedicationRequest, DocumentReference and more.
- US Core. The US profile of FHIR that defines which fields must be supported, so data looks similar across vendors.
- SMART on FHIR. App launch and authorization: OAuth 2.0 scopes, single sign-on and patient context.
- Bulk FHIR. Exports of data for many patients at once, used for analytics and population health.
- Interface engine. Software such as Mirth Connect that receives, transforms and routes HL7 v2 messages.
- Integration platforms. Services that offer one API across many EHRs for a recurring fee.
Which should you use?
| You are building… | Start with |
|---|---|
| A patient-facing app that shows records | FHIR patient access APIs |
| A clinician app that opens inside the EHR | SMART on FHIR |
| A product that reacts to admissions or new lab results in real time | HL7 v2 ADT and ORU feeds, or FHIR Subscriptions where offered |
| Analytics across a whole patient population | Bulk FHIR export |
| A product for many small practices on different EHRs | An integration platform, then direct connections for big customers |
How an EHR integration project runs
- Define the data. List exactly which fields you need to read and write, and map them to FHIR resources.
- Register with the vendor. Create a developer account and app registration in the EHR vendor's program.
- Build against the sandbox. Use synthetic patients to build authorization, reads, writes and error handling.
- Security and privacy review. Complete the vendor's and the hospital's questionnaires; expect questions about encryption, access and BAAs.
- Pilot with one site. Validate real-world data quality, which is always messier than the sandbox.
- Monitor. Track failures, token expiry and version changes, with alerts and a replay queue.
Common mistakes
- Assuming every hospital on the same EHR exposes the same data. Configurations differ.
- Leaving the vendor and hospital reviews until the code is finished.
- Storing more patient data than the product needs.
- Ignoring write-back. Reading is easy; writing notes or orders needs more approval and testing.
- Treating the integration as finished at go-live. APIs and profiles change.
Cost and timeline
With our team, a read-only FHIR integration with one EHR typically costs $2,000–$4,000 and takes 4–8 weeks of engineering. A SMART on FHIR app costs $4,500–$8,250, and a set of HL7 v2 interfaces $3,750–$7,000. See EHR and EMR development and integration, or read the HIPAA compliance checklist before you handle real records.


