intrahealth/client-registry

Is there a way to get back the id of the patient resource that contains demographic details?

Closed this issue · 9 comments

At the moment when you submit a patient to OpenCR, you get back the CRUID of the created patient in the Location header. I need access to the patient resource that contains the demographic information but there seems to be no way to get the ID for this resources. There are references in the Golden Record but if there are multiple references you don't know which was the newly created one.

Would it be possible to get this local ID back in addition to the CRUID?

@ashaban you would probably be best placed to know if this was possible.

cc @citizenrich

Great question. I think this would require a small enhancement, but I leave it to @ashaban to answer.

My feeling is that maybe what is returned in the Location header shouldn't be the CRUID but the ID of the patient demographics record for that client. This would be more conformant of FHIR in general but would introduce a breaking change in OpenCR. The CRUID could still be returned but maybe in a different header?

@ashaban what do you think?

@rcrichton responding to your first question, opencr requires POS unique internal ID as one of the identifier to be included as part of the resource, and opencr supports PIXm, so you may send a PIXm request and get back the patient ID + patient identifiers.
Let me know if that is helpful

Im also exploring the best way (standard) we can include both patient id and the CRUID

@rcrichton looking at the PIXm, it was just returning targetIdentifier excluding targetId, i have included targetId on the response, you may need to update your instance to get this small change.

Thanks Ally, I have been working around this by doing a query by the client identifier from the client. It works but it does introduce extra complexity on the client. If you can figure out a way to get this back in the response to the original request that would be ideal.

Thanks for getting the PIXm stuff sorted!

i agree!, i will keep you posted

@rcrichton i have made some changes and now openCR returns patient ID on headers.location and i have added a custom header (locationcruid) which returns the CRUID. I hope that will work well.

Thanks Ally, this sounds good. I hope to check it out soon.