Master Patient Index Software: How Patient Matching Works and How to Build It
Healthcare Insights

Master Patient Index Software: How Patient Matching Works and How to Build It

Abhinav Mohite
FHIR Subject Matter Expert, Mindbowser
TL;DR
  • An MPI links each person’s records under one enterprise ID; an EMPI does it across facilities or organizations.
  • Matching is a pipeline: standardize the data, narrow the candidates, score each pair, then link, reject or send the pair to a person. A person with health information management (HIM) training owns the review policy, whether that’s your team, the health system’s or a contracted reviewer.
  • Match rates between organizations have been measured as low as 50%, even when both use the same EHR vendor (ONC’s 2014 patient matching report, summarized by the Pew Charitable Trusts in October 2018).
  • FHIR defines a Patient/$match operation but leaves the algorithm to each server. Epic lists it; Oracle Health’s R4 API doesn’t.
  • You can use the EHR’s own matching, license a commercial EMPI, run open source or build matching into your platform. We build the last, or integrate the EMPI you license.

A master patient index (MPI) is the system that decides which patient each record belongs to and gives that person one ID across your sources. An enterprise master patient index (EMPI) does the same job across several hospitals or organizations, each with its own record numbers.

The job gets hard when a product connects to a second health system. The patient you already know arrives with a different medical record number (MRN), a shortened first name or last year’s address, and your software has to decide whether this is the same person. This guide covers how matching works, where it breaks across EHRs, what FHIR and HL7 v2 already give you, and the four ways to get an MPI, including building one into the data platform behind your healthcare data integration services.

What is a master patient index (MPI)?

An MPI keeps one enterprise ID per person and a crosswalk from that ID to every identifier your sources use: the MRN at each hospital, a payer member ID, your own app’s user ID. It does not hold the clinical record. It tells the systems that do which records belong to the same person, so a lab result from one hospital and a visit note from another land in one patient view.

Matching runs on demographics. The common fields are first and last name, date of birth, Social Security number and address, with phone and email used less often (Pew, October 2018, p. 6). Certified EHRs expose a defined set of these demographic elements through their APIs, listed in the USCDI v3 demographic data elements.

Master patient index (MPI)Enterprise MPI (EMPI)Master person index
ScopeOne organization’s own systemsSeveral hospitals, clinics or organizationsThe same idea used for people who aren’t only patients (members, citizens)
Typical ownerThe hospital’s HIM teamThe health system, network or data platformA government agency, payer, HIE or client registry
What it solvesDuplicates inside one EHROne person across many record numbersOne person across programs

Research datasets need this too. Before records from several sites go into a common data model, each person needs one ID, which is why patient matching sits upstream of FHIR to OMOP conversion.

Why duplicate and unlinked patient records are costly

Matching fails in two directions. A false merge puts two people in one record, so a clinician can act on someone else’s allergies or diagnoses. A false split leaves one person in two records, so results go missing and tests get repeated.

The numbers are older than they should be, because few organizations measure this well. Pew’s 2018 report collected the best available estimates:

  • Matching within one facility can be as low as 80%, an estimate from the College of Healthcare Information Management Executives (CHIME), cited in a 2012 Bipartisan Policy Center brief.
  • Between organizations, Audacious Inquiry’s work for the Office of the National Coordinator for Health IT (ONC) found match rates as low as 50%, even between organizations on the same EHR vendor (ONC Patient Identification and Matching Final Report, 2014).
  • A 2016 study in Perspectives in Health Information Management found 4% of confirmed duplicate records led to negative clinical care.
  • ONC’s 2015 interoperability roadmap set goals of under 2% duplicate records within a facility by the end of 2017 and 0.01% by 2024. Both dates have passed, and Pew noted that available analyses show the industry falling short.

All four figures are summarized in Pew, October 2018, p. 3, with the original studies in its endnotes. The same page adds that facilities guard hard against false merges, so failing to link is the more common problem, and most organizations can’t state their true match rate because they don’t know every record that should have been linked. So measure both error types on a sample someone has reviewed by hand, and treat a low duplicate count with suspicion until you have.

When a deterministic link is enough, and when to build matching

Many products can link patients exactly before they need any scoring. If a health system sends a roster or attribution file that carries its own MRN for each patient, you store that MRN and the link is certain. If patients sign in through the health system’s patient portal with a SMART on FHIR app, the launch hands your app that system’s patient ID (SMART App Launch), which is also an exact link.

Probabilistic matching earns its cost when exact links run out: records arrive without a shared identifier, the same person shows up from several sources, or someone signs up directly in your app. Two other routes exist outside your own platform. Referential matching checks demographics against an outside reference data set, one of the four approaches Pew’s report examined (Pew, October 2018). National networks locate a patient’s records at other organizations through IHE’s Cross-Community Patient Discovery (XCPD) profile.

A quick test for whether to build matching now:

  • Do most of your records arrive with an identifier you can trust?
  • Do you take data from one source per patient, or several?
  • How many unlinked or duplicate records do you see today, and is that number growing?

If the answers are yes, one, and few, start with exact links and design your data model so a matcher can be added later.

How patient matching works, from clean-up to a match decision

Patient matching is a pipeline of five steps, and most accuracy problems start in the first one: most of the causes Pew lists are data capture problems such as inconsistent formats, typos, and missing or default values. It usually runs inside the same jobs that move your data, as part of ETL in healthcare.

  1. Standardize the data. Put names, dates and phone numbers into one format, handle nicknames and hyphenated surnames, and treat placeholder values as missing data. Addresses deserve extra care: ONC’s Project US@ technical specification (Final Version 1.0, January 2022) defines one way to represent patient addresses because address is among the fields most sensitive to standardization.
  2. Narrow the candidates. Comparing every record with every other grows with the square of the data: 1 million records make about 500 billion pairs. Matchers first group records by a key such as birth year plus a phonetic code of the surname, then score pairs only inside each group. Production matchers run several passes with different keys and combine the candidates, so a changed surname or a typo in one field doesn’t hide a true match.
  3. Score each pair. Deterministic matching needs chosen fields to agree, exactly or after normalization. Rules-based matching accepts any of several field combinations. Probabilistic matching estimates how likely two records are the same person: each agreeing field adds weight, each disagreeing field subtracts it, and rarer values count for more. Fellegi and Sunter set out this model in 1969 (Journal of the American Statistical Association), and the weights can be estimated from your own unlabeled data. Pew’s report gives a practical example: a name that is common near a hospital should count for less there than in a region where it is rare.
  4. Decide. Two thresholds split the scores. Pairs above the upper one link automatically, pairs below the lower one are treated as different people, and the band between goes to a person. Where you set the thresholds is the trade between false merges and false splits.
  5. Link and keep the history. Attach both source records to one enterprise ID and keep each source record intact, so a wrong link can be undone. Survivorship rules decide which name or address the combined view shows.

Pew describes a Houston health system with 2,488 records named Maria Garcia, 231 of them sharing a birth date, and notes that twins can share a birth date, an address and similar names (Pew, October 2018, p. 5). No threshold settles those on demographics alone, which is why the review band exists.

Here is how the scoring works on three fields, with illustrative probabilities. For each field, m is the chance it agrees when two records are the same person, and u is the chance it agrees by coincidence. An agreement adds log2(m/u) to the score; a disagreement adds log2((1-m)/(1-u)), which is negative.

Field (illustrative values)muAgree addsDisagree adds
Birth date0.950.003+8.3-4.3
Surname0.900.01+6.5-3.3
ZIP code0.800.05+4.0-2.2

With an upper threshold of 12 and a lower one of 4, a pair that agrees on birth date and surname but not ZIP code scores 12.6 and links. A pair that agrees on birth date and ZIP code but not surname, as after a marriage, scores 9.0 and goes to review. A pair that agrees only on ZIP code scores -3.6 and is rejected. Real deployments use more fields, value-specific weights and thresholds set from a reviewed sample.

MethodHow it decidesWhere it worksWhere it struggles
DeterministicSeveral fields must match exactlyClean, consistent dataTypos, nicknames, moves
Rules-basedAny one of several field combinations matchesKnown data patternsRules multiply and conflict
ProbabilisticWeighted likelihood with two thresholdsMixed data from many sourcesNeeds tuning on your population
ML-assistedA model trained on past review decisions suggests pairsLarge review queuesNeeds labeled decisions and monitoring

Machine learning helps most in steps 3 and 4. A model trained on your reviewers’ past decisions can suggest likely pairs and show which fields drove each score, which shortens the queue. It does not set your thresholds, fill fields that registration never captured, or replace the person who approves a merge.

Patient matching in a product connected to several EHRs

Say your product serves patients at Hospital A, which runs Epic, and Hospital B, which runs Oracle Health. The same woman has an MRN at each, and she signed up in your app with a third ID.

Keep every source identifier as a pair of system and value under your enterprise ID, the same shape FHIR uses for Patient.identifier, and store each EHR’s FHIR resource ID separately from its MRN, because they are different identifiers. Don’t reuse one hospital’s MRN as your patient key, because MRNs are unique only inside the hospital that issued them.

HL7 v2 feeds add a timing problem. Each message carries the patient identifier list in its PID-3 field, with an assigning authority (PID-3.4) that tells you which facility issued each number. When a hospital merges two of its own records it typically sends an ADT A40 merge message with the retired identifier in its MRG segment, and that can arrive days after your product has written data under the old MRN. Your platform needs a plan to re-point that data. It also needs one for the day the hospital decides the merge was wrong: that usually arrives as a manual correction or a vendor-specific message, which makes it harder to clean up. The message details are covered in our guide to HL7 integration.

Your enterprise ID has to stay stable while all of this happens underneath it:

  • Never reuse an enterprise ID, even after the person it belonged to is merged away.
  • When two enterprise IDs turn out to be one person, keep one as the survivor and turn the other into a pointer to it, so old references still resolve.
  • When a link turns out to be wrong, split the records and give the separated person a new ID.
  • Publish every identity change as an event, so downstream tables, reports and models can re-key. FHIR expresses the same idea with Patient.link types such as replaced-by.

I’d settle who works the review queue before writing any matching code. A seed-stage company rarely has health information management (HIM) staff, so the options are the health system’s HIM team, agreed in the contract; a contracted reviewer with HIM training; or narrower thresholds that send fewer pairs to review and accept more false splits until someone can review them. The queue grows with every poorly registered source you add.

Need One Enterprise Patient ID Across Every EHR You Connect To?

What FHIR and HL7 V2 give you for patient matching

FHIR R4 defines an operation for this, Patient/$match. You POST a Parameters resource holding a Patient, which can be incomplete, plus optional onlyCertainMatches and count parameters; the server returns a Bundle of candidates ordered by score, where 1 is the most certain match, each with a match grade. The specification states that it “does not specify any particular algorithm” (HL7 FHIR R4, Patient $match), so each server applies its own.

Support varies by EHR. Epic lists $match on its R4 Patient resource (Epic R4 CapabilityStatement, August 2026 release, retrieved October 31, 2026). Oracle Health’s R4 CapabilityStatement, retrieved the same day, lists read and search for Patient and no $match, so there you search by a trusted identifier first, then by name and birth date, and compare every result yourself. A listed operation is still subject to approval: each health system decides which scopes your app may use.

Even where $match exists, each server matches only against its own patients. Your platform still needs its own enterprise ID across hospitals. FHIR records merges with Patient.link (types such as replaced-by and replaces), and IHE publishes two profiles built for this cross-referencing work: PIXm for identifier cross-references and PDQm for demographic queries. For the wider FHIR picture, see FHIR standards for health tech teams.

MPI software options: EHR built-in, commercial EMPI, open source or your own

There are four routes, and the right one depends on where your patients’ records live and who has to own the IDs.

Use the EHR’s own matchingLicense a commercial EMPIRun open-source matchingBuild matching into your platform
Where the IDs liveInside one EHRIn the EMPI productIn your infrastructureIn your data platform
Reach across hospitalsThat EHR’s own recordsAcross the sources you connectAcross the sources you connectAcross the sources you connect
Control over matching rulesThe EHR vendor’s settingsThe product’s settingsFullFull
What your team runsLittleIntegration and reviewHosting, code upkeep, tuning and reviewHosting, code upkeep, tuning and review
Fits whenOne health system, one EHRA health system that prefers a packaged productAn engineering team with data experienceA product that spans many EHRs and owns its data model

Commercial EMPI products include Verato. Open-source options include the HAPI FHIR MDM module and Splink, a probabilistic record-linkage library from the UK Ministry of Justice’s analytical services team.

Whichever route you pick, ask:

  • Can we test it on a sample of our own records that someone has reviewed by hand?
  • Does it report false merges and false splits separately?
  • Does it show why two records were matched?
  • Can a wrong link be undone, and does the change reach downstream systems?
  • Does it expose an API, $match or equivalent, for our applications?
  • Where does it run, and who holds the data?
  • How much work is adding a new source?

How we build patient matching into your data platform

We build patient matching into your data platform: normalization, scoring, a review-queue screen for your HIM team, the enterprise ID and crosswalk, merge/unmerge propagation, and a match API on your side. We test it on a sample of your own records against false-merge and false-split targets your team agrees before go-live. When a licensed EMPI is the better route, we integrate the commercial EMPI you license.

It runs in your own cloud account, and we sign a business associate agreement (BAA). Mindbowser is SOC 2 Type II audited and an Epic Vendor Services member, and our team includes 200+ FHIR-certified developers. Work starts with a six-week discovery that ends in a fixed-price scope, then moves to builds in 2-4 week sprints, as described in our process.

Start a Conversation

Where ConnectHealth fits in patient matching

ConnectHealth gets the patient data in. It brings ADT messages and FHIR Patient records from the EHRs your customers run, through 20+ EHR adapters, and it runs in your own cloud. The matching service, the enterprise ID and the review queue sit in the platform Mindbowser builds around it; ConnectHealth itself does no patient matching.

Built for these healthcare verticals

One Patient, One ID, Before The Data Spreads

Every system you connect copies its own version of each patient, so the cheapest time to fix identity is before those copies reach your tables, reports and models. The rules around matching are still moving: the MATCH IT Act would direct HHS to define patient matching and set match-rate standards, but it is a bill in Congress and not law. Measure your own match rate either way.

Where to go next:

Frequently Asked Questions

An MPI matches patients inside one organization’s systems. An EMPI matches the same person across several hospitals, clinics or organizations, each with its own record numbers, and keeps one enterprise ID that points to all of them. The matching methods are the same; the scope is wider.

Matching uses demographics: first and last name, date of birth, sex, address, phone, email and identifiers such as an MRN or, where collected, a Social Security number. Typos, missing values and inconsistent formats cause many matching errors, so capture quality matters as much as the algorithm.

ONC’s 2015 roadmap set goals of under 2% duplicate records within a facility by the end of 2017 and 0.01% by 2024; both dates have passed. Many organizations can’t measure their true rate, so start by reviewing a sample by hand and counting false merges and false splits separately.

Deterministic matching links two records only when chosen fields agree exactly. Probabilistic matching weighs how much each agreeing or disagreeing field tells you, produces a score, and uses thresholds to link, reject or send a pair to a person for review.

FHIR R4 defines the Patient $match operation. You send the demographics you have, and the server returns candidate records ranked by score. The specification states it doesn’t specify any particular algorithm, so each server applies its own, and some EHRs don’t expose the operation at all.

No. The MATCH IT Act is a bill in Congress, not law. It would direct HHS to define patient matching and set match-rate standards, but it hasn’t been enacted, so it creates no requirement today. Until it does, measure your own match rate instead of waiting on a federal benchmark.

Take a sample of your own records, have someone with HIM training mark the true matches, then run the matcher and count false merges and false splits. Agree targets for both before go-live and re-test when you add a source or change a threshold.

Abhinav Mohite

Abhinav Mohite

FHIR Subject Matter Expert, Mindbowser

Connect Now

Abhinav Mohite is a FHIR Subject Matter Expert at Mindbowser. He has 6+ years of experience in US healthcare interoperability, with deep expertise in HL7, FHIR, and SMART on FHIR implementation.

A Business Analyst and Product Owner hybrid with strong Agile and SDLC fluency, Abhinav bridges the gap between clinical workflow reality and technical protocol, making him a go-to expert for EHR integration projects where standards meet real-world delivery.

Share This Blog

Read More Similar Blogs

Let’s #Transform Healthcare,# Together.

Partner with us to design, build, and scale digital solutions that drive better outcomes.

Location

Global Tech Teams LLC, 525 Washington Blvd, Industrious at Newport Tower, Jersey City, NJ 07310, United States.

Contact

+1 408 786 5974
contact@mindbowser.com
BOOK A QUICK CONSULTATION

Have a Healthcare Project in Mind?

Let’s discuss your goals, workflows, and next steps in a focused consultation call.

Calendar icon Schedule a Call

Contact form