FHIR Error API Policy
home
Overview
The FHIR Error API custom policy is a component of MuleSoft Accelerator for Healthcare.
MuleSoft Accelerator for Healthcare enables healthcare providers to unlock critical patient data to build a patient 360, faster and easier than ever before. The solution also provides a library of United States Core Data for Interoperability (USCDI) and FHIR R4 resources to help healthcare developers adhere to interoperability needs and jumpstart the development of healthcare digital transformation initiatives.
This FHIR Error API policy can be used to capture error responses and format them in an FHIR OperationOutcome-compliant format. This policy can also be used with other out-of-the-box API policies provided in Anypoint Platform, such as OAuth or JWT.
Why is this policy required?
Anypoint Platform's out-of-the-box (OOTB) policies do not provide error messages in an FHIR-compliant format. For example, when an authentication/authorization failure occurs, the OAuth Access Token Enforcement Policy returns the following message:
There was an authentication error
Since this is not OperationOutcome-compliant, you can instead use this policy to send FHIR-compliant responses from other OOTB policies.
Sample response
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "security",
"details": {
"text": "There was an authentication error"
}
}
]
}
Feedback
We encourage you to explore these assets and let us know what you think. If you have any questions or feedback, email us at solutions-hc-questions@mulesoft.com. You can also engage with other users on the MuleSoft Forum, and submit ideas in the Ideas Portal.