- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Thu, 9 Sep 2010 13:05:46 -0400
- To: public-semweb-lifesci@w3.org
We have choices about how to model units. per the first TMO RDF
patient data, we can keep the units as datatypes:
:X trans:bloodPressure
[ trans:systolic "120"^^u:mmHg ;
trans:diastolic "80"^^u:mmHg ] .
per CPR, as a pair of value and datatype:
… [ trans:systolic [ muo:measuredIn trans1:mmHg ; muo:numericalValue "120" ] ;
trans:diastolic [ muo:measuredIn trans1:mmHg ; muo:numericalValue "80" ] ] .
Another, potentially more attractive option, is to model units in the
predicate:
:X trans:bloodPressure
[ trans:systolicMmHg "120" ;
trans:diastolicMmHg "80" ] .
This greatly simplifies our life as we are otherwise likely to have a
variety of e.g. BP data in the database: 120/80 mmHg, 12/8 DmHg, 16000/10667 Pa,
16/11 MPa, 13 (PAM)
which would lead to rediculous queries when we want to use the data:
SELET ?sysM ?diaM {
?x trans:bloodPressure [ trans:systolic ?sys ; trans:diastolic ]
FILTER (datatype(?sys) = u:mmHg) && datatype(?dia) = u:mmHg) }
UNION SELECT (?sys*10 as ?sysM) (?dia*10 as ?diaM) {
?x trans:bloodPressure [ trans:systolic ?sys ; trans:diastolic ]
FILTER (datatype(?sys) = u:dmHg) && datatype(?dia) = u:dmHg) }
UNION SELECT (?sys*133 as ?sysM) (?dia*133 as ?diaM) {
?x trans:bloodPressure [ trans:systolic ?sys ; trans:diastolic ]
FILTER (datatype(?sys) = u:MPa) && datatype(?dia) = u:MPA) } … }
--
-ericP
Received on Thursday, 9 September 2010 17:06:21 UTC