# SanteMPI Matches

SanteMPI provides a robust [matching-engine](https://help.santesuite.org/santedb/matching-engine "mention")which can be used to determine whether new registrations or existing registrations are duplicate / identical patients.&#x20;

The matching dashboard is used to show the registered matches (i.e. those which have been detected and flagged) within the SanteMPI linkage tables.&#x20;

## Nomenclature

The nomenclature used in SanteDB is described in detail in [master-data-storage](https://help.santesuite.org/santedb/data-and-information-architecture/data-storage-patterns/master-data-storage "mention"), when describing the patients in the user interface documentation the data will be referred to as:

* `LOCAL_A` - The source record submitted from a third party system, representing the `$input` record
* `MASTER_A` - The master/golden record established by SanteMPI's master data management layer for `LOCAL_A` (note there may be multiple locals attached to this record)
* `LOCAL_B` - The source record submitted from a third party system, representing the `$block` record
* `MASTER_B` - The master/golden record established by SanteMPI's master data management layer for `LOCAL_B` (note: there may be multiple locals attached to this record)

## Patient Matching

The first portion of the match dashboard shows the duplicate detection panel. This panel allows data administrators to quickly review duplicates which have been detected by the MPI software.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2Fv7y0i2WXZG3OS7gGqmwD%2Fimage.png?alt=media\&token=5d554c62-a2bd-45d2-bba5-b46326153192)

* Candidate Report - Downloads the `Detected Duplicates` table in excel format
* Linkage Report - Downloads an excel report with the entirety of the SanteMPI database linkages provided.
* Candidate Patient A/B - The pair of patient records which were detected as a duplicate.
  * Patient A - The inbound or `$input or LOCAL_A` patient which was being registered
  * Patient B - The duplicate or `$block or MASTER_B` patient which was scored
* Normalized Score - The confidence (`0.0 .. 1.0`) that the patient represented in Patient A is the same as Patient B.
* [View Match Detail](#undefined) - Opens the detail screen for the match (see: )
* Quick Resolve - Resolves the match pair
* Quick Ignore - Ignores the match pair

### Quick Resolve

The quick resolution option allows the data administrator to quickly instruct the SanteMPI MDM layer that Patient A has been verified as Patient B. This action:

* Detaches `LOCAL_A` from `MASTER_A` (i.e. detaches the patient in Patient A column from its current master / golden record)
* Attaches `LOCAL_A` to `MASTER_B` (i.e. attaches the Patient A column to the Patient B master / golden record)
* If no further local or source records exist for `MASTER_A` then `MASTER_A` is obsoleted.

{% hint style="info" %}
The SanteMPI MDM user interfaces do not MERGE records, they change linkages. In SanteDB a MERGE is a different operation which is performed only by source systems when they send an appropriate `ADT^A40` or `PMIR Merge`
{% endhint %}

### Quick Ignore

The quick ignore option allows the data administrator to quickly instruct SanteMPI MDM layer that Patient A has been verified NOT to be Patient B. This action:

* Removes the current candidate record between `LOCAL_A` and `MASTER_B`
* Adds a new `Ignore` instruction which instructs all future detections between `LOCAL_A` and `MASTER_B` to be ignored.

## View Match Detail

Clicking on the `View` option, will display a more detailed analysis of the match pair. This view assists data administrators in determining the validity of the match, such that the match can be verified or ignored.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2FdAmAePkipl3Ed6wOZner%2Fimage.png?alt=media\&token=b2fdb21c-0a5c-496e-88d7-b829a564906f)

* Match Summary Information Tab - Shows a side-by-side comparison of basic attributes on both the A and B records.
  * Either patient record can be opened using the `View` option.
* [A/B Comparison](#a-b-compare) - Shows the A and B comparison of all demographics for the patient match pair.
* [Scoring ](#undefined)- Shows a report of the match score between the two records based on configurations which are active in SanteMPI.
* Match Classification - Indicates the overall quality of the match

### A/B Compare

The `Matched Entities` tab shows summary information of the two patients which have been flagged as potential matches. However, there are times when a more holistic view of a patient match pair is desired. Some reasons the A/B compare may be used:

* To see other relationships both the A and B records have (such as citizenship, employment, marital status, multiple-birth, etc.)
* To view next of kin records on both A and B records.
* &#x20;To view additional identification information (from third party plugins) which would otherwise be rendered in the patient dashboard.

The A/B compare tab takes the contents of the [the-patient-dashboard](https://help.santesuite.org/user-guides-and-training/santempi/the-patient-dashboard "mention") (which is a common place for plugins to extend the UI) and shows the panels as an A/B comparison.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2Frzrg6l3Zvemow1YP7sDi%2Fimage.png?alt=media\&token=2648be23-90c6-4c25-99ad-066def7670b6)

### Scoring

The scoring tab presents a list of match configurations which are active on the SanteMPI server and presents each configured attribute, the weights, and calculated score.&#x20;

This panel is used by data administrators to understand **why** the particular match pair came to be flagged. This information is helpful when determining whether a configuration needs to be changed, or to understand why a match is a match.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LZ0_pjgTp_kx4hqTZ3a%2Fuploads%2FR5ey8mmxLOy2yKRmRsXq%2Fimage.png?alt=media\&token=95a5811d-3532-4893-9d64-67bdb33a3965)

* Classification - Indicates the match pair's classification as determined by the configuration.
* Match Method - The method or algorithm used to score the matches&#x20;
  * Weighted - The matching engine used a weighted scoring for the match
  * Deterministic - The matching engine used only a deterministic score for the match pair
  * Identifier - The matching engine made the determination based on identification of the source and target resources
* Absolute Score - The numeric score assigned to the match pair. This score is a sum of all weighted scores for all attributes.
* Strength - The normalized score which indicates on a scale of `0 .. 1` what the match agreement was.

The detail table illustrates the calculated (and weighted) score of each object (see: [matching-engine](https://help.santesuite.org/santedb/matching-engine "mention")) for more details.

| E         | Indicates whether the attribute was even evaluated. If the attribute was not evaluated, then the `whenNull` action was taken on the score. | <p><span data-gb-custom-inline data-tag="emoji" data-code="2714">✔️</span> - The attribute was evaluated and scored<br><span data-gb-custom-inline data-tag="emoji" data-code="2716">✖️</span> - The attribute was not evaluated. The <code>whenNull</code> score was applied.</p> |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Attribute | Indicates the attribute identifier or name which was scored.                                                                               | The path to the property in A and B values.                                                                                                                                                                                                                                        |
| A Value   | The value of the property in record A which was evaluated.                                                                                 |                                                                                                                                                                                                                                                                                    |
| B Value   | The value of the property in record B which was evaluated.                                                                                 |                                                                                                                                                                                                                                                                                    |
| M / U     | Identifies the match probability (M) and the uncertainty (U) of the attributes.                                                            | <p>M - The likelihood that if the A value and B value agree, then the record represents a true match.<br>U - The likelihood that if the A value and B value agree, that they agree on a coincidence.</p>                                                                           |
| Score     | The numeric, calculated score given to the record (before partial scoring applied)                                                         |                                                                                                                                                                                                                                                                                    |
| Weight    | The final score applied to the overall score for the record.                                                                               |                                                                                                                                                                                                                                                                                    |

## Related Topics

{% content-ref url="the-patient-dashboard/master-data-management-tab" %}
[master-data-management-tab](https://help.santesuite.org/user-guides-and-training/santempi/the-patient-dashboard/master-data-management-tab)
{% endcontent-ref %}

{% content-ref url="../../operations/cdr-administration/santedb-administration-panel/cdr-administration/matching-configuration" %}
[matching-configuration](https://help.santesuite.org/operations/cdr-administration/santedb-administration-panel/cdr-administration/matching-configuration)
{% endcontent-ref %}

{% content-ref url="../../santedb/matching-engine" %}
[matching-engine](https://help.santesuite.org/santedb/matching-engine)
{% endcontent-ref %}
