Knowledge Base
Viewing CCDA Files
The XML files typically sent and received using Direct are in the format intended for an EMR to be able to upload and ingest, known as a CCDA. This format is designed for its machine-readable contents to be displayed within an EMR or other system.
The XML attachment is generally out of scope for EMR Direct solutions, as it relates to payload and is beyond the transport service we provide, however some guidance is included below that may helpful to our customers.
If an XML file cannot be viewed as received, the following alternative approach may be considered:
Examine the file references or URLs that are typically at the very top of the XML file to see if they are absent or pointing to an unreachable URL, either of which may cause problems. Text such as:
<?xml-stylesheet type="text/xsl" href="../stylesheet/CDA.xsl"?>
should appear near the top of the XML file when you open it in a text editor like Notepad, or when you right-click on the filename (if viewing in a browser) and select "view source" or "view page source". If no stylesheet is referenced at all, the browser may default to showing the raw XML data.
If needed, find a suitable stylesheet for the XML, if one is not provided by the sender, and modify the XML in an appropriate file location within your secure environment, in order to view the rendered HTML successfully. phiMail Web is able to leverage a stylesheet hosted by EMR Direct if the stylesheet reference is:
href="CDA.xsl"
, a commonly-used path. phiMail Web also includes an embedded XDM Viewer, for streamlining the unzipping and viewing of XDM Zip files.
Beyond these suggestions, further research on XML rendering to HTML or finding an appropriate stylesheet to select for use with your system may be needed. This is up to you to determine, but several stylesheet examples are offered by other parties here:
https://github.com/lantanagroup/stylesheets/tree/master/Stylesheets/CDA
phiMail Web displays exactly what was sent and if no stylesheet is available, one is not added. In cases where the stylesheet reference is external (such that its content is not accessible to phiMail Web), Chrome may display only an empty page; in this case try viewing the attachment using Edge or Firefox instead.
Steps to prepare an XML attachment that lacks a viable stylesheet referenced:
1. In phiMail Web, Right click on the XML attachment and choose "Save link as..." to save the XML file to a secure location.
2. Copy the following text into your copy/paste buffer if you would like to use the stylesheet hosted by EMR Direct:
3. Right-click on the saved XML file and choose the "Open with" option and then select Notepad to open the file with Notepad and edit the XML.
4. In Notepad, move the cursor to immediately follow the characters ?> in the first line and click Enter. Then paste the text from step 2 into a new line of text.
5. Save the edited XML file with the new line added.
6. Send the edited XML, as modified in steps 1-5 above, to yourself as a Direct message.
To find out more about EMR Direct's Interoperability Engine FHIR and Direct Messaging services, register for a complimentary EMR Direct developer account.
Did this article answer your question? If not, please contact us.