How should I represent References in a ESB environment for updating single resources?
I’ve been using a combination of resources wrapped in a bundle or singular resources with contained resources but it seems a bit heavy for simple resource updates. For example I have
{
"resourceType":"Practitioner",
"id":"1572895",
"identifier":[
{
"system":"urn:fhir.nhs.uk/id/GeneralPractitionerPPDCode",
"value":"G9536441"
}
],
"practitionerRole":[
{
"managingOrganization":{
"reference":"Organization/68632"
},
<... snip ....>
}
which is referring to
{
"resourceType":"Organization",
"id":"68632",
"identifier":[
{
"system":"urn:fhir.nhs.uk/id/ODSOrganisationCode",
"value":"J83010"
}
],
"partOf":{
"reference":"Organization/2800"
}
<... snip ....>
}
When I move resources like this around the ESB is it ok to use resource references like
"managingOrganization":{
"reference":"Organization?identifier=urn:fhir.nhs.uk/id/ODSOrganisationCode|J83010"
}
The reasons for doing this are to just simplify code and reduce the amount of calls I need to make (in a number of cases I have these identifiers but don’t have the resource it refers to without looking it up. Also the remote system only needs this identifier to post the resource). These identifiers are being used in a similar manner to id’s on the ESB.