Documentation / How to: MDM

How to set up match rules for patients

Set thresholds, weights, blocking keys and vetoes, and test them on a sample before you run.

Before you start
Who
Data stewards.
You need
mdm:rules.manage.
  1. Choose the type

    In Match rules, choose Patient in the left panel. Every type starts with a standard rule set.
    Match rules: choosing the resource type in the left panel
    Match rules: choosing the resource type in the left panel
    1. Filter – Type part of a resource type name to shorten the list; matching groups open.
    2. Collapse all – Closes every group.
    3. Family group – Types are grouped by matching family (people, organizations, canonical definitions…); the arrow opens or closes a group.
    4. Selected type – The rule set shown on the right; an orange dot means the rules changed since the last MDM run, badges show off (matching disabled) and custom (edited).
  2. Set the thresholds

    Automatic merge at and Review at: pairs between the two go to stewards. Minimum attributes says how many attributes must have a value on both sides.
    Thresholds and the score bar
    Thresholds and the score bar
    1. Automatic merge at – Pairs scoring at or above this value are merged without a steward.
    2. Review at – Pairs from here up to the automatic threshold become possible matches in the Remediation queue.
    3. Minimum attributes – How many attributes must have a value on both sides before a score is trusted.
    4. Max. blocking group – Blocks with more records than this are skipped – protects against keys like a shared birth date.
    5. Score bar – The three zones update as you edit: no match, steward review, automatic merge.
    6. Scale – The two thresholds marked on the 0 to 1 scale.
    7. Legend – Plain-language reading of the current settings.
  3. Weigh the attributes

    Each attribute has a comparator (exact, phonetic, date, edit distance…) and a weight.
    Weighted attributes
    Weighted attributes
    1. Attribute – A label for people, and underneath the technical id used by vetoes.
    2. Where – Element paths read from the record (comma separated), or for a relationship attribute: resource type, referencing path and value path.
    3. Comparator – How two values are compared (fuzzy text, date, phone, identifier, shared references…). The box below takes JSON parameters.
    4. Weight – How much the attribute counts when it agrees.
    5. Penalty – How much it counts against the pair when it disagrees.
    6. Options – required: a missing value means no match. agree only: only agreement counts, disagreement is ignored.
    7. Order and delete – Move the attribute up or down, or remove it.
  4. Add blocking keys, rules and vetoes

    Blocking keys decide which pairs are compared; deterministic rules match on an identifier; vetoes cap the score when attributes conflict.
    Blocking keys, deterministic rules and vetoes
    Blocking keys, deterministic rules and vetoes
    1. Blocking key – Each key has parts: element paths plus a transform (soundex, first letters, year, digits…). Records sharing a key are compared.
    2. Deterministic rule – Automatic match without a score, e.g. the same identifier system and value.
    3. Veto – If the chosen attribute's similarity is below the limit, the score is capped, so a steward must decide.
  5. Test before you save

    Test on sample runs the rules on screen over a sample: candidate pairs, automatic merges, reviews and a score histogram. Nothing is written.
    The rule tester
    The rule tester
    1. Test on sample – Runs the rule set currently on screen – saved or not – over a sample of source records; nothing is changed.
    2. Result tiles – Sample size, candidate pairs, how many would merge automatically, go to review, or match by identifier.
    3. Score distribution – How many scored pairs fall in each score band; helps place the thresholds.
  6. Run

    Save, then start a matching run on the MDM dashboard.
    Start matching run dialog
    Start matching run dialog
    1. Scope – Choose which resource types to match. Masters (Patient, Practitioner, Organization…) are always processed before the types that refer to them.
    2. Start – Starts the run in the background; the dashboard switches to live progress.
TipPut the review threshold where the histogram has few pairs: fewer pairs to review, and fewer wrong merges.