150 likes | 293 Views
ART-DÉCOR Templates in Everest. Project “ Sherpas ” Justin Fyfe – Mohawk College of Applied Arts and Technology May 2014 WGM. Everest – A Brief. Generic framework for generating HL7v3 (and CDA) instances Features Overview: .NET and Java implementation
E N D
ART-DÉCOR Templates in Everest Project “Sherpas”Justin Fyfe – Mohawk College of Applied Arts and Technology May 2014 WGM
Everest – A Brief • Generic framework for generating HL7v3 (and CDA) instances • Features Overview: • .NET and Java implementation • Compact (Windows Phone) edition available • Formatting • R1 and R2 data-types representation • XML ITS 1.0 • Transport • SOAP (via WCF/Spring) • File System Pub/sub • MSMQ • Started in 2008 as a generic solution • Over 9,000 downloads currently on Tech Exchange • In use in many implementation (primarily C#)
Everest at 5,000 m CodeDom XML ITS 1.0 DT R1 DT R2 CDA Connectors Formatters RMIM Structures WCF MSMQ Everest Core Library GPMR .NET Framework
CDA In Everest Optimizer C# .DLL GPMR Java .JAR POCD_MT000040UV.MIF
Using the Generated RMIM Classes ClinicalDocument document = newClinicalDocument(); document.TemplateId = LIST<II>.CreateList(newII("2.16.840.1.113883.10.20.1")); document.Code = newCE<string>("34133-9", "2.16.840.1.113883.6.1") { DisplayName = "Summarization of episode note" }; document.Component = newComponent2(); document.Component.SetBodyChoice(newStructuredBody()); // Vital Signs section SectionvitalSigns = newSection(); vitalSigns.TemplateId = LIST<II>.CreateList(newII("2.16.840.1.113883.10.20.1.16")); vitalSigns.Code = newCE<string>("8716-3", "2.16.840.1.113883.6.1"); vitalSigns.Title = "Vital Signs"; vitalSigns.Text = "<table>Todo</table>"; vitalSigns.Text.Representation = EncapsulatedDataRepresentation.XML; document.Component.GetBodyChoiceIfStructuredBody().Component.Add( newComponent3(ActRelationshipHasComponent.HasComponent, true) { Section = vitalSigns } ); // Comment entry EntrycommentEntry = newEntry(x_ActRelationshipEntry.HasComponent, false); ActcommentAct = newAct(x_ActClassDocumentEntryAct.Act, x_DocumentActMood.Eventoccurrence); commentAct.TemplateId = LIST<II>.CreateList(newII("2.16.840.1.113883.10.20.1.40")); commentAct.Code = newCD<string>("48767-8", "2.16.840.1.113883.6.1") { DisplayName = "Annotation comment" }; commentAct.Text = "This is a test"; commentEntry.ClinicalStatement = commentAct; vitalSigns.Entry.Add(commentEntry);
Rendered in XML <ClinicalDocumentxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"classCode="DOCCLIN"moodCode="EVN"xmlns="urn:hl7-org:v3"> <templateIdroot="2.16.840.1.113883.10.20.1" /> <codecode="34133-9"codeSystem="2.16.840.1.113883.6.1"displayName="Summarization of episode note" /> <componenttypeCode="COMP"contextConductionInd="false"> <structuredBodyclassCode="DOCBODY"moodCode="EVN"> <componenttypeCode="COMP"contextConductionInd="true"> <sectionclassCode="DOCSECT"moodCode="EVN"> <templateIdroot="2.16.840.1.113883.10.20.1.16" /> <codecode="8716-3"codeSystem="2.16.840.1.113883.6.1" /> <titlelanguage="en-US">Vital Signs</title> <textmediaType="text/plain"language="en-US"> <table>Todo</table> </text> <entrytypeCode="COMP"contextConductionInd="true"> <actclassCode="ACT"moodCode="EVN"negationInd="false"> <templateIdroot="2.16.840.1.113883.10.20.1.40" /> <codecode="48767-8"codeSystem="2.16.840.1.113883.6.1"displayName="Annotation comment" /> <textrepresentation="TXT"mediaType="text/plain"language="en-US">This is a test</text> </act> </entry> </section> </component> </structuredBody> </component> </ClinicalDocument>
Common Roadblocks • Developers on the forums and via e-mail asked common questions: • How do I … ? • Quite a bit of questions about how to represent a particular CDA template using Everest • I have a jurisdiction that does X differently than the standard, how do I represent this? • Lots of common questions were asked about how to represent jurisdictional constraints in Everest • Some common themes • Jurisdiction has a “custom” schema for their extended attributes • Jurisdiction has a “custom” series of elements represented in a word document • Jurisdiction had computable representations and Java renderings but no C# equivalent • Everest had some way to address this: • Writing extended classes which implemented the templates/custom bits • Writing scaffolding code • We wanted a more automated way to do this.
Sherpas • The name: • Everest was named after tallest mountain in the world • HL7v3 was considered by many to be equally difficult to implement • This toolkit would help developers climb that mountain … • = Sherpas • What is it? • A template processor that binds CDA templates to Everest RMIM classes • A series of helper classes that handle formatting/validation (as extensions to Everest)
Sherpas Generation Optimizer GPMR C# SherpaTC .DLL .DLL <temp <cla </cla POCD_MT000040UV.MIF Y-DECOR.XML
Vanilla Everest ClinicalDocument document = newClinicalDocument(); document.TemplateId = LIST<II>.CreateList(newII("2.16.840.1.113883.10.20.1")); document.Code = newCE<string>("34133-9", "2.16.840.1.113883.6.1") { DisplayName = "Summarization of episode note" }; document.Component = newComponent2(); document.Component.SetBodyChoice(newStructuredBody()); // Vital Signs section SectionvitalSigns = newSection(); vitalSigns.TemplateId = LIST<II>.CreateList(newII("2.16.840.1.113883.10.20.1.16")); vitalSigns.Code = newCE<string>("8716-3", "2.16.840.1.113883.6.1"); vitalSigns.Title = "Vital Signs"; vitalSigns.Text = "<table>Todo</table>"; vitalSigns.Text.Representation = EncapsulatedDataRepresentation.XML; document.Component.GetBodyChoiceIfStructuredBody().Component.Add( newComponent3(ActRelationshipHasComponent.HasComponent, true) { Section = vitalSigns } ); // Comment entry EntrycommentEntry = newEntry(x_ActRelationshipEntry.HasComponent, false); ActcommentAct = newAct(x_ActClassDocumentEntryAct.Act, x_DocumentActMood.Eventoccurrence); commentAct.TemplateId = LIST<II>.CreateList(newII("2.16.840.1.113883.10.20.1.40")); commentAct.Code = newCD<string>("48767-8", "2.16.840.1.113883.6.1") { DisplayName = "Annotation comment" }; commentAct.Text = "This is a test"; commentEntry.ClinicalStatement = commentAct; vitalSigns.Entry.Add(commentEntry);
Using Sherpas (live demo?) CCDClinicalDocument document = newCCDClinicalDocument(); document.Component = newCCDClinicalDocument_Component(); document.Component.BodyChoice = newCCDClinicalDocument_Component_BodyChoice(); // Vital Signs VitalSignsSectionvitalSigns = newVitalSignsSection( classCode: ActClassDocumentSection.DOCSECT, moodCode: ActMoodEventOccurrence.Eventoccurrence, title: "Vital Signs", text: "<table>Todo</table>", entry: null ); vitalSigns.Text.Representation = EncapsulatedDataRepresentation.XML; document.Component.BodyChoice.AddVitalSignsSectionComponent( newVitalSignsSectionComponent(false, vitalSigns) ); // Comment entry CommentcommentAct = newComment(false); commentAct.Text = "This is a test"; vitalSigns.AddCommentEntry15(newCommentEntry15(x_ActRelationshipEntry.HasComponent, true, commentAct));
Rendered in XML <ClinicalDocumentxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"classCode="DOCCLIN"moodCode="EVN"xmlns="urn:hl7-org:v3"> <templateIdroot="2.16.840.1.113883.10.20.1" /> <codecode="34133-9"codeSystem="2.16.840.1.113883.6.1"displayName="Summarization of episode note" /> <componenttypeCode="COMP"contextConductionInd="false"> <structuredBodyclassCode="DOCBODY"moodCode="EVN"> <componenttypeCode="COMP"contextConductionInd="true"> <sectionclassCode="DOCSECT"moodCode="EVN"> <templateIdroot="2.16.840.1.113883.10.20.1.16" /> <codecode="8716-3"codeSystem="2.16.840.1.113883.6.1" /> <titlelanguage="en-US">Vital Signs</title> <textmediaType="text/plain"language="en-US"> <table>Todo</table> </text> <entrytypeCode="COMP"contextConductionInd="true"> <actclassCode="ACT"moodCode="EVN"negationInd="false"> <templateIdroot="2.16.840.1.113883.10.20.1.40" /> <codecode="48767-8"codeSystem="2.16.840.1.113883.6.1"displayName="Annotation comment" /> <textrepresentation="TXT"mediaType="text/plain"language="en-US">This is a test</text> </act> </entry> </section> </component> </structuredBody> </component> </ClinicalDocument>
Sherpas Features Helper Methods Allow developers to see what choices of sections/entries/statements can be used in a particular context Documentation Helper Methods Constraint Validation Constraint Validation Gives developers an opportunity to provide *basic* validation of their models in memory while developing, or parsing.
Current Status • Very early stages of development • Started work after Jan WGM • Sherpas is able to process: • Simple DÉCOR format files such as CCD or CCDA • Graph (Model => XML) DÉCOR template RMIM structures • Parse (XML => Model) DÉCOR RMIM structures based on “templateId” • Todo: • More testing, esp. on parsing • Complex template operations (splicing, combining, resolving based on xpath, etc.) • Complex template constraints (expressed as XPath) • Huge demand to generate “templates from XSD” • Some demand to generate Sherpas templates from MDHT definitions