310 likes | 492 Views
XML, HL7 Messaging and the Clinical Document Architecture. Contents. Introduction to XML Introduction to Heath Level 7 (HL7) HL7 messaging, current and future HL7 Clinical Document Architecture (CDA). Generalized Markup Languages.
E N D
Contents • Introduction to XML • Introduction to Heath Level 7 (HL7) • HL7 messaging, current and future • HL7 Clinical Document Architecture (CDA)
Generalized Markup Languages • Markup identifies structural elements of a document rather than specific formatting features • Markup is expressed as standard text sequences (markup "tags") • Formatting instructions are applied separately to the specified document elements • Markup tags can be human-readable
Markup Expresses Metadata • Documents naturally have content and metadata • Metadata may help specify: • Meaning of data (e.g., standard coding) • Arrangement of data (display) • Correct use of the data (business rules) • Context and relationships between data elements • Example of display markup: Documents contain <emph>metadata</emph> and "primary" data Tag content Embedded "tag"
Heritage of Generalized Markup Languages Internal work at IBM TeX, nroff, troff SGML Tag formats DTD format Processing rules Frameworks 1984 Many special- purpose markup languages XML 1998 HTML XHTML ~1990 Many special- purpose markup languages Implementations
Extensable Markup Language (XML) • HTML originally specified structural components of documents • HTML has evolved to become a presentation syntax • SGML is complex and requires complex processing software • XML is a simplified version of SGML designed for electronic document archiving and exchange • Allows creation of special-purpose markup languages • Can represent a variety of data structures and semi-structured data as well as metadata • Arbitrary tag nesting, recursion and granularity • Human-readable and machine readable • Expected to be useful for creation of special purpose data-interchange standards as well as document structuring
XML Document Detail Opening tag Attribute Element name <procedure cpt="1234"> <pat_phys pnum="abcd"> <firstName>Elmer</firstName> <lastName>Fudd</lastName> <degree>M.D.</degree> </pat_phys> <proc_name>Upper endoscopy of gizzard</proc_name> <proc_date>09/09/1999</proc_date> <location name="ER"/> </procedure> Content Singleton tag Closing tag
HL7Health Level 7 Organized to create standards for the exchange, management and integration of data that supports clinical patient care and the management, delivery and evaluation of healthcare services • Founded by healthcare providers in 1987 • Version 1.0 late in 1987 • Version 2.0 late in 1988 • Versions 2.1, 2.2 and 2.3 published in 1990, 1994 and 1997; ANSI standards • Pragmatic approach • Work on Version 3 (XML-based) is ongoing
7 Application Function 6 Presentation 5 Session 4 Transport 3 Network Communication 2 Data Link 1 Physical "Level Seven" A protocol for the exchange of health care information ISO-OSI Layered Protocol Model
Lab system Receive A01, send ACK trigger event (external) admit event send HL7 A01 msg receive HL7 ACK msg ADT system network HL7 Transactional Model
HL7 Abstract Messages • Identifies data fields • Describes error conditions • DOES NOT describe the byte string contained in the message.
Admit Message segments, fields, components & subcomponents MSH|^~\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT^A01|MSG00001|P|2.3|<cr> EVN|A01|198808181123||<cr> PID|||PATID1234^5^M11||JONES^WILLIAM^A^III||19610615|M||C|1200 N ELM STREET^^GREENSBORO^NC^27401-1020|GL|(919)379-1212|(919)271-3434||S|| PATID12345001^2^M10|123456789|987654^NC|<cr> NK1|JONES^BARBARA^K|WIFE||||||NK^NEXT OF KIN<cr> PV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||||ADM|A0|<cr>
Variability in HL7 Interfaces • Site 1: OBX|1|CE|ABO^ABO GROUP||O^Type O| • Site 2: OBX|1|CE|BLDTYP^ABO GROUP||TYPEO^Type O| • Site 3: OBX|1|CE|ABOTYPE^ABO GROUP||OPOS^Type O| "when you've seen one HL7 interface you've seen one HL7 interface"
HL7 v2.x is not Plug and Play • Cost of installing an HL7 interface: 2-4 weeks of analyst time • Issues • Different implicit information models • Misunderstanding of specifications • No vocabulary to describe conformance except by detailed specs • Significant local demands on vendors
Goals for Version 3 • Substantially reduce interface development time • Clarify spec for messages • Create a specified information model • Method for conformance specification • Support modern communications infrastructures • Reference Information Model (RIM) • Coherent shared information model • Includes all content of HL7 messages • Provides consistency to messages across usage settings
Advantages of XML for Message Formatting • The syntax handles recursion and nesting • Variably nested structures to arbitrary depth • More flexible than segments, fields, components & subcomponents • Objects (including contained objects) can be represented • Relational structures can be represented • Simple syntax, easy to debug (human readable) • Software tools (parsers, etc.) are generally available • Language- and platform-independent • Compatibility with other industries
HL7 Clinical Document Architecture (CDA) A multilevel representation of medical documents that can be passed as messages and which make up the medical record. • Level 1: XML-coded header • Contents may be flat or tagged text • Level 2: Coded document sections • Generic architectural DTD with multiple derived DTDs • Level 3: Coded content • Text tagging based on RIM • Generic architectural DTD with multiple derived DTDs • Initial focus is documents used directly in clinical care
Definition of a Document • Persistence • Defined by local and regulatory requirements • Stewardship • Maintained by an organization or person • Authentication • A collection of information that is to be legally authenticated • Wholeness • Legal authentication applies to the document as a whole and not to parts of the document out of context. The document also establishes a context for use of the contained information. • Human readability
Advantages of XML for Document Management • Adaptable to unstructured and semi-structured data • Tagging does not destroy the document or its text flow • The text of the document can be recovered by ignoring the tags • Tagged document are human readable • If tagging is well-documented and/or tags are logically named, XML documents will remain readable over the long term
CDA Level 1 Markup Header & "wrapper" Clinical Document as text
CDA Level 2 Markup Header & "wrapper" Clinical Document with structural markup (main sections)
CDA Level 3 Markup Header & "wrapper" Clinical Document with detailed markup including local extensions
Why Not Standardize DTDs? • DTDs support local processes • Single documents may use multiple DTDs • Achieving consensus on details is lengthy • DTDs evolve with local needs • Strategy: • Create generic architectural DTDs • Allow local extension • Local extensions can be ignored when necessary
Key Header Elements • ID, set ID, version, addendum vs. replacement • Fulfills order • Document type (LOINC) • Origination time • Confidentiality level • Patient encounter • Service actors (care providers; individuals and organizations) • Authenticator, legal authenticator, originator, intended recipient, originating organization, provider, transcriptionist • Service target (living or inanimate) • If patient, one and only one
Structural Markup • HTML-like (captions/headings, paragraphs, lists, tables) • Recursive relationships • Content tag: generic identifier and target for text sequences • Coded entry: standard vocabulary entry, can be targeted to a text span defined by content tags • Generic design yields limited ability to specify structure of particular document types (schemas?) • Complex style sheets for particular documents?
Summary • XML is a flexible framework for creating tag vocabularies that add metadata to textual documents • HL7 is a core standard in healthcare systems communications that has strengths and also specific weaknesses • A new version of the HL7 messaging standard attempts to address those weaknesses through definition of a reference information model and XML message formatting • HL7 has also defined a generic XML standard for clinical documents that is intended to improve the structure, accessibility and longevity of the electronic medical record.