Stream: implementers
Topic: FHIRPath Patch and JSON Patch problems on test.fhir.org
Bertram Hildebrand (Jan 23 2019 at 12:00):
I am trying to patch an existing Observation resource on http://test.fhir.org.
The resource has an effectiveDateTime Field that I want to change.
I am using the Parameters resource below, sending it via http PATCH to http://test.fhir.org with Content-Type set to "application/fhir+json".
The patch operation does not work, the server returns an OperationOutcome with diagnostics=”Not Found internally”.
{ "resourceType": "Parameters", "parameter": [ { "name": "operation", "part": [ {"name":"type", "valueCode":"replace" }, {"name":"path", "valueString":"effectiveDateTime" }, {"name":"value", "valueDateTime":"2019-01-23" } ] } ] }
Patching a resource does not work using JSON Patch either. When sending the JSON Patch shown below via http PATCH with Content-Type set to "application/json-patch+json", the server returns an OperationOutcome saying "[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'ForTesting', table 'fhir4.dbo.Versions'; column does not allow nulls. INSERT fails."
[ {"op":"replace","path":"/effectiveDateTime","value":"2019-01-23"} ]
Grahame Grieve (Jan 23 2019 at 12:06):
hmm I better fix my server.... I thought I had fixed that bug
Grahame Grieve (Jan 23 2019 at 19:28):
mistake in your patch: {"name":"path", "valueString":"effective" },
Bertram Hildebrand (Jan 24 2019 at 18:03):
Thank you for pointing out my mistake. Is there a way of registering for getting a notification once the patch bug is fixed?
Grahame Grieve (Jan 24 2019 at 20:05):
you can get notified of a new release of the server, but that doesn't mean it's installed. Typically, I just notify people directly here when I fix a bug
Grahame Grieve (Jan 24 2019 at 20:41):
and it is now fixed
Bertram Hildebrand (Jan 25 2019 at 14:31):
Thank you!
Last updated: Apr 12 2022 at 19:14 UTC