Address returned for patient by id by not from patient search

Hi

When we search on the following patient by id in the int environment, we get a match that includes an address

9449303266

"address": {
            "postcode": "LS1 4HY",
            "addressLine1": "addr1",
            "addressLine2": "addr2",
            "addressLine3": "addr4",
            "addressLine4": null,
            "addressLine5": null,
            "city": null,
            "district": null,
            "country": null
        }

However using patient search to search for the same patient yields a response with no address.

_exact-match=false&family=XXXXX-ADDRESSTYPEINV&given=CAR*&given=CAR*&given=ETH*&birthdate=eq2009-04-20&address-postcode=LS%2A
"address": null,

I’m not sure on how this data was created and perhaps the name of this user provides a clue but I would like to understand why we get different results based on search by id versus patient search and whether this is something we are doing incorrectly in our search parameter build?

Thanks

1 Like

Hi @patrick.hughes1

The demographics support team is actively investigating your issue and will update you soon.
Thanks for your patience.

1 Like

A ticket has been raised to investigate this issue, reference number SPINEDEM-1453. This page will be updated when this work is scheduled in.

1 Like

Hello toni.whiteford,
Has there been any development on this initiative?

1 Like

This isn’t an official answer.

It seems you are getting different ‘Read’ and ‘Search’ responses.

Read is returning full details (including address) and search is returning summary details (excluding address).

When searching via NHS Number (id) you are expecting one result - it is a ‘read’.
Without the id, multiple patients could be returned and so it is a ‘search’, a summary is returned.

This issue has been investigated and it has been found that the above NHS number is test data for the scenario where the address type stored in PDS is invalid.

In the test data pack, the surname field is used to show where the test data is for ‘bad data’, in this instance the surname “QUICKADDRESSTYPEINV”. You are executing the search parameters correctly, the different responses are by design.

As per Kevin Mayfield’s comment above, the ‘Retrieve patient’s data’ endpoint will use the NHS number to retrieve all patient data, whereas the ‘Search for a patient’ is returning summary details, this has additional validation to filter out ‘bad data’.