ResMed Core Implementation Guide
0.37.0 - ci-build International flag

ResMed Core Implementation Guide - Local Development build (v0.37.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Operation $match on Patient

Description

This page describes how to use patient-match operation on CHP. It incudes the input parameter accepted by this operation and the returned response bundle example.

Introduction

The patient-match operation is implemented using a search algorithm that allows for approximate matches on the name fields. The closeness will be reflected in the score returned for each Patient resource returned.

The patient resource submitted to the operation does not have to be complete, but it does have to be a valid instance of resmed-patient-match-patient resource, as it is used as the reference data to match against. We require firstName, lastName and birthDate information of the patient in order to perform patient-match. Exact match is perform for birthDate field and approximate fuzzy match is done for firstName and lastName field.

Formal Definition (as a OperationDefinition).

URL: [base]/Patient/$match

This is an idempotent operation

In Parameters:

Name Cardinality Type Profile Documentation
resource 0..1 boolean ResMedPatientMatchPatient Use this to provide partial patient details for patient match operation (e.g. POST a patient record to Patient/$match).
onlyCertainMatches 0..1 integer   If there are multiple potential matches, then the match should not return the results with this flag set to true. When false, the server may return multiple results with each result graded accordingly. For now we have set this to false by default.
count 0..1 Bundle   The maximum number of records to return. If no value is provided, the server decides how many matches to return. Note that clients should be careful when using this, as it may prevent probable - and valid - matches from being returned

Out Parameters:

Name Cardinality Type Profile Documentation
return 1..1 Bundle   A bundle containing a set of Patient records that represent possible matches, when request is successful. If the operation was unsuccessful, then an OperationOutcome may be returned along with a BadRequest(400) status Code (e.g. security issue, or insufficient properties in patient fragment - check against profile)

The response from an patient-match query is a bundle containing patient records, ordered from most likely to least likely. If there are no patient matches, we get an empty search set with no error, but may include an operation outcome with further advice regarding patient selection. All patient records SHALL have a search score from 0 to 1, where 1 is the most certain match.

Examples

Request: Patient match using patient resource:

POST {API_URL}/Patient/$match
[some headers]

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "resource",
            "resource": {
                "resourceType": "Patient",
                "meta": {
                    "profile": [
                        "http://resmed.com/fhir/core/StructureDefinition/resmed-patient-match-patient"
                    ]
                },
                "name": [
                    {
                        "family": "Smith",
                        "given": [
                            "Steven"
                        ]
                    }
                ],
                "birthDate": "1990-10-25"
            }
        },
        {
            "name": "count",
            "valueInteger": 3
        },
        {
            "name": "onlyCertainMatches",
            "valueBoolean": false
        }
    ]
}

Response: Results from fuzzy search MPI algorithm

HTTP/1.1 200 OK
[other headers]

{
    "resourceType": "Bundle",
    "id": "ee432ae1-734c-4018-8fab-1bac4a94cff6",
    "meta": {
        "lastUpdated": "2023-04-12T16:10:39.108Z"
    },
    "type": "searchset",
    "total": 2,
    "entry": [
        {
            "search": {
                "mode": "match",
                "score": 1
            },
            "fullUrl": "https://id0ci3apg8.execute-api.us-west-2.amazonaws.com/dev/Patient/23aa7c61-1da8-4b88-b09b-1a9c8d089b5b",
            "resource": {
                "birthDate": "1990-10-25",
                "managingOrganization": {
                    "reference": "Organization/airview-organization"
                },
                "meta": {
                    "lastUpdated": "2023-03-15T15:21:58.671Z",
                    "versionId": "1",
                },
                "name": [
                    {
                        "given": [
                            "Stephen"
                        ],
                        "family": "Smith"
                    }
                ],
                "id": "23aa7c61-1da8-4b88-b09b-1a9c8d089b5b",
                "resourceType": "Patient"
            }
        },
...
        }
    ]
}

For more information about operations, including how they are invoked, see Operations.