XML for HL7 v.2 Messages: A Bridge to Clinical Documents
description
Transcript of XML for HL7 v.2 Messages: A Bridge to Clinical Documents
XML for HL7 v.2 Messages: XML for HL7 v.2 Messages: A Bridge to Clinical DocumentsA Bridge to Clinical Documents
PHIN Conference PHIN Conference Atlanta, August 2007Atlanta, August 2007
Nancy McQuillen, M.S., Data ArchitectNancy McQuillen, M.S., Data ArchitectCalifornia Department of Public HealthCalifornia Department of Public Health
PHIN 2007PHIN 2007 22
Syntax (XML) as a Bridge to Syntax (XML) as a Bridge to Enlightenment?Enlightenment?
-- -- Well, maybe not; but public health workers read Well, maybe not; but public health workers read documents more easily than HL7 messages. documents more easily than HL7 messages.
via XML ->
PHIN 2007PHIN 2007 33
What’s wrong with these What’s wrong with these statements?statements?
Interface developers: Interface developers:
””We are planning to use either HL7 We are planning to use either HL7 (version 2) or XML”. (version 2) or XML”.
Standards watchers: Standards watchers:
””HL7 is introducing XML-based HL7 is introducing XML-based messaging starting with their latest messaging starting with their latest release - version 3”.release - version 3”.
PHIN 2007PHIN 2007 44
Presentation GoalsPresentation Goals1)1) Raise Awareness – Raise Awareness – of HL7’s XML syntax of HL7’s XML syntax
option for version 2 messages, as a potential option for version 2 messages, as a potential bridge to forms, documents, and XML-aware bridge to forms, documents, and XML-aware technologies (web-based data exchange).technologies (web-based data exchange).
2)2) Describe “Use Cases”Describe “Use Cases” – for XML in relation to – for XML in relation to forms and documents.forms and documents.
3)3) Show some steps (and tools)Show some steps (and tools) – for defining – for defining HL7 XML messages, and presenting them as HL7 XML messages, and presenting them as forms or clinical documents.forms or clinical documents.
PHIN 2007PHIN 2007 55
Traditional ER7 Syntax vs. XML SyntaxTraditional ER7 Syntax vs. XML Syntax
HL7 is primarily a HL7 is primarily a semanticsemantic standard (defining standard (defining data contentdata content of messages). The semantics can be cast into multiple of messages). The semantics can be cast into multiple syntaxes. syntaxes.
In addition to traditional encoding rules (ER7) for HL7 v.2.x, HL7 In addition to traditional encoding rules (ER7) for HL7 v.2.x, HL7 also publishes a syntax guide (an “Implementable Technology also publishes a syntax guide (an “Implementable Technology Specification (ITS)”) for the XML representation of HL7 v.2.3.1, Specification (ITS)”) for the XML representation of HL7 v.2.3.1, v.2.4, v.2.5 messages (and beyond). v.2.4, v.2.5 messages (and beyond).
HL7 Standard
(Syntax specification #1) (Syntax specification #2)
ER7 XML
Also called: •Bar syntax•Pipe-and-hat^•EDI-style•Traditional
PHIN 2007PHIN 2007 66
ER7 Syntax vs. XML SyntaxER7 Syntax vs. XML Syntax
ER7:
XML:
This translation example provided by:
(COMPACT!)
(REALLY LONG!)
The HL7 XML schema structure follows the simple structure of the HL7 v.2 standard:
• <Message>
• <Segments>
• <Fields>
• <Components>
PHIN 2007PHIN 2007 77
A Closer Look at One HL7 XML SegmentA Closer Look at One HL7 XML Segment
• <Segment> (PID)
• <Field> (PID.5)
<Datatype> (XPN)• <Component> (Surname)• <Component> (Given name)
Complex HL7 datatypes such as Extended Person Name (XPN) have component parts (e.g. XPN.1 and XPN.2) expressed as subordinate XML elements.
PID Segment Snippet:
PHIN 2007PHIN 2007 88
““Use Cases” for HL7 v.2 XMLUse Cases” for HL7 v.2 XML Useful as an adjunct (not a replacement) for Useful as an adjunct (not a replacement) for
traditional ER7 syntax, if you need to:traditional ER7 syntax, if you need to:
1)1) Convert messages - Convert messages - to other versions of to other versions of HL7 (or to custom XML formats) using HL7 (or to custom XML formats) using standard XML-aware tools, such as standard XML-aware tools, such as integration brokers and graphical integration brokers and graphical mapping tools.mapping tools.
2)2) Present and/or “persist” message data – Present and/or “persist” message data – on forms and documents, using XML-on forms and documents, using XML-aware standards (e.g. XForms) and aware standards (e.g. XForms) and technologies (e.g. Adobe’s XML technologies (e.g. Adobe’s XML architecture for .pdf fillable forms). architecture for .pdf fillable forms).
PHIN 2007PHIN 2007 99
Confidential Morbidity Report (CMR) -Confidential Morbidity Report (CMR) -XML-Based Adobe .pdf Fillable Form ExampleXML-Based Adobe .pdf Fillable Form Example
PHIN 2007PHIN 2007 1010
Example Data Flow: Clinical <-> Public HealthExample Data Flow: Clinical <-> Public Health Using Both Syntaxes (and Multiple HL7 Versions) Using Both Syntaxes (and Multiple HL7 Versions)
Dream scenario, or someday soon?Dream scenario, or someday soon?
Electronic HealthRecords Systems
Public Health Jurisdictions
IntegrationBroker
Flat CMR
2.4 ER7 CMR
2.5 ER7 CMR
EHR Case Extracts
(CDA)
Rendered, FaxedCMRs
EHR Case Data Requests
(CDA)
CDA CMRs, Case Extracts
CMR Form
HL7 XML CMR(Adobe Prof. 8)
2007?
2008?
2009?
PHIN 2007PHIN 2007 1111
Steps to (Truly) Interoperable Messages Steps to (Truly) Interoperable Messages
PHIN Compliant Profiled:
Sample Messages
Constrain!
Constrain!
Constrain!
XML (the general standard: an open slate)
HL7 XML (specific schema applied)
Profiled HL7 XML Message
• Vocabulary and OIDs• Datatype (parts)• Rules and constraints
• XML Tag Language (Semantics)
• XML Structure (Elements/Attributes)
• HL7 Segments, Fields, Repeats
Constrain!
Tools Used
(examples):
Text/XML editors
XMLSpy
HL7 MWB
XSLT
Schematron
Validate!Message
ValidatorsSUCCESS!
PHIN 2007PHIN 2007 1212
Steps to Implement an HL7 v.2.5 XML Steps to Implement an HL7 v.2.5 XML Message Behind an Adobe .pdf FormMessage Behind an Adobe .pdf Form
Step/TaskStep/Task Tool UsedTool Used1.1. Discover (reverse engineer) PHIN 2.5 Discover (reverse engineer) PHIN 2.5
ORU_RO1 message structureORU_RO1 message structureHL7 Messaging Workbench HL7 Messaging Workbench (MWB)(MWB)
2.2. A) Adapt (profile) the message as a A) Adapt (profile) the message as a CMR; and B) generate XML schemaCMR; and B) generate XML schema
HL7 Messaging Workbench HL7 Messaging Workbench (MWB)(MWB)
3.3. Bind the XML schema to data fields of Bind the XML schema to data fields of a fillable CMR .pdf forma fillable CMR .pdf form
Adobe LiveCycle DesignerAdobe LiveCycle Designer
(Adobe Acrobat 8 Professional) (Adobe Acrobat 8 Professional)
4.4. Create an XSLT transformation to add Create an XSLT transformation to add PHIN codes, OIDs, final detailsPHIN codes, OIDs, final details
Altova MapForceAltova MapForce
5.5. Attach the auto-generated XSLT Attach the auto-generated XSLT transform to outbound .pdf CMR formtransform to outbound .pdf CMR form
Adobe LiveCycle DesignerAdobe LiveCycle Designer
(Adobe Acrobat 8 Professional)(Adobe Acrobat 8 Professional)
6.6. Validate the resulting PHIN-adapted Validate the resulting PHIN-adapted CMR against profiled HL7 ORU_RO1CMR against profiled HL7 ORU_RO1
Altova XMLSpyAltova XMLSpy
PHIN 2007PHIN 2007 1313
Step 1: Messaging Workbench -Step 1: Messaging Workbench -Parse structure of sample (CDC case notification) messageParse structure of sample (CDC case notification) message
PHIN 2007PHIN 2007 1414
Step 2a: Messaging Workbench -Step 2a: Messaging Workbench -Profile the CMR (Select segments, fields, etc.)Profile the CMR (Select segments, fields, etc.)
PHIN 2007PHIN 2007 1515
Step 2b: Messaging Workbench -Step 2b: Messaging Workbench -(XML schema generated for the profiled CMR)(XML schema generated for the profiled CMR)
Hint:
Schema is multi-page and organized from “bottom up” –
progressing from general (whole ORU_R01) to specifics (segments and datatypes).
PHIN 2007PHIN 2007 1616
Step 3: Adobe LiveCycle Designer –Step 3: Adobe LiveCycle Designer –Bind the XML schema to data fields of fillable formBind the XML schema to data fields of fillable form
e.g. Patient First Name (on form) is bound to PID.XPN.2 (in the attached XML schema).
PHIN 2007PHIN 2007 1717
Step 4: Altova MapforceStep 4: Altova MapforceAdd PHIN Codes, OIDs, Rules, via XSLTAdd PHIN Codes, OIDs, Rules, via XSLT
PHIN 2007PHIN 2007 1818
Step 5: Adobe LiveCycle Designer:Step 5: Adobe LiveCycle Designer:Attach the XSLT to “Transform Outgoing Data”Attach the XSLT to “Transform Outgoing Data”
Insert snapshot:Insert snapshot:
PHIN 2007PHIN 2007 1919
Step 6: XMLSpy (or Other Validators)Step 6: XMLSpy (or Other Validators)View XML generated via Form Entry (+ XSLT)View XML generated via Form Entry (+ XSLT)
PHIN 2007PHIN 2007 2020
Binding to an HL7 CDA Document Binding to an HL7 CDA Document An HL7 Clinical Document is an XML document!An HL7 Clinical Document is an XML document!
• Representing a human-readable documentRepresenting a human-readable document
A CDA message is composed of two parts: A CDA message is composed of two parts:
• A A headerheader and a and a bodybody
Designed for communication between two systems Designed for communication between two systems
A valid variant of HL7 v3A valid variant of HL7 v3 - -
• based on the HL7 Reference Information Model based on the HL7 Reference Information Model (RIM); CDA is an HL7 v3 standard(RIM); CDA is an HL7 v3 standard
PHIN 2007PHIN 2007 2121
Structure of a CDA Document (an XML Instance)Structure of a CDA Document (an XML Instance)<ClinicalDocument ><ClinicalDocument >
<title>Confidential Morbidity Report</title><title>Confidential Morbidity Report</title>
<effectiveTime value="20050407"/><effectiveTime value="20050407"/>
<author><author> ..... ..... </author></author>
<recordTarget><recordTarget>
<patient><patient> .......... </patient></patient>
</recordTarget></recordTarget>
<component><component>
<structuredBody><structuredBody>
<component><component>
<section><section>
<code code="14657009" ….. codeSystemName="SNOMED CT"/><code code="14657009" ….. codeSystemName="SNOMED CT"/>
<title>Established diagnosis</title><title>Established diagnosis</title>
……....
<entry><entry>
<observation classCode="COND" moodCode="EVN"> .....<observation classCode="COND" moodCode="EVN"> .....
<value ... code="398565003" ... displayName="Botulism"> ... </value><value ... code="398565003" ... displayName="Botulism"> ... </value>
</observation></observation>
</entry></entry>
</section></section>
</component></component>
</structuredBody></structuredBody>
</component></component>
</ClinicalDocument></ClinicalDocument>
Header
BodyClinical
Statement(s)
PHIN 2007PHIN 2007 2222
Example: Mapping HL7 2.5 Segments to an Example: Mapping HL7 2.5 Segments to an HL7 CDA Message SchemaHL7 CDA Message Schema
PHIN 2007PHIN 2007 2323
Conclusions, HypothesesConclusions, Hypotheses1)1) HL7 XML Syntax for v.2 Messages is UsefulHL7 XML Syntax for v.2 Messages is Useful
- to facilitate message conversions (e.g. v2 to HL7 v3 Clinical - to facilitate message conversions (e.g. v2 to HL7 v3 Clinical Document Architecture (CDA)), and to facilitate integration Document Architecture (CDA)), and to facilitate integration with other XML-aware forms and document architectures (e.g. with other XML-aware forms and document architectures (e.g. XForms and Adobe .pdf forms).XForms and Adobe .pdf forms).
2)2) Tools for manipulating XML and HL7 XML schemas are Tools for manipulating XML and HL7 XML schemas are emergingemerging
- and can be used to help bridge messages with documents, - and can be used to help bridge messages with documents, enabling public health professionals to visualize message enabling public health professionals to visualize message content, and to participate in PHIN-compliant form content, and to participate in PHIN-compliant form development and vocabulary review. development and vocabulary review.
== PHIN 2007 PHIN 2008 and Beyond
PHIN 2007PHIN 2007 2424
AcknowledgementsAcknowledgements The author would like to thank the following persons and The author would like to thank the following persons and
organizations who have contributed their time and thought organizations who have contributed their time and thought leadership to the XML, Adobe, HL7, and PHIN technical content of this leadership to the XML, Adobe, HL7, and PHIN technical content of this presentation. presentation.
• Dr. Mark Starr, NEDSS Principal Investigator, California Dr. Mark Starr, NEDSS Principal Investigator, California Department of Public Health Department of Public Health
• Linda Sandoval, NEDSS Surveillance Systems Coordinator, Linda Sandoval, NEDSS Surveillance Systems Coordinator, California Department of Public HealthCalifornia Department of Public Health
• Dr. Cecil Lynch, OntoReason LLC and UC Davis InformaticsDr. Cecil Lynch, OntoReason LLC and UC Davis Informatics
• Kai Heitmann, Paul Biron, and the entire (former) XML Special Kai Heitmann, Paul Biron, and the entire (former) XML Special Interest Group (SIG) of HL7Interest Group (SIG) of HL7
• Bob Dolin, M.D. and Liora Alschuler, Co-chairs of HL7 Structured Bob Dolin, M.D. and Liora Alschuler, Co-chairs of HL7 Structured Documents Technical CommitteeDocuments Technical Committee
• CDC NCPHI PHIN technical support team and DISS XForms teamCDC NCPHI PHIN technical support team and DISS XForms team