FHIR Chat · Reference · hapi

Stream: hapi

Topic: Reference


view this post on Zulip jawath mohamed (Oct 12 2018 at 03:26):

i am having requirement when fetching procedurereuquest i need to include the subject which is a patient as a whole json body rather then as reference id . i dont want it to be living in bundle as separate node . reference

view this post on Zulip DevGeek (Jul 24 2020 at 13:55):

Hi, a quick question , in a reference :

"subject" : {
"reference" : "Patient/example",
"display" : "Peter James CHALMERS (12345)"
}

the /example is the identifier of the Patient not ID ?

view this post on Zulip Rik Smithies (Jul 24 2020 at 15:14):

no - it is the id, not the identifier

view this post on Zulip DevGeek (Jul 24 2020 at 15:32):

@Rik Smithies is the id will be generated by the server ? or I can pass an "id": "2234" and then the server will not create automatic id ?

view this post on Zulip Rik Smithies (Jul 24 2020 at 15:36):

in general, though not always, ids are server assigned. Either way, the Patient resource needs to exist before you can reference it in the way you do above. Ids can be server assigned, but the Patient itself can't be created just by referring to it using an id, as the subject of some other resource.

view this post on Zulip DevGeek (Jul 25 2020 at 17:13):

@Rik Smithies so I need to pass ID manually ?

view this post on Zulip Rik Smithies (Jul 25 2020 at 17:23):

Yes - the referenced id. In the usual case you need to know the Id of a patient that you want the reference to refer to, and you use that when creating the reference to it. The next question is of course how to know that patient Id. That is told to you when you created (or looked up) the patient resource in the first place.
There are ways to create the patient and the reference to it at the same time, but it’s better to understand the basics first,

view this post on Zulip Sandeep Rathore (Sep 01 2020 at 21:17):

https://chat.fhir.org/#narrow/stream/179167-hapi/topic/Referencing.20in.20bundle/near/208741914


Last updated: Apr 12 2022 at 19:14 UTC