ART-DECOR_Templates_in_Everest

Report
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
Connectors
WCF
MSMQ
XML
ITS 1.0
DT
R1
Formatters
Everest Core Library
.NET Framework
DT
R2
CDA
RMIM Structures
GPMR
CDA In Everest
Optimizer
C#
.DLL
Java
.JAR
GPMR
POCD_MT000040UV.MIF
Using the Generated RMIM Classes
ClinicalDocument 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 section
Section 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 entry
Entry 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);
Rendered in XML
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classCode="DOCCLIN" moodCode="EVN" xmlns="urn:hl7org: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>
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
<temp
<cla
</cla
Optimizer
Y-DECOR.XML
GPMR
POCD_MT000040UV.MIF
C#
.DLL
SherpaTC
.DLL
Vanilla Everest
ClinicalDocument 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 section
Section 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 entry
Entry 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);
Using Sherpas (live demo?)
CCDClinicalDocument document = new CCDClinicalDocument();
document.Component = new CCDClinicalDocument_Component();
document.Component.BodyChoice = new CCDClinicalDocument_Component_BodyChoice();
// Vital Signs
VitalSignsSection 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 entry
Comment commentAct = new Comment(false);
commentAct.Text = "This is a test";
vitalSigns.AddCommentEntry15(new CommentEntry15(x_ActRelationshipEntry.HasComponent, true, commentAct));
Rendered in XML
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classCode="DOCCLIN" moodCode="EVN" xmlns="urn:hl7org: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>
Sherpas Features
Helper Methods
Constraint Validation
Documentation
Allow developers to see what choices of sections/entries/statements can
Constraint Validation
be used in a particular context
Helper Methods
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
Questions?

similar documents