Setting up the Master Patient Index premium

Before the MPI can find duplicates, you tell it what a patient record contains, which data identifies a person and how that data is compared. This is done once, from the web console, without writing code.

1. Patient template

A patient record is a PERSON actor, and its structure is defined by an openEHR Operational Template that you upload (see Demographics and Templates). The template holds whatever your organization records about a patient: names, birth date, sex, identifiers, addresses, contacts. It can follow local customs, such as naming conventions.

2. Identity definition

The identity is the subset of the template that takes part in matching. The rest of the record is kept, but not compared. For each identity you set:

  • The template it applies to.
  • The data points that form the identity, for example first name, last name, date of birth and sex.
  • The duplicate threshold: the similarity from which a pair is flagged as a potential duplicate. The default is 90%.

Atomik maintains the patient identity of the whole organization: one identity per person, not one per source system.

Identity definition with four data points
Identity definition

3. Comparison rules

The comparison configuration gives each identity data point a comparison method and a weight. Weights add up to 100%, and the result is one similarity score from 0% to 100%.

Comparison method and weight per data point
Comparison method and weight per data point

Comparison methods

The methods offered for a data point depend on its data type.

MethodWhat it doesTypical use
ExactThe values must be equal.Sex and other coded values
Levenshtein similarityCounts the typing changes between two values.Names, identifiers
Jaro-Winkler similarityLike the above, giving more weight to a common beginning.Short names
Phonetic matchEqual if both sound the same (Double Metaphone, designed around English sounds).Catherine / Katherine
Cosine similarityOverlap of words, in any order.Addresses
Token Jaccard similarityShared words over all words, in any order.Compound names
N-gram Jaccard similarityShared three-letter fragments.Typos anywhere in the value
Phone last digitsCompares the last 8 digits.Phone numbers with or without country code
Date differencePartial credit for matching year, month and day.Date of birth

Value clean-up

Each data point can be normalized before it is compared and before candidates are searched: trim and collapse spaces, ignore case, remove accents, remove punctuation, keep only letters and digits or only digits, sort words, drop short words or listed prefixes, and discard placeholder values such as 99999999999. Dates and numbers are never normalized. The console includes a simulator to try a value against your steps.

Changing the rules later

Changing the identity or its comparison rules makes earlier scores stale. The console shows the impact and asks for confirmation. Logged comparisons and rejected pairs are then discarded so they can be evaluated again. Confirmed duplicates and merges are kept.

4. Candidate finding

Comparing every record with every other one does not scale: 10,000 patients mean almost 50 million pairs. Atomik first selects the pairs that are worth comparing, grouping records that look alike. Being in the same group does not mean being the same person. A record can belong to more than one group.

One strategy is active per instance, set by the configuration property atomik.candidates.strategy:

StrategyHow candidates are foundConsider it when
ngram (default)Records sharing many three-letter fragments. No AI model needed.The identity is made of names, dates and codes.
probabilisticBlocking keys (for example, how a name sounds plus birth year) and a Fellegi–Sunter score learned from your data.You want common values to weigh less. Its score scale differs, so set the threshold accordingly.
vector-clusterA language model turns each identity into a vector; records above a similarity threshold form overlapping clusters.You want threshold-based clusters.
vector-topkEach record proposes its K nearest records, with no fixed threshold.The identity has free text.

Whatever the strategy, the review and merge process is the same. With ngram and the vector strategies the score comes from your comparison rules; probabilistic uses its own score. The default strategy needs nothing beyond the database.

Next: reviewing and merging duplicates.

Let us hear from you!

We love to hear from you, let us know how we can be of help.

WhatsApp Start a chat!