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
I'm integrating EPIC FHIR into our C# application using the .NET Firely SDK. I've successfully created a patient using the provided resources, but I'm encountering an issue with the PATCH operation. I'm strictly following the .net firely sdk documentation for doing the same. https://docs.fire.ly/projects/Firely-NET-SDK/en/latest/client/crud.html#patching-resources
I'm attempting to update a patient's birth date using the following payload:
var patch = new Parameters(); patch.Parameter.Add(new Parameters.ParameterComponent() { Name = "OPERATION", Part = new List<Parameters.ParameterComponent>() { new Parameters.ParameterComponent() { Name = "type", Value = new FhirString("replace") }, new Parameters.ParameterComponent() { Name = "path", Value = new FhirString("Patient.BirthDate") }, new Parameters.ParameterComponent() { Name = "value", Value = new FhirString("2003-02-12") } } }); var r = await _fhirClient.PatchAsync<Patient>(url, patch);
However, this PATCH operation is failing with an InternalServerError. The OperationOutcome returned contains the message "There was an error processing your request."
Error :
Hl7.Fhir.Rest.FhirOperationException
HResult=0x80131500
Message=Operation was unsuccessful, and returned status InternalServerError. OperationOutcome: Overall result: FAILURE (1 errors and 0 warnings)
[ERROR] (no details)(further diagnostics: There was an error processing your request.)
I've verified the request payload, the URL, and the permissions. Could someone please advise on how to troubleshoot or resolve this issue?
Cc @mbaltus
The text was updated successfully, but these errors were encountered:
@ewoutkramer I particularly didn't find any patch APIs on EPIC sandbox.
Firely client has provided the patch extension method, so I expected it to work.
Could you please verify if there is any issue with the payload or do I need to add any headers?
Cc @mbaltus
Epic's FHIR interface does not support patch, so even when you've corrected your code, it will not work on the Epic sandbox. They have very limited FHIR capabilities, which you can find in their documentation: https://fhir.epic.com. Note that if your desired functionality is not listed there, you will get 5xx responses even if your call is a valid FHIR call.
Now, looking at your code, there are two small issues with how you have filled in your Parameters resource. In FHIR, casing matters. The name of your first parameter should be "operation" - note the lowercase. And the path for your field should be "Patient.birthDate" following the casing of the field as specified in the FHIR specification (see http://hl7.org/fhir/R4/patient.html) instead of the casing used in the .Net SDK.
When you change both you will have a valid call, which you can verify by using 'https://server.fire.ly' as your FHIR server. But as said, unfortunately Epic does not support patch, so it will not work there.
I'm integrating EPIC FHIR into our C# application using the .NET Firely SDK. I've successfully created a patient using the provided resources, but I'm encountering an issue with the PATCH operation. I'm strictly following the .net firely sdk documentation for doing the same. https://docs.fire.ly/projects/Firely-NET-SDK/en/latest/client/crud.html#patching-resources
I'm attempting to update a patient's birth date using the following payload:
var patch = new Parameters(); patch.Parameter.Add(new Parameters.ParameterComponent() { Name = "OPERATION", Part = new List<Parameters.ParameterComponent>() { new Parameters.ParameterComponent() { Name = "type", Value = new FhirString("replace") }, new Parameters.ParameterComponent() { Name = "path", Value = new FhirString("Patient.BirthDate") }, new Parameters.ParameterComponent() { Name = "value", Value = new FhirString("2003-02-12") } } }); var r = await _fhirClient.PatchAsync<Patient>(url, patch);
However, this PATCH operation is failing with an InternalServerError. The OperationOutcome returned contains the message "There was an error processing your request."
Error :
Hl7.Fhir.Rest.FhirOperationException
HResult=0x80131500
Message=Operation was unsuccessful, and returned status InternalServerError. OperationOutcome: Overall result: FAILURE (1 errors and 0 warnings)
[ERROR] (no details)(further diagnostics: There was an error processing your request.)
I've verified the request payload, the URL, and the permissions. Could someone please advise on how to troubleshoot or resolve this issue?
Cc @mbaltus
The text was updated successfully, but these errors were encountered: