XML in Healthcare and the Semantic Web Jonathan
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, W 3 C Web Ontology Working Group Chair, ASTM E 31. 28 Electronic Healthcare Records
The Goal z. Answer questions like: z“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 “P 53” mutation, did PCV chemotherapy improve the cure rate at five years? ”
Healthcare: The current situation z. A disaster: 1. 1 Trillion $/year in the USA z 30 -40 % overhead zmostly paper based zhighly proprietary commercial systems ztens of thousands of people die each year due to poor information/errors z. Most of the information is rendered useless
Strategies z. Define open standards z. Capture information in an electronic form z. Reduce errors related to information z. Define distributed, web enabled, query models
Tactics z. XML, schemas, query model z. Semantic Web/URI graphs z. Data analysis based on actual population rather than small, potentially biased, samples z. Google for biomedical information
Why XML? z. Widely implemented with excellent open source tools z. Life of data is longer than life of application z. Data driven, Platform independent z. Formal schema and query models
Reinventing medical informatics z. Get the data format right and the rest will follow z. Structured information has been the holy grail of medical informatics for the last 30+ years z. XML is the culmination of 30+ years of work in structured information z. Time to do something
XML Briefly z. Simplification of SGML … markup language for the web z<element> content </element> z<element attribute=“value”> y<child-element another=“ 123”/> z</element>
XML and Infosets z<patient> y<person. name> x<given>James</given><given>Steven</given> x<family>Smith</family><suffix>3 rd</suffix> y</person. name> zstart. Element(“patient”) ystart. Element(“person. name”) xstart. Element(“given”); characters(“James”); . . .
Regular Expressions z. Pattern matching z“*TATA*” zbp : : = ‘G’ | ‘T’ | ‘A’ | ‘C’ ztata : : = bp*, ‘T’, ‘A’, bp*
XML DTD z<!ELEMENT foo (bar*)> z<!ELEMENT bar (baz? )> z<!ATTLIST bar bop CDATA #IMPLIED> z<!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 E 2182/E 2183 z. XML DTDs for Healthcare z. Emphasize Human Readability z. Flexibility z. Openhealth reference implementation http: //www. openhealth. org/ASTM z. Compatible with HL 7 CDA
ASTM Healthcare DTDs zclinical. header ycompatible with HL 7 CDA zclinical. body yspecific to document type yoperative. report yradiology. report ydischarge. summary etc.
ASTM E 31. 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 E 31. 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 E 31. 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 z<encounter> y<patient>…</patient> y<provider>…</provider> y<date. time>…</date. time> y<location> … </location> y<encounter. id>…</encounter. id> z</encounter>
XML examples z<person> y<person. name> x<prefix>Ms. </prefix> x<given>Susan</given> x<given>Samantha</given> x<family>Jones</family> y</person. name> y<id type=“SSN”>000 -11 -2233</id>
XML examples z <patient> y <person. name> … </person. name> y <id authority=“New England Medical Center”>000112233</id> z </patient> z <provider> y <person. name><prefix>Dr. </prefix><given>Amanda</given> <family>Smith</family></person. name> z </provider>
Using XML to generate reports z. Browser form z. ASTM E 2182 XML format z. XSLT transform for display in browser z. 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="ICD 9">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 (3 D) protocol. The image set was transferred using the DICOM protocol. . . </p> </description> <estimated. blood. loss>100 cc</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 Form. xml Formgen. xsl Defaults. xml
Workflow z. Form created z. Transform into ASTM XML format z. XHTML editing (opnote-edit. xsl) z. Sign finished product z. Render as XHTML for viewing, printing zemail to Medical Records and Billing
Workflow generate Billing edit sign repository
Document analysis z. Like gene sequences, it turns out that … z. Medical documentation is highly repetitive z. With ‘hot spots’ of unique information z. Schema defines template filled with values z. Easily expanded into HTML for human consumption z. Easily analyzed by software
Document analysis
Integrating binary formats z. MIME <-> XMTP z. HL 7 V 2 z. X 12 EDI z. DICOM
Internet Telemedicine z. The Ocean. Med project, 1998 z. Merchant vessel, e-mail access via satellite gateway z. Digital camera z. Web based physician access
XMTP Gateway Ship HTML SMTP XMTP MIME -> XML -> XSLT -> 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 z. Messages arrive in MIME format z. MIME SAX parser ‘converts’ to XML by SAX events z. XMTP employs XML object model *not necessarily* serialization format -> zgrove processing
XMTP z z From: joe. patient@home. com To: sue. doctor@openhealth. org Content-type: multipart/related; charset=iso-8859 -1 ----- z start. Document() y start. Element(“MIME”) xstart. Element(“From”) • characters(“joe. patient@home. com”) xend. Element(“From”) xstart. Element(“Content-Type”, attribute(“charset”, ”iso-8859 -1”)) • characters(“multipart/related”) xend. Element(“Content-Type”)
The XMTP/MIME grove Content-type: text/plain <MIME> From: joe@whereever. org <Content-type>text/plain</Content-Type> To: sue@example. com <From>joe@whereever. org</From> Hi Sue! See you in Boston, Joe <Body>Hi Sue! See you in Seattle, Joe</Body> </MIME>
The HL 7 Grove z. Non-XML syntax => XML Infoset z. MSH|PAT|Jones^James^Stephen^3 rd| start. Element(“patient”) start. Element(“person. name”) start. Element(“family”) characters(“Jones”); end. Element(“family”) … end. Element(“person. name”) end. Element(“patient”)
Simple building blocks z. XML parsers z. XSLT transform engines z. HTTP clients and servers
From syntax to semantics z. Layer 1: syntax y XML defines syntactic constrains on text yother specs define syntactic constraints on binary data z. Layer 2: datatypes yintegers define mapping from lexical space to value space y“ 10”base 10 -> 10, “ 10”base 2 -> 2
The shape of information syntax -> structure = semantics “…. . TATA…. . ” Pattern matching transform gene snp tata
Semantics z. Layer 3: hierarchy of classes ythe set of individuals of a given datatype or object type define a class z. Ontology: a description of a collection of classes, their properties and the relationships between them
Healthcare Ontology
RDF in Healthcare <rdf: Description about=“…/patient/12345”> <lab: HIV>positive</lab: HIV> <lab: CD 4>100</lab: CD 4> </rdf: Description> <path: Biopsy about=“…/patient/12345”> <path: description>The brain demonstrates areas of PML including viral inclusion bodies </path: description> </path>
RDF is. . . A standard syntax to represent (edge labeled) directed graphs in XML
DLG: Semantic Networks spine has heart vertebrate isa hair mammal walk can bird isa canary freddie wings fly isa yellow doesn’t fly ostrich hugo
Semantic Networks z. A way to represent natural language circa 1970 s z. A format for organizing statements in a way that can be queries by computers
Semantic Networks z“Can freddy fly? ” z“Does hugo have wings? ” z“Does freddy have a spine? ” z“Of all the canaries, how many live in cages? ”
RDF N-triples syntax Subject predicate object. ex: Freddy rdf: type ex: Canary. Bird ex: Canary rdfs: sub. Class. Of ex: Bird. isa ex: Freddy ex: color “Yellow”. Canary Freddie yellow
RDF/XML syntax <rdf: Description rdf: ID=“Freddy”> <rdf: type rdf: resource=“#Canary”/> <ex: color>Yellow</ex: color> </rdf: Description> <rdf: Description rdf: ID=“Canary”> </rdf: Description>
RDF/XML syntax: typed <ex: Canary rdf: ID=“Freddy”> <ex: color>Yellow</ex: color> </ex: Canary>
Semantic analysis z“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 “P 53” mutation, did PCV chemotherapy improve the cure rate at five years? ”
Web Ontology Language (OWL) z. Problem (restated): "Tell me what wines I should buy to serve with each course of the following menu. And, by the way, I don't like Sauterne. " z. OWL is a language for defining Web ontologies and their associated knowledge bases.
Ontologies z. Ontology is a term borrowed from philosophy that refers to the science of describing the kinds of entities in the world and how they are related. In OWL, an ontology is a set of definitions of classes and properties, and constraints on the way those classes and properties can be employed.
OWL zincludes · taxonomic relations between classes · datatype properties, descriptions of attributes of elements of classes, · object properties, descriptions of relations between elements of classes, z. Datatype properties and object properties are collectively the properties of a class.
Simple Named Classes class, sub. Class. Of z. Root classes: Every individual in the OWL world is a member of owl: Thing. zsample wines domain, we create three root classes: Winery, Region, and Consumable. Thing. <owl: Class rdf: ID="Winery"/> <owl: Class rdf: ID="Region"/> <owl: Class rdf: ID="Consumable. Thing"/>
Simple Named Classes class, sub. Class. Of <owl: Class rdf: ID="Potable. Liquid"> <rdfs: sub. Class. Of rdf: resource="#Consumable. Thing" /> </owl: Class> <owl: Class rdf: ID="Wine"> <rdfs: sub. Class. Of rdf: resource="#Potable. Liquid"/> <rdfs: label xml: lang="en">wine</rdfs: label> <rdfs: label xml: lang="fr">vin</rdfs: label> . . . </owl: Class>
Defining individuals <Region rdf: ID="Central. Coast. Region" /> is identical to <owl: Thing rdf: ID="Central. Coast. Region" /> <owl: Thing rdf: about="#Central. Coast. Region"> <rdf: type rdf: resource="#Region"/> </owl: Thing>
Grapes <owl: Class rdf: ID="Grape” /> <owl: Class rdf: ID="Wine. Grape"> <rdfs: sub. Class. Of rdf: resource="#Grape"/> </owl: Class> <Wine. Grape rdf: ID="Cabernet. Sauvignon. Grape" />
Simple properties z. Object Properties <owl: Object. Property rdf: ID="made. From. Grape"> <rdfs: domain rdf: resource="#Wine"/> <rdfs: range rdf: resource="#Wine. Grape"/> </owl: Object. Property>
Property hierarchy <owl: Object. Property rdf: ID="Wine. Descriptor" /> <owl: Class rdf: ID="Wine. Color"> <rdfs: sub. Class. Of rdf: resource="#Wine. Descriptor" />. . . </owl: Class> <owl: Object. Property rdf: ID="has. Wine. Descriptor"> <rdfs: domain rdf: resource="#Wine" /> <rdfs: range rdf: resource="#Wine. Descriptor" /> </owl: Object. Property> <owl: Object. Property rdf: ID="has. Color"> <rdfs: sub. Property. Of rdf: resource="#has. Wine. Descriptor" /> <rdfs: range rdf: resource="#Wine. Color" /> </owl: Object. Property>
Domain and range <owl: Object. Property rdf: ID="located. In">. . . <rdfs: domain rdf: resource="http: //www. w 3. org/2002/07/owl#Thing" /> <rdfs: range rdf: resource="#Region" /> </owl: Object. Property>
Restrictions <owl: Class rdf: ID="Wine"> <rdfs: sub. Class. Of rdf: resource="#Potable. Liquid"/> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#made. From. Grape"/> <owl: min. Cardinality>1</owl: min. Cardinality> </owl: Restriction> </rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#located. In"/> <owl: min. Cardinality>1</owl: min. Cardinality> </owl: Restriction> </rdfs: sub. Class. Of>. . . </owl: Class>
Vintages <owl: Class rdf: ID="Vintage"> <rdfs: sub. Class. Of rdf: resource="http: //www. w 3. org/2002/07/owl#Thing"/> <rdfs: sub. Class. Of> <owl: Restriction> <owl: on. Property rdf: resource="#vintage. Of"/> <owl: min. Cardinality>1</owl: min. Cardinality> </owl: Restriction> </rdfs: sub. Class. Of> </owl: Class> <owl: Object. Property rdf: ID="vintage. Of"> <rdfs: domain rdf: resource="#Vintage" /> <rdfs: range rdf: resource="#Wine" /> </owl: Object. Property>
Datatype properties <owl: Class rdf: ID="Wine. Year" /> <owl: Data. Type. Property rdf: ID="year. Value"> <rdfs: domain rdf: resource="#Wine. Year" /> <rdfs: range rdf: resource="&dt; wine. Year"/> </owl: Data. Type. Property> dt; wine. Year : : = integer > 1700
Properties of individuals <California. Region rdf: ID="Santa. Cruz. Mountains. Region" /> <Winery rdf: ID="Santa. Cruz. Mountain. Vineyard" /> <Cabernet. Sauvignon rdf: ID="Santa. Cruz. Mountain. Vineyard. Cabernet. Sauvignon" > <located. In rdf: resource="#Santa. Cruz. Mountains. Region"/> <has. Maker rdf: resource="#Santa. Cruz. Mountain. Vineyard" /> </Cabernet. Sauvignon>
Ontology mapping zsame. Class. As zsame. Individual. As zsame. Property. As <owl: Class rdf: ID="Texas. Things"> <owl: same. Class. As> <owl: Restriction> <owl: on. Property rdf: resource="#located. In" /> <owl: all. Values. From rdf: resource="#Texas. Region" /> </owl: Restriction> </owl: same. Class. As> </owl: Class>
Complex constructs z. Description Logic yunion. Of yintersection. Of ycomplement. Of yone. Of ydisjoint. With
Healthcare DL ontologies z. Open. GALEN http: //www. opengalen. org y. Open terminology y. French Ministry of Health CCAM z. SNOMED http: //www. snomed. org y. Closed DL terminology
Simplified Healthcare Ontology <owl: Class rdf: ID=“Provider”> <rdfs: sub. Class. Of rdf: resource=“#Person”/> </owl: Class>
Simplified Healthcare Ontology
Healthcare Ontology
Putting it all together z. Biomedical information has many vocabularies - each in its own namespace zgenetics “Bio ML” zpathology “SNOMED” zsurgery “CPT” zmedicine “ICD” zradiology “DICOM”
Putting it all together genes diagnoses drugs procedures Electronic medical record
OWL across schemas person SNOMED: glioblastoma Gene: p 53 Left temporal tumor genetics Path-specimen MRI
Assimilating disparate information enhancing astrocytoma p 53 glioblastoma Ring enhancing . . . p 53. 1
UMLS next generation z. Ontologies exposed as OWL on web z. Cross references exposed as OWL on web z. Enables searching for and reasoning about terms relating to eachother z. Enables searching for and reasoning about terms from multiple terminologies
Semantic analysis Class sub. Class domain repository Class type Property type instance
Queries: several views z. Regular expression pattern matching z. Query as universal/existential quantification (FOPL) z. Query as DL classification
First Order Predicate Logic (for-all ? pat (exists ? surgeon (last-name ? surgeon “Borden”)) (exists ? procedure (craniotomy ? procedure) (patient ? procedure ? pat) (surgeon ? procedure ? surgeon) (between (date ? procedure) “ 1996” “ 2000”) (sequence ? procedure “p 53”). . .
Future directions z. The technology is here … z. ASTM E 31. 28 http: //www. astm. org z. Define schemas and ontologies z. Standardize data formats z. Collect data zjust do it! zjonathan@openhealth. org
Contact Information Jonathan Borden, M. D. Center for Brain and Cranial Diseases St. Vincent Health System 311 W. 24 th Street Erie, PA, 16505 www. openhealth. org/ASTM www. openhealth. org/opnote (demo) www. w 3. org/2001/sw/Web. Ont www. jonathanborden-md. com jonathan@openhealth. org
- Slides: 88