Using HAPI FHIR as a standalone terminology server

A dedicated HAPI FHIR JPA instance can serve $expand, $lookup and $validate-code to several systems. This page explains when to run one, what to configure, and what to confirm before you commit.

On this page

Why teams run HAPI FHIR as a standalone terminology server

Teams run HAPI FHIR as a standalone terminology server when several systems need the same code lookups and validation, and embedding terminology logic in each application starts to duplicate load and drift. A dedicated HAPI FHIR JPA instance answers $lookup, $validate-code and $expand for every caller from one place, so a code system is loaded once, updated once and tested once. The HAPI FHIR JPA Server documentation covers terminology services as part of the same server that handles FHIR resources, which is why a terminology-only deployment is a configuration choice rather than a separate product.

A shared service beats per-application handling when the same SNOMED CT, LOINC or ICD-10 content must be used by a registration system, an order entry module, a reporting pipeline and an analytics team, and when those teams cannot all agree on the same release at the same time. Per-application handling makes sense when one application uses a small, stable code list and no one else needs it. Ask each system owner which code systems and versions they use, how often those change, and whether their validation results must match the others. Those answers decide whether the central service is worth its operating cost.

The shared service also concentrates risk. Every application that depends on it will fail or slow down when it is unavailable, so plan health checks, capacity for peak $expand requests and a rollback path before the first consumer goes live. Confirm the licensing position for each code system with its owner before loading it into a service that many organizations can reach. Access control is not provided out of the box: the HAPI FHIR security documentation describes building blocks such as the AuthorizationInterceptor that you must configure yourself, so decide which callers may run which operations.

Shared terminology service or embedded terminology: which fits

A shared terminology service fits when several systems need the same $expand, $lookup and $validate-code results. Each consuming application that embeds its own terminology copy must load, store, update and monitor that content separately, and each copy can drift. A single HAPI FHIR JPA server centralizes that work. The JPA server documents terminology services as part of its scope, so the question is less whether it can serve terminology and more whether your consumers justify a separate service.

  • Two or three consumers: an embedded approach may be simpler if the systems use a small set of value sets and the teams already run their own pipelines.
  • Four or more consumers: a shared service usually reduces duplicated loading and reconciliation work.
  • Mixed technology stacks: systems that cannot easily load code systems locally benefit from a network endpoint.
  • Latency-sensitive lookups: confirm the network path and caching needs before routing every validation call to a central server.
  • Ask your team: list each system that validates or expands codes and how often it does so.

Check the consumer count and call volume with each application owner before you decide, because the number of integrations is the strongest signal.

Configuration options and when each fits

This table compares the database, deployment method and partitioning choices for a HAPI FHIR JPA server that serves as a shared terminology server. Read each row against your platform and the number of systems that will call the server. The main takeaway is that the starter defaults to embedded H2, so a production terminology service needs PostgreSQL or Microsoft SQL Server and a deployment method your team already operates.

OptionFits whenTrade-offConfirm before choosing
Embedded H2 databaseEvaluating code system loads and $expand behavior on a workstation or test hostDefault in the starter, so it is easy to start but not suited to a shared servicePlan a migration to PostgreSQL or SQL Server before any system depends on the server
PostgreSQLYour organization already runs PostgreSQL with backup and high availability practicesYou own schema setup, tuning and storage sizing for large code systemsVersions supported by your HAPI FHIR release and your DBA standards
Microsoft SQL ServerYour database platform team standardizes on SQL ServerLicensing and driver setup add work compared with a PostgreSQL buildSupported SQL Server versions for the HAPI FHIR release you select
MySQLNot an option for the JPA server starterThe starter does not support MySQL, so a migration would be a rebuildDo not plan a design around MySQL for this service
Docker image or Docker ComposeA single host or small set of hosts run by a team that already uses containersFewer moving parts, but you manage restarts, upgrades and scaling yourselfImage tag and Java requirement for the release you pick
Spring Boot or WAR on Tomcat, Jetty or WildflyYour organization standardizes on a Java application server or Spring Boot operationsRuntime tuning, patching and certificate handling follow your existing standardsApplication server versions tested with your HAPI FHIR release
Kubernetes with the Helm chartSeveral systems call the terminology service and you need rolling updates and health checksNeeds cluster operations skills and a shared database endpointChart version and values for your database and ingress setup
PartitioningSeparate regions, tenants or data sources must keep terminology content apartAdds configuration and testing work and is rarely needed for a single shared code system setWhether shared code systems should sit in one partition or in several

Setup sequence for a shared HAPI FHIR terminology instance

This sequence takes a shared HAPI FHIR JPA server from an empty host to a verified terminology endpoint that several systems can call for expansion, lookup and code validation. Each step closes with a check, so the team knows when to move on.

  1. Confirm the Java version for the release

    Pick the HAPI FHIR release first, then confirm the JDK it requires. HAPI FHIR 8.2.0 requires JDK 17, and the versions page in the project documentation lists requirements for other releases. Your platform team installs the matching JDK on the build and runtime hosts and records the version in the deployment standard. Done when java -version on each host reports the required major version and the build pipeline uses the same JDK.

  2. Provision a supported production database

    Your database team provisions PostgreSQL or Microsoft SQL Server for the JPA server. The starter defaults to an embedded H2 database, which is not suitable for a shared service, and MySQL is not supported. Ask the DBA team to confirm backup schedule, restore testing, connection limits and storage sizing for terminology content before the first load. Done when the database accepts connections from the application host, a test restore has been completed, and the connection details are stored in your secrets manager.

  3. Deploy the JPA server starter

    Deploy the hapi-fhir-jpaserver-starter with the packaging your organization already runs, such as the hapiproject/hapi Docker image, Docker Compose, a Helm chart on Kubernetes, or a WAR on a supported application server. Point the datasource settings at the production database and disable the embedded default. The platform team owns the release, and the application team confirms the configuration. Done when the server starts cleanly, schema creation completes, and the capability statement endpoint returns a response.

  4. Load the code systems and value sets

    Load each code system into the server as a versioned CodeSystem, using the processes documented for SNOMED CT, LOINC and ICD-10. Record the canonical URL and version for every upload so consuming systems can request a specific release. Your terminology owner signs off on the license terms for each code system before it is loaded. Done when a $lookup call for a known code in each loaded system returns the expected display and properties.

  5. Verify the terminology operations for each consumer

    For every system that will call the server, run its real requests against the test instance: $expand on the value sets it uses, $lookup for code details, and $validate-code for codes it stores. Include the version parameter each consumer sends. Compare results with the expected output from the source release. Done when each consuming system has a recorded set of passing requests, and any mismatch in display text or version has been resolved or documented.

  6. Confirm health checks and access controls

    Configure the health check endpoint on the load balancer or orchestrator and confirm it reflects database connectivity. Then test access: each consuming system must authenticate with its own credential, and requests without a valid token must fail. Use the authentication and authorization options described in the HAPI FHIR security documentation, and confirm the choices with your security team, since the project does not supply a single security layer. Done when a failed health check causes the orchestrator to remove the instance, and an unauthenticated request is rejected in the test environment.

  7. Record the baseline and hand over

    Capture the loaded code system versions, server version, JDK version, database version and the list of consuming systems in a runbook. Store the runbook with the configuration in version control. Agree who approves future loads and who owns the update routine. Done when the runbook is reviewed by the platform, terminology and security owners and each consuming team confirms its test requests still pass against the handover baseline.

How consuming systems reach the shared terminology server

Requests start at client systems that call $expand, $lookup and $validate-code over HTTPS. They pass through a reverse proxy or API gateway, which handles TLS and access rules before reaching the HAPI FHIR JPA server. The server reads from its production database, and the terminology load process writes code system content into that same database. Check that the trust boundary holds: only the proxy should be reachable from outside, and the database should accept connections only from the server and the load process.

Client systems reach the HAPI FHIR server only through the proxy, with the database inside the same boundary.

Sizing the server and licensing the code systems

Size the terminology server from the code systems you plan to load, not from the server software alone. Storage, memory and database capacity depend on three things: which code systems are loaded, how many versions of each are kept side by side, and how many consuming systems send $expand, $lookup and $validate-code requests at the same time. Each added edition or release adds data that stays in the database until you remove it, so retention of old versions is a recurring cost decision, not a one-time one. Ask your team to inventory every code system and version in scope, the expected query load from each consuming system, and the peak periods when many systems validate at once. The HAPI FHIR JPA server runs on PostgreSQL or Microsoft SQL Server for production, and the database sizing exercise belongs with that choice, so confirm it early. Load testing with your real code systems is the only reliable way to set memory and database limits, because the supplied facts do not give sizes for any of these code systems.

Before loading any code system, check its distribution terms. SNOMED CT, LOINC and ICD-10 each have their own license conditions, and they differ in who may use the content, whether the content can be redistributed or hosted for other systems, whether an affiliate or national license applies, and whether the license covers a terminology server shared by several internal applications. Treat these as separate questions. For SNOMED CT, confirm the scope of your national or organizational license with the license owner or the relevant national authority. For LOINC, read the current terms published by the LOINC project and confirm them for a hosted, shared service. For ICD-10 and ICD-10-CM, confirm with the WHO or the US source that your intended use and internal distribution are permitted. Record the answers in writing before the first upload.

Licensing also shapes the operating model. If a license limits who can access the content, the server needs access controls that match those limits, and the consuming systems must be inside the permitted group. If a license requires notices, version attribution or reporting, assign an owner for those duties and add them to the update routine. Ask any implementation partner to quote the sizing and licensing review as a separate, written item, and ask them to state which license terms they assumed and who will confirm them. A reader who cannot name the license owner and the permitted scope for each code system is not ready to size the server.

Securing a shared terminology endpoint

HAPI FHIR does not ship a single security layer. It provides building blocks that your team assembles into one access model for the terminology endpoint. The cards below cover the decisions that connect authentication, operation-level permissions, the write path for code system loads and access logging.

Authentication in front of the server

Decide how callers prove identity before a request reaches the JPA server. HAPI FHIR offers authentication interceptors, but the identity provider, token format and client registration are choices your organization makes and must document. Confirm which systems will call $expand, $lookup and $validate-code, and whether any of them are unattended services that need client credentials rather than user sign-in. Test that anonymous requests are rejected on every operation, including metadata calls that some clients use for discovery.

HAPI FHIR security docs

Operation-level access rules

Use the AuthorizationInterceptor to decide which callers may run read-only terminology operations and which may modify code systems or value sets. Terminology lookups are often open to every connected system, while uploads and value set changes should be limited to a small set of administrators. Write the rules as a table of client, operation and code system, then test each row with a real token. Ask your implementation partner to show failing cases, not only the expected successes.

Protecting the code system load path

Loading SNOMED CT, LOINC or ICD-10 content changes what every downstream system validates against, so the upload path needs stricter control than reads. Restrict upload and delete operations to a named service account or a small administrator group, and run loads from a controlled pipeline rather than ad hoc workstations. Keep the source file checksums and the version string with each load so that a later dispute about which release was active can be settled from records.

Browser access and CORS

Only browser-based applications need cross-origin access, so configure CORS for the exact origins that host those applications and nothing wider. Server-to-server callers, which most terminology traffic will be, do not depend on CORS settings at all. Review the allowed origins whenever a new front end is added, because a permissive setting on a shared endpoint exposes every system that uses it.

Audit logging with BALP

Enable BALP audit logging so that each read and write against the terminology endpoint is recorded with the calling identity and the resource or operation involved. Decide where the audit records are stored, who can read them, and how long they are kept under your retention policy. Confirm that the log captures terminology operations as well as resource writes, and test by running one $expand and one code system upload, then checking that both appear in the audit trail.

Separating shared and restricted content

If some code systems carry licensing or internal restrictions, consider whether they belong on the same endpoint as openly licensed content. HAPI FHIR partitioning can separate resources into partitions for different data sources or groups, which may help with this, but the access rules still have to be written and tested for each partition. Confirm with your legal or licensing contact which code systems may be exposed to which callers before you configure the access model.

Questions buyers ask before running a terminology server

What drives the cost of running a HAPI FHIR terminology server?

The main cost drivers are code system licensing, infrastructure, load and update work, and security review, and only the infrastructure and labor costs are paid to the operator. Code system licenses are paid to the owning body or licensing agent, and the terms depend on your country, your use and whether you distribute the content. Infrastructure is a recurring cost that grows with the number of code systems, the size of loaded releases and the query volume from connected systems. Ask any partner for a quote that separates one-time setup, recurring hosting and update work, and license fees you pay directly, so you can compare it with your own team's effort.

How long does it take to stand up a standalone terminology server?

The duration depends on how many code systems you load, how many systems will call the server, and whether you already hold the licenses and have a database and hosting platform ready. Loading a single large release such as SNOMED CT takes its own planning, and the value set expansion behavior needs testing against your real queries before other systems depend on it. The fastest path is usually a fixed-scope plan with written milestones, so you can agree the sequence and acceptance tests before work begins. Ask for the timeline per code system and per integration, not one overall figure.

What does the client need to provide for this work?

You need to provide proof of license for each code system, the infrastructure where the server will run, and named staff who will own the update routine after go-live. Licensing questions go to the owning body or your licensing agent, not to the implementation team. Infrastructure includes a database that HAPI FHIR supports for production, such as PostgreSQL or Microsoft SQL Server, plus networking, backups and a place to run scheduled loads. Owners should be named for each code system, because each release arrives on its own schedule and someone must decide when it goes live.

Can our internal team run a HAPI FHIR terminology server alone?

A capable platform team can run it alone if it has FHIR and terminology knowledge, Java and database operations skills, and time for scheduled updates. The work that most often stalls internal teams is not the first load but the recurring routine: new releases, validation of results against consuming systems, and handling of expansion of large value sets. Before deciding, check whether two or three people can cover the role, including holidays and incidents. A short external review of the design, followed by an internal build, is a common middle option, and it should be written as a defined scope.

How does security review affect a shared terminology server?

A shared server needs access control, audit logging and a documented review before several systems depend on it. HAPI FHIR does not provide a single security layer, so you must choose and configure authentication, authorization and audit components that fit your identity provider and your data rules. Terminology content is often not sensitive, but the requests that reveal which codes a system uses can be, so the review should cover who can call which operations. Plan time for the security review of the server, the network path to it and the update process that brings in new content.

What ongoing work does a terminology server need after go-live?

Ongoing work includes loading each new code system release, checking that validation and expansion results still match what consuming systems expect, and monitoring the server. Each new release can change codes, displays or hierarchies, so updates should be tested in a non-production copy before they replace the current version. Operations also cover database backups, restore tests, upgrades of HAPI FHIR and its Java runtime, and capacity checks as query volume grows. Ask for these routines in writing, with an owner and a frequency for each.

When is a managed FHIR service a better fit than a self-hosted HAPI FHIR server?

A managed FHIR service fits better when you need terminology operations quickly, have no staff to run a Java and database stack, and your data rules allow a vendor to host the service. Self-hosting fits better when you must keep terminology and related requests inside infrastructure you control, need custom interceptors or partitioning, or want to avoid per-service dependence on one vendor. Compare the total effort, including licensing for each code system, which you pay regardless of hosting choice. Write the requirements first, such as data residency, expansion size and audit needs, and then test both options against them.

Where to verify the platform details

Confirm every version, Java requirement and deployment detail against the official HAPI FHIR sources before you plan a terminology deployment. The HAPI FHIR versions page lists which release supports which JDK, and the releases page on the hapifhir/hapi-fhir GitHub repository shows the newest tagged builds. Terminology work depends on these details, so record the release you tested against in your design document and re-check it when the planning date slips.

For the JPA server, read the HAPI FHIR JPA server introduction for the terminology service behavior that your three operations rely on, and the hapi-fhir-jpaserver-starter repository for the supported database options and the starter's configuration keys. Use the security introduction to confirm which authentication and authorization building blocks apply to a server that several systems will call, since HAPI FHIR does not supply a single security layer. The partitioning documentation matters if you plan to separate code system data or tenants inside one instance.

Treat these pages as the baseline, not as a substitute for a test run. Ask the vendor or community channels which behavior changed between releases, and confirm with a proof of concept on your own sizing data that $expand, $lookup and $validate-code respond within the limits your consuming systems need. Write down the answers so the team that upgrades the server later has the same starting point.

How DeployOpen works on this

DeployOpen plans, builds, tests, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and a standalone HAPI FHIR terminology server is handled the same way. The work starts with a written scope that defines which systems will call the server, which code systems and value sets it must serve, and where it will run. Engagements are fixed-scope, so the scope, deliverables and timelines are agreed in writing before work begins.

How we scope

  • Inventory every system that will call $expand, $lookup and $validate-code, with expected request volumes and client types.
  • List the code systems and editions to load, such as SNOMED CT, LOINC and ICD-10, and confirm the licenses your organization holds for each.
  • Agree the hosting target, database engine and environments, and record them in the written scope before any build starts.

How we build

  • Deploy the HAPI FHIR JPA server starter in your environments with PostgreSQL or Microsoft SQL Server as the production database.
  • Load the agreed code system releases with versioned canonical URLs and confirm that each version resolves as expected.
  • Test expansion, lookup and code validation against representative requests, including large value sets, and document the results.

How we hand over

  • Deliver runbooks for loading a new code system release, rolling back a failed load and verifying the result.
  • Document the configuration, version pinning, access rules and client endpoints so your own team can operate the server.
  • Provide a retest of agreed findings and a handover session with the teams that will run the server day to day.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer for the terminology server after handover.
  • Plan HAPI FHIR version upgrades and code system updates as recurring work, with each change tested before release to clients.
  • Review the server's access controls and logging against your requirements at agreed intervals, using the scope as the baseline.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.