43.2.1MDM Endpoint
Deprecated

 

The MDM (Master Data Management) endpoints provide RESTful JSON access to MDM operations through the Admin JSON API. These endpoints offer convenient access to MDM functionality for administrative purposes.

This method requires the ACCESS_ADMIN_JSON permission.
The operations described on this page are DEPRECATED and will be removed in the future. The [FHIR MDM Operations](/hapi-fhir/docs/server_jpa_mdm/mdm_operations.html) versions of these MDM endpoints should be used instead.

See FHIR documentation for the FHIR endpoint versions of these MDM endpoints.


43.2.1.1MDM Create Link

Creates a new MDM link between an existing golden resource and an existing source resource with the provided match result.

POST http://localhost:9000/mdm/{mdm_module_id}/create-link

43.2.1.1.1Request Body

{
   "goldenResourceId": "Patient/10",
   "resourceId": "Patient/1",
   "matchResult": "MATCH"
}

43.2.1.1.2Response

{
   "links": [{
      "goldenResourceId": "Patient/10",
      "sourceId": "Patient/1",
      "matchResult": "MATCH"
   }]
}

See the related documentation for the FHIR endpoint here.

43.2.1.2MDM Update Link

Updates an existing MDM link, changing the link relationship between a provided golden resource id and source resource id.

POST http://localhost:9000/mdm/{mdm_module_id}/update-link

43.2.1.2.1Request Body

{
   "goldenResourceId": "Patient/10",
   "resourceId": "Patient/1",
   "matchResult": "MATCH"
}

43.2.1.2.2Response

{
   "links": [{
      "goldenResourceId": "Patient/10",
      "sourceId": "Patient/1",
      "matchResult": "MATCH"
   }]
}

See the related documentation for the FHIR endpoint here.

43.2.1.3MDM Not Duplicate

Marks the provided golden resources as not duplicates.

Output is always true, or an exception is thrown.

POST http://localhost:9000/mdm/{mdm_module_id}/not-duplicate

43.2.1.3.1Request Body

{
   "goldenResourceId": "Patient/10",
   "resourceId": "Patient/1"
}

43.2.1.3.2Response

true

See the related documentation for the FHIR endpoint here.

43.2.1.4MDM Merge Golden Resources

Merges one golden resource into another. After the merge is complete, the "from" golden resource will be deactivated.

POST http://localhost:9000/mdm/{mdm_module_id}/merge-golden-resources

43.2.1.4.1Request Body

{
   "fromGoldenResourceId": "Patient/10",
   "toGoldenResourceId": "Patient/20"
}

43.2.1.4.2Response

{
   "resourceType": "Patient",
   "id": "20",
   "meta": {
      "versionId": "2",
      "lastUpdated": "2000-01-31T00:00:00.000-00:00",
      "tag": [
         {
            "system": "http://hapifhir.io/fhir/NamingSystem/mdm-record-status",
            "version": "1",
            "code": "GOLDEN_RECORD",
            "display": "Golden Record",
            "userSelected": false
         },
         {
            "system": "https://hapifhir.org/NamingSystem/managing-mdm-system",
            "version": "1",
            "code": "HAPI-MDM",
            "display": "This Golden Resource can only be modified by HAPI MDM system.",
            "userSelected": false
         }
      ]
   },
   "identifier": [
      {
         "system": "http://hapifhir.io/fhir/NamingSystem/mdm-golden-resource-enterprise-id",
         "value": "4f8d1113-6a76-4671-88cd-10f7dc3bd2e6"
      },
      {
         "system": "http://hapifhir.io/fhir/NamingSystem/mdm-golden-resource-enterprise-id",
         "value": "799fec0d-7904-4698-bc7d-3cf6dd757c30"
      }
   ]
}

See the related documentation for the FHIR endpoint here.

43.2.1.5MDM Query Links

Returns a pageable list of MDM links that fit the optionally provided query parameters.

GET http://localhost:9000/mdm/{mdm_module_id}/query-links?matchResult=NO_MATCH

43.2.1.5.1Query Parameters

  • goldenResourceId - A single string value of the golden resource id. E.g.: goldenResourceId=Patient%2F10
  • resourceId - A single string value of the source resource id. E.g.: resourceId=Patient%2F1
  • matchResult - A string value of the match type of interest (MATCH, NO_MATCH, POSSIBLE_MATCH). E.g.: matchResult=MATCH
  • linkSource - A single string of the link type (AUTO, MANUAL). E.g.: linkSource=AUTO
  • _offset - Offset for paging. E.g.: _offset=1
  • _count - The number of links to return. E.g.: _count=10
  • _sort - One or more comma separated string values indicating the fields of the MDM Link on which to sort (prefaced with a - for descending order). E.g.: sort=-myUpdated
  • resourceType - The resource types of interest. E.g.: resourceType=Patient
  • partitionIds - A list of partition ids to search. E.g.: partitionIds=1,2,3

43.2.1.5.2Response

{
   "links": [
      {
         "goldenResourceId": "Patient/10",
         "sourceId": "Patient/1",
         "matchResult": "MATCH",
         "linkSource": "AUTO",
         "created": 1691003284116,
         "updated": 1691003284116,
         "version": "1",
         "eidMatch": false,
         "vector": 0,
         "score": 1.0,
         "ruleCount": 0,
         "linkCreatedNewGoldenResource": true
      }
   ]
}

See the related documentation for the FHIR endpoint here.

43.2.1.6MDM Link History

Shows a history for a given set of MDM links, querying by golden resource IDs, source IDs, or both.

GET http://localhost:9000/mdm/{mdm_module_id}/link-history?goldenResourceId=Patient/10

43.2.1.6.1Query Parameters

The following query parameters are available. One or both must be provided:

  • goldenResourceId - The golden resource id of interest. E.g.: goldenResourceId=Patient/10
  • resourceId - The source resource id of interest. E.g.: resourceId=Patient/1

43.2.1.6.2Response

{
   "links": [
      {
         "mdmLink": {
            "goldenResourceId": "Patient/10",
            "sourceId": "Patient/1",
            "matchResult": "MATCH",
            "linkSource": "AUTO",
            "created": 1691003284116,
            "updated": 1691003284116,
            "version": "1",
            "eidMatch": false,
            "vector": 0,
            "score": 1.0,
            "ruleCount": 0,
            "linkCreatedNewGoldenResource": true
         },
         "revisionNumber": 1,
         "revisionTimestamp": 1691003284123
      }
   ]
}

See the related documentation for the FHIR endpoint here.

43.2.1.7MDM Duplicate Golden Resources

Returns a list of all the duplicate golden resources.

GET http://localhost:9000/mdm/{mdm_module_id}/duplicate-golden-resources

43.2.1.7.1Query Parameters

The following optional query parameters are available:

  • _offset - The offset to begin returning records at. E.g.: _offset=1
  • _count - The number of resources to be returned per page. E.g.: _count=10
  • partitionIds - A list of partitions to query. E.g.: partitionIds=1,2,3
  • resourceType - The resource type of interest. E.g.: resourceType=Patient

43.2.1.7.2Response

{
   "links": [
      {
         "goldenResourceId": "Patient/10",
         "sourceId": "Patient/1",
         "matchResult": "POSSIBLE_DUPLICATE",
         "linkSource": "AUTO",
         "created": 1691003284116,
         "updated": 1691003284116,
         "version": "1",
         "eidMatch": false,
         "vector": 0,
         "score": 1.0,
         "ruleCount": 0,
         "linkCreatedNewGoldenResource": true
      }
   ]
}

See the related documentation for the FHIR endpoint here.

43.2.1.8MDM Submit

Submits a batch job to perform MDM matching on all existing resources in the system. An optional criteria can be provided to filter resources on which to match.

The output value will be the number of resources submitted for MDM processing.

POST http://localhost:9000/mdm/{mdm_module_id}/mdm-submit

43.2.1.8.1Request Body

{
   "resourceType": "Patient",
   "criteria": "birthdate=2020-07-28"
}

43.2.1.8.2Response

27

See the related documentation for the FHIR endpoint here.

43.2.1.9MDM Clear

Submits a batch job to bulk delete all MDM links and related golden resources from the system.

The returned output will include a batch jobId which can be used to find the status of the job in the admin console.

POST http://localhost:9000/mdm/{mdm_module_id}/mdm-clear

43.2.1.9.1Request Body

{
   "resourceType": "Patient,Practitioner",
   "batchSize": 500,
   "tenantId": "{tenant-id}"
}

43.2.1.9.2Response

{
   "resourceType": "Patient",
   "parameter": [{
      "name": "jobId",
      "valueString": "some-guid-value"
   }]
}

See the related documentation for the FHIR endpoint here.

43.2.1.10MDM Metrics

Returns metrics about the MDM module.

GET http://localhost:9000/mdm/{mdm_module_id}/mdm-metrics?resourceType=Patient

43.2.1.10.1Query Parameters

  • resourceType (required) - The resource type of interest. Must be a valid FHIR resource type. E.g.: resourceType=Patient
  • matchResult (optional) - A string value of the match type of interest (MATCH, NO_MATCH, POSSIBLE_MATCH). Metrics (for score and link type counts) will be filtered to only look at the provided match results. If none are provided, all will be checked. E.g.: matchResult=MATCH
  • linkSource (optional) - A single string of the link type (AUTO, MANUAL). Metrics for link type counts will be filtered to only look at the provided link sources. If none are provided, all will be checked. E.g.: linkSource=AUTO

43.2.1.10.2Response Example 1

{
	"resourceType": "Patient",
	"matchResult2linkSource2count": {
		"NO_MATCH": {
			"MANUAL": 1
		},
		"MATCH": {
			"AUTO": 5
		}
	},
	"scoreCounts": {
		"NULL": 0,
		"x_<_0.01": 0,
		"0.01_<_x_<=_0.02": 0,
		"0.02_<_x_<=_0.03": 0,
		"0.03_<_x_<=_0.04": 0,
		"...": "...",
		"0.97_<_x_<=_0.98": 0,
		"0.98_<_x_<=_0.99": 0,
		"0.99_<_x_<=_1.00": 6
	},
	"goldenResources": 4,
	"sourceResources": 5,
	"excludedResources": 0
}

43.2.1.10.3Response Example 2

For filtered results using matchResult=MATCH&linkSource=AUTO:

{
	"resourceType": "Patient",
	"matchResult2linkSource2count": {
		"MATCH": {
			"AUTO": 5
		}
	},
	"scoreCounts": {
		"NULL": 0,
		"x_<_0.01": 0,
		"0.01_<_x_<=_0.02": 0,
		"0.02_<_x_<=_0.03": 0,
		"0.03_<_x_<=_0.04": 0,
		"...": "...",
		"0.97_<_x_<=_0.98": 0,
		"0.98_<_x_<=_0.99": 0,
		"0.99_<_x_<=_1.00": 5
	},
	"goldenResources": 4,
	"sourceResources": 5,
	"excludedResources": 0
}

43.2.1.11Notes

  • This operation is currently only supported on the JSON Admin API
  • This operation is currently in experimental stage and may be subject to change with minimal notice