I'm not getting the patient SSN identifier

74 views
Skip to first unread message
Assigned to aaron....@cerner.com by me

Pedro Simon

unread,
Jun 8, 2021, 9:46:47 AM6/8/21
to Cerner FHIR Developers

Hi! I'd like to share another issue I run into. Below is the timeline of events:

1. I created a patient without SSN. Request ID: bf9814f2-67c7-4550-8ae4-591cee54932a

2. I successfully added a new SSN identifier to the just created patient, by using a patch request. Request ID: eaecc98a-60ea-4972-b4c3-873618557684

3. After that, I fetch the patient, and didn't see the just added SSN identifier in the payload. Request ID: 9b924ac4-f5f3-472d-83ba-e52d7d66a546

And this is problematic, because if I don't see the SSN in the payload, I infer the patient doesn't have it, and I would attempt to perform an `add` operation, instead of a `replace` operation. Here is an example of a 409 - Conflict response  I got after attempting to create an SNN identifier by using an `add` operation, because I didn't know the patient already had it. (Request ID: 12a5cdac-efe7-410f-984c-abef448f0eae)

Is there any reason why the SSN is not present when I get the patient? How can I know which operation I should use (add|replace) if I don't get that info?

Thanks, I appreciate your time.

Aaron McGinn (Cerner)

unread,
Jun 8, 2021, 10:07:37 AM6/8/21
to Cerner FHIR Developers
For privacy reasons, the SSN will not be returned in a Patient by ID query. You can search the Patient resource by the full SSN to retrieve the patient to ensure it was written correctly.

-Aaron (Cerner)

Pedro Simon

unread,
Jun 8, 2021, 10:56:23 AM6/8/21
to Cerner FHIR Developers
Thanks for your prompt reply!

In our use case, we show a text field for the patient to enter/update the SSN, and we don't have it available beforehand, we can't perform a search. But maybe I can infer which operation I should perform by trial and error (If a get a 409 response, I know it's present already), although I would still need to know the index I have to use in /identifier/{index}/value when sending the JSON patch.

Maybe there is no way to support our use case?

Aaron McGinn (Cerner)

unread,
Jun 11, 2021, 6:54:44 PM6/11/21
to Cerner FHIR Developers
Because you would not receive it in the GET, you would not have a valid index to PATCH. I don't know your full app/workflow, but in general, error/exception handling for logic is an anti-pattern. What your trying to accomplish just may not be possible through the FHIR APIs since you won't have a way to verify the SSN's existence.

-Aaron (Cerner)

Pedro Simon

unread,
Jun 14, 2021, 6:25:37 AM6/14/21
to Cerner FHIR Developers
Thanks!
Reply all
Reply to author
Forward
0 new messages