Patch
The Patch operation is used to update a resource on the server with JSON patches. The return type from the patch operation is the updated resource.
API
R4
- CLI
- Curl
- Typescript
iguhealth api patch r4 $ResourceType $ResourceId --data $Patches
curl --request GET --header "Authorization: Header" --header "Content-Type: application/json" ${domain}/w/${tenant}/api/v1/fhir/r4/${ResourceType}/${ResourceId} --data $Patches
await client.patch({}, R4, resourceType, id, patches);
R4B
- CLI
- Curl
- Typescript
iguhealth api patch r4b $ResourceType $ResourceId --data $Patches
curl --request GET --header "Authorization: Header" --header "Content-Type: application/json" ${domain}/w/${tenant}/api/v1/fhir/r4b/${ResourceType}/${ResourceId} --data $Patches
await client.patch({}, R4B, resourceType, id, patches);
Example
- Request
- Response
iguhealth api patch r4 Patient FsHg1Z14IE1D3up03EBqDQ --file patches.json
{
"id": "FsHg1Z14IE1D3up03EBqDQ",
"meta": {
"extension": [
{
"url": "https://iguhealth.app/version-sequence",
"valueInteger": 4120
},
{
"url": "https://iguhealth.app/author",
"valueReference": {
"reference": "ClientApplication/5K89P9NcTjtw4wjy-POJsD"
}
}
],
"versionId": "4120",
"lastUpdated": "2024-06-24T20:45:20.965+00:00"
},
"name": [
{
"family": "Smith"
}
],
"resourceType": "Patient"
}