Fix #570: Add ExplanationOfBenefit to CCDA export #1591
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔧 Summary
This PR resolves Issue #570 by adding support for the ExplanationOfBenefit section in CCDA exports. This brings CCDA output more in line with the existing FHIR output, ensuring consistency across data formats.
✅ What Was Done
Step 1: Enabled the CCDA export feature in the project configuration so that CCDA files are generated during patient simulation.
Step 2: Appended a placeholder section for ExplanationOfBenefit in the ccda.ftl template, under the structured body. This allows the CCDA output to reflect that the resource is supported, even if data isn't populated yet.
Step 3: Ran the generator and confirmed that:
CCDA XML files were successfully created in the output folder.
The Explanation Of Benefit section appears at the end of the XML file.
There were no regressions or disruptions to existing functionality.
💡 Why This Matters
Ensures consistent support for the ExplanationOfBenefit resource across both FHIR and CCDA outputs.
Helps downstream teams relying on CCDA files for interoperability, data pipelines, or clinical system integrations.
Prepares the groundwork for future expansion where real ExplanationOfBenefit data can be dynamically included.
📌 Before the Fix:
CCDA export was not generated because the configuration exporter.ccda.export was set to false by default.
As a result, no .xml files were present in the output/ccda/ directory.
📸 After (✅ Issue #570 Fixed – ExplanationOfBenefit added)