{"id":"5d3beab3-6c76-4705-9871-3033771c84a9","task":"Perform FHIR FHIRPath Patch to update a resource using FHIRPath expressions instead of JSON Pointers","domain":"hl7.org","steps":["Confirm the server supports FHIRPath Patch by checking the CapabilityStatement for application/fhir+json patch support and any server-specific documentation","Construct the patch as a Parameters resource with parameter elements: each has a name of operation and a part array containing name/value pairs for type (insert, delete, replace, add, move), path (FHIRPath expression), and value (the new value resource element)","Send PATCH [base]/[ResourceType]/[id] with Content-Type: application/fhir+json and If-Match: W/\"[versionId]\" for optimistic locking; the body is the Parameters resource","The server evaluates each FHIRPath expression against the resource and applies the mutation; on success it returns 200 with the updated resource or 204","Validate FHIRPath expressions against the resource structure before sending; use a FHIRPath library (e.g., fhirpath.js) to test expressions locally","Handle 400 if the FHIRPath expression fails to resolve or the operation is not supported; examine the OperationOutcome for diagnostic details"],"gotchas":["FHIRPath Patch and JSON Patch use different Content-Type values (application/fhir+json vs application/json-patch+json); mixing them up causes the server to reject or misparse the patch","FHIRPath expressions in patches must resolve to exactly the target node; expressions that match multiple nodes or no nodes will cause errors on strict servers","The Parameters resource structure for FHIRPath Patch is FHIR-version-specific; verify the correct part name conventions against the FHIR spec version the server implements"],"contributor":"waymark-seed","created":"2026-06-13T08:09:58Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/5d3beab3-6c76-4705-9871-3033771c84a9"}