Outpatient EHRs in the United States typically arrive at the same architectural choice for code lookup: keep using the SQL-backed code-system tables the EHR has had for years, or stand up a FHIR terminology server and route code lookups through $expand and $translate. Both approaches work. The right pick depends on what the practice already runs and how much the EHR vendor cooperates. The notes below cover what usually decides the outcome.
You can also step back to additional FHIR walkthroughs for context first.
What SQL-Based Code Lookup Brings
Most legacy outpatient EHRs ship with code-system tables baked into the application database. ICD-10-CM, CPT, HCPCS, and a subset of SNOMED CT all live there, joined directly to the chart and the billing schema. Lookups are fast, the EHR developers know how to maintain them, and the relationship between a code and its description is one SQL query away.
The trade-off shows up in three places. Updates require a database deployment, value-set logic has to be hand-written, and cross-system $translate (ICD-10-CM to SNOMED CT) lives wherever someone wrote it once and forgot to revisit.
For broader context on the buyer's-guide framing, choosing a FHIR terminology server for US vision-care practices covers the cross-cutting concerns.
What FHIR $expand Brings
A FHIR terminology server exposes $expand for value-set expansion, $translate for crosswalks, and $validate-code for code verification, all as standard operations. The code-system content is managed centrally and updated on the cadence of the source authority. The EHR makes API calls instead of SQL joins.
The trade-off is latency and complexity. A SQL join is faster than a remote API call; introducing a network hop for a code lookup that used to be a local query adds milliseconds that can show up in user-facing latency. The architecture also adds a service to maintain and to monitor.
Where They Diverge in Practice
Five factors decide which approach fits an outpatient EHR.
- Update cadence. SNOMED CT releases twice a year; LOINC releases twice a year; CPT releases annually. A FHIR server handles updates without code deploys. A SQL-backed table needs a database migration each time.
- Value-set complexity. If the practice runs more than a handful of payer-driven value sets, the FHIR server's $expand wins. If the practice runs only a few static lists, SQL holds up fine.
- Cross-system $translate. The day the practice has to map ICD-10-CM to SNOMED CT for a registry submission, the FHIR server is dramatically less work.
- Latency budget. A chart-open path that already runs slow cannot afford an extra network hop; embedding code lookups locally still has a place.
- Team shape. A SQL-fluent DBA can maintain code tables forever; a team that does not have one and has a FHIR-fluent integration engineer will see the FHIR server as a better fit.
For overlapping mobile-app patterns, the cloud terminology APIs vs embedded LOINC tables for mobile health apps comparison covers a parallel decision. For federal-scale procurement, the best terminology servers for VA and DoD health networks write-up frames the larger choice.
How to Pick for Your Practice
A four-week side-by-side test will tell you what no architectural diagram can. Route half of your code lookups through a FHIR $expand and half through your existing SQL tables, measure the 95th-percentile latency on both paths, and check the support burden over the test window. Whichever path delivered cleaner code data with acceptable latency is the right one for the next several years. The honest answer for most US outpatient EHRs in 2026 is to keep SQL for hot paths and route value-set work through a FHIR server.
Sources
- Mastering FHIR Terminology - PDF slides, DevDays, 2023
- Terminology Service spec - HTML, HL7 FHIR R5, evergreen
- Terminology operations docs - HTML, HAPI FHIR project, evergreen