FHIR Chat · FhirPatch bundle txn reference fields not updating · implementers

Stream: implementers

Topic: FhirPatch bundle txn reference fields not updating


view this post on Zulip Nath (Jul 16 2020 at 21:20):

Hello Implementers,
I am trying to do a Patch using bundle txn. I tried the R5 open server the following examples:

http://hapi.fhir.org/transaction
POST http://hapi.fhir.org/baseR5/?_pretty=true
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [ {
"fullUrl": "Patient/1107",
"resource": {
"resourceType": "Parameters",
"parameter": [ {
"name": "operation",
"part": [ {
"name": "type",
"valueCode": "add"
}, {
"name": "path",
"valueString": "Patient.generalPractitioner"
}, {
"name": "value",
"valueReference": "Practitioner/852"
} ]
} ]
},
"request": {
"method": "PATCH",
"url": "Patient/1107"
}
} ]
}
Response
200
{
"resourceType": "Bundle",
"id": "bf4c8b6f-e088-49ad-9095-2ad90b3521c3",
"type": "transaction-response",
"link": [ {
"relation": "self",
"url": "http://hapi.fhir.org/baseR5"
} ]
}

Read back the resource after the bundle txn
GET http://hapi.fhir.org/baseR5/Patient/1107?_pretty=true
{
"resourceType": "Patient",
"id": "1107",
"meta": {
"versionId": "3",
"lastUpdated": "2020-07-16T20:57:32.852+00:00",
"source": "#j3HeV1z5srG8zNp5"
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">John58074 <b>DOE2DA9065 </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Date of birth</td><td><span>01 January 1950</span></td></tr></tbody></table></div>"
},
"name": [ {
"family": "Doe2da9065",
"given": [ "John58074" ]
} ],
"gender": "male",
"birthDate": "1950-01-01"
}

It has not updated the generalPractitioner. I tried just updating the birthDate field and that one worked. Can someone help me how to fix this issue?.

Btw, I was trying to use JsonPatch approach with binary but that does not update the references created within the bundle.

thanks for your help

view this post on Zulip Lloyd McKenzie (Jul 17 2020 at 00:54):

@James Agnew


Last updated: Apr 12 2022 at 19:14 UTC