--- a/syntheticPatients/AD_PCHR_1-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_1-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -82,6 +82,7 @@
trans:onset "2009-05-15T12:00:00" ;
trans:diagnosedWith "hypertension" ;
+ trans:ICD9 "410" ;
# unmatched comments
# unmatched diagnosedBy
@@ -91,6 +92,7 @@
trans:onset "2009-05-20T12:00:00" ;
trans:diagnosedWith "hypercholesterolaemia" ;
+ trans:ICD9 "272" ;
# unmatched comments
# unmatched diagnosedBy
@@ -100,6 +102,7 @@
trans:onset "2009-05-20T12:00:00" ;
trans:diagnosedWith "atrial fibrillation" ;
+ trans:ICD9 "427" ;
# unmatched comments
# unmatched diagnosedBy
@@ -109,6 +112,7 @@
trans:onset "2009-08-10T12:00:00" ;
trans:diagnosedWith "alzheimer’s disease" ;
+ trans:ICD9 "331" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_1.xml Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_1.xml Thu Oct 07 01:40:16 2010 -0400
@@ -1,4 +1,4 @@
-<!-- -*- XML -*- --><!-- ?xml-stylesheet type="text/xsl" href="Patrdf2html.xsl"? -->
+<!-- -*- nxml -*- --><!-- ?xml-stylesheet type="text/xsl" href="Patrdf2html.xsl"? -->
<!-- Fake AD Patient 1
$Id: AD_PCHR_1_Final.xml,v 1.6 2009/12/02 21:08:30 eric Exp $
-->
--- a/syntheticPatients/AD_PCHR_2-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_2-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -97,6 +97,7 @@
trans:onset "2004-07-10T12:00:00" ;
trans:diagnosedWith "mild cognitive impairment" ;
+ trans:ICD9 "290.0" ;
# unmatched comments
# unmatched diagnosedBy
@@ -106,6 +107,7 @@
trans:onset "2007-07-20T12:00:00" ;
trans:diagnosedWith "hypercholesterolaemia" ;
+ trans:ICD9 "272" ;
# unmatched comments
# unmatched diagnosedBy
@@ -115,6 +117,7 @@
trans:onset "2008-03-18T12:00:00" ;
trans:diagnosedWith "myocardial infarction" ;
+ trans:ICD9 "410.3" ;
# unmatched comments
# unmatched diagnosedBy
@@ -124,6 +127,7 @@
trans:onset "2008-05-16T12:00:00" ;
trans:diagnosedWith "anxiety depression" ;
+ trans:ICD9 "300.4" ;
# unmatched comments
# unmatched diagnosedBy
@@ -133,6 +137,7 @@
trans:onset "2009-10-15T12:00:00" ;
trans:diagnosedWith "alzheimer’s disease" ;
+ trans:ICD9 "331" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_3-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_3-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -84,6 +84,7 @@
trans:onset "2001-01-03T12:00:00" ;
trans:diagnosedWith "Osteoarthrosis generalized involving hand" ;
+ trans:ICD9 "715.04" ;
# unmatched comments
# unmatched diagnosedBy
@@ -93,6 +94,7 @@
trans:onset "2005-11-03T12:00:00" ;
trans:diagnosedWith "Alzheimer's Disease" ;
+ trans:ICD9 "331" ;
# unmatched comments
# unmatched diagnosedBy
@@ -102,6 +104,7 @@
trans:onset "2007-09-23T12:00:00" ;
trans:diagnosedWith "Dyspepsia and other specified disorders of stomach" ;
+ trans:ICD9 "536.8" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_4-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_4-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -66,6 +66,7 @@
trans:onset "1950-05-15T12:00:00" ;
trans:diagnosedWith "Epilepsy and recurrent seizures" ;
+ trans:ICD9 "345" ;
# unmatched comments
# unmatched diagnosedBy
@@ -75,6 +76,7 @@
trans:onset "1995-05-20T12:00:00" ;
trans:diagnosedWith "Hypertension" ;
+ trans:ICD9 "402.1" ;
# unmatched comments
# unmatched diagnosedBy
@@ -84,6 +86,7 @@
trans:onset "2009-05-20T12:00:00" ;
trans:diagnosedWith "Alzheimer’s Dementia" ;
+ trans:ICD9 "331.0" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_5-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_5-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -82,6 +82,7 @@
trans:onset "2008-02-03T12:00:00" ;
trans:diagnosedWith "hypertension" ;
+ trans:ICD9 "410" ;
# unmatched comments
# unmatched diagnosedBy
@@ -91,6 +92,7 @@
trans:onset "2009-07-21T12:00:00" ;
trans:diagnosedWith "alzheimer’s disease" ;
+ trans:ICD9 "331" ;
# unmatched comments
# unmatched diagnosedBy
@@ -100,6 +102,7 @@
trans:onset "2008-05-06T12:00:00" ;
trans:diagnosedWith "acute coronary occlusion without myocardial infarction" ;
+ trans:ICD9 "414" ;
# unmatched comments
# unmatched diagnosedBy
@@ -109,6 +112,7 @@
trans:onset "2009-06-18T12:00:00" ;
trans:diagnosedWith "gastroesophageal reflux disease" ;
+ trans:ICD9 "530.81" ;
# unmatched comments
# unmatched diagnosedBy
@@ -118,6 +122,7 @@
trans:onset "2009-07-23T12:00:00" ;
trans:diagnosedWith "nausea and vomiting" ;
+ trans:ICD9 "787.0" ;
# unmatched comments
# unmatched diagnosedBy
@@ -127,6 +132,7 @@
trans:onset "2009-07-23T12:00:00" ;
trans:diagnosedWith "adverse drug effect" ;
+ trans:ICD9 "9995.2" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_6-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_6-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -61,6 +61,7 @@
trans:onset "2008-11-09T12:00:00" ;
trans:diagnosedWith "Hypertension" ;
+ trans:ICD9 "401.9" ;
# unmatched comments
# unmatched diagnosedBy
@@ -70,6 +71,7 @@
trans:onset "2009-11-09T12:00:00" ;
trans:diagnosedWith "Hypocalcemia" ;
+ trans:ICD9 "275.41" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_7-indivo.xml Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_7-indivo.xml Thu Oct 07 01:40:16 2010 -0400
@@ -60,13 +60,13 @@
<Conditions>
<Problem>
<dateOnset>1978-01-31T12:00:00</dateOnset>
- <name type="http://indivo.org/codes/ICD9" value="">Down Syndrome</name>
+ <name type="http://indivo.org/codes/ICD9" value="758">Down Syndrome</name>
<comments>...</comments>
<diagnosedBy>Michael Matthews</diagnosedBy>
</Problem>
<Problem>
<dateOnset>2009-02-01T12:00:00</dateOnset>
- <name type="http://indivo.org/codes/ICD9" value="">Alzheimer’s Disease</name>
+ <name type="http://indivo.org/codes/ICD9" value="331">Alzheimer’s Disease</name>
<comments>...</comments>
<diagnosedBy>Michael Matthews</diagnosedBy>
</Problem>
--- a/syntheticPatients/AD_PCHR_7-tmo.trig Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_7-tmo.trig Thu Oct 07 01:40:16 2010 -0400
@@ -45,6 +45,7 @@
trans:onset "1978-01-31T12:00:00" ;
trans:diagnosedWith "Down Syndrome" ;
+ trans:ICD9 "758" ;
# unmatched comments
# unmatched diagnosedBy
@@ -54,6 +55,7 @@
trans:onset "2009-02-01T12:00:00" ;
trans:diagnosedWith "Alzheimer’s Disease" ;
+ trans:ICD9 "331" ;
# unmatched comments
# unmatched diagnosedBy
--- a/syntheticPatients/AD_PCHR_7.xml Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/AD_PCHR_7.xml Thu Oct 07 01:40:16 2010 -0400
@@ -90,12 +90,14 @@
<conditions>
<condition>
<diagnosedWith>Down Syndrome</diagnosedWith>
+ <ICD9>758</ICD9><!-- 758.0 EGP -->
<dateDiagnosed>1978-01-31</dateDiagnosed>
<diagnosedBy>Michael Matthews</diagnosedBy>
<physicianNotes>...</physicianNotes>
</condition>
<condition>
<diagnosedWith>Alzheimer’s Disease</diagnosedWith>
+ <ICD9>331</ICD9><!-- 331.0 EGP -->
<dateDiagnosed>2009-02-01</dateDiagnosed>
<diagnosedBy>Michael Matthews</diagnosedBy>
<physicianNotes>...</physicianNotes>
--- a/syntheticPatients/Indivo2Trig.xsl Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/Indivo2Trig.xsl Thu Oct 07 01:40:16 2010 -0400
@@ -110,6 +110,7 @@
<xsl:template mode="problem" match="in:name">
trans:diagnosedWith "<xsl:value-of select="text()"/>" ;
+ trans:ICD9 "<xsl:value-of select="@value"/>" ;
</xsl:template>
<xsl:template mode="problem" match="*">
--- a/syntheticPatients/Makefile Tue Oct 05 05:34:00 2010 -0400
+++ b/syntheticPatients/Makefile Thu Oct 07 01:40:16 2010 -0400
@@ -5,14 +5,13 @@
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 \
@@ -45,6 +44,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))
+Q4S := $(subst AD_PCHR_, q4_, $(INPUTLIST))
#$(error TMOLIST: $(TMOLIST))
mbox_%: AD_PCHR_%-tmo.trig tests/email_%.srt
@@ -53,7 +53,10 @@
q1_%: AD_PCHR_%-tmo.trig tests/q1.rq tests/q1_%.srt
$(SPARQL) -qg pchr $(word 1, $^) $(word 2, $^) --compare $(word 3, $^) || echo $<:0: error: data\\n$(word 2, $^):0: note: query\\n$(word 3, $^):0: note: expected results
-test: all $(MBOXES) $(Q1S)
+q4_%: AD_PCHR_%-tmo.trig tests/q4.rq tests/q4_%.srt
+ $(SPARQL) -qg pchr $(word 1, $^) $(word 2, $^) --compare $(word 3, $^) || echo $<:0: error: data\\n$(word 2, $^):0: note: query\\n$(word 3, $^):0: note: expected results
+
+test: all $(MBOXES) $(Q1S) $(Q4S)
clean:
rm -f *-indivo.xml *-tmo.trig
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4.rq Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,17 @@
+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
+WHERE {
+ graph <pchr>
+{
+ ?patient foaf:name ?patient_name.
+ [
+ trans:patient ?patient;
+ trans:reportedSymptoms ?symptoms ;
+ ]
+ FILTER regex(?symptoms,"depression","i").
+ #ICD9 of 331 - alzheimer disease
+ ?patient trans:hasCondition [trans:ICD9 "331";]
+}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_1.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+
+| ?patient | ?patient_name |
++----------+---------------+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_2.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,4 @@
++----------+--------------------+
+| ?patient | ?patient_name |
+| _:x | "Monica Mary Mall" |
++----------+--------------------+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_3.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+
+| ?patient | ?patient_name |
++----------+---------------+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_4.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+
+| ?patient | ?patient_name |
++----------+---------------+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_5.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+
+| ?patient | ?patient_name |
++----------+---------------+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_6.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+
+| ?patient | ?patient_name |
++----------+---------------+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/syntheticPatients/tests/q4_7.srt Thu Oct 07 01:40:16 2010 -0400
@@ -0,0 +1,3 @@
++----------+---------------+
+| ?patient | ?patient_name |
++----------+---------------+