- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Wed, 1 Oct 2008 01:32:31 -0400
- To: public-hcls-coi@w3.org
- Message-ID: <20081001053231.GA13414@w3.org>
Given some data that Helen added to db: <http://www.w3.org/2008/04/DiabeticPatientsDataSet/MockPerson.csv> <http://www.w3.org/2008/04/DiabeticPatientsDataSet/MockMedication.csv> <http://www.w3.org/2008/04/DiabeticPatientsDataSet/MockItem_Medication.csv> and the latest version of SWObjects: <http://www.w3.org/2008/04/SPARQLfed/> I tested the SPARQL-SQL mapping on a sample query tests/execute_HealthCare1 tests/query_stem:Person.rq -s http://hospital.example/DB/ <http://www.w3.org/2008/04/SPARQLfed/tests/query_stem:Person.rq> got an SQL query: [[ SELECT person.id AS person, person.DateOfBirth AS dob, sexEntry.EntryName AS sex, medication.id AS medication, opt1.contraIndic AS contraIndic FROM Person AS person INNER JOIN Sex_DE AS sexEntry ON sexEntry.id=person.SexDE INNER JOIN Item_Medication AS medication ON medication.PatientID=person.id AND medication.EntryName="GlipiZIDE-Metformin HCl 2.5-250 MG Tablet" LEFT OUTER JOIN ( SELECT contraIndic.PatientID AS person, contraIndic.id AS contraIndic FROM Item_Medication AS contraIndic WHERE contraIndic.EntryName="Warfarin Sodium 5 MG Tablet" ) AS opt1 ON opt1.person=person.id WHERE (person.DateOfBirth < "1980-01-01 00:00:00" AND !(opt1.contraIndic IS NOT NULL)) LIMIT 10 ]] executed it, and got: +---------+---------------------+--------+-------------+-------------+ | person | dob | sex | medication | contraIndic | +---------+---------------------+--------+-------------+-------------+ | 1234562 | 1963-12-27 00:00:00 | Female | 99999999003 | NULL | | 1234562 | 1963-12-27 00:00:00 | Female | 99999999004 | NULL | +---------+---------------------+--------+-------------+-------------+ I encourage folks to play more. Also, probably time to start working on the construct rules that allow the SPARQL query to work over HL7 data. Holger, could you build a DOS/WIN version of the code and distribute it or make it available to folks who want to help? -- -eric office: +1.617.258.5741 32-G528, MIT, Cambridge, MA 02144 USA mobile: +1.617.599.3509 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution.
Received on Wednesday, 1 October 2008 06:49:09 UTC