MARC-HI Everest Framework Enabling RMIM Based Applications Justin Fyfe (Mohawk College)
Agenda Overview Architecture Using Everest Universal Messaging Data types Enhancements Roadmap
Overview HL7v3 Messaging API Object representation of structures within MIFs Improved v3 Experience Extensive documentation in developer’s IDE Value sets represented as business names Parameterized constructors, operators and helper functions Flexible ITS and Transport Channel architecture
History
Guiding Principles Flexibility Performance Quality The Guiding Principles of Everest: Documentation – A developer MUST be able to understand what each component of the framework does and it’s purpose Standards Compliance – The framework MUST generate, to the best of its ability, standards compliant messages Intuitiveness – The framework MUST behave as an extension of the developer’s environment. Performance – The framework MUST not introduce undue performance degradation to it’s container application Flexibility – The framework MUST allow developers to adapt to new HL7 standards with little changes to their application logic Standards Compliance Intuitiveness / Documentation
Documentation
Architecture
10,000 m View Development Canonical Data Canonical Data RIM Graph MARC-HI Everest ITS Graph ITS Graph Transport Transport
5,000 m - Everest .NET CodeDom XML ITS 1.0 DT R1 DT R2 CDA UV NE2008 Connectors Formatters RMIM Structures WCF MSMQ Everest Core Library GPMR Purple = Everest functionality Red = User Extensible / Auto-Generated Silver = Third Party Note: Using term CodeDom loosely to describe the process of generating executable code at runtime .NET Framework
5,000 m - Overview jEverest XML ITS 1.0 DT R1 Connectors Formatters CA 2.04.02 UV NE2008 Metro / Axis JMS Everest Core Library Purple = Everest functionality Red = User Extensible / Auto-Generated Silver = Third Party J2SE/J2EE 1.6
Using Everest
From MIF to Code .js Optimizer C# .DLL .HTM COR MIF 2.1.x GPMR Repo. REST/JSON .js Optimizer C# .DLL HTML .HTM COR Repo. MIF 2.1.x GPMR Java .JAR XSL/XSD .XSL / .XSD
(Written by Developer) Graph to RMIMs Core Library Canonical Data RIM Graph RMIM Objects RMIM Graph Code (Written by Developer) Generated DLL Purple = Provided by Everest Red = Developed by Programmer Data
Formatting Objects Canonical Data RIM Graph ITS Graph Datatypes R1 Graph Aide Canonical Data RIM Graph RMIM Objects ITS Graph XML ITS 1.0 Formatter Purple = Provided by Everest Red = Developed by Programmer <PRPA_IN201305UV02 … <id root=“1.2.3.456 <creationTime va…
Transporting Objects Canonical Data RIM Graph ITS Graph Transport 1 Datatypes R1 Graph Aide XML ITS 1.0 Formatter Canonical Data RIM Graph RMIM Objects ITS Graph WCF Client Connector Transport 1 Purple = Provided by Everest Red = Developed by Programmer Web Service
(ex: Queue / File System) One-Way Connectors Application Code Application Code One Way Transport (ex: Queue / File System) Sending Connector Listening Connector
Two-Way Connectors Application Code Application Code Send / Receive Connector Send / Receive Connector
Universal Messaging & CDA
UV Support NE2008 (since GPMR 0.9.x) NE2009 / NE2010 *_HD*.*mif files should be removed NE2009 / NE2010 HTML renderer works on Patched MIF files in quirks mode Missing Several CMET definitions in DEFN IFC file Templating issue with several Interactions CDAr2 (NE2010) (since GPMR 1.1.x)
Patching NE2009/2010 Some MIFs duplicate the “true” option <mif:class name="GuarantorChoice" isAbstract="true true"> Search / replace “true true” with “true” PORP_MT0500032UV04 has invalid Type option <mif:type name=")"/> Replace name=“)” with name=“CS”
Interactions in Everest Bind T: ControlActProcess Message<T> Subject<T> : Subject ControlAct<T> Bind PRPA_IN201305UV02 RegistrationEvent
Subject<T> : Subject NE2010 Interaction Issue ParameterList Bind Bind T : ControlActProcess Message<T> Subject<T> : Subject ControlAct<T> Bind Bind POIZ_IN070020UV01 System.Object ImmunizationProfile
NE2010 Interaction Issue Bind Subject<T> : Subject ControlAct<T> T : ControlActProcess Message<T> Bind ParameterList : CreateParameterList() SpecialAuthorizationRequest : CreateSpecialAuthorizationRequest() POIZ_IN070020UV01 POIZ_IN070020UV01 System.Object When instance of ParameterList When instance of ImmunizationProfile
CDA in Everest
CDA Support in Everest GPMR 1.1 supports processing of POCD_MTxxxxxx MIFs Everest 1.0 Supports rendering of the ClinicalDocument RMIM structure
How we did it NE2010 V3 Generator POCD_RM000040.VSD POCD_RM000040.XML POCD_MT000030.MIF POCD_MT000040UV.MIF
How we did it (cont’d) Optimizer C# .DLL GPMR Java .JAR DEFN=IFC … coremif GPMR POCD_MT000040UV.MIF DEFN=RIM … coremif Java DEFN=VO … coremif .JAR
DT Enhancements
Operators HL7v3 data types should behave like native primitives when not null-Flavored INT should behave like int, long, uint REAL should behave like float, double BL should behave like bool Operator overloading allows us to achieve this: Casting to/from native types Adding nullFlavors Providing native operations (+, -, /, *, %, <=, >=, etc..)
Behaving Like Native Types for (int i = 0; i < 10; i++) if ((i % 2).Equals(1)) Console.WriteLine("{0} odd", i); for (INT i = 0; i < 10; i++) if ((i % 2).Equals(1)) Console.WriteLine("{0} odd", i);
Operator Example INT zero = 0; REAL pi = Math.PI; TS now = DateTime.Now; PQ day = new PQ(1, “d”); INT integerDiv = 3 / 2; REAL floatDiv = 3 / (REAL)2; TS yesterday = now – day; PQ negation = -day; REAL nullFlavored = pi / zero; NullFlavor nf = (pi / zero).NullFlavor; TS throwsAnException = now – new PQ(3, “ft”); Cast to/from native datatypes Natural operations on datatypes Null flavor rules still apply (nullFlavor = NI) Unit checking is performed
Implemented Operators Comparison (<, >, <=, >=) Any PDV<T> where T is IComparable<T> Basic Arithmetic (+, -) TS, PQ, MO, INT, REAL Arithmetic (*, /) & Unary (-) PQ, MO, REAL, INT Integer Arithmetic (%, /) & Unary (--, ++) INT Logic (^, &, |, !) BL Casting (Implicit / Explicit) Many of the datatypes support this, many times when ToX or FromX is listed in the Data Types implementation guide.
Utility Functions To / from Interval: REAL pi = Math.PI; pi.Precision = 2; IVL<REAL> piRange = pi.ToIVL(); TS ts2008 = new TS() { Value = “2008” }; IVL<TS> range2008 = ts2008.ToIVL(); Low = 3.1400000000 High = 3.1499999999 Low = 20080101000000.000 High = 20081231115959.999
Set Utilities Interval IVL<PQ> ageRange = new IVL<PQ>( new PQ(1, “a”), new PQ(3, “a”) ); ageRange.Contains(new PQ(24, ”mo”));
Set Utilities Periodic Interval: IVL<TS> nineToFive = new IVL<TS>( DateTime.Parse("2011-09-02 09:00 AM"), DateTime.Parse("2011-09-02 05:00 PM") ); PIVL<TS> repeated = new PIVL<TS>( nineToFive, new PQ(1, "wk") TS y2kLunch = DateTime.Parse("2000-01-01 11:30 AM"); bool isIncluded = repeated.Contains(y2kLunch ); // Returns false
Three levels of Equality Reference Equals (default == operation) Do the two objects represent the same reference in memory Value Equality (via .Equals()) Do all of the properties in A have the same content as all the properties in B? Semantically Equal (via .SemanticEquals()) Are the two objects equal according to data types guide?
Example II a = new II(“1.1.1.1”, “123”) { Use = InstanceIdentifierUse.Business }, b = new II(“1.1.1.1”, “123”) { Use = InstanceIdentifierUse.Version } bool reference = a == b; bool value = a.Equals(b); bool semantics = a.SemanticEquals(b); False – A is not B False – Use is not equal True – A is equal to B according to Data Type rules.
roadmap
Milestones Q4 2011 – jEverest CTP (Community Tech. Preview) Formatters RMIM Structures GPMR Patches Q1 2012 – Release Candidate 3 Everest .NET: CDA Support Datatypes R2 Support jEverest : Connectors Q2 2012 – Release of Everest 1.0 jEverest + Everest + GPMR Bundles Documentation for jEverest
Everest 1.0 Goals jEverest – Java Version of Everest XML ITS 1.0 and Datatypes R1 File and SOAP Connectors (Metro / Axis undecided yet) Support for NE2010 CDA Support for Everest DataTypes R2 Support for .NET version
Development Roadmap
Questions http://everest.marc-hi.ca