How OpenEMR generates C-CDA documents for referrals and HIE
A clinic or health system that needs OpenEMR to produce C-CDA documents for referrals and exchange with a health information exchange (HIE) should start with the Carecoordination module's C-CDA service. This is the supported route for generating these documents from OpenEMR. You turn it on under Admin, Globals, Connectors, where you choose Care Coordination Only, Portal Only or Both, depending on whether documents go to outside providers, patients through the portal, or both. The module also adds a Send to HIE permission to each ACL role, so sending is a deliberate grant rather than something every clinical user inherits. Decide before rollout which roles can send, and confirm the role list with your compliance team.
The C-CDA service depends on Node.js, so the server needs a supported Node.js runtime installed before the service will work. The Carecoordination module configuration wiki lists 18 as the maximum Node.js version currently tested, so confirm that against the OpenEMR release you run and your operating system's packaging before you pin a version. The same page notes that Mirth settings are not needed for OpenEMR 6 and later, which removes one integration engine from the build. It also flags a conflict you must resolve early: the Apache AllowOverride FileInfo setting the module needs runs against the hardening advice to disable .htaccess overrides. Record how you resolved that conflict, because a security reviewer will ask.
This module is separate from the FHIR API and from Direct messaging. The FHIR R4 API exposes data to apps through OAuth 2.0 scopes, and Direct messaging moves documents over the DirectTrust network through a separate connector. Carecoordination generates the C-CDA documents themselves, so Node.js, the Send to HIE permission and the Apache settings are the parts to plan and verify here. Before go-live, confirm with your HIE or receiving organization which C-CDA document types and template versions they accept, and test exports against that exact list rather than against a generic sample.
Prerequisites before enabling the C-CDA service
The Carecoordination C-CDA service adds runtime, web server and database dependencies to an OpenEMR installation, and it depends on a receiving party that can accept what you send. Work through these cards before you change any Globals setting, so the service is enabled on a platform you have already confirmed and tested.
OpenEMR version and PHP runtime
Recent OpenEMR releases require PHP 8.3 or later. Confirm the exact release you plan to run on the OpenEMR releases page, and confirm that your PHP build meets the version and extensions that release lists. If you are on an older 7.x or 6.x install, plan the upgrade first, because the C-CDA configuration should be tested on the version you will keep running.
OpenEMR releasesMySQL or MariaDB-compatible database
OpenEMR recent releases run on a MySQL- or MariaDB-compatible database. Confirm the exact server version and character set required by your target release, and make sure the database account used by OpenEMR has the privileges your upgrade and backup routines expect. Record the database version in your change ticket so later troubleshooting starts from a known baseline.
Node.js version for the C-CDA service
The C-CDA service runs on Node.js. The Carecoordination wiki describes the 18 series as the maximum version currently tested, so do not install a newer major release on the host without first confirming support with the project. Pin the Node.js version in your build or package process, and record which version runs on each web server node.
Carecoordination configurationApache AllowOverride conflict
The module needs Apache AllowOverride FileInfo, while the Securing OpenEMR guidance tells you to disable .htaccess overrides. Decide before go-live how you will resolve this, for example by placing the required directives in the main server configuration rather than relying on per-directory overrides, and document the decision. Test that the security settings still block direct access to sites/*/documents after the change.
Receiving party onboarding
Confirm with each receiving organization or health information exchange that it is ready to accept C-CDA documents from your OpenEMR site. Ask who issues the onboarding steps, which document types and transport they accept, and what test submissions they require before go-live. Agree a named contact on each side for failed transmissions.
HIE endpoint details and test environment
Collect the endpoint address, transport method, certificates or credentials and any sender identifiers each exchange requires, and store them in your secrets management process rather than in shared notes. Confirm that you have a non-production OpenEMR instance with the same PHP, database and Node.js versions, and a test endpoint or test partner, so exports are verified before any live patient record is sent.
Configuration sequence for the Carecoordination C-CDA service
This sequence turns on the Carecoordination C-CDA service, connects OpenEMR to a supported Node.js runtime, grants the Send to HIE permission to the right roles and proves that a document can be generated before any exchange partner is involved. Each step ends with a check so the team knows the previous step held before moving on.
Confirm the platform prerequisites
Before changing any setting, the platform engineer confirms that the OpenEMR instance runs a release that requires PHP 8.3 or later and a MySQL- or MariaDB-compatible database, and that the Node.js runtime planned for the C-CDA service falls within the 18 series, which the module documentation lists as the maximum version tested. The team also reviews the Apache AllowOverride FileInfo conflict noted in the module wiki so that it is resolved with the security team before the service goes live. Done means the versions are written into the change record and the security owner has agreed how the .htaccess question will be handled.
Install Node.js and point OpenEMR at it
The system administrator installs the Node.js runtime on the host or container that runs the C-CDA service, using a version in the 18 series, and makes it reachable by the OpenEMR web process. The path to the runtime is set in the Carecoordination configuration so that OpenEMR can call the service. Done means the runtime reports the expected version from the same user context that the web server uses, and the configured path resolves without errors in the OpenEMR logs.
Enable the Carecoordination service in globals
An administrator opens Admin, Globals, Connectors and selects the Carecoordination option that matches the intended use: Care Coordination Only, Portal Only or Both. The choice decides whether clinicians, patients through the portal or both can use the generated documents, so the security and clinical owners should agree on it first. Done means the setting is saved, the change appears in the globals audit trail, and the Carecoordination menu items become visible to a test administrator account.
Confirm Mirth settings are not required
The platform engineer checks the Carecoordination configuration and confirms that no Mirth Connect settings are being entered, since the module documentation states that Mirth settings are not needed for OpenEMR 6 and later. Any Mirth configuration left over from an older deployment should be documented and removed or disabled so that the team knows which service generates the documents. Done means the configuration screen shows no Mirth dependency for the release in use and the team has recorded that decision.
Assign the Send to HIE permission by role
The administrator opens the ACL settings and grants the Send to HIE permission only to the roles that need to transmit documents, such as named clinicians or referral coordinators. The permission is set per role, so the list should be reviewed against the least-privilege model the organization already uses. Done means a test user in a permitted role sees the send option, and a user in a role without the permission does not, which the team confirms by logging in with both accounts.
Generate a test C-CDA export
Using a test patient record that contains no real protected health information, a permitted tester creates a C-CDA document from OpenEMR through the Carecoordination workflow and saves the output without sending it. The team opens the file in a C-CDA viewer or validator selected by the organization and checks that the header, demographics and sections match the test record. Done means the document is generated without service errors, the Node.js process logs show a clean run, and the reviewer has signed off on the content.
Record the export and verify access controls
The team records the exact versions, settings and test results in the configuration baseline, then confirms that the generated file is stored where only authorized roles can reach it and that the document directory is not directly reachable from the web. This ties the service to the hardening guidance in the Securing OpenEMR guide, which asks for blocked direct web access to the documents directory. Done means the baseline is stored with the change record and a direct request to a sample document path is refused.
Choosing a host layout for the C-CDA service
A dedicated host runs the Carecoordination C-CDA service on its own machine or virtual machine, and OpenEMR reaches it over the network. This layout keeps the Node.js runtime, its patch cycle and its dependencies away from the PHP and web server configuration that serves the EHR itself. It also lets the team keep Apache's .htaccess handling strict on the OpenEMR host, since the module's needs are no longer applied there. The cost is an extra system to build, patch, monitor, back up and place in your network and access model.
- Runtime isolation: Node.js versions and updates happen without touching the OpenEMR web tier.
- Network path: Traffic between OpenEMR and the service must be restricted to the required connections and encrypted where it crosses a segment.
- Extra system ownership: Someone must own patching, logging and recovery for the additional host.
- Access scope: Only the OpenEMR application should reach the service, not general users or other systems.
- Document handling: Confirm where generated C-CDA files are written and how long they persist on the dedicated host.
Confirm with your hosting team that the dedicated host is inside the same controls as the EHR, including logging, access reviews and backup scope.
Running the service on the same host as OpenEMR keeps the topology simple and avoids a new network dependency. The trade-off is that the Node.js runtime is installed beside PHP and Apache, and the Carecoordination module's Apache requirement touches the web server configuration that the security guidance asks you to tighten. Teams with a single well-managed server often choose this layout, provided they accept that web server hardening and module requirements must be reviewed together.
- Simplest topology: One host to build, back up and monitor.
- Apache conflict: The wiki notes the module needs
AllowOverride FileInfo, which conflicts with disabling.htaccessoverrides as the security guidance recommends. - Shared resources: Node.js processes compete with the EHR for CPU and memory during export peaks.
- Shared patch window: Node.js, PHP and OpenSSL updates may need to be coordinated with OpenEMR upgrades.
- Blast radius: A compromise or misconfiguration of the service can affect the EHR host directly.
Before choosing this layout, confirm the exact Node.js version your operating system provides against the maximum version the wiki lists as tested, and document any directory-level exception you grant for the module.
OpenEMR offers Docker deployment options, and the C-CDA service can be arranged as a separate container or as a component inside the OpenEMR container image. Separating the service into its own container keeps the Node.js runtime versioned independently, but the wiki's Apache and Node.js guidance still applies to whatever process serves the module. Confirm whether your image build includes the Node.js dependency, how the Apache configuration is delivered, and whether your orchestration platform can restrict traffic between the two containers.
- Image versioning: Pin the Node.js version in the image and rebuild it when the tested range changes.
- Configuration source: Apache directives and the
.htaccessdecision must live in the image or mounted files, not in ad hoc edits inside a running container. - Network policy: Restrict which containers can reach the service and confirm your platform enforces it.
- Persistent volumes: Generated documents and site directories need defined storage, backup and retention.
- Upgrade path: Recent OpenEMR releases require PHP 8.3 or later, so the container base must match the release you run.
Confirm with the OpenEMR release notes and your platform team how the chosen image handles the Carecoordination requirements before you commit to a layout.
Which OpenEMR data feeds each C-CDA document section
This table maps the clinical content that referral and HIE documents usually carry to the OpenEMR areas that hold it. Use it as a starting inventory for your build, then confirm section by section which template version and sections your exchange partners expect. The main takeaway is that the Carecoordination service does not remove the need to verify each section's content against your C-CDA specification and your own chart data.
| Document content | Where it typically lives in OpenEMR | What to confirm before go-live |
|---|---|---|
| Demographics | Patient demographics record, including identifiers and contact details | Which demographic fields the generated document populates, and how missing or blank fields render |
| Problems | Problem list entries on the patient's medical problems record | Whether active, resolved and inactive problems are all included, and how coded terms map to the exchange standard |
| Medications | Current medication list and prescriptions held in the patient record | Whether active and discontinued medications are distinguished, and how free-text entries are handled |
| Allergies | Allergy entries in the patient record | Whether allergy reactions and severity are carried through, and how no-known-allergy states are expressed |
| Encounters | Encounter (visit) records, including encounter reasons and providers | Which encounter types, dates and providers appear, and whether the receiving system needs them |
| Results | Lab and imaging results received or entered against the patient | Whether result values, units, reference ranges and status are carried, and how external results are represented |
| Referral reason and plan of care | Encounter notes, referral details and orders entered by the clinician | Whether narrative text and structured orders are both included, and how the receiving system displays them |
| Template version and section set | Carecoordination module configuration and the C-CDA service | The exact C-CDA version and section list your partners require, validated with a test export before use |
Security controls for exported clinical documents
C-CDA documents carry ePHI out of OpenEMR, so the web server, the admin surface and the send permission all shape what can leave the system. The cards below cover the controls to set and verify before the first document goes to an HIE, and the HIPAA and contract points that depend on them.
HTTPS only and port 443
The Securing OpenEMR guide says to allow only HTTPS and to consider exposing only port 443. Confirm that plain HTTP redirects or is refused at the load balancer and web server, and that the Carecoordination endpoints are reachable only through the same protected path. Check this from outside your network, not only from inside it, since the exchange traffic depends on it.
Securing OpenEMR guideRemove setup and admin scripts
The guide says to remove setup.php and other admin scripts after installation. A leftover installer is a route to reconfiguring the system, including the connector settings that turn on the C-CDA service. Verify the file is gone from every site directory in a multisite install, and record the check in your change log.
Block direct access to documents
The guide says to block direct web access to sites/*/documents, where uploaded and generated files are stored. Generated C-CDA files should be reachable only through the application's permission checks. Request a 403 or 404 for a known document path while signed out and while signed in as a user without the Send to HIE permission.
Limit Send to HIE by role
The module adds a Send to HIE permission to each ACL role, so it must be granted deliberately. Grant it only to roles whose job includes transmitting records, and review it whenever roles change. Test with an account from each role to confirm that the send action is blocked for everyone else, including staff who can view the patient chart.
MFA and password policy
The Securing OpenEMR guide recommends multi-factor authentication and strong password policies, and OpenEMR 6.0.0 added length limits, a four-character-type rule, reuse prevention and expiration settings. Apply these to every account that can send documents, and confirm with your identity team whether LDAP or Google Sign-In login is in use, since that changes where the controls are enforced.
- Passwords blocked from reuse
- 5 prior
Apache overrides and the module
The wiki notes that the Apache AllowOverride FileInfo setting the C-CDA module needs conflicts with the guidance to disable .htaccess overrides. Enabling the override widens what a web-writable file can change, so decide with your security team whether to allow it for the module's directory only, or to move the rules into the server configuration and disable overrides everywhere. Document the choice and retest after each upgrade.
Why C-CDA exports fail and how to fix them
This table lists the failures most often seen when enabling the Carecoordination C-CDA service, with the likely cause and the first fix to try for each. Work down the rows in order, since the service must appear before permissions, runtime and web server settings can be tested. Receiver rejections are the last step and depend on rules the receiving HIE sets, so confirm those with the HIE before changing OpenEMR.
| Failure | Likely cause | First fix to try |
|---|---|---|
| Carecoordination service does not appear after enabling | Connector setting was not saved, or the page was not reloaded after the change | Set the connector under Admin, Globals, Connectors to Care Coordination Only, Portal Only or Both, save, then log out and back in and recheck |
| Node.js version does not match the C-CDA service | Installed Node.js is newer than the 18 series, which is the maximum version the wiki lists as tested | Install a Node.js 18 series release on the OpenEMR host and restart the web service before retesting the export |
| Export blocked with no Send to HIE option | The user's ACL role lacks the Send to HIE permission that the module adds | Grant Send to HIE to the role under Administration, Access Control for the affected users, then have them sign out and back in |
| Module fails after hardening the web server | Apache AllowOverride FileInfo is disabled to follow the guidance on .htaccess overrides | Confirm the module's requirement in the Carecoordination wiki, then scope the override to the OpenEMR directory only and document the exception for your security review |
| Export file is created but not delivered | Outbound network path, transport settings or receiver endpoint details are incorrect | Check egress from the OpenEMR host to the HIE endpoint and verify the endpoint and certificate details with the HIE's onboarding team |
| Document rejected by the receiving HIE | Required sections, template identifiers, coded values or document structure do not meet the receiver's validation rules | Run the exported file through the validation the HIE requires, correct the source data in OpenEMR, and confirm the receiver's current validation rules with the HIE before retesting |
| Incomplete or empty clinical sections | Source data is missing or was not coded in the form the export expects | Review the sample patient's chart for the affected sections, correct coding at the source, and re-export a test patient |
Common questions about C-CDA exchange with OpenEMR
Can our own team enable the Carecoordination C-CDA service without a partner?
Yes, if your administrators are comfortable changing OpenEMR global settings, installing Node.js on the host and reviewing web server configuration. Enabling the service is a configuration task under Admin, Globals, Connectors, where you choose Care Coordination Only, Portal Only or Both, and then assigning the Send to HIE permission to the right ACL roles. The harder part is the surrounding work: the Node.js dependency, the Apache AllowOverride FileInfo conflict with the hardening guidance, and testing exports against real receivers. Your team should decide early whether it has that capacity, because the wiki's guidance on these points is short and leaves the trade-offs to you.
Is OpenEMR certified for C-CDA exchange?
OpenEMR is ONC certified as a 2015 Edition Base EHR, with version 7.0.0 certified on 7/19/22 after testing by SLI concluded on 6/30/22. The OpenEMR website tells users to upgrade to version 8 by March 1, 2026 to keep their system's active certification. Certification covers the certified configuration of the product as tested, so you should confirm which certified capabilities apply to your installed version and whether the Carecoordination module and your exchange workflow fall within that scope. Ask your certification contact to confirm this in writing, and do not assume that a certified base product means your specific C-CDA output has been validated.
What does testing a C-CDA export actually require?
Testing needs a non-production OpenEMR instance with representative test patients, the Carecoordination service enabled, Node.js installed at a supported version, and a receiving system that can accept the documents. Check each export against the receiver's validation tooling and the content your partners expect, then confirm that the document reaches the intended destination and that the send is recorded. Testing should also cover the permission model, so you can show that only authorized roles can send. Ask any vendor or partner to name the exact test cases, the receivers they will test against and who signs off on each result.
What does HIE onboarding require from our organization?
Onboarding depends on the health information exchange or receiving organization, so the first step is to ask each one for its onboarding requirements in writing. Typical items include a formal participation agreement, endpoint or connection details, certificates or credentials, the document types and content they accept, and a test window. Your organization will need to name a clinical or operational owner, a technical contact and a security contact. Confirm with each HIE whether it requires a specific transport or trust framework, because those requirements change what your OpenEMR setup must support.
What drives the cost of C-CDA work in OpenEMR?
The main cost drivers are scope, the number of receivers, the number of environments and the amount of testing. Each receiver can have its own content expectations, onboarding steps and validation, so more receivers usually means more configuration and test work. Separate development, test and production environments add build and verification effort, and any custom templates or mapping increase review time. Ask for a quote that separates one-time work such as enablement, template review and onboarding from recurring work such as upgrades, patching after security releases and ongoing monitoring of exports. DeployOpen fixes scope and deliverables in writing before work starts, so the quote will follow from the agreed list.
How long does it take to get C-CDA exchange running?
The timeline depends mostly on how quickly receivers complete their onboarding and testing, not on the OpenEMR setting itself. Enabling the service and installing Node.js are usually short tasks, but partner approvals, certificate exchange and test windows often take longer. Ask each receiver for its onboarding schedule and test window before you commit to a go-live date. Any duration a partner quotes should be tied to the written scope and the receiver's responses.
Does enabling C-CDA exchange create security risks we need to manage?
Yes. The Carecoordination service requires Apache AllowOverride FileInfo, which conflicts with the Securing OpenEMR guidance to disable .htaccess overrides, so you need a documented decision on how to reconcile the two. Limit the Send to HIE permission to roles that need it, keep the web server exposure to HTTPS, and confirm that the Node.js service is not reachable from outside its intended path. Review the HIPAA Security Rule obligations for ePHI you transmit, and make sure any business associate that handles those documents has a contract that covers the Security Rule and incident reporting.
How to test C-CDA exports before live referrals
Test every C-CDA export on a non-production copy of OpenEMR before any document reaches a live receiver. Build that copy from the same OpenEMR version, the same Carecoordination settings (under Admin, Globals, Connectors, as Care Coordination Only, Portal Only or Both) and the same Node.js runtime that production will use, so the test result describes the system you will actually run. Confirm the Node.js version against the wiki's note that the 18 series is the maximum version currently tested, and record the exact versions in the test log.
Generate sample documents only for synthetic or de-identified patients. Create a small set that covers the cases your referrals will hit, such as a patient with several medications, allergies, problems and an encounter with a referral reason. Open each generated file and check that the sections, codes and demographics match the source records you entered. Then validate the output against the receiving HIE's own requirements, including its C-CDA template expectations and any conformance tool it names. Ask each receiver for its acceptance criteria in writing, and treat anything they have not written down as unconfirmed.
Verify access in the same test pass. Confirm that the Send to HIE permission is granted only to the ACL roles that should send referrals, and that other roles cannot trigger a send. Then review the audit trail for the test sends, checking that each action records the user, patient and time so the team can reconstruct who sent what. Because the module's Apache setting conflicts with the guidance to disable .htaccess overrides, record how you resolved that conflict in the test, since the same decision will apply in production.
How a referral moves from OpenEMR to the HIE
The flow starts when a user holding the Send to HIE permission triggers an export in OpenEMR. The Carecoordination service, which depends on Node.js, builds the C-CDA document from the patient record, and the document leaves the OpenEMR host over an outbound connection to the HIE endpoint. Check the permission grant and the audit trail at the trigger, confirm what the service can reach on the host, and confirm that the outbound path is the one your security team approved.
Referral export path from the OpenEMR host to an external HIE endpoint.
How DeployOpen scopes and delivers C-CDA integrations
DeployOpen plans, implements, tests and documents the Carecoordination C-CDA service inside your own infrastructure, so your team can review how documents are generated, permissioned and sent. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- Confirm which OpenEMR version, PHP version and database your site runs before any configuration starts.
- Record which care coordination mode you need: Care Coordination Only, Portal Only or Both.
- Map which ACL roles should hold the Send to HIE permission and which clinicians will use it.
- Document how the Node.js runtime, Apache settings and hosting model will be provided and who maintains them.
How we build
- Install and configure the Carecoordination module and Node.js dependency in your environment, following the vendor configuration notes.
- Work through the conflict between the Apache FileInfo requirement and the .htaccess hardening guidance, and record the decision.
- Test sample exports against the C-CDA content your clinicians and receiving systems expect, using de-identified or test patient records.
- Configure role permissions and web server access rules to match the access model agreed during scoping.
How we hand over
- Deliver a written configuration record covering settings, permissions, runtime versions and the security decisions made.
- Provide a test log showing each export scenario, the outcome, and the remediation for any failed case.
- Walk your administrators and clinical leads through sending, reviewing and troubleshooting documents, with runbooks for each role.
- Confirm with you which evidence your compliance team will need, and which items remain for your own assessor to review.
How we support
- Support after handover can be provided as a retainer covering upgrades, patching after security releases and configuration changes.
- Retesting is scheduled after each OpenEMR, Node.js or web server change that touches the C-CDA service.
- Ask any partner for a written scope that names the OpenEMR version, supported runtimes and who owns each recurring task.
Sources and further reading
- OpenEMR wiki: Carecoordination Module Configuration ↗
- Securing OpenEMR ↗
- 45 CFR Part 164 Subpart C, Security Standards for the Protection of ePHI ↗
- Appendix A to Subpart C of Part 164, Security Standards: Matrix ↗
- HHS FAQ 2003: Are we required to certify our organization's compliance with the standards? ↗
- NIST SP 800-66 Rev. 2, Implementing the HIPAA Security Rule ↗

