This project has moved and is read-only. For the latest updates, please go here.

CDA document with NonXMLBody

Nov 11, 2015 at 10:00 PM
I am a bit new to CDA but we have a project in our hospital to try and use it in a document archive. From the looks of it this project is the best open source code base for dealing with CDAv2 so I am keen to pursue it. Unfortunately I do not have the time to learn it properly as need to produce a proof of concept in a couple of days!
So is it possible using these libraries to produce a CDA which is simply a wrapper for a document blob (pdf or docx). Any pointers would be greatly appreciated.
Thanks,

Steve
Nov 11, 2015 at 10:07 PM
Hi Steve,

Thanks for your interest in Everest.

Everest can do what you're looking for. The easiest way is to call the SetNonXmlBody method on the Component property of the ClinicalDocument class. Unfortunately I am going off of memory as I don't have a copy of Everest on my tablet (I'm in an airport at the moment), but I can post a sample tomorrow if that works with your timeline :) ..

Cheers
-Justin
Nov 11, 2015 at 10:21 PM
jf03cg wrote:
Hi Steve,

Thanks for your interest in Everest.

Everest can do what you're looking for. The easiest way is to call the SetNonXmlBody method on the Component property of the ClinicalDocument class. Unfortunately I am going off of memory as I don't have a copy of Everest on my tablet (I'm in an airport at the moment), but I can post a sample tomorrow if that works with your timeline :) ..

Cheers
-Justin
I found an example, you'd do this:
doc.Component = new Component2();
doc.Component.SetBodyChoice(new NonXMLBody(new MARC.Everest.DataTypes.ED(data, "image/png")));
Where "data" is the byte array of the binary content you want to embed in the CDA.

Hope that helps!
Nov 12, 2015 at 1:25 PM
Thanks Justin, I was actually quite close to the same solution but close in this game is never quite enough!
The code fragment above works perfectly and I have thrown it over the fence to our software vendors to see what they make of it.
I hope the outcome will be positive and we can use these libraries at scale in our applications as they seem to be really well written.
Thanks again,

Woody