880 likes | 1.23k Views
XML in Healthcare and the Semantic Web . Jonathan Borden, M.D. Center for Brain and Cranial Diseases St. Vincent Health System, Erie PA Invited Expert, W3C Web Ontology Working Group Chair, ASTM E31.28 Electronic Healthcare Records. The Goal. Answer questions like:
E N D
XML in Healthcare and the Semantic Web Jonathan Borden, M.D. Center for Brain and Cranial Diseases St. Vincent Health System, Erie PA Invited Expert, W3C Web Ontology Working Group Chair, ASTM E31.28 Electronic Healthcare Records
The Goal • Answer questions like: • “Of all the patient’s I operated on for brain tumors between 1996-2000, matching severity of pathology and matching clinical status and who have the “P53” mutation, did PCV chemotherapy improve the cure rate at five years?”
Healthcare: The current situation • A disaster: 1.1 Trillion $/year in the USA • 30-40 % overhead • mostly paper based • highly proprietary commercial systems • tens of thousands of people die each year due to poor information/errors • Most of the information is rendered useless
Strategies • Define open standards • Capture information in an electronic form • Reduce errors related to information • Define distributed, web enabled, query models
Tactics • XML, schemas, query model • Semantic Web/URI graphs • Data analysis based on actual population rather than small, potentially biased, samples • Google for biomedical information
Why XML? • Widely implemented with excellent open source tools • Life of data is longer than life of application • Data driven, Platform independent • Formal schema and query models
Reinventing medical informatics • Get the data format right and the rest will follow • Structured information has been the holy grail of medical informatics for the last 30+ years • XML is the culmination of 30+ years of work in structured information • Time to do something
XML Briefly • Simplification of SGML … markup language for the web • <element> content </element> • <element attribute=“value”> • <child-element another=“123”/> • </element>
XML and Infosets • <patient> • <person.name> • <given>James</given><given>Steven</given> • <family>Smith</family><suffix>3rd</suffix> • </person.name> • startElement(“patient”) • startElement(“person.name”) • startElement(“given”);characters(“James”);...
Regular Expressions • Pattern matching • “*TATA*” • bp ::= ‘G’ | ‘T’ | ‘A’ | ‘C’ • tata ::= bp*, ‘T’, ‘A’, ‘T’, ‘A’, bp*
XML DTD • <!ELEMENT foo (bar*)> • <!ELEMENT bar (baz?)> • <!ATTLIST bar bop CDATA #IMPLIED> • <!ELEMENT baz (#PCDATA)>
Tree Regular Expressions • <foo> • <bar bop=“23”> • <baz>xxx</baz> • </bar> • </foo> • element foo{ • element bar{ • attribute bop[int] • element baz{‘xxx’} • } • }
ASTM E2182/E2183 • XML DTDs for Healthcare • Emphasize Human Readability • Flexibility • Openhealth reference implementation http://www.openhealth.org/ASTM • Compatible with HL7 CDA
ASTM Healthcare DTDs • clinical.header • compatible with HL7 CDA • clinical.body • specific to document type • operative.report • radiology.report • discharge.summary etc.
ASTM E31.28 Clinical Header ch.person.type = person.name, id*, addr* ch.organization.type = organization.name?, id*, addr* clinical.header = element clinical.header{ ch.attrib, id*, version.number?, confidentiality.code*, patient.encounter?, authenticator*, legal.authenticator*, intended.recipient*, originator?, originating.organization?, transcriptionist?, provider+, service.actor*, patient, events?, codes?, related.document* }
ASTM E31.28 Clinical Header service.actor = element service.actor { ch.attrib, xlink.attrib?, (person.name|organization.name), id*, addr*, type.code?, function?, date.time? } provider = element provider{ ch.attrib, ch.actor.type, function?}
ASTM E31.28 Clinical Header patient.encounter = element patient.encounter{ ch.attrib, (id? & practice.setting? & date.time? & location) } service.target.model = ch.actor.type & birth.date? & gender? patient = element patient { ch.attrib,xlink.attrib?, service.target.model }
Encounter • <encounter> • <patient>…</patient> • <provider>…</provider> • <date.time>…</date.time> • <location> … </location> • <encounter.id>…</encounter.id> • </encounter>
XML examples • <person> • <person.name> • <prefix>Ms.</prefix> • <given>Susan</given> • <given>Samantha</given> • <family>Jones</family> • </person.name> • <id type=“SSN”>000-11-2233</id>
XML examples • <patient> • <person.name> … </person.name> • <id authority=“New England Medical Center”>000112233</id> • </patient> • <provider> • <person.name><prefix>Dr.</prefix><given>Amanda</given><family>Smith</family></person.name> • </provider>
Using XML to generate reports • Browser form • ASTM E2182 XML format • XSLT transform for display in browser • XSL-FO transform for printable form (e.g. PDF)
ASTM Opnote: Header (1/3) <operative.report xmlns="http://www.openhealth.org/ASTM/operative.report"> <clinical.header xmlns="http://www.openhealth.org/ASTM/clinical.header"> <id>5556666</id> <patient.encounter> <id>ENC-11111</id> <practice.setting>Operation</practice.setting> <date.time>2000-10-15</date.time> <location>New England Medical Center</location> </patient.encounter> <provider> <person.name> <prefix type="title">Dr.</prefix> <given>Jonathan</given> <given>Alan</given> <family>Borden</family> <suffix type="degree">M.D.</suffix> </person.name> ...
ASTM Opnote: Header (2/3) … <id type="license" authority="MA">12345</id> <addr type="office"> <house.number>750</house.number> <street>Washington Street</street> <city>Boston</city> <state>MA</state> <zip>02111</zip> <uri type="email">mailto:jonathan@openhealth.org</uri> <telephone>617-636-7587</telephone> </addr> <type.code>Attending</type.code> <function>Surgeon</function> </provider> ...
ASTM Opnote: Header (3/3) … <patient> <person.name> <given>John</given> <given type="MI">Q</given> <family>Doe</family> <suffix>Jr.</suffix> </person.name> <id type="patient.identifier" authority="NEMC">111223344</id> <id type="SSN" authority="SSA">111-22-3344</id> <birth.date>1955-10-21</birth.date> </patient> <codes> <coded.value code.system="CPT">63051</coded.value> <coded.value code.system="CPT">69990</coded.value> <coded.value code.system="ICD9">XXX.21</coded.value> </codes> </clinical.header>
ASTM Opnote: Body <clinical.body> <preoperative.diagnosis>Right Frontal Brain Tumor</preoperative.diagnosis> <postoperative.diagnosis>same, probable Astrocytoma</postoperative.diagnosis> <procedure>Right Frontal Craniotomy for Excision of Brain Tumor</procedure> <anesthesia>GETA</anesthesia> <indications><p>The patient presents with severe headaches and blurred vision. An MRI demonstrates a large cystic irregularly shaped mass within the right frontal lobe.</p> </indications> <description> <p>The patient had application of the external fiducial markers and was brought down to the MRI suite where a head MRI was obtained using the frameless stereotactic (3D) protocol. The image set was transferred using the DICOM protocol ... </p> </description> <estimated.blood.loss>100cc</estimated.blood.loss> <patient.condition>Stable, extubated</patient.condition> <disposition>SICU</disposition> </clinical.body> </operative.report>
How it works Browser Apache Servlet engine RDF xml:db XSLT
Form generation XML + XSLT => XHTML Formgen.xsl Form.xml Defaults.xml
Workflow • Form created • Transform into ASTM XML format • XHTML editing (opnote-edit.xsl) • Sign finished product • Render as XHTML for viewing, printing • email to Medical Records and Billing
Workflow generate Billing edit repository sign
Document analysis • Like gene sequences, it turns out that … • Medical documentation is highly repetitive • With ‘hot spots’ of unique information • Schema defines template filled with values • Easily expanded into HTML for human consumption • Easily analyzed by software
Integrating binary formats • MIME <-> XMTP • HL7 V2 • X12 EDI • DICOM
Internet Telemedicine • The OceanMed project, 1998 • Merchant vessel, e-mail access via satellite gateway • Digital camera • Web based physician access
XMTP Gateway Ship SMTP XMTP MIME -> XML -> XSLT -> HTML HTML
XMTP Consult 36 year old male has itchy rash for 6 days Hydrocortisone cream 1% to affected area t.i.d.| reply
How it works • Messages arrive in MIME format • MIME SAX parser ‘converts’ to XML by SAX events • XMTP employs XML object model *not necessarily* serialization format -> • grove processing
XMTP • From: joe.patient@home.com • To: sue.doctor@openhealth.org • Content-type: multipart/related; charset=iso-8859-1 • --------- • startDocument() • startElement(“MIME”) • startElement(“From”) • characters(“joe.patient@home.com”) • endElement(“From”) • startElement(“Content-Type”, attribute(“charset”,”iso-8859-1”)) • characters(“multipart/related”) • endElement(“Content-Type”)
The XMTP/MIME grove Content-type: text/plain From: joe@whereever.org To: sue@example.com Hi Sue! See you in Boston, Joe <MIME> <Content-type>text/plain</Content-Type> <From>joe@whereever.org</From> <Body>Hi Sue! See you in Seattle, Joe</Body> </MIME>
The HL7 Grove • Non-XML syntax => XML Infoset • MSH|PAT|Jones^James^Stephen^3rd| startElement(“patient”) startElement(“person.name”) startElement(“family”) characters(“Jones”); endElement(“family”) … endElement(“person.name”) endElement(“patient”)
Simple building blocks • XML parsers • XSLT transform engines • HTTP clients and servers
From syntax to semantics • Layer 1: syntax • XML defines syntactic constrains on text • other specs define syntactic constraints on binary data • Layer 2: datatypes • integers define mapping from lexical space to value space • “10”base10 -> 10, “10”base2 -> 2
The shape of informationsyntax -> structure = semantics “…..TATA…..” Pattern matching transform gene snp tata snp
Semantics • Layer 3: hierarchy of classes • the set of individuals of a given datatype or object type define a class • Ontology: a description of a collection of classes, their properties and the relationships between them
RDF in Healthcare <rdf:Description about=“…/patient/12345”> <lab:HIV>positive</lab:HIV> <lab:CD4>100</lab:CD4> </rdf:Description> <path:Biopsy about=“…/patient/12345”> <path:description>The brain demonstrates areas of PML including viral inclusion bodies </path:description> </path>