When HAPI FHIR MDM for patient matching fits your deployment
Choose the HAPI FHIR MDM module when your team runs a HAPI FHIR JPA server and the same patient or clinician appears under several records that arrived from different intake systems, and queries need to return one consolidated identity. The module links those duplicate Patient and Practitioner records to a golden resource, so searches read one identity instead of separate fragments. It is also the supported path away from the EMPI module, which is deprecated. The HAPI FHIR JPA server documentation lists MDM among the capabilities it covers, alongside terminology services, validation and partitioning, so the module is documented as part of the same server your clients already call.
Its job is to match incoming Patient and Practitioner records against configured rules and to maintain the links that point each record to its golden resource. Confirm the exact resource types, matching rule settings, link states and merge behavior for your server version before you design workflows around them. Matching output still needs human governance. Possible matches, conflicting links and merges should go to a review queue owned by a named data steward role, each decision should record who made it and why, and your team should define who may undo a link. These controls sit outside the module, so plan them as part of the implementation rather than as an afterthought for the compliance team to add later.
Decide scope before any production data is loaded. Name the resource types in scope, the intake systems that feed the server, the identifiers your organization trusts enough to support a link, and the people who approve the matching rules. Then test those rules against a copied dataset that includes records your staff already know are duplicates, and review the possible-match output before anything reaches production. Links become difficult to unwind once clinicians rely on them, so a rule mistake found late is costly. Also confirm your production database choice, since the JPA server starter supports PostgreSQL and Microsoft SQL Server for production and does not support MySQL, and make sure the test copy is protected under the same privacy controls as production.
Duplicate patterns HAPI FHIR MDM for patient matching is meant to resolve
Duplicate Patient and Practitioner records rarely come from one mistake. They build up as systems, people and organizations change, and each cause leaves a different trace in search results and reports. MDM links these records to a golden resource, so the inventory below should come before any matching rule is written.
Several intake systems
Registration, scheduling, laboratory and referral tools often each create their own Patient when the same person arrives through a different front door. In two records returned for one name and birth date, a clinician sees two IDs with no link between them. Inventory every system that writes Patient resources or sends patient messages, and note which identifier each one stamps on the record. Without that list, a matching rule tuned on one feed will misfire on the others.
Name and birth date variation
In an illustrative case, the same person is entered as Jose in one system and José in another, with a hyphenated surname in a third and a day and month reversed in a fourth. In exact-match searches, one of the two records simply does not appear, so staff create a third. Inventory the name and date formats each source sends, including character sets, name part order and how each system stores the birth date. Check the sample against pairs you already know refer to the same person, because those pairs show which fields the matching rules must weigh.
Clinicians under departmental identifiers
A physician may be created once by credentialing, again by a department scheduling system and again by an order entry module, each with a different staff number or local code. In provider reports, one clinician appears as several people, so workload and referral counts split across records. Inventory which departments create Practitioner resources, which identifier systems each one uses (for example, a license number or an internal staff ID), and whether the same person also appears through PractitionerRole. Confirm those identifiers are unique within each system before using them as matching evidence.
Legacy system migrations
A migration can load historical records under their legacy identifiers while the new system creates fresh resources for patients who arrive after cutover. In clinical timelines, past encounters hang off one Patient and current encounters hang off another, so the history looks shorter than it is. Inventory the migration load logs, the mapping from legacy to new identifiers, any records loaded twice, and whether legacy IDs were kept as identifiers. Ask the migration team which identifier system names they used, because MDM will need those names to recognize the old keys.
Merged organizations and affiliations
After a merger or acquisition, two sets of Organization, Practitioner and Patient records often run in parallel for a period. In affiliation searches, the same clinician appears under two organizations, and a patient from the acquired site may have a second record under the parent. Inventory each organization's source systems, the identifier namespaces they use and whether any identifier is shared across them. Confirm which records may be linked across organizations before matching starts, since that decision belongs to governance and should be made first.
Configuration choices and when each fits
This table compares the four configuration choices that shape how HAPI FHIR MDM links Patient and Practitioner records. Read each row across accuracy, staffing and data quality, then confirm the matching and queue behavior in the MDM documentation for the release you will run. The main takeaway is that wrong links spread into golden records and are costly to unwind, so borderline pairs need a reviewer and staying on EMPI should have an end date.
| Choice | Accuracy | Staffing and data quality | When it fits and what to confirm |
|---|---|---|---|
| Enterprise identifiers | High where issuers assign identifiers consistently. Conflicting or reused identifiers can merge the wrong people. | Few review cases. Depends on source systems keeping identifiers clean and current. | Trusted sources issue identifiers consistently. Confirm accepted EID systems per resource type and the conflict handling. |
| Attribute-based rules | Catches records without identifiers, but name, birth date and address variation cause both false matches and misses. | Needs rule tuning, a test set of known pairs and more review of borderline cases. | Identifiers are missing or unreliable. Confirm the rule syntax, comparison options and scoring in the release documentation. |
| Automatic linking | Fastest links, but every wrong automatic link flows into the golden record. | Lowest review load. Unlinking and cleanup still need an owner and a written procedure. | Mature data and conservative thresholds. Confirm whether auto-link thresholds are configurable and how unlinking works. |
| Possible-match queue with review | Better on borderline pairs, since a person decides the cases the rules cannot settle. | Needs named reviewers, a turnaround expectation and a decision log. An unstaffed queue grows. | Wrong merges carry clinical or billing impact. Confirm where the queue is exposed and how decisions are recorded. |
| Separate Patient and Practitioner rules | Practitioner data can differ in identifiers and name patterns, so patient-tuned rules may mislink clinicians. | Two rule sets to tune, test and govern, each with its own review ownership. | Both types are in scope for linking. Confirm that rules can be defined per resource type and what the Practitioner defaults are. |
| Stay on EMPI for a period | Existing linking behavior continues while the module is deprecated, with no new matching improvements from this module. | Dual running invites drift between EMPI and MDM links. One owner must cover both until cutover. | Migration validation is incomplete and a dated move plan exists. Confirm EMPI support status and the migration guidance for the release. |
| Move to MDM now | Rules are rewritten and tested, so accuracy depends on the test cases chosen. | Front-loaded rule testing and reconciliation of existing links. Plan a comparison period before cutover. | The team can staff rule testing before cutover. Confirm whether existing EMPI links carry over and how they are reconciled. |
Every record ends at a golden resource or a steward decision
The illustrative diagram shows one client's setup. Patient and Practitioner resources arrive from source systems such as an EHR and a registration system, and both post to the HAPI FHIR JPA server inside the client's infrastructure. The MDM matching rules score each candidate against existing golden resources and produce one of three outcomes: an automatic link to a golden resource, a possible match held for steward review, or a new golden resource when nothing matches. Stewards decide held matches, and downstream readers query only the golden resources. Check that every outcome writes to the same golden store and that readers never see held candidates.
Illustrative flow from source systems to golden resources inside the client's infrastructure.
Setting up HAPI FHIR MDM for patient matching
This sequence takes a test HAPI FHIR JPA server from version and database confirmation through to a cutover plan from the deprecated EMPI module. Each step ends with a check that a named role can sign off, so stewards review matching behavior before any production patient data moves.
Confirm server version, JDK and database
The platform lead pins the HAPI FHIR JPA server version and checks its Java requirement on the HAPI FHIR versions page. HAPI FHIR 8.2.0 requires JDK 17, so confirm the level for whichever release you pin. Confirm the database is PostgreSQL or Microsoft SQL Server, since MySQL is not supported for the starter, and note that the starter's embedded H2 default is not meant for production. Done when the version, JDK build target and database engine are written in the design record and the build host matches them.
Define in-scope resource types
The data owner and integration lead list the resource types MDM will link, starting with Patient and Practitioner, and record which source systems and EMPI feeds send them. For each type, decide which fields and identifiers matching will use, and name the resource types that are out of scope for this phase. Done when a signed scope list names each resource type, its source systems and its owner, and a written out-of-scope list shows reviewers what the matching will not touch.
Write matching rules in a test environment
The integration engineer writes matching rules for each in-scope resource type on a non-production HAPI FHIR server, following the MDM configuration guidance in the JPA server documentation for the pinned version. Keep the rules in version control so every change has an author and a reason. Run a set of synthetic pairs, some known duplicates and some known distinct records, and check that each pair produces the expected automatic link, possible match or no link. Done when every test pair gives the expected outcome and the rule version is tagged in version control.
Load a de-identified sample dataset
The data governance lead produces a de-identified extract of Patient and Practitioner records that keeps the fields matching depends on and removes direct identifiers that matching does not need. Privacy staff approve the de-identification method before the extract leaves its source system. The platform engineer loads the extract into the test server and records counts of resources loaded, golden resources created and links formed. Done when the load log reconciles to the extract counts and the sample is stored with restricted access.
Review automatic links with stewards
Data stewards review the automatic links and possible matches the server produced for the sample, working through them in groups. For each possible match, the steward records a decision: link, keep separate or escalate. Where stewards find wrong links, the engineer adjusts the rules, reruns the sample and compares the results with the previous run. Done when every possible match in the sample has a recorded decision, each wrong link has a documented cause, and the rule version used for the final run is recorded.
Set access and audit controls
The security engineer restricts merge, unlink and link-review actions to the steward role, using the authorization and audit building blocks HAPI FHIR provides, since the project does not offer a single security layer that covers all of this. Enable audit logging for reads and writes, including BALP where your audit model calls for it. Check that a non-steward account is refused for each restricted action and that a steward decision produces an audit entry you can trace. Done when these access tests pass in staging and the security owner signs off on the audit records.
Plan the cutover from EMPI
The program lead plans the move from the deprecated EMPI module to HAPI FHIR MDM, covering how EMPI identifiers map to golden resources, which systems switch first and how both systems are compared during the transition. Run both systems against the approved sample and reconcile their links, explaining every difference before any production data moves. Write a rollback path and test it in staging. Done when stewards sign the reconciliation report and the system owners accept the rollback path and the switch order.
What the possible-match review queue needs from your team
Before go-live, name who reviews possible matches and write the rules they apply. The HAPI FHIR MDM queue holds candidate links in the POSSIBLE_MATCH state until a person decides them. In most organizations that work falls to health information management for record integrity, a data steward team for daily volume, or an identity owner for the enterprise identifier policy. Assign one accountable owner for each decision type and confirm who covers escalations when that owner is unavailable. The written decision rules should state which identifiers are trusted enough to auto-link, which differences in name, birth date or address force manual review, how multiple births and shared family contact details are handled, and what evidence a reviewer must check before confirming a link. If these rules are missing, reviewers will make inconsistent calls, and those calls become the record your auditors read.
Each queue item ends in one of three actions: confirm the link so both records share a golden resource, split a link that should not exist, or unlink records that were merged in error. Your engineers should confirm which MDM operations and link states your HAPI FHIR version exposes for each action before the runbook is written. Record every decision with the reviewer's identity, the timestamp, the two source Patient resources, the golden resource, the action taken, and a reason code drawn from your written rules. Store this record outside the MDM link tables so it survives a rebuild of the link data. Ask your compliance lead to confirm that the resulting trail meets the logging requirements in your program, since HAPI FHIR's audit features are a set of building blocks that your team still has to assemble and configure.
A wrong merge reaches downstream systems as soon as a consumer reads the golden resource, so the rollback plan must cover those consumers as well as the MDM tables. List every system that subscribes to, syncs from or searches across linked records, and decide how each one learns that a link was split. Searches that use the :mdm qualifier return data from every linked record until the link is corrected, so a wrong merge can show one patient's data inside another patient's chart. Write the rollback as a procedure your team has rehearsed: pull the affected links from the audit record, split or unlink them, resend corrected data to downstream systems, and verify that searches return only the right records. Rehearse it on a copy of the database before go-live, and confirm with your database team how backups or point-in-time recovery would restore link state without reversing unrelated decisions.
Security and operational controls around the MDM module
HAPI FHIR does not ship a single security layer, so the MDM module inherits whatever access, audit and data handling controls you build around the server. The five controls below cover who can change links, what gets recorded, how protected health information stays out of side channels, how link data survives recovery, and how matching rule changes are reviewed.
Authorize who triggers MDM operations
Matching, linking, unlinking and merging change which records are treated as one patient, so these operations need explicit authorization of their own. Build the rules with the AuthorizationInterceptor, backed by your identity provider's roles or groups, so that only named operator roles can trigger them. Check that the rules cover every route that reaches these operations, and test each role with a denied request.
HAPI FHIR security docsAudit MDM activity with BALP
Confirm that BALP records include the MDM operations that create, update and remove links and merge golden resources, along with the user, time and outcome of each call. Send the logs to storage that your security team controls and set retention to match your policy. Test the trail by making a link, reading the audit entry and tracing it back to the identity that made the request.
Keep PHI out of logs and fixtures
MDM work handles demographics such as names, birth dates and identifiers, so one verbose log line or one copied test fixture can expose protected health information. Keep request and response bodies out of server and reverse proxy logs, scrub error messages before they reach shared dashboards, and generate test patients with synthetic data. Confirm that matching-rule tests run on synthetic or de-identified data, since a fixture copied from production can place identifiers in version control and CI logs.
Back up link data with golden records
Links between duplicate records and golden resources live in the same database as the resources they connect, so a backup that restores resources without matching link data can leave links that no longer match the restored data. Include the MDM link data in the same backup job and point-in-time window as the resource data, and confirm the job captures the whole database schema. Test a restore by checking a sample of golden records against their source resources and confirming each link still resolves.
Change control for matching rules
A change to a matching rule can alter which patient records are linked, and so which clinical history is merged under one golden resource. Keep rule definitions in version control, require data stewardship review before deployment, and keep a dated log that maps each deployed rule version to its change ticket. Before rollout, run the new rules against a synthetic or de-identified sample, compare the links that change, and review the possible-match queue closely for the first days after the change.
What HAPI FHIR MDM for patient matching costs and takes
What drives the cost of HAPI FHIR MDM patient matching work?
Cost follows the written scope, and the largest drivers are the number of source systems sending Patient and Practitioner records, how inconsistent their identifiers are, and how many matching rules and review queues you want. Each source adds profiling, mapping and test cases. Rules tuned against your real duplicates take more iterations than default settings. Integration with the systems that create or update records is another driver, as are the number of environments and the depth of handover documentation. DeployOpen is paid for the planned build, testing and documentation. Your organization carries steward time, identity owner sign-off and the infrastructure you run. Design, rule tuning and migration are typically one-time costs. Upgrades, monitoring and retainers recur. Ask for a quote that lists each phase, the source systems in scope, the environments, the handover items and which costs continue after go-live.
How long does a HAPI FHIR MDM matching project usually take?
Duration depends mostly on data quality, the number of sources and how quickly decisions are made, not on installing the server alone. Standing up the HAPI FHIR JPA server with the MDM module enabled is often the smaller part. The longer work is profiling source data, agreeing which identifiers and attributes count as evidence of a match, tuning rules against known duplicates, and building the workflow for possible matches. Stewards must review sample pairs, and that step stalls when nobody owns the time. A migration from an existing EMPI setup adds reconciliation. Ask for a schedule tied to written milestones and to your dependencies, such as extract delivery dates, steward availability and approval dates. Also ask what moves the schedule if one source system is late.
What does our team need to provide for MDM matching work?
Plan for three inputs before work starts: access to representative Patient and Practitioner data, time from people who know that data, and a named identity owner who approves the matching rules. Early design usually works from masked or de-identified extracts. Production access stays inside your environment under your approval process. Confirm with your privacy office which data may leave your environment and in what form. Steward time covers reviewing sample pairs the rules flag as likely or possible matches and deciding what should merge. The identity owner approves thresholds, the attributes used and how conflicts are resolved. You also provide test environments, hosting access and change approval. Ask the quote to name each person, their role, the expected time commitment and the date each sign-off is due.
Can our internal team run HAPI FHIR MDM matching without a partner?
Yes, a capable internal team can run it, but the work needs skills across FHIR resource modeling, Java server operations, relational database administration and data quality. The HAPI FHIR JPA server is a Java application, and HAPI FHIR 8.2.0 requires JDK 17, so someone must own the runtime and each upgrade. Matching rules need people who can read scoring results, plus clinical or registration staff who can judge borderline pairs. Check your team's experience with PostgreSQL or Microsoft SQL Server, container or Kubernetes operations and test design. Also decide who tunes rules after go-live and who is on call. An outside partner is most useful for a first build, for migration from EMPI, or where one of these skills is missing. Whatever you choose, require documentation that your team can operate without the partner.
How does migrating from EMPI differ from a fresh MDM start?
Migration adds work because existing links, golden records and past possible-match decisions already exist and must be carried over or deliberately reset. The EMPI module is deprecated, so the target is the MDM module, and the mapping between EMPI behavior and MDM configuration needs line-by-line review. Start with an inventory of existing links, the rules that produced them and the steward decisions behind them. Then choose whether to keep current links, re-run matching on the new rules and compare outcomes, or re-link from source. Each choice changes testing and the stewardship backlog. Check resource references, identifiers and downstream systems that depend on golden record IDs. A fresh start is simpler to test but loses decision history unless you export it first. Ask the quote to list the migration steps, the reconciliation report, the rollback approach and who approves cutover.
How do we measure patient matching quality in HAPI FHIR MDM?
Measure quality against a labeled sample of known matches and known non-matches. Track precision, which is the share of links that are correct, and recall, which is the share of true duplicates that get linked. Also track the size of the possible-match queue, because a growing queue shows that rules are not separating records well. Build the sample from steward decisions and from records your team already knows are the same or different. Break results down by source system, record age and name or address quality, since errors often cluster in one feed. Track false merges separately, because a wrong merge attaches one person's data to another. Re-run the sample after each rule change and each new source. Ask the partner for the test set, scripts and report template. The identity owner decides what error rate is acceptable.
Does DeployOpen certify HAPI FHIR patient matching for compliance?
No. DeployOpen does not issue audit reports, attestations or certifications. It prepares systems, controls and evidence for compliance assessments, and independent auditors and certification bodies make the assessment decisions. For an MDM build, evidence can include documented matching rules, access settings, audit logging configuration, change records, match quality test results and steward decision logs. HAPI FHIR provides building blocks for access control and audit logging, and your team must configure and monitor them. Ask for a written list of evidence items, the owner of each control after handover and the controls that stay with your compliance team. Confirm with your compliance lead and assessor which frameworks and regulations apply to your data before scoping the evidence.
Limits to confirm before you commit
Confirm these points in your own environment and against the exact HAPI FHIR release you plan to run. Each card is a question to verify with a test on your data before you rely on the module, and together they decide whether the module fits your database, Java runtime, deployment topology and partitioning model.
Feature set in your release
MDM behavior is tied to a specific HAPI FHIR version, so documentation for a newer line may describe features your version does not have. Ask the team to list each MDM capability the project will depend on, then check each one against the documentation and code for the exact version you will deploy. The current release is v8.8.2, released 25 September 2026. Record the chosen version in the design document and the test plan, and repeat the check before every upgrade.
Release notesSupported database engines
The JPA server starter defaults to an embedded H2 database, documents PostgreSQL and Microsoft SQL Server for production, and does not support MySQL. Confirm that the MDM tables, indexes and matching queries run on the PostgreSQL or SQL Server version your organization operates. Ask your database team to confirm backup and restore for the MDM data, and run a load test on a copy of data sized like yours before you choose the engine.
Starter repositoryJDK version for your release
HAPI FHIR 8.2.0 requires JDK 17, so the Java baseline depends on which release line you adopt. Confirm the JDK requirement for the exact release you plan to run, then check it against your base image, application server and patch policy. Ask whether your platform team can keep the JDK on a supported update path for the life of the deployment, because a later JDK change can force a coordinated release of the server and its container images.
Version requirementsMatching quality depends on data
Linking results depend on the identifiers, demographics and sample records in your source data, so rules that work well for one organization can perform differently for another. Ask for a labeled sample of known duplicates and known distinct patients, then measure the links, possible matches and missed matches the rules produce. Check how often enterprise identifiers are blank, malformed or reused across people, because those gaps set the ceiling on matching quality.
Behavior across multiple instances
Running two instances against one database raises questions the single-server tests will not answer. Confirm which MDM operations run in the request thread, which run as background work, and whether a second instance can process the same work twice or leave links stale after a failure. Ask the vendor or project for documented behavior, then run a test with two instances writing to the same database at the same time, including a restart during processing.
Partitioning and MDM-linked search
Partitioning places each resource in a partition for multitenancy, separate data sources or regional grouping, and MDM links must respect the same boundaries. Confirm whether a golden resource can link records from different partitions, which partition the golden resource is stored in, and whether the :mdm search qualifier returns linked records from partitions the caller cannot see. The answers change both the tenant isolation design and the privacy review for cross-record search.
How DeployOpen scopes and supports HAPI FHIR MDM
DeployOpen plans MDM as part of a self-hosted HAPI FHIR JPA server in your infrastructure, with matching rules, possible-match handling and any move off the deprecated EMPI module agreed before build starts. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and ongoing support, upgrades and continuous testing are available as retainers.
How we scope
- The written scope names the Patient and Practitioner resource types, the identifiers and demographic fields the matching rules use.
- The scope sets who reviews possible matches and how confirmed duplicates are merged or kept apart.
- The scope lists the EMPI-to-MDM migration tasks, the environments covered and the deliverables, documents and handover items.
How we build
- Build starts in a non-production environment with the MDM module enabled and synthetic or de-identified Patient data.
- Matching rules are written, version controlled and tested against labeled sample pairs before they reach shared environments.
- Each step is documented, with the server configuration, rule files and the test evidence stored with the deliverables.
How we hand over
- Handover covers the matching rule set, the possible-match review procedure and the golden resource data model.
- Your team receives run procedures for reviewing candidate matches and for changing matching rules, including a documented test step.
- Where the written scope includes a walkthrough, it covers the engineers and compliance leads who review matching decisions.
How we support
- Support after go-live can cover upgrades of the HAPI FHIR server and changes to matching rules under a retainer.
- Retainers can include continuous testing of the MDM setup, so changed match results after an upgrade are reviewed.
- Before any HAPI FHIR upgrade, confirm the target version's Java requirement, for example JDK 17 for 8.2.0.

