Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

getSingleBestRecord

...

In this scenario we have two records that have been linked together by the matching algorithm. The Single Best Record module has been configured using the section shown above. We use the findPersonsByAttributes method to return the sample records for the example.

http://localhost:8080/openempi-admin/openempi-ws-rest/person-query-resource/findPersonsByAttributes

Input:

Code Block
languagejs
{
  "givenName": "James",
  "familyName": "Dedicoat"
}

Output

Code Block
languagejs
{
    "person": [
        {
            "address1": "12 Sheaffe Street",
            "address2": "Herbert River",
            "city": "Houston",
            "dateCreated": "2018-03-08T13:00:00.249-05:00",
            "dateOfBirth": "1948-02-24T00:00:00-05:00",
            "familyName": "Dedicoat",
            "givenName": "James",
            "personId": "3727",
            "personIdentifiers": {
                "dateCreated": "2018-03-08T13:00:00.249-05:00",
                "identifier": "rec-3044-dup-0",
                "identifierDomain": {
                    "identifierDomainId": "14",
                    "identifierDomainName": "IHENA",
                    "namespaceIdentifier": "IHENA",
                    "universalIdentifier": "1.3.6.1.4.1.21367.2010.1.2.300",
                    "universalIdentifierTypeCode": "ISO"
                },
                "personIdentifierId": "3728"
            },
            "phoneNumber": "6534628928",
            "ssn": "868066233",
            "state": "MI"
        },
        {
            "address1": "12 Sheaffe Street",
            "address2": "Herbert River",
            "city": "Houston",
            "dateCreated": "2018-03-08T12:59:54.402-05:00",
            "dateOfBirth": "1948-02-24T00:00:00-05:00",
            "familyName": "Dedicoat",
            "gender": {
                "genderCd": "2",
                "genderCode": "M",
                "genderDescription": "Male",
                "genderName": "Male"
            },
            "givenName": "James",
            "personId": "1806",
            "personIdentifiers": {
                "dateCreated": "2018-03-08T12:59:54.402-05:00",
                "identifier": "rec-3044-org",
                "identifierDomain": {
                    "identifierDomainId": "14",
                    "identifierDomainName": "IHENA",
                    "namespaceIdentifier": "IHENA",
                    "universalIdentifier": "1.3.6.1.4.1.21367.2010.1.2.300",
                    "universalIdentifierTypeCode": "ISO"
                },
                "personIdentifierId": "1807"
            },
            "phoneNumber": "6534628928",
            "postalCode": "60618",
            "ssn": "868066233",
            "state": "MI"
        }
    ]
} 

We now submit a getSingleBestRecord request using the personId of the first record. Note that the record specified has a null value for the postalCode field.

http://localhost:8080/openempi-admin/openempi-ws-rest/person-query-resource/loadSingleBestRecordgetSingleBestRecord?personId=3727

The service returns the second record in the cluster since this is the record that satisfied the single best record rule of having a value for the postalCode field.

...