--- a/syntheticPatients/indivo-schemas/allergy.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/allergy.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -4,22 +4,30 @@
<include schemaLocation="codes.xsd" />
- <element name="Allergy">
- <complexType>
- <sequence>
- <element name="dateDiagnosed" type="dateTime" minOccurs="1" maxOccurs="1" />
- <element name="diagnosedBy" type="string" minOccurs="0" maxOccurs="1" />
- <element name="allergen">
- <complexType>
- <sequence>
- <element name="type" type="indivo:CodedValue" />
- <element name="name" type="indivo:CodedValue" />
- </sequence>
- </complexType>
- </element>
- <element name="reaction" minOccurs="0" maxOccurs="1" type="string" />
- <element name="specifics" minOccurs="0" maxOccurs="1" type="string" />
- </sequence>
- </complexType>
+ <element name="Allergy" type="indivo:AllergyType">
</element>
+ <complexType name="AllergyType">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" name="dateDiagnosed"
+ type="dateTime">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="diagnosedBy"
+ type="string">
+ </element>
+ <element name="allergen">
+ <complexType>
+ <sequence>
+ <element name="type" type="indivo:CodedValue"></element>
+ <element name="name" type="indivo:CodedValue"></element>
+ </sequence>
+ </complexType>
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="reaction"
+ type="string">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="specifics"
+ type="string">
+ </element>
+ </sequence>
+ </complexType>
</schema>
--- a/syntheticPatients/indivo-schemas/contact.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/contact.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -1,74 +1,90 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://indivo.org/vocab/xml/documents#">
-
- <xs:element name="Contact">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="name" minOccurs="1">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="fullName" type="xs:string" minOccurs="1" maxOccurs="1" />
- <xs:element name="givenName" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
- <xs:element name="familyName" type="xs:string" minOccurs="1" maxOccurs="1" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="email" minOccurs="1" maxOccurs="unbounded">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="type" type="xs:string" />
- </xs:extension>
- <!-- for now no restriction until we figure out a clean way to combine it with above
- <xs:restriction base="xs:string">
- <xs:pattern value="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/>
- </xs:restriction>-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://indivo.org/vocab/xml/documents#"
+ xmlns:indivo="http://indivo.org/vocab/xml/documents#"
+ elementFormDefault="qualified">
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="address" minOccurs="1" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="streetAddress" type="xs:string" minOccurs="1" />
- <xs:element name="postalCode" type="xs:string" minOccurs="1" />
- <xs:element name="locality" type="xs:string" minOccurs="1" />
- <xs:element name="region" type="xs:string" minOccurs="1" />
- <xs:element name="country" type="xs:string" minOccurs="1" />
- <xs:element name="timeZone" type="xs:string" minOccurs="0" />
- </xs:sequence>
- <xs:attribute name="type" type="xs:string" />
- </xs:complexType>
- </xs:element>
- <xs:element name="location" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="latitude" type="xs:string" />
- <xs:element name="longitude" type="xs:string" />
- </xs:sequence>
- <xs:attribute name="type" type="xs:string" />
- </xs:complexType>
- </xs:element>
- <xs:element name="phoneNumber" minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="type" type="xs:string" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="instantMessengerName" minOccurs="0" maxOccurs="unbounded">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="protocol" type="xs:string" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="thumbnail" type="xs:string" minOccurs="0" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xs:element name="Contact" type="indivo:ContactType"/>
+ <xs:complexType name="ContactType">
+ <xs:sequence>
+ <xs:element name="name" minOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="fullName" type="xs:string"
+ minOccurs="1" maxOccurs="1" />
+ <xs:element name="givenName" type="xs:string"
+ minOccurs="1" maxOccurs="unbounded" />
+ <xs:element name="familyName" type="xs:string"
+ minOccurs="1" maxOccurs="1" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="email" minOccurs="1"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="type" type="xs:string" />
+ </xs:extension>
+ <!-- for now no restriction until we figure out a clean way to combine it with above
+ <xs:restriction base="xs:string">
+ <xs:pattern value="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/>
+ </xs:restriction>-->
+
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="address" minOccurs="1"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="streetAddress" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="postalCode" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="locality" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="region" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="country" type="xs:string"
+ minOccurs="1" />
+ <xs:element name="timeZone" type="xs:string"
+ minOccurs="0" />
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="location" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="latitude" type="xs:string" />
+ <xs:element name="longitude" type="xs:string" />
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="phoneNumber" minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="type" type="xs:string" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="instantMessengerName" minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="protocol"
+ type="xs:string" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="thumbnail" type="xs:string" minOccurs="0" />
+ </xs:sequence>
+ <xs:attribute name="ID" type="xs:ID"></xs:attribute>
+ </xs:complexType>
</xs:schema>
--- a/syntheticPatients/indivo-schemas/demographics.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/demographics.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://indivo.org/vocab/xml/documents#">
- <xs:element name="Demographics">
- <xs:complexType>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://indivo.org/vocab/xml/documents#"
+ xmlns:indivo="http://indivo.org/vocab/xml/documents#"
+ elementFormDefault="qualified">
+
+ <xs:element name="Demographics" type="indivo:DemographicsType" />
+ <xs:complexType name="DemographicsType">
<xs:sequence>
<xs:element name="dateOfBirth" type="xs:date" minOccurs="0" />
<xs:element name="dateOfDeath" type="xs:date" minOccurs="0" />
- <xs:element name="gender" type="xs:string" minOccurs="0" />
+ <xs:element name="gender" type="indivo:genderType" minOccurs="0" />
<xs:element name="ethnicity" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="language" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="maritalStatus" type="xs:string" minOccurs="0" />
@@ -18,5 +21,12 @@
<xs:element name="organDonor" type="xs:boolean" minOccurs="0" />
</xs:sequence>
</xs:complexType>
- </xs:element>
+
+ <xs:simpleType name = "genderType">
+ <xs:restriction base = "xs:string">
+ <xs:enumeration value = "Male"/>
+ <xs:enumeration value = "Female"/>
+ </xs:restriction>
+ </xs:simpleType>
+
</xs:schema>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/indivo-schemas/envelope.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://indivo.org/vocab/xml/documents#"
+ xmlns:indivo="http://indivo.org/vocab/xml/documents#"
+ elementFormDefault="qualified">
+
+ <xs:include schemaLocation="contact.xsd" />
+ <xs:include schemaLocation="demographics.xsd" />
+ <xs:include schemaLocation="medication.xsd"></xs:include>
+ <xs:include schemaLocation="problem.xsd"></xs:include>
+ <xs:include schemaLocation="procedure.xsd"></xs:include>
+ <xs:include schemaLocation="allergy.xsd"></xs:include>
+ <xs:include schemaLocation="immunization.xsd"></xs:include>
+ <xs:complexType name="EncountersType">
+ <xs:sequence>
+ <xs:element name="Encounter" type="indivo:EncounterType" />
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="EncounterType">
+ <xs:sequence>
+ <xs:element name="Date" type="xs:dateTime"></xs:element>
+ <xs:element name="Physician" type="indivo:ContactRefType"
+ minOccurs="0" />
+ <xs:element name="Referral" type="xs:boolean"></xs:element>
+ <xs:element name="MedicalBaseline" type="xs:boolean"></xs:element>
+ <xs:element name="MedicalTest" type="xs:string"></xs:element>
+ <xs:element name="ReportedSymptoms" type="xs:boolean"></xs:element>
+ <xs:element name="WorkingDiagnosis" type="xs:boolean"></xs:element>
+ <xs:element name="PhysicianObservations" type="xs:string"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+
+ <xs:element name="Envelope" type="indivo:EnvelopeType"></xs:element>
+
+ <xs:complexType name="EnvelopeType">
+ <xs:sequence>
+ <xs:element name="CurrentStatus"
+ type="indivo:CurrentStatusType">
+ </xs:element>
+ <xs:element name="Encounters"
+ type="indivo:EncountersType">
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="CurrentStatusType">
+ <xs:sequence maxOccurs="1" minOccurs="1">
+ <xs:element name="PrimaryCarePhysician"
+ type="indivo:ContactType" maxOccurs="1" minOccurs="0">
+ </xs:element>
+ <xs:element name="Demographics"
+ type="indivo:DemographicsType" maxOccurs="1" minOccurs="0">
+ </xs:element>
+ <xs:element name="Prescriptions"
+ type="indivo:PrescriptionsType" maxOccurs="1" minOccurs="0">
+ </xs:element>
+ <xs:element name="Conditions" type="indivo:ProblemType">
+ </xs:element>
+ <xs:element name="Procedures" type="indivo:ProcedureType"></xs:element>
+ <xs:element name="Allergies" type="indivo:AllergyType"></xs:element>
+ <xs:element name="Immunizations"
+ type="indivo:ImmunizationType">
+ </xs:element>
+ <xs:element name="Lifestyle" type="indivo:LifestyleType"></xs:element>
+ <xs:element name="FamilyHistory" type="indivo:FamilyHistoryType"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="PrescriptionsType">
+ <xs:sequence>
+ <xs:element name="Medication"
+ type="indivo:MedicationType">
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+
+ <xs:complexType name="MedicationType"></xs:complexType>
+
+ <xs:complexType name="LifestyleType">
+ <xs:sequence>
+ <xs:element name="AlcoholConsumption"
+ type="indivo:AlcoholConsumptionType">
+ </xs:element>
+ <xs:element name="Exercise" type="indivo:ExerciseType"></xs:element>
+ <xs:element name="Smoking" type="indivo:SmokingType"></xs:element>
+ <xs:element name="Diet" type="indivo:DietType"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="AlcoholConsumptionType">
+ <xs:sequence>
+ <xs:element name="Frequency" type="xs:int"></xs:element>
+ <xs:element name="Units" type="xs:string"></xs:element>
+ <xs:element name="Quantity" type="xs:int"></xs:element>
+ <xs:element name="Date" type="xs:dateTime"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ExerciseType">
+ <xs:sequence maxOccurs="1" minOccurs="1">
+ <xs:element name="Frequency" type="xs:int"></xs:element>
+ <xs:element name="Units" type="xs:string"></xs:element>
+ <xs:element name="Duration" type="xs:int"></xs:element>
+ <xs:element name="Date" type="xs:dateTime"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="SmokingType">
+ <xs:sequence>
+ <xs:element name="PackYears" type="xs:int"></xs:element>
+ <xs:element name="History" type="xs:string"></xs:element>
+ <xs:element name="Date" type="xs:dateTime"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="DietType">
+ <xs:sequence>
+ <xs:element name="FruitVegetable" type="xs:int"></xs:element>
+ <xs:element name="WholeGrains" type="xs:int"></xs:element>
+ <xs:element name="Dairy" type="xs:int"></xs:element>
+ <xs:element name="Protein" type="xs:int"></xs:element>
+ <xs:element name="Fats" type="xs:int"></xs:element>
+ <xs:element name="JunkFood" type="xs:int"></xs:element>
+ <xs:element name="Date" type="xs:dateTime"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="FamilyHistoryType">
+ <xs:sequence maxOccurs="unbounded" minOccurs="0">
+ <xs:element name="Relation" type="xs:string"></xs:element>
+ <xs:element name="Name" type="xs:string"></xs:element>
+ <xs:element name="Sex" type="xs:string"></xs:element>
+ <xs:element name="Alive" type="xs:boolean"></xs:element>
+ <xs:element name="AgeAtDeath" type="xs:int"></xs:element>
+ <xs:element name="Cancer" type="xs:string"></xs:element>
+ <xs:element name="CauseOfDeath" type="xs:string"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ContactRefType">
+ <xs:choice>
+ <xs:element name="Contact" type="indivo:ContactType"></xs:element>
+ <xs:element name="ContactRef" type="xs:anyURI"></xs:element>
+ </xs:choice>
+ </xs:complexType>
+</xs:schema>
--- a/syntheticPatients/indivo-schemas/immunization.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/immunization.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -4,25 +4,43 @@
<include schemaLocation="codes.xsd" />
- <element name="Immunization">
- <complexType>
- <sequence>
- <element name="dateAdministered" type="dateTime" minOccurs="1" maxOccurs="1" />
- <element name="administeredBy" type="string" minOccurs="0" maxOccurs="1" />
- <element name="vaccine">
- <complexType>
- <sequence>
- <element name="type" type="indivo:CodedValue" minOccurs="1" maxOccurs="1" />
- <element name="manufacturer" type="string" minOccurs="0" maxOccurs="1" />
- <element name="lot" type="string" minOccurs="0" maxOccurs="1" />
- <element name="expiration" type="date" minOccurs="0" maxOccurs="1" />
- </sequence>
- </complexType>
- </element>
- <element name="sequence" type="integer" minOccurs="1" maxOccurs="1" />
- <element name="anatomicSurface" type="indivo:CodedValue" minOccurs="0" maxOccurs="1" />
- <element name="adverseEvent" type="string" minOccurs="0" maxOccurs="1" />
- </sequence>
- </complexType>
+ <element name="Immunization" type="indivo:ImmunizationType">
</element>
+ <complexType name="ImmunizationType">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" name="dateAdministered"
+ type="dateTime">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="administeredBy"
+ type="string">
+ </element>
+ <element name="vaccine">
+ <complexType>
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" name="type"
+ type="indivo:CodedValue">
+ </element>
+ <element minOccurs="0" maxOccurs="1"
+ name="manufacturer" type="string">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="lot"
+ type="string">
+ </element>
+ <element minOccurs="0" maxOccurs="1"
+ name="expiration" type="date">
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element minOccurs="1" maxOccurs="1" name="sequence"
+ type="integer">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="anatomicSurface"
+ type="indivo:CodedValue">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="adverseEvent"
+ type="string">
+ </element>
+ </sequence>
+ </complexType>
</schema>
--- a/syntheticPatients/indivo-schemas/medication.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/medication.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -8,7 +8,7 @@
<xs:include schemaLocation="values.xsd" />
<!-- a medication, how often it's taken, etc.. -->
- <xs:complexType name="Medication">
+ <xs:complexType name="MedicationType">
<xs:sequence>
<xs:element name="dateStarted" type="xs:date" minOccurs="0" maxOccurs="1" />
<xs:element name="dateStopped" type="xs:date" minOccurs="0" maxOccurs="1" />
@@ -26,12 +26,12 @@
</xs:sequence>
</xs:complexType>
- <xs:element name="Medication" type="indivo:Medication" />
+ <xs:element name="Medication" type="indivo:MedicationType" />
<!-- a prescription for a medication -->
<xs:complexType name="Prescription">
<xs:sequence>
- <xs:element name="medication" type="indivo:Medication" minOccurs="1" maxOccurs="1" />
+ <xs:element name="medication" type="indivo:MedicationType" minOccurs="1" maxOccurs="1" />
<xs:element name="prescribedBy" type="indivo:Provider" minOccurs="1" maxOccurs="1" />
<xs:element name="prescribedOn" type="xs:date" minOccurs="0" maxOccurs="1" />
<xs:element name="dispenseAsWritten" type="xs:boolean" minOccurs="1" maxOccurs="1" />
--- a/syntheticPatients/indivo-schemas/problem.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/problem.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://indivo.org/vocab/xml/documents#" xmlns:indivo="http://indivo.org/vocab/xml/documents#"
- elementFormDefault="qualified">
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://indivo.org/vocab/xml/documents#"
+ xmlns:indivo="http://indivo.org/vocab/xml/documents#"
+ elementFormDefault="qualified">
<include schemaLocation="codes.xsd" />
- <element name="Problem">
- <complexType>
+ <element name="Problem" type="indivo:ProblemType" />
+ <complexType name="ProblemType">
<sequence>
<element name="dateOnset" type="dateTime" minOccurs="1" maxOccurs="1" />
<element name="dateResolution" type="dateTime" minOccurs="0" maxOccurs="1" />
@@ -14,5 +15,4 @@
<element name="diagnosedBy" type="string" minOccurs="0" maxOccurs="1" />
</sequence>
</complexType>
- </element>
</schema>
--- a/syntheticPatients/indivo-schemas/procedure.xsd Wed Jul 14 17:05:29 2010 -0400
+++ b/syntheticPatients/indivo-schemas/procedure.xsd Wed Jul 14 17:18:12 2010 -0400
@@ -6,15 +6,25 @@
<include schemaLocation="provider.xsd" />
- <element name="Procedure">
- <complexType>
- <sequence>
- <element name="datePerformed" type="dateTime" minOccurs="1" maxOccurs="1" />
- <element name="name" type="indivo:CodedValue" minOccurs="1" maxOccurs="1" />
- <element name="Provider" type="indivo:Provider" minOccurs="0" />
- <element name="location" type="string" minOccurs="0" maxOccurs="1" />
- <element name="comments" type="string" minOccurs="0" maxOccurs="1" />
- </sequence>
- </complexType>
+ <element name="Procedure" type="indivo:ProcedureType">
</element>
+ <complexType name="ProcedureType">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" name="datePerformed"
+ type="dateTime">
+ </element>
+ <element minOccurs="1" maxOccurs="1" name="name"
+ type="indivo:CodedValue">
+ </element>
+ <element minOccurs="0" name="Provider"
+ type="indivo:Provider">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="location"
+ type="string">
+ </element>
+ <element minOccurs="0" maxOccurs="1" name="comments"
+ type="string">
+ </element>
+ </sequence>
+ </complexType>
</schema>