art-dÉcor templates in everest

15
ART-DÉCOR Templates in Everest Project “Sherpas” Justin Fyfe – Mohawk College of Applied Arts and Technology May 2014 WGM

Upload: zonta

Post on 21-Mar-2016

55 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ART-DÉCOR Templates in Everest

ART-DÉCOR Templates in Everest

Project “Sherpas”Justin Fyfe – Mohawk College of Applied Arts and Technology

May 2014 WGM

Page 2: ART-DÉCOR Templates in Everest

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#)

Page 3: ART-DÉCOR Templates in Everest

Everest at 5,000 m

.NET Framework

GPMREverest Core Library

Connectors Formatters

WCF MSMQ

XML ITS 1.0 DT R1 DT R2

RMIM Structures

CDACodeDom

Page 4: ART-DÉCOR Templates in Everest

CDA In Everest

Optimizer

GPMR

C#

Java

.DLL

.JARPOCD_MT000040UV.MIF

Page 5: ART-DÉCOR Templates in Everest

Using the Generated RMIM ClassesClinicalDocument document = new ClinicalDocument();document.TemplateId = LIST<II>.CreateList(new II("2.16.840.1.113883.10.20.1"));document.Code = new CE<string>("34133-9", "2.16.840.1.113883.6.1"){ DisplayName = "Summarization of episode note"};document.Component = new Component2();document.Component.SetBodyChoice(new StructuredBody());

// Vital Signs sectionSection vitalSigns = new Section();vitalSigns.TemplateId = LIST<II>.CreateList(new II("2.16.840.1.113883.10.20.1.16"));vitalSigns.Code = new CE<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( new Component3(ActRelationshipHasComponent.HasComponent, true) { Section = vitalSigns });

// Comment entryEntry commentEntry = new Entry(x_ActRelationshipEntry.HasComponent, false);Act commentAct = new Act(x_ActClassDocumentEntryAct.Act, x_DocumentActMood.Eventoccurrence);commentAct.TemplateId = LIST<II>.CreateList(new II("2.16.840.1.113883.10.20.1.40"));commentAct.Code = new CD<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);

Page 6: ART-DÉCOR Templates in Everest

Rendered in XML<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classCode="DOCCLIN" moodCode="EVN" xmlns="urn:hl7-org:v3"> <templateId root="2.16.840.1.113883.10.20.1" /> <code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note" /> <component typeCode="COMP" contextConductionInd="false"> <structuredBody classCode="DOCBODY" moodCode="EVN"> <component typeCode="COMP" contextConductionInd="true"> <section classCode="DOCSECT" moodCode="EVN"> <templateId root="2.16.840.1.113883.10.20.1.16" /> <code code="8716-3" codeSystem="2.16.840.1.113883.6.1" /> <title language="en-US">Vital Signs</title> <text mediaType="text/plain" language="en-US"> <table>Todo</table> </text> <entry typeCode="COMP" contextConductionInd="true"> <act classCode="ACT" moodCode="EVN" negationInd="false"> <templateId root="2.16.840.1.113883.10.20.1.40" /> <code code="48767-8" codeSystem="2.16.840.1.113883.6.1" displayName="Annotation comment" /> <text representation="TXT" mediaType="text/plain" language="en-US">This is a test</text> </act> </entry> </section> </component> </structuredBody> </component></ClinicalDocument>

Page 7: ART-DÉCOR Templates in Everest

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.

Page 8: ART-DÉCOR Templates in Everest

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)

Page 9: ART-DÉCOR Templates in Everest

Sherpas Generation

Optimizer

GPMR C# .DLLPOCD_MT000040UV.MIF

<temp <cla </cla

Y-DECOR.XML

SherpaTC .DLL

Page 10: ART-DÉCOR Templates in Everest

Vanilla EverestClinicalDocument document = new ClinicalDocument();document.TemplateId = LIST<II>.CreateList(new II("2.16.840.1.113883.10.20.1"));document.Code = new CE<string>("34133-9", "2.16.840.1.113883.6.1"){ DisplayName = "Summarization of episode note"};document.Component = new Component2();document.Component.SetBodyChoice(new StructuredBody());

// Vital Signs sectionSection vitalSigns = new Section();vitalSigns.TemplateId = LIST<II>.CreateList(new II("2.16.840.1.113883.10.20.1.16"));vitalSigns.Code = new CE<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( new Component3(ActRelationshipHasComponent.HasComponent, true) { Section = vitalSigns });

// Comment entryEntry commentEntry = new Entry(x_ActRelationshipEntry.HasComponent, false);Act commentAct = new Act(x_ActClassDocumentEntryAct.Act, x_DocumentActMood.Eventoccurrence);commentAct.TemplateId = LIST<II>.CreateList(new II("2.16.840.1.113883.10.20.1.40"));commentAct.Code = new CD<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);

Page 11: ART-DÉCOR Templates in Everest

Using Sherpas (live demo?)CCDClinicalDocument document = new CCDClinicalDocument();document.Component = new CCDClinicalDocument_Component();document.Component.BodyChoice = new CCDClinicalDocument_Component_BodyChoice();

// Vital SignsVitalSignsSection vitalSigns = new VitalSignsSection( classCode: ActClassDocumentSection.DOCSECT, moodCode: ActMoodEventOccurrence.Eventoccurrence, title: "Vital Signs", text: "<table>Todo</table>", entry: null);vitalSigns.Text.Representation = EncapsulatedDataRepresentation.XML;document.Component.BodyChoice.AddVitalSignsSectionComponent( new VitalSignsSectionComponent(false, vitalSigns));

// Comment entryComment commentAct = new Comment(false);commentAct.Text = "This is a test";vitalSigns.AddCommentEntry15(new CommentEntry15(x_ActRelationshipEntry.HasComponent, true, commentAct));

Page 12: ART-DÉCOR Templates in Everest

Rendered in XML<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classCode="DOCCLIN" moodCode="EVN" xmlns="urn:hl7-org:v3"> <templateId root="2.16.840.1.113883.10.20.1" /> <code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note" /> <component typeCode="COMP" contextConductionInd="false"> <structuredBody classCode="DOCBODY" moodCode="EVN"> <component typeCode="COMP" contextConductionInd="true"> <section classCode="DOCSECT" moodCode="EVN"> <templateId root="2.16.840.1.113883.10.20.1.16" /> <code code="8716-3" codeSystem="2.16.840.1.113883.6.1" /> <title language="en-US">Vital Signs</title> <text mediaType="text/plain" language="en-US"> <table>Todo</table> </text> <entry typeCode="COMP" contextConductionInd="true"> <act classCode="ACT" moodCode="EVN" negationInd="false"> <templateId root="2.16.840.1.113883.10.20.1.40" /> <code code="48767-8" codeSystem="2.16.840.1.113883.6.1" displayName="Annotation comment" /> <text representation="TXT" mediaType="text/plain" language="en-US">This is a test</text> </act> </entry> </section> </component> </structuredBody> </component></ClinicalDocument>

Page 13: ART-DÉCOR Templates in Everest

Sherpas Features

Helper Methods Constraint Validation DocumentationHelper MethodsAllow developers to see what choices of sections/entries/statements can be used in a particular contextConstraint Validation

Gives developers an opportunity to provide *basic* validation of their models in memory while developing, or parsing.

Page 14: ART-DÉCOR Templates in Everest

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

Page 15: ART-DÉCOR Templates in Everest

Questions?