FHIR integration acceptance tests for failure and reconciliation

Accept a FHIR integration against a named environment and a written set of failure tests. Require evidence for successful requests and recovery after interrupted operations. Every unresolved operation needs an owner and a defined reconciliation path.
BitLab recommends accepting individual workflows rather than a general claim of FHIR support. A successful patient lookup proves only that lookup under the tested conditions.
This article uses FHIR R4 documentation for its protocol references. Match your test plan to the version your actual endpoint implements.
Pin down the connection being accepted
Record the endpoint and tenant identifier. Add the application registration, permitted operations, and intended user context. Identify which parts were tested in a sandbox.
Request the endpoint's CapabilityStatement. HL7 describes this resource as documentation of capabilities for a particular FHIR version. It can describe an implementation or a set of desired capabilities. Confirm which kind you received.
Compare the declared capabilities with your workflow requirements. Then test the connection under its actual permissions. A document alone cannot demonstrate that your application has tenant access.
Keep unsupported operations visible in the acceptance record. Assign a separate decision if the product needs a proprietary interface. BitLab's EMR integration guides provide vendor-specific starting points for that investigation.
Specify the evidence before running the tests
Create fixtures with approved synthetic records. Give each test a known starting state and expected result. State what the operator should see when the request fails.
Capture request identifiers and timestamps. Record response status and the resulting application state. Keep secrets and unnecessary patient information outside routine diagnostic logs.
Use the same test identifier in the execution record and defect ticket. That lets the reviewer compare a failed run with its later repair. Preserve the configuration version used for each run.
| Test condition | Expected application behavior | Acceptance evidence | Reconciliation action |
|---|---|---|---|
| Permission denied | Stop the affected operation | Denied request and visible blocked state | Correct authorization before resubmission |
| Interrupted write | Mark outcome unknown | Request identifier and timing | Check remote state before retrying |
| Conflicting update | Preserve conflict for review | Versions and response | Refresh data and apply approved resolution |
| Invalid resource | Hold for correction | Validation response and field | Correct source or mapping |
| Interrupted retrieval | Use documented recovery path | Checkpoint and resulting local records | Compare expected and retrieved records |
These are recommended acceptance conditions. Exact response behavior depends on the endpoint and interaction.
Treat an interrupted write as an unknown outcome
A client timeout can leave your application without a confirmed result. Build a state for that uncertainty. Avoid automatically displaying either "saved" or "failed" without supporting evidence.
Before retrying, determine whether the remote system created or changed the record. Choose the check using identifiers and operations supported by that endpoint. Document who handles an inconclusive check.
HL7's R4 RESTful API specification describes conditional interactions and version-aware update behavior. Supported interactions differ between servers. Test the particular mechanism you intend to use.
Your application might need an internal operation ledger. Record the intended change and the observed result. Give each outstanding item an explicit state, including unknown and awaiting review.
The ledger is an application design recommendation. It does not replace the source system's record or establish clinical correctness.
Read error details without depending on their presence
FHIR provides OperationOutcome for information about system operations. Its issues can include severity and diagnostic details. HL7 documents the resource and its boundaries.
Parse useful error details when returned. Also handle errors lacking a FHIR body. Test an unavailable gateway and an unexpected response format.
Separate diagnostic detail from the message shown to the operator. A technical stack trace should not become a patient-facing explanation. Give the operator a supported next action and a reference for support.
Keep correction paths narrow. A mapping defect needs engineering review. A permission failure belongs with the authorization owner. An ambiguous write needs reconciliation before another submission.
Make reconciliation an executable procedure
Choose one approved test workflow and interrupt it deliberately. Have someone follow the written recovery procedure without coaching. Compare the remote record with the local operation ledger.
Record any manual query required to establish the result. Add those queries to the controlled support procedure. Define the access needed and who can authorize corrections.
BitLab's EHR integration best practices article covers broader rollout patterns. Acceptance should go deeper into the exact evidence for this workflow.
Set a review interval for unresolved items. Choose it from the workflow's consequences and operating hours. An engineering team should not invent a universal timing threshold for every integration.
Sign off the tested scope explicitly
The acceptance record should name the workflows that passed and the remaining limitations. Separate environment access from functional acceptance. List recovery tests that were postponed.
Give the product owner the operator-facing failure messages to review. Assign responsibility for outstanding reconciliation items after release. Re-run affected tests whenever permissions or integration mappings change.
Sources
The audit is free. Another quarter of guessing is not.
Book the Free 48-Hour Audit