1.41k likes | 1.44k Views
V3 Software Implementation. Full source: www.ringholm.com/download/ implementation_mechanics.ppt. Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt. René Spronk M.Sc. FHL7.
E N D
V3 Software Implementation Full source: www.ringholm.com/download/ implementation_mechanics.ppt Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
René Spronk M.Sc. FHL7 Trainer / Senior Consultant Ringholm bv Haarlem, the Netherlands Tel. +31 (0)318 589 789 Fax: +31 (0)318 548 090 eMail: Rene.Spronk@Ringholm.com Web: http://www.Ringholm.com • HL7/IHE roles: • Co-chair of the international HL7 RIMBAA Working Group • Co-chair of various Committees, HL7 Germany, HL7 Netherlands • Contributor to the IHE Laboratory Technical Framework • HL7 Fellow, 2011
Key Objectives Understand some architectural approaches and techniques for v3 Implementation Discuss some technologies and tools available to implement v3 specifications Show some of the ‘best practices’ collected by the HL7 RIMBAA Workgroup
Overall Agenda • Introduction • XML Serialization • In memory object processing • Persistence • Mapping v2 to v3 (optional) • Implementation Tools • User Interfaces (optional)
An Introduction HL7 v3 Implementation – an introduction Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
Agenda – Introduction section • HL7 v3 modeling/HDF – bottom up • MIF and the origins of schema • Conformance/validation principles • RIMBAA Technology Matrix
An introduction HL7 v3 modeling / HDF -bottom up- Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
XML ITS XML example DT R1
HL7 v3: Model Refinement ITS (serialization format of instances) R-MIM / SIM Serializable Model Refinement of Clinical Documents D-MIM / DIM Domain Model Pharmacy Refinement of RIM Stable model, Domain agnostic RIM
Notes • Core of all information models: Data Type specification • Behavioral (dynamic) model: • Interactions, initial/response exchanges between 2 applications • Service layer, contractual issues, -work in progressin HL7 v3-
An introduction MIF – Model Interchange Format Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
MIF • The Model Interchange Format (MIF) • a set of XML formats used to support the storage and exchange of HL7 version 3 artefacts • the pre-publication format of HL7 v3 artefacts used by tooling. • the formal definition of the HL7 metamodel. • MIF can be transformed into derived forms such as UML/XMI, OWL, or XML schema.
MIF documents: • Requirements-analysis related structures. • Static model related structures. • Dynamic model related structures. • Infrastructure related structures: • including data types, and vocabulary • Structures related to testing • Conformance-related HL7 structures • Publication related structures
MIF: How Is It Defined? (1) A set of XML schemas (+ Schematron):
MIF: How Is It Defined? (2) • The XML schemas define the MIF language constructs as types, with the meaning of the types explained informally in annotations:
Why MIF instead of UML? • MIF is a single unified metamodel that spans all HL7 artifacts. The metamodel is maintained and under the sole control of HL7. The metamodel represents all HL7 artifacts in a consistent fashion. • There will always be a "newer" and "better" technology out there, but there is currently no alternative metamodel representation that covers all of HL7's metamodel.
An introduction ITSs and the origins of HL7 Schema Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
ITS – Implementable Technology Specification • An ITS specifies how instances of HL7 SIMs should be ‘transmitted’ • Serialization, deserialization, encoding syntax • The most commonly used ITS is the “XML ITS” • Alternatives: RIM serialization ITS (“RIM ITS”), Green CDA
MIF transform toXML based ITS schemas Repository MIF MIF MIF XSLT XSLT R-MIM Pubs XML Schemas
MIF Example: E_NonPersonLivingSubject Other attributes
MIF v. XML-based ITS • XML provides a syntax only • An XML based ITS defines the set of valid XML instances for a given message type • no schema can do this • Download informative schemas with the v3 Ballot Package • Normative Edition schemas as a reference
XML ITS Generated XML-Schema for BirthPlace (snippet, XML ITS 1.1)
An introduction Conformance and Validation Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
A “Valid” v3 instance.. • Complies with the requirements as defined by the HL7 v3 information model • Conformance indicator, cardinality, vocabulary • Complies with additional (“contractual”) requirements • Template definitions, business rules
Attribute/AssociationConformance Levels • Conformance indicator: • Optional: MAY be present, MAY be processed, allows for nullFlavors • Required*: SHOULD be present, SHALL be supported by sender/receiver, SHALL be sent if known, allows nullFlavors • Mandatory yes/no: • Mandatory*: SHALL be present, SHALL be processed/supported by sender/receiver, no nullFlavors
Vocabulary: Value Sets • Attribute is linked to Concept Domain • The concept domain is (UV Realm) represented by a value set. • The value set is based on a coding system. Person name: EN [0..*] administrativeGenderCode: CE CWE <= AdministrativeGender …
R-MIM (SIM).. and a Template (LIM) • Notes: • Template model must be a valid constraint on the R-MIM • -- An instance would not be able to conform to both if the above doesn’t hold true • Reminder: Clone names of classes carry no semantics (they are irrelevant)
Constraint Language • To express additional constraints • OCL, ADL, Gello • No solution has been formally adopted • Typical (OCL) example: • The Person object should have either an id or a name • context Person • inv: id.hasContent or name.hasContent
Example: „Valid“ CDA Document • Validates against the published XML Schema • XML Schema based validation tool • Validates against the abstract CDA model specification • Use a MIF (specification of the abstract model) based validation tool, includes conformance and vocabulary validation • Validates against requirements / templates as specified in implementation guides • Mostly: a XML Schematron based validation tool; could be MIF/OCL based
An introduction RIMBAA Technology Matrix Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
The RIM is “abstract” The same “instance” of information can be shared via different information interoperability paradigms • E.g. lab results can be shared • via (electronic) documents (v3 Clinical Document Architecture) • via V3 lab messages • via Web Services with v3 payloads • ..or they can be imported • In a RIM Based Application (RIMBAA)
Use of V3 artefacts RIMBAA
RIMBAA Technology Matrix Persistent Representation Object Representation Serialized Representation RIM (generic) Model RIM Constrained Information Model Application specific Model
Overall Agenda • Introduction • XML Serialization • In memory object processing • Persistence • Mapping v2 to v3 (optional) • Implementation Tools • User Interfaces (optional)
XML Serialization About the HL7 v3 XML Schema Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
Two XML-based ITSs XML ITS 1.1 RIM ITS New (2010) Based on serialization of the RIM XML element names based on the RIM core class names. One single schema for all RIM-based models; 50 classes. • Has been in use since the beginnings of HL7 v3 • Based on serialization of an R-MIM (SIM) • XML elements names based on clone/business names for classes as used in the R-MIM • Separate schema for each and every R-MIM (SIM)
XML ITS example <component typeCode="COMP"> <commonObservationEvent classCode="OBS" moodCode="EVN” <templateId root='2.16.840.1.113883.10.20.1.24'/> <code code="8302-2" codeSystem="2.16.840.1.113883.6.1" displayName="Lichaamslengte“> <statusCode code="completed"/> <effectiveTime value="200907011346" /> <value xsi:type="PQ" value="90" unit="cm" /> <subject typeCode="SBJ" contextControlCode="OP"> <patient classCode="PAT"> <patientPerson classCode="PSN“ determinerCode="INSTANCE"> <name>ROELOFSEN, TOM</name>
RIM ITS example <rim-graph xmlns="urn:hl7-org:v3-rim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0226" xmlns:sbad=“urn:oid:2.16.840.1.113883.10.20.1.24” > <outboundRelationship xsi:type="ActRelationship" assocName="subject" cloneName="Subject2" contextControlCode="AN" typeCode="SUBJ" contextConductionInd="false"> <target xsi:type="SubstanceAdministration" classCode="SBADM" moodCode="RQO“ templates=“sbad:root” > <id root=""/> <code code="DRUG" codeSystem=""/> <participation xsi:type="Participation" contextControlCode="OP" typeCode="DIR"> <role xsi:type="Role" assocName="medication" cloneName="Medication" classCode="ADMM"> <player xsi:type="ManufacturedMaterial“ assocName="administerableMedicine" classCode="MMAT" determinerCode="KIND"> <code code="" codeSystem="?"/>
ITSs - RIMBAA Technology Matrix Persistent Representation Object Representation Serialized Representation Note: RIM ITS RIM (generic) Model Note: XML ITS RIM Constrained Information Model Application specific Model
Using HL7 v3 Schemas HL7 produces informative XML Schema Definitions (XSD) for all v3 messages There are nonormativeXML schema (current workitem) normative schema are being discussed Things to understand An XML document that satisfies Schema validation is not necessarily a valid HL7 v3 Message/Document
XML ITS XML ITS Schema - Abstract Models • In v3, Element Names are derived from the permitted structural codes • No meaning is lost if you strip all element names from HL7v3 XML • <Foo classCode=“PSN”>..</Foo> is the semantic equivalent of • <Person classCode=“PSN”>..</Person> • However, most XML tools are useless if you strip all element names from a document. • First generation implementations will use XML element names, later systems will be driven off the structural vocabulary (classCode, moodCode, typeCode.. ) • Model Driven Architectures / Code Generation
XML Schema what are schemas bad at • No ambiguous content models allowed • Problem for model-XML mapping (requires use of clone class names in XML instances) • No conditional constraints • cannot have an element that may either have a nullFlavour, or a set of attributes • Date+Time types are a mess • HL7 uses short ISO dates (without validation) • Code list validation • Only for small (enumerated) code lists • Friendly messages when validation fails
XML Serialization Serialization/Deserialization (using XML techniques) Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.com/download/implementation_mechanics.ppt
Parsing and ValidationUsing XML Techniques Serialized Message to Application Object Streaming API SAX, XmlReader for efficient parsing of XML instances Stripping out of those parts one needs only, skipping all other content DOM, XPath Total control on XML processing In memory object which represents all of the XML contents