Smile CDR v2024.05.PRE
On this page:

22.8.1$mdm-evaluate operation

 

$mdm-evaluate is a custom Smile CDR operation, which you can use to test out different MDM algorithms available and get match results based on the input values.

This operation is only available when a FHIR persistence module is configured to use MDM. This operation will be available on the base FHIR endpoint url.

This operation takes in Parameters FHIR resource for inputs and responds with a Parameters resource with the match results.

22.8.1.1Permissions

22.8.1.2Limitations

  • This custom operation is available for FHIR version DSTU3 and FHIR versions released after.
  • This custom operation does not support two matcher type algorithms:
    • IDENTIFIER
    • EXTENSION_ANY_ORDER

22.8.1.3Input Parameters

Parameter nameCardinalityTypeDescription
compareTo1..1StringThe input string to compare.
compareWith1..1StringThe input string to compare against.
algorithmType1..1StringThe algorithm type matcher or similarity.
algorithm1..1StringThe algorithm name to use for evaluation.
threshold0..1DecimalThe match threshold to check with.
Note: This is not required for matcher type but required for similarity type algorithm.

22.8.1.4Output Parameters

Parameter nameCardinalityTypeDescription
match1..1Booleantrue or false based on the evaluation.
score0..1StringThe match score based on the evaluation. Note: This is only returned for similarity type evaluation.

22.8.1.4.1Sample request for

Below is a sample request and response when using $mdm-evaluate for similarity type algorithm.

POST http://fhir.example.com/baseR4/$mdm-evaluate

Sample request body

{
	"resourceType":"Parameters",
	"parameter":[
		{
			"name":"compareTo",
			"valueString":"My tsring"
		},
		{
			"name":"compareWith",
			"valueString":"My string"
		},
		{
			"name":"algorithmType",
			"valueString":"similarity"
		},
		{
			"name":"algorithm",
			"valueString":"JARO_WINKLER"
		},
		{
			"name":"threshold",
			"valueDecimal":0.5
		}
	]
}

Sample response body

{
	"resourceType": "Parameters",
	"parameter": [
		{
			"name": "match",
			"valueBoolean": true
		},
		{
			"name": "score",
			"valueDecimal": 0.974
		}
	]
}

Below is a sample request and response when using $mdm-evaluate for matcher type algorithm.

POST http://fhir.example.com/baseR4/$mdm-evaluate

Sample request body

{
	"resourceType":"Parameters",
	"parameter":[
		{
			"name":"compareTo",
			"valueString":"Gail"
		},
		{
			"name":"compareWith",
			"valueString":"Gael"
		},
		{
			"name":"algorithmType",
			"valueString":"matcher"
		},
		{
			"name":"algorithm",
			"valueString":"CAVERPHONE1"
		}
	]
}

Sample response body

{
	"resourceType": "Parameters",
	"parameter": [
		{
			"name": "match",
			"valueBoolean": true
		}
	]
}