W3C Semantic Web Projects.
Diabetic Patient Data
Warning: vapid example:
PREFIX :mydb <http://cityhospital.example/dbs> CONSTRUCT { ?o a study:SubjectObservation . ?o study:subject ?p . ?o study:clinician ?d . ?d :foaf:name ?dName }
WHERE { ?o mydb:patient ?p . ?o mydb:doctor ?d . ?d mydb:name ?dName }
PREFIX db: <…> SELECT ?O ?P ?D WHERE { ?O db:onPatient ?P . ?O db:byDoctor ?D . }
cat sdtm.rq | \ SWtransformer -q - hl7-sdtm.rq | \ SWtransformer -q - db-hl7.rq -s http://hospital.example/DB/ | \ mysql -u root DiabeticPatientsDataSet --table
PREFIX sdtm: <http://www.sdtm.org/vocabulary#> PREFIX spl: <http://www.hl7.org/v3ballot/xml/infrastructure/vocabulary/vocabulary#> SELECT ?patient ?dob ?sex ?takes ?indicDate # ?indicEnd ?contra WHERE { ?patient a sdtm:Patient ; sdtm:middleName ?middleName ; sdtm:dateTimeOfBirth ?dob ; sdtm:sex ?sex . ?ip sdtm:subject ?patient ; sdtm:standardizedMedicationName ?takes ; # nothing by ingredient in sdtm/caBIG/... # sdtm:startDateTimeOfMedication ?indicDate ; # ; sdtm:endDateTimeOfMedication ?indicEnd spl:activeIngredient ?ic . ?ic spl:classCode 6809 . OPTIONAL { ?cp sdtm:subject ?patient ; sdtm:standardizedMedicationName ?contra ; # sdtm:startDateTimeOfMedication ?contraDate ; # ; sdtm:endDateTimeOfMedication ?contraEnd spl:activeIngredient ?cc . ?cc spl:classCode 11289 . } FILTER (!BOUND(?cp)) } LIMIT 30
PREFIX rim: <http://www.hl7.org/v3ballot/xml/infrastructure/vocabulary/vocabulary#> SELECT ?patient ?dob ?sex ?takes ?indicDate WHERE { ?patient a rim:Person> . ?patient rim:entityName ?middleName . ?patient rim:livingSubjectBirthTime ?dob . ?patient rim:administrativeGenderCodePrintName ?sex . ?patient rim:substanceAdministration _:admin . # substance administration _:admin a rim:SubstanceAdministration> . _:admin rim:consumable _:subst . # substance _:subst rim:displayName ?takes . _:subst rim:activeIngredient _:ingred . _:ingred rim:classCode 6809 . _:admin rim:effectiveTime _:when . _:when rim:start ?indicDate . } LIMIT 30
Many DBs contributing
to a network of data.
Configured query services
federating and distributing
to many DB Interfaces.
thanks to Lilly and Lincoln Labs for funding this work.