2

I have read that everest framework support HL7 CDA V3 Xml file but I cant find any examples on how to use this framework to read data from xml files. Does anybody know how to do it ? Thanks. Framework link: http://everest.codeplex.com/

Alex Nolasco
  • 18,750
  • 9
  • 86
  • 81
Nic
  • 1,088
  • 3
  • 19
  • 43

2 Answers2

1

There are some examples which hint at this, and the guide book has some good examples. In the code documentation there is an example which reads from a string (see XmlIts1Formatter.Parse's documentation), which you can adapt to any XmlReader:

using(XmlStateReader xr = new XmlStateReader(XmlReader.Create(@"C:\path-to-file.xml")))
{
    var fmtr = new XmlIts1Formatter();
    fmtr.ValidateConformance = false;
    fmtr.GraphAides.Add(new ClinicalDocumentDatatypeFormatter());
    var parseResult = fmtr.Parse(xr, typeof(ClinicalDocument));
    // There is a variable called structure which will contain your
    var cda = parseResult.Structure as ClinicalDocument;
} 
0

I don't know about this framework, but me advice for parsing HL7 CDA, is doing it using XML technologies like Xpath. Better performance and simpler

Greetings, Martí

Marti Pàmies Solà
  • 611
  • 1
  • 6
  • 12