An MDM rule definition is a JSON document whose top-level fields are version, mdmTypes, candidateSearchParams, candidateFilterSearchParams, matchFields, matchResultMap and eidSystems. The MDM Rule Definition page describes these top-level fields, with examples and performance guidance. This page provides the detailed schema of the nested structures that appear within a rule definition.
eidSystems SchemaeidSystems is a JSON object keyed by resource type, or by * to apply to every managed resource type.
Each value is either a single EID system URI, or an array of them where a resource type is identified by more than one system. Both forms may appear in the same object.
{
"eidSystems": {
"Patient": ["http://example.org/fhir/sid/mrn", "http://example.org/fhir/sid/npi"],
"Practitioner": "http://hl7.org/fhir/sid/us-npi"
}
}
Order is significant: the first system listed for a resource type is its primary system. See Using Enterprise Identifiers (EIDs) in MDM Rule Definition for how several systems affect matching.
candidateSearchParams Entry Schema| Field Name | Brief Description | Notes and Comments |
|---|---|---|
resourceType |
Indicates which resource type this search parameter applies to. | Only match operations related to this resource type will use this search criteria. This resource type must also appear in the list of mdmTypes. The special value * can be used to include all resource types from the list of mdmTypes. |
searchParams |
Indicates which search parameters to include in the query. | These may be standard or custom search parameters. Each search parameter must be active and the FHIR resources must be indexed on each search parameter. If multiple search parameters are listed, a resource must match on all of them to be considered a candidate. |
candidateFilterSearchParams Entry Schema| Field Name | Brief Description | Notes and Comments |
|---|---|---|
resourceType |
Indicates which resource type this filter applies to. | Only queries related to this resource type will include this filter. At least one entry for this resource type must occur in the list of candidateSearchParams. |
searchParam |
Indicates which search parameter to filter on. | This may be a standard or custom search parameter. It must be active, and it must have been indexed. |
qualifier |
[Optional] Specifies the type of test that will be evaluated. | If this field is not provided, the default test is exact equality with the fixedValue. Other possible values for this field are ABOVE, BELOW, NOT, IN, NOT_IN, TEXT or OF_TYPE. Not all qualifiers can be applied to all search parameters. |
fixedValue |
The value that will be compared to the search parameter to evaluate the filter. | The value must be appropriate for the specified search parameter. |
matchFields Entry Schema| Field Name | Brief Description | Notes and Comments |
|---|---|---|
name |
Assigns a name to the match rule. | Used to identify this rule in the matchResultMap. The name must not contain a comma. |
resourceType |
Indicates which resource type the rule applies to. | This resource type must also appear in the list of mdmTypes. |
resourcePath |
[Optional] Indicates the field to be compared as a simple path. | The path to the field is expressed using a dot-delimited list of node names in the resource structure. |
fhirPath |
[Optional] Indicates the field to be compared as a FHIRPath expression. | The path to the field is expressed using a FHIRPath expression. |
matcher |
[Optional] Indicates the algorithm to use to evaluate the match. | This property is used for matchers that return a simple boolean result. |
similarity |
[Optional] Indicates the algorithm to use to evaluate the match. | This property is used for matchers that return a similarity score. |
At least one of fhirPath and resourcePath must be provided. If both are provided in a single rule, fhirPath takes precedence.
At least one of matcher and similarity must be provided. If both are provided in a single rule, matcher takes precedence.
matcher Entry Schema| Field Name | Brief Description | Notes and Comments |
|---|---|---|
algorithm |
The algorithm to use to evaluate the match. | This can be a built-in matcher or a custom matcher. The selected algorithm must implement the IMdmFieldMatcher interface. |
identifierSystem |
[Optional] An identifier system URI. | If the algorithm is IDENTIFIER and this property is provided, only identifiers whose system matches this value will be considered for match purposes. This property has no effect for any other built-in matcher. It is available for custom matchers. |
exact |
[Optional] Indicates that an exact match should be performed. | If this property is set to true, the matcher will perform a strict match. Otherwise, the values being compared will be normalized before matching, allowing case insensitivity and ignoring diacritical marks. |
similarity Entry Schema| Field Name | Brief Description | Notes and Comments |
|---|---|---|
algorithm |
The algorithm to use to evaluate the similarity. | This can be a built-in matcher or a custom matcher. The selected algorithm must implement the IMdmFieldSimilarity interface. |
matchThreshold |
The threshold for a successful match. | Similarity algorithms return a decimal value between 0 and 1 to represent the degree of similarity between two inputs. This parameter specifies the minimum similarity score that must be achieved to be considered a match. |
exact |
[Optional] Indicates that an exact match should be performed. | If this property is set to true, the matcher will perform a strict match. Otherwise, the values being compared will be normalized before matching, allowing case insensitivity and ignoring diacritical marks. |
You are about to leave the Smile Digital Health documentation and navigate to the Open Source HAPI-FHIR Documentation.