MDM Block Rules

 

Block rules consist of a rule-set, and each rule-set consists of a set of fields (defined by fhir path and block value).

Rules are applied one at a time until a match is found, at which point the submitted resource will be omitted from MDM matching.

If no rule-set matches the submitted resource, MDM matching will continue as expected.

A blocked resource is tagged with the code blocked under the system http://hapifhir.io/fhir/NamingSystem/mdm-unmatched, so blocked resources can be found afterwards. A Golden Record is still created for blocked resources.

See Resources Omitted From MDM Matching.

To give an overview on how blocklist rules work, some working examples have been provided here.

While block rules could be applied to any resource type, the examples provided here will all be using Patient resources.

For information on how the block list rules work specifically, please see mdm customization rules.

Block on Name (John Doe or Jane Doe)

Block rules

{
   "blocklist": [{
      "resourceType": "Patient",
      "fields": [{
        "fhirPath": "name.first().family",
        "value": "doe"
      }, {
         "fhirPath": "name.first().given.first()",
         "value": "john"
      }]
   }, {
      "resourceType": "Patient",
      "fields": [{
         "fhirPath": "name.first().family",
         "value": "doe"
      }, {
         "fhirPath": "name.first().given.first()",
         "value": "jane"
      }]
   }]
}

Example of a blocked patient

				{
   "resourceType": "Patient",
   "name": [{
      "family": "Doe",
      "given": [ "John" ]
   }]
}

Block On Extension

Block Rules

{
   "blocklist": [{
      "resourceType": "Patient",
      "fields": [{
         "fhirPath": "extension.where(url = 'http://hl7.org/fhir/StructureDefinition/resource-instance-description').value",
         "value": "Test Patient"
      }]
   }]
}

Example of blocked patient

				{
   "resourceType": "Patient",
   "name": [{
      "family": "Simpson",
      "given": [ "Homer" ]
   }],
   "extension": [{
      "url": "http://hl7.org/fhir/StructureDefinition/resource-instance-description",
      "valueString": "Test Patient"
   }]
}

Block on Identifier: US Social Security Number (SSN)

Block Rules

{
   "blocklist": [{
      "resourceType": "Patient",
      "fields": [{
         "fhirPath": "identifier.where(system = 'http://hl7.org/fhir/sid/us-ssn').value",
         "value": "000-00-0000"
      }]
   }]
}

Example of blocked patient

{	
   "resourceType": "Patient",
   "name": [{
      "family": "Simpson",
      "given": [ "Homer" ]
   }],
   "identifier": [{
      "system": "http://hl7.org/fhir/sid/us-ssn",
      "value": "000-00-0000"
   }]
}

Block on Date: Birthday

{
   "blocklist": [{
      "resourceType": "Patient",
      "fields": [{
         "fhirPath": "birthDate",
         "value": "1900-01-01"
      }]
   }]
}

Example of blocked patient

{	
   "resourceType": "Patient",
   "name": [{
      "family": "Simpson",
      "given": [ "Homer" ]
   }],
   "birthDate": "1900-01-01"
}

Combining Rules

Rules can be combined with each other for more exact matches.

Adding more fields to a rule-set creates a more precise block rule. While adding more rule-sets creates different block conditions on the same resource type.

The following example combines multiple rules to block very specific patients, either with an official name of John Doe or Jane Doe, and with the specific US SSN value 000-00-0000.

{
   "blocklist": [{
      "resourceType": "Patient",
      "fields": [{
        "fhirPath": "name.where(use = 'official').family",
        "value": "doe"
      }, {
         "fhirPath": "name.where(use = 'official').given.first()",
         "value": "john"
      }, {
         "fhirPath": "identifier.where(system = 'http://hl7.org/fhir/sid/us-ssn').value",
         "value": "000-00-0000"
      }]
   }, {
      "resourceType": "Patient",
      "fields": [{
         "fhirPath": "name.where(use = 'official').family",
         "value": "doe"
      }, {
         "fhirPath": "name.where(use = 'official').given.first()",
         "value": "jane"
      }, {
         "fhirPath": "identifier.where(system = 'http://hl7.org/fhir/sid/us-ssn').value",
         "value": "000-00-0000"
      }]
   }]
}

Examples of blocked patients:

				{
   "resourceType": "Patient",
   "name": [{
      "use": "official",
      "family": "Doe",
      "given": [ "John" ]
   }],
   "identifier": [{
      "system": "http://hl7.org/fhir/sid/us-ssn",
      "value": "000-00-0000"
   }]
}
				{
   "resourceType": "Patient",
   "name": [{
      "use": "official",
      "family": "Doe",
      "given": [ "Jane" ]
   }],
   "identifier": [{
      "system": "http://hl7.org/fhir/sid/us-ssn",
      "value": "000-00-0000"
   }]
}

Note that the name field has "use": "official", and only a single given name is provided.