Health Care Analyst A 0 Source Data John

  • Slides: 10
Download presentation
Health Care Analyst A 0 Source Data: John Doe 1 Analyze, XMLize Context: Hospital

Health Care Analyst A 0 Source Data: John Doe 1 Analyze, XMLize Context: Hospital Patient Record Proposed Tag: <Patient> 2 <? xml version=“ 1. 0” ? > <Patient>John Doe</Patient> Well-formed XML document

Health Care Analyst B 0 Source Data: John Doe 1 Analyze, XMLize Context: Hospital

Health Care Analyst B 0 Source Data: John Doe 1 Analyze, XMLize Context: Hospital Patient Record Proposed Tag: <In. Patient> 2 <? xml version=“ 1. 0” ? > <In. Patient>John Doe</In. Patient> Well-formed XML document Problem: Same data, same context, different XMLization

VALIDATION – Exercising Control over your Data Schemas provide a means for specifying your

VALIDATION – Exercising Control over your Data Schemas provide a means for specifying your entire XML ‘vocabulary’. Because they are written in XML they can be processed just like any other XML document. <? xml version="1. 0"? > <Patient>John Doe</Patient> <? xml version="1. 0"? > <xs: schema xmlns: xsd=http: //www. w 3. org/2001/XMLSCHEMA> <xs: element name="Patient" type="xs: string"/> </xs: schema>

<? xml version="1. 0"? > <Hospitalization. Record> <Client>John Doe</Client> <Date>18 -FEB-04</Date> <Comment>Patient showed severe

<? xml version="1. 0"? > <Hospitalization. Record> <Client>John Doe</Client> <Date>18 -FEB-04</Date> <Comment>Patient showed severe malnutrition</Comment> </Hospitalization. Record> <? xml version="1. 0" encoding="UTF-8"? > <xs: schema xmlns: xs="http: //www. w 3. org/2001/XMLSchema" element. Form. Default="q <xs: element name="Hospitalization. Record"> <xs: complex. Type> <xs: sequence> <xs: element name="Client" type="xs: string"/> <xs: element name="Comment" type="xs: string"/> <xs: element name="Date" type="xs: string"/> </xs: sequence> </xs: complex. Type> </xs: element> </xs: schema>

<? xml version="1. 0"? > <Hospitalization. Record> <Client>John Doe</Client> <Date>18 -FEB-04</Date> <Comment>Patient showed severe

<? xml version="1. 0"? > <Hospitalization. Record> <Client>John Doe</Client> <Date>18 -FEB-04</Date> <Comment>Patient showed severe malnutrition</Comment> </Hospitalization. Record> <? xml version="1. 0" encoding="UTF-8"? > <xs: schema xmlns: xs="http: //www. w 3. org/2001/XMLSchema" element. Form. Default="qualified"> <xs: element name="Client" type="xs: string"/> <xs: element name="Comment" type="xs: string"/> <xs: element name="Date" type="xs: string"/> <xs: element name="Hospitalization. Record"> <xs: complex. Type> <xs: sequence> <xs: element ref="Client"/> <xs: element ref="Date"/> <xs: element ref="Comment"/> </xs: sequence> </xs: complex. Type> </xs: element> </xs: schema>

In-Class Exercise Write the XSD for the following XML document: <? xml version="1. 0"?

In-Class Exercise Write the XSD for the following XML document: <? xml version="1. 0"? > <Case> <Physician>Dr. Alberts</Physician> <Date>18 -FEB-04</Date> <Patient>John Doe</Patient> <Diagnosis>Diabetes</Diagnosis> <Insurance>Kaiser Permanente</Insurance> </Case>