+ start on q1.rq
authorEric Prud'hommeaux <eric@w3.org>
Sun, 03 Oct 2010 23:05:34 -0400
changeset 20 a78609605d19
parent 19 ca9c645e8daf
child 21 91ec57b253d1
+ start on q1.rq
syntheticPatients/AD_PCHR_1-indivo.xml
syntheticPatients/AD_PCHR_1-tmo.trig
syntheticPatients/AD_PCHR_1.html
syntheticPatients/AD_PCHR_1.rdf
syntheticPatients/AD_PCHR_2-tmo.trig
syntheticPatients/AD_PCHR_2.rdf
syntheticPatients/AD_PCHR_3-tmo.trig
syntheticPatients/AD_PCHR_3.rdf
syntheticPatients/AD_PCHR_4-tmo.trig
syntheticPatients/AD_PCHR_4.rdf
syntheticPatients/AD_PCHR_5-tmo.trig
syntheticPatients/AD_PCHR_5.rdf
syntheticPatients/AD_PCHR_6-tmo.trig
syntheticPatients/AD_PCHR_6.rdf
syntheticPatients/AD_PCHR_7-tmo.trig
syntheticPatients/Indivo2Trig.xsl
syntheticPatients/Makefile
syntheticPatients/Pat2Indivo2.xsl
syntheticPatients/indivo-schemas/medication.xsd
syntheticPatients/tests/q1.rq
syntheticPatients/tests/q1_1.srt
--- a/syntheticPatients/AD_PCHR_1-indivo.xml	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_1-indivo.xml	Sun Oct 03 23:05:34 2010 -0400
@@ -61,7 +61,7 @@
             <medication>
                <dateStarted>2009-05-15</dateStarted>
                <name type="http://indivo.org/codes/ndc">000007414020</name>
-               <brandName/>
+               <genericName>COREG TABLETS</genericName>
                <dose>
                   <value>999</value>
                   <unit type="http://indivo.org/codes/units#" value="999"/>
@@ -84,7 +84,7 @@
             <medication>
                <dateStarted>2009-05-20</dateStarted>
                <name type="http://indivo.org/codes/ndc">000071015595</name>
-               <brandName/>
+               <genericName>LIPITOR TABLETS</genericName>
                <dose>
                   <value>999</value>
                   <unit type="http://indivo.org/codes/units#" value="999"/>
@@ -107,7 +107,7 @@
             <medication>
                <dateStarted>2009-05-20</dateStarted>
                <name type="http://indivo.org/codes/ndc">66105051810</name>
-               <brandName/>
+               <genericName>COUMADIN TABLETS</genericName>
                <dose>
                   <value>999</value>
                   <unit type="http://indivo.org/codes/units#" value="999"/>
@@ -131,7 +131,7 @@
                <dateStarted>2009-08-10</dateStarted>
                <dateStopped>2009-08-15</dateStopped>
                <name type="http://indivo.org/codes/ndc">11071084101</name>
-               <brandName/>
+               <genericName>DONEPEZIL HYDROCHLORIDE TABLETS</genericName>
                <dose>
                   <value>999</value>
                   <unit type="http://indivo.org/codes/units#" value="999"/>
@@ -154,7 +154,7 @@
             <medication>
                <dateStarted>2009-08-15</dateStarted>
                <name type="http://indivo.org/codes/ndc">62856083130</name>
-               <brandName/>
+               <genericName>ARICEPT TABLETS ORALLY DISINTEGRATING</genericName>
                <dose>
                   <value>999</value>
                   <unit type="http://indivo.org/codes/units#" value="999"/>
--- a/syntheticPatients/AD_PCHR_1-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_1-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -40,6 +40,41 @@
       
   . 
 
+  [ a trans:Prescription ;
+    trans:prescribedTo _:patient ;
+    trans:prescribedOn "2009-05-15"^^xsd:dateTime ; 
+
+    trans:genericName "COREG TABLETS" ;    
+  ] .
+
+  [ a trans:Prescription ;
+    trans:prescribedTo _:patient ;
+    trans:prescribedOn "2009-05-20"^^xsd:dateTime ; 
+
+    trans:genericName "LIPITOR TABLETS" ;    
+  ] .
+
+  [ a trans:Prescription ;
+    trans:prescribedTo _:patient ;
+    trans:prescribedOn "2009-05-20"^^xsd:dateTime ; 
+
+    trans:genericName "COUMADIN TABLETS" ;    
+  ] .
+
+  [ a trans:Prescription ;
+    trans:prescribedTo _:patient ;
+    trans:prescribedOn "2009-08-10"^^xsd:dateTime ; 
+
+    trans:genericName "DONEPEZIL HYDROCHLORIDE TABLETS" ;    
+  ] .
+
+  [ a trans:Prescription ;
+    trans:prescribedTo _:patient ;
+    trans:prescribedOn "2009-08-15"^^xsd:dateTime ; 
+
+    trans:genericName "ARICEPT TABLETS ORALLY DISINTEGRATING" ;    
+  ] .
+
   _:patient trans:hasCondition [
   trans:onset "2009-05-15T12:00:00"^^xsd:dateTime ;
 
@@ -76,44 +111,106 @@
   # unmatched diagnosedBy
   ] .
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-05-15"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
+    trans:workingDiagnosis "false" ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    trans:reportedSymptoms "false"
+    
   ] .
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-05-17"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
+    trans:workingDiagnosis "atrial fibrillation" ;
+
+    trans:reportedSymptoms "false"
+    
   ] .
 
-  [ a :Encounter ;
-    :patient _:patient
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-05-18"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "atrial fibrillation" ;
+
+    trans:reportedSymptoms "irregular pulse"
+    
   ] .
 
-  [ a :Encounter ;
-    :patient _:patient
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-05-20"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "none" ;
+
+    trans:reportedSymptoms "none"
+    
   ] .
 
-  [ a :Encounter ;
-    :patient _:patient
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-06-03"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "none" ;
+
+    trans:reportedSymptoms "none"
+    
   ] .
 
-  [ a :Encounter ;
-    :patient _:patient
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-07-03"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "none" ;
+
+    trans:reportedSymptoms "none"
+    
+  ] .
+
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-07-15"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "Dementia" ;
+
+    trans:workingDiagnosis "Dementia" ;
+
+    trans:reportedSymptoms "Confusion, Declining memory"
+    
+  ] .
+
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-08-03"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "false" ;
+
+    trans:reportedSymptoms "false"
+    
+  ] .
+
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-08-15"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "adverse event to Donepezil" ;
+
+    trans:reportedSymptoms "nausea"
+    
+  ] .
+
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "2009-11-03"^^xsd:dateTime ;
+
+    trans:workingDiagnosis "false" ;
+
+    trans:reportedSymptoms "false"
+    
   ] .
 
 }
--- a/syntheticPatients/AD_PCHR_1.html	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_1.html	Sun Oct 03 23:05:34 2010 -0400
@@ -2124,7 +2124,7 @@
             </tr>
             <tr>
                <td>1934-05-15</td>
-               <td>XXXX-XX-XX</td>
+               <td>9999-01-01</td>
                <td>Male</td>
                <td>Basque</td>
                <td>EN</td>
--- a/syntheticPatients/AD_PCHR_1.rdf	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_1.rdf	Sun Oct 03 23:05:34 2010 -0400
@@ -56,12 +56,8 @@
       <foaf:name>George Andrew Tour</foaf:name>
       <foaf:givenName>George</foaf:givenName>
       <foaf:familyName>Tour</foaf:familyName>
-      <!--personal mbox--><foaf:mbox>
-        gtour@hotmail.com
-    </foaf:mbox>
-      <!--work mbox--><foaf:mbox>
-        george.tour@technology.com
-    </foaf:mbox>
+      <!--personal mbox--><foaf:mbox>gtour@hotmail.com</foaf:mbox>
+      <!--work mbox--><foaf:mbox>george.tour@technology.com</foaf:mbox>
       <foaf:address>
          <pim:Address>
             <vcard:Street>15 Water St.</vcard:Street>
--- a/syntheticPatients/AD_PCHR_2-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_2-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -85,95 +85,187 @@
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2004-07-10"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "Declining memory"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2004-07-17"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "Declining memory"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2004-07-20"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2004-10-01"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2005-04-01"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2005-07-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2005-10-01"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2006-04-01"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2006-07-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2006-10-01"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2007-07-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2007-10-01"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2007-10-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "none"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2008-01-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "none"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2008-03-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "chest pains"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2008-03-19"^^xsd:dateTime ;
+
+    :reportedSymptoms "myocardial infarction"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2005-05-16"^^xsd:dateTime ;
+
+    :reportedSymptoms "Depression"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2008-05-17"^^xsd:dateTime ;
+
+    :reportedSymptoms "depression"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2005-05-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "Depression"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2005-06-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "Depression"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2008-07-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "Confusion, Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
   ] .
 
 }
--- a/syntheticPatients/AD_PCHR_2.rdf	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_2.rdf	Sun Oct 03 23:05:34 2010 -0400
@@ -58,8 +58,7 @@
       <foaf:name>Monica Mary Mall</foaf:name>
       <foaf:givenName>Monica</foaf:givenName>
       <foaf:familyName>Mall</foaf:familyName>
-      <!--personal mbox--><foaf:mbox>
-        mmall@hotmail.com</foaf:mbox>
+      <!--personal mbox--><foaf:mbox>mmall@hotmail.com</foaf:mbox>
       <trans:misParse>&lt;email&gt;false&lt;/email&gt;</trans:misParse>
       <foaf:address>
          <pim:Address>
--- a/syntheticPatients/AD_PCHR_3-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_3-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -65,27 +65,51 @@
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "1996-09-12"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2002-07-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2008-11-05"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2003-17-05"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2005-12-05"^^xsd:dateTime ;
+
+    :reportedSymptoms "Declining memory"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2007-10-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
   ] .
 
 }
--- a/syntheticPatients/AD_PCHR_3.rdf	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_3.rdf	Sun Oct 03 23:05:34 2010 -0400
@@ -55,9 +55,7 @@
       <foaf:name>Benny Smith</foaf:name>
       <foaf:givenName>Benny</foaf:givenName>
       <foaf:familyName>Smith</foaf:familyName>
-      <!--work mbox--><foaf:mbox>
-        benny.smith@pharma.com
-    </foaf:mbox>
+      <!--work mbox--><foaf:mbox>benny.smith@pharma.com</foaf:mbox>
       <foaf:address>
          <pim:Address>
             <vcard:Street>5 Jogging St.</vcard:Street>
--- a/syntheticPatients/AD_PCHR_4-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_4-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -68,23 +68,43 @@
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2001-06-15"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2003-07-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "Nausea"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-01-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "none"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-15"^^xsd:dateTime ;
+
+    :reportedSymptoms " Confusion, Declining memory "
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-16"^^xsd:dateTime ;
+
+    :reportedSymptoms " Confusion, Declining memory "
+    
   ] .
 
 }
--- a/syntheticPatients/AD_PCHR_4.rdf	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_4.rdf	Sun Oct 03 23:05:34 2010 -0400
@@ -56,12 +56,8 @@
       <foaf:name>Edward Quesada</foaf:name>
       <foaf:givenName>Edward</foaf:givenName>
       <foaf:familyName>Quesada</foaf:familyName>
-      <!--personal mbox--><foaf:mbox>
-        eq@hotmail.com
-    </foaf:mbox>
-      <!--work mbox--><foaf:mbox>
-        equesada@msscc.edu
-    </foaf:mbox>
+      <!--personal mbox--><foaf:mbox>eq@hotmail.com</foaf:mbox>
+      <!--work mbox--><foaf:mbox>equesada@msscc.edu</foaf:mbox>
       <foaf:address>
          <pim:Address>
             <vcard:Street>1855 Oak Tree Rd.</vcard:Street>
--- a/syntheticPatients/AD_PCHR_5-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_5-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -95,31 +95,59 @@
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2002-02-02"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2008-03-02"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "headache, somnolence"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2008-05-06"^^xsd:dateTime ;
+
+    :reportedSymptoms "chest pain, nausea, diaphoresis"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-06-18"^^xsd:dateTime ;
+
+    :reportedSymptoms "dysphagia, nausea"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-21"^^xsd:dateTime ;
+
+    :reportedSymptoms "memory loss"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-23"^^xsd:dateTime ;
+
+    :reportedSymptoms "nausea and vomiting"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-30"^^xsd:dateTime ;
+
+    :reportedSymptoms ""
+    
   ] .
 
 }
--- a/syntheticPatients/AD_PCHR_5.rdf	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_5.rdf	Sun Oct 03 23:05:34 2010 -0400
@@ -57,8 +57,7 @@
       <foaf:givenName>Georg</foaf:givenName>
       <foaf:familyName>Möller</foaf:familyName>
       <!--personal mbox--><foaf:mbox>georg.moeller@mail.de</foaf:mbox>
-      <!--work mbox--><foaf:mbox>
-    </foaf:mbox>
+      <!--work mbox--><foaf:mbox/>
       <foaf:address>
          <pim:Address>
             <vcard:Street>Fichtenweg 13</vcard:Street>
--- a/syntheticPatients/AD_PCHR_6-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_6-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -59,27 +59,51 @@
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2009-05-10"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
-  ] .
-
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "Confusion, Declining memory"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-07-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-09-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "Depression, gait problems"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-11-09"^^xsd:dateTime ;
+
+    :reportedSymptoms "Depression"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-11-16"^^xsd:dateTime ;
+
+    :reportedSymptoms "none"
+    
   ] .
 
 }
--- a/syntheticPatients/AD_PCHR_6.rdf	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_6.rdf	Sun Oct 03 23:05:34 2010 -0400
@@ -55,12 +55,8 @@
       <foaf:name>Marianne Huber</foaf:name>
       <foaf:givenName>Gerlinde</foaf:givenName>
       <foaf:familyName>Huber</foaf:familyName>
-      <!--personal mbox--><foaf:mbox>
-        mhuber@hotmail.com
-    </foaf:mbox>
-      <!--work mbox--><foaf:mbox>
-        Marianne.huber@technology.com
-    </foaf:mbox>
+      <!--personal mbox--><foaf:mbox>mhuber@hotmail.com</foaf:mbox>
+      <!--work mbox--><foaf:mbox>Marianne.huber@technology.com</foaf:mbox>
       <foaf:address>
          <pim:Address>
             <vcard:Street>2400 Newton St.</vcard:Street>
--- a/syntheticPatients/AD_PCHR_7-tmo.trig	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/AD_PCHR_7-tmo.trig	Sun Oct 03 23:05:34 2010 -0400
@@ -59,19 +59,35 @@
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
-  ] .
+    :patient _:patient ;
+    :dateOfEncounter "2008-11-15"^^xsd:dateTime ;
 
-  [ a :Encounter ;
-    :patient _:patient
+    :reportedSymptoms "true"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-01-15"^^xsd:dateTime ;
+
+    :reportedSymptoms "Confusion, Becomes lost"
+    
   ] .
 
   [ a :Encounter ;
-    :patient _:patient
+    :patient _:patient ;
+    :dateOfEncounter "2009-01-20"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
+  ] .
+
+  [ a :Encounter ;
+    :patient _:patient ;
+    :dateOfEncounter "2009-01-30"^^xsd:dateTime ;
+
+    :reportedSymptoms "false"
+    
   ] .
 
 }
--- a/syntheticPatients/Indivo2Trig.xsl	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/Indivo2Trig.xsl	Sun Oct 03 23:05:34 2010 -0400
@@ -24,7 +24,14 @@
 <xsl:template match="in:CurrentStatus">
   <xsl:apply-templates select="in:Contact"/>
   <xsl:apply-templates select="in:PrimaryCarePhysician"/>
+  <!-- xsl:apply-templates select="in:Demographics"/ -->
+  <xsl:apply-templates select="in:Prescriptions"/>
   <xsl:apply-templates select="in:Conditions"/>
+  <!-- xsl:apply-templates select="in:Procedures"/ -->
+  <!-- xsl:apply-templates select="in:Allergies"/ -->
+  <!-- xsl:apply-templates select="in:Immunizations"/ -->
+  <!-- xsl:apply-templates select="in:lifestyle"/ -->
+  <!-- xsl:apply-templates select="in:familyHistory"/ -->
 </xsl:template>
 
 <xsl:template match="in:Contact">
@@ -72,6 +79,21 @@
 <xsl:template mode="contact" match="*">
 </xsl:template>
 
+<xsl:template match="in:Prescriptions">
+  <xsl:apply-templates select="in:Prescription"/>
+</xsl:template>
+
+<xsl:template match="in:Prescription">
+  [ a trans:Prescription ;
+    trans:prescribedTo _:patient ;
+    trans:prescribedOn "<xsl:value-of select="in:medication/in:dateStarted"/>"^^xsd:dateTime ; <!-- trans:dateStarted -->
+<xsl:if test="in:medication/dateStopped"> 
+    trans:datePrescriptionEnded "<xsl:value-of select="in:medication/in:dateStopped"/>"^^xsd:dateTime ;
+</xsl:if>
+    trans:genericName "<xsl:value-of select="in:medication/in:genericName"/>" ;    
+  ] .
+</xsl:template>
+
 <xsl:template match="in:Conditions">
   <xsl:apply-templates select="in:Problem"/>
 </xsl:template>
@@ -94,9 +116,17 @@
 </xsl:template>
 
 <xsl:template match="in:Encounter">
-  [ a :Encounter ;
-    :patient _:patient
+  [ a trans:Encounter ;
+    trans:patient _:patient ;
+    trans:dateOfEncounter "<xsl:value-of select="in:Date/text()"/>"^^xsd:dateTime ;
+<xsl:apply-templates select="in:WorkingDiagnosis/in:PreliminaryDiagnosis"/>
+    trans:reportedSymptoms "<xsl:value-of select="in:ReportedSymptoms/text()"/>"
+    
   ] .
 </xsl:template>
 
+<xsl:template match="in:PreliminaryDiagnosis">
+    trans:workingDiagnosis "<xsl:value-of select="in:DiagnosisDescription/text()"/>" ;
+</xsl:template>
+
 </xsl:stylesheet>
\ No newline at end of file
--- a/syntheticPatients/Makefile	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/Makefile	Sun Oct 03 23:05:34 2010 -0400
@@ -2,16 +2,17 @@
 
 # XSLT ?= xsltprocDocStyle.sh
 XSLT ?= saxonb-xslt -ext:on
-SPARQL ?= ~/checkouts/swobjects/bin/SPARQL
+SPARQL ?= SPARQL
 
 all : \
- AD_PCHR_1-indivo.xml AD_PCHR_1-tmo.trig \
- AD_PCHR_2-indivo.xml AD_PCHR_2-tmo.trig \
- AD_PCHR_3-indivo.xml AD_PCHR_3-tmo.trig \
- AD_PCHR_4-indivo.xml AD_PCHR_4-tmo.trig \
- AD_PCHR_5-indivo.xml AD_PCHR_5-tmo.trig \
- AD_PCHR_6-indivo.xml AD_PCHR_6-tmo.trig \
- AD_PCHR_7-indivo.xml AD_PCHR_7-tmo.trig
+ AD_PCHR_1-indivo.xml AD_PCHR_1-tmo.trig
+# \
+# AD_PCHR_2-indivo.xml AD_PCHR_2-tmo.trig \
+# AD_PCHR_3-indivo.xml AD_PCHR_3-tmo.trig \
+# AD_PCHR_4-indivo.xml AD_PCHR_4-tmo.trig \
+# AD_PCHR_5-indivo.xml AD_PCHR_5-tmo.trig \
+# AD_PCHR_6-indivo.xml AD_PCHR_6-tmo.trig \
+# AD_PCHR_7-indivo.xml AD_PCHR_7-tmo.trig
 
 old : \
  AD_PCHR_1.html AD_PCHR_1.rdf \
@@ -41,13 +42,18 @@
 	# java xerces2val document.xsd $<
 	xmllint --noout --schema indivo-schemas/envelope.xsd $<
 
-TMOLIST  :=  t_1 t_2 t_3 t_4 t_5 t_6 t_7
+INPUTLIST  :=  AD_PCHR_1 # AD_PCHR_2 AD_PCHR_3 AD_PCHR_4 AD_PCHR_5 AD_PCHR_6 AD_PCHR_7
+MBOXES := $(subst AD_PCHR_, mbox_, $(INPUTLIST))
+Q1S := $(subst AD_PCHR_, q1_, $(INPUTLIST))
 #$(error TMOLIST: $(TMOLIST))
 
-t_%: AD_PCHR_%-tmo.trig tests/email_%.srt
-	$(SPARQL) -qd $(word 1, $^) --compare $(word 2, $^) -e 'PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?mbox { ?s foaf:mbox ?mbox }' || echo $<\(0\): error !mbox
+mbox_%: AD_PCHR_%-tmo.trig tests/email_%.srt
+	$(SPARQL) -qd $(word 1, $^) -e 'PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?mbox { ?s foaf:mbox ?mbox }' --compare $(word 2, $^) || echo $<\(0\): error !mbox
 
-test: all $(TMOLIST)
+q1_%: AD_PCHR_%-tmo.trig tests/q1.rq tests/q1_%.srt
+	$(SPARQL) -g pchr $(word 1, $^) $(word 2, $^) --compare $(word 3, $^) || echo $<\(0\): error !q1
+
+test: all $(MBOXES) $(Q1S)
 
 clean:
 	rm -f *-indivo.xml *-tmo.trig
--- a/syntheticPatients/Pat2Indivo2.xsl	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/Pat2Indivo2.xsl	Sun Oct 03 23:05:34 2010 -0400
@@ -59,9 +59,8 @@
 	    <xsl:attribute name="type">http://indivo.org/codes/ndc</xsl:attribute>
 	    <xsl:value-of select="NDC"/>
 	  </name>
-	  <brandName>
-	    
-	  </brandName>
+	  <genericName><xsl:value-of select="genericName"/></genericName>
+	  <!-- brandName></brandName -->
 	  <dose>
 	    <value><xsl:value-of select="999"/></value>
 	    <unit type="http://indivo.org/codes/units#">
--- a/syntheticPatients/indivo-schemas/medication.xsd	Sun Oct 03 17:15:57 2010 -0400
+++ b/syntheticPatients/indivo-schemas/medication.xsd	Sun Oct 03 23:05:34 2010 -0400
@@ -14,6 +14,7 @@
       <xs:element name="dateStopped" type="xs:date" minOccurs="0" maxOccurs="1" />
       <xs:element name="name" type="indivo:CodedValue" minOccurs="1" maxOccurs="1" />
       <xs:element name="brandName" type="indivo:CodedValue" minOccurs="0" maxOccurs="1" />
+      <xs:element name="genericName" type="indivo:CodedValue" minOccurs="0" maxOccurs="1" />
       <xs:element name="dose" type="indivo:ValueAndUnit" minOccurs="1" maxOccurs="1" />
 
       <!-- this is typically contained in the code, but maybe not -->
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1.rq	Sun Oct 03 23:05:34 2010 -0400
@@ -0,0 +1,20 @@
+PREFIX indivo: <http://indivo.org/vocab/xml/documents#>
+PREFIX trans: <tag:eric@w3.org:2009/tmo/translator#>
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+SELECT distinct(?patient) ?patient_name  ?encounter_date ?symptoms ?diagnosis ?drug_name ?prescription_start
+WHERE {
+ graph <pchr> 
+ {
+ ?patient foaf:name ?patient_name .
+ ?encounter trans:patient ?patient ;
+            trans:reportedSymptoms ?symptoms ;
+            trans:workingDiagnosis ?diagnosis ;
+            trans:dateOfEncounter ?encounter_date .
+ ?drug trans:prescribedTo ?patient ; # dateStarted
+       trans:prescribedOn ?prescription_start;
+#       trans:datePrescriptionEnded ?prescription_end;
+#       trans:genericName ?drug_name
+# FILTER regex(?drug_name,"DONEPEZIL","i").
+# FILTER (?prescription_start <= ?encounter_date && ?prescription_end >= ?encounter_date)
+ }   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q1_1.srt	Sun Oct 03 23:05:34 2010 -0400
@@ -0,0 +1,4 @@
++--------------------+----------------------+-----------------+-----------+------------------------------+-----------------------------------+---------------------+
+| ?patient           | ?patient_name        | ?encounter_date | ?symptoms | ?diagnosis                   | ?drug_name                        | ?prescription_start |
+| <AD_PCHR_1.rdf#me> | "George Andrew Tour" |    "2009-08-15" |  "nausea" | "adverse event to Donepezil" | "DONEPEZIL HYDROCHLORIDE TABLETS" |        "2009-08-10" |
++--------------------+----------------------+-----------------+-----------+------------------------------+-----------------------------------+---------------------+