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