You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by timammons August 30, 2022
I am trying to patch a patient in the following way, but getting an error body: must be a list of patch operation requests. Any idea why?
Code:
`static void UpdatePatientName(FhirClient fireClient, string patientID)
{
var pat = fireClient.Read($"/Patient/{patientID}");
var eTag = fireClient.LastResult.Etag;
Parameters patParams = new Parameters();
patParams.AddReplacePatchParameter("name/0/given", new HumanName().WithGiven("Beulah").WithGiven("Z"));
fireClient.RequestHeaders.IfMatch.Add(new EntityTagHeaderValue($"\"{eTag}\"", true));
var updatedPat = fireClient.Patch<Patient>($"{patientID}", patParams);
}`
This is the body it created, which appears to be a list of patch operation requests:
{"resourceType":"Parameters","parameter":[{"name":"operation","part":[{"name":"type","valueCode":"replace"},{"name":"path","valueString":"name/0/given"},{"name":"value","valueHumanName":{"given":["Beulah","Z"]}}]}]}
Thanks,
Tim
The text was updated successfully, but these errors were encountered:
Discussed in #2217
Originally posted by timammons August 30, 2022
I am trying to patch a patient in the following way, but getting an error body: must be a list of patch operation requests. Any idea why?
Code:
`static void UpdatePatientName(FhirClient fireClient, string patientID)
{
var pat = fireClient.Read($"/Patient/{patientID}");
var eTag = fireClient.LastResult.Etag;
}`
This is the body it created, which appears to be a list of patch operation requests:
{"resourceType":"Parameters","parameter":[{"name":"operation","part":[{"name":"type","valueCode":"replace"},{"name":"path","valueString":"name/0/given"},{"name":"value","valueHumanName":{"given":["Beulah","Z"]}}]}]}
Thanks,
Tim
The text was updated successfully, but these errors were encountered: