not able to hit <$operations> with end points like http://example.com/$mdm-query-links?matchResult=POSSIBLE_MATCH

179 views
Skip to first unread message

Kiran Polusani

unread,
Jan 7, 2021, 8:38:39 AM1/7/21
to HAPI FHIR
I am trying to use  $mdm-query-links and etc.. which are mentioned on MDM documentation. As mentioned I tried to the endpoints like  

Could someone help me in understanding how to use these $operations?

Regards,
Kiran.

Ajay shekar

unread,
Jan 11, 2021, 10:53:44 PM1/11/21
to HAPI FHIR
I think you are using the http://example.com/$mdm-query-links?matchResult=POSSIBLE_MATCH operation right.

But make sure you have enabled the MDM and golden records is getting created. 

Then if you post two resources of same type(Patient/Practitioner) with similar field value to match "matchFields" of mdm-rules.json file, 
you can query http://example.com/$mdm-query-links to see mdm linked resources.

Kiran Polusani

unread,
Jan 11, 2021, 11:07:41 PM1/11/21
to HAPI FHIR
Thanks for responding. I am able to store patients and create golden records and mdm-rules.json configuration. everything is working fine. Only thing I am not able to use the api with operations like $match. I am getting operation not supported error like this.

{
    "resourceType": "OperationOutcome",
    "text": {
        "status": "generated",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Patient/$match] with parameters [[]]</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
    },
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Patient/$match] with parameters [[]]"
        }
    ]
}

Ajay shekar

unread,
Jan 12, 2021, 6:13:42 AM1/12/21
to HAPI FHIR
You are making GET operation with [Patient/$match], it has to be POST.

Kiran Polusani

unread,
Jan 12, 2021, 7:35:28 AM1/12/21
to HAPI FHIR
I tried both 

{
    "resourceType": "OperationOutcome",
    "text": {
        "status": "generated",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[Patient/$match] with parameters [[]]</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
    },
    "issue": [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[Patient/$match] with parameters [[]]"
        }
    ]
}

Even as mentioned in MDM docs I tried get http://example.com/$mdm-query-links?matchResult=POSSIBLE_MATCH
 also showing the same reponse

Ajay shekar

unread,
Jan 12, 2021, 8:04:05 AM1/12/21
to HAPI FHIR
Okay, well I have to look at your sample request body and url. Also it will be good, if you can provide the url you used to create patient.

Kiran Polusani

unread,
Jan 12, 2021, 9:18:26 AM1/12/21
to HAPI FHIR
URL: http://localhost:8080/fhir/Patient 

Request:
{
        "resourceType": "Patient",
        "name": [
          {
            "use": "official",
            "family": "Abcd",
            "given": [
              "xyze"
            ]
          }
        ],
        "gender": "male",
        "birthDate": "1972-01-08T00:00:00",
        "active": true,
        "telecom": [
          {
            "system": "phone",
            "value": "0678 56160"
          }
        ]
     
}
Capture.PNG
And match url is 
Capture2.PNG

Ajay shekar

unread,
Jan 12, 2021, 10:38:01 AM1/12/21
to HAPI FHIR
Its working for me when fields (name, birthdate) is in request body. 

Else it gives 0 match result but doesnt throw error of bad request, Your case is strange.

My mdm-rules.json file is - 
{
"version": "1",
"mdmTypes": ["Patient", "Practitioner"],
"candidateSearchParams": [
{
"resourceType": "Patient",
"searchParams": ["birthdate"]
},
{
"resourceType": "*",
"searchParams": ["identifier"]
},
{
"resourceType": "Patient",
"searchParams": ["general-practitioner"]
}
],
"candidateFilterSearchParams": [
{
"resourceType": "*",
"searchParam": "active",
"fixedValue": "true"
}
],
"matchFields": [
{
"name": "cosine-given-name",
"resourceType": "*",
"resourcePath": "name.given",
"matcher": {
"algorithm": "COLOGNE"
}
},
{
"name": "jaro-last-name",
"resourceType": "*",
"resourcePath": "name.family",
"matcher": {
"algorithm": "SOUNDEX"
}
}
],
"matchResultMap": {
"cosine-given-name" : "POSSIBLE_MATCH",
"cosine-given-name,jaro-last-name" : "MATCH"
},
}

$match operation is linked to this mdm-rules and I guess matchFields and candidateSearchParams field needs to be present while making $match operation.

Kiran Polusani

unread,
Jan 12, 2021, 11:15:38 AM1/12/21
to HAPI FHIR
Are you using the same codebase
Or different. I am working with the branch rel_5_3_0. Or if possible could you please share me the sample codezip that you are using?

Kiran Polusani

unread,
Jan 12, 2021, 9:57:58 PM1/12/21
to HAPI FHIR
is there any changes made in properties or yaml file apart from mdm_enabled=true?
Reply all
Reply to author
Forward
0 new messages