ExampleQueryMatching

From W3C Wiki
Revision as of 10:34, 10 November 2011 by Mmarshal (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
# Find pathology reports matching a radiology report.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX term: <term:/> # not the most inspired namespace...

SELECT ?lat ?clock ?radFinding ?pathFinding {
 { [ a term:MammogramReport ;
     term:finding [
         rdfs:label ?radFinding ;
         term:location [
             term:laterality ?lat ;
             term:position ?clock
         ]
     ]
   ] }
 OPTIONAL
  { [ a term:PathologyReport ;
      term:finding [
          rdfs:label ?pathFinding ;
          term:location [
              term:laterality ?lat ;
              term:position ?clock
          ]
      ]
    ] }
}