Submitted by Leigh Dodds on 25th July 2011
This query finds all General Practices associated with a specific post code and then the GPs associated with each practice.
Query:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX nhs: <http://data.kasabi.com/dataset/nhs-organization/def/>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX os: <http://data.ordnancesurvey.co.uk/ontology/postcode/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?doctor ?practice WHERE {
?org a nhs:GeneralPractice;
org:hasSite ?site;
rdfs:label ?practice.
#limit to postcode of interest
?site os:postcode <http://data.ordnancesurvey.co.uk/id/postcodeunit/TS181HU>.
#find gps who are members of the practices found
?gp org:memberOf ?org;
foaf:name ?doctor.
}
ORDER BY ?doctor
| Dataset | NHS Organization |
|---|---|
| Created By | Leigh Dodds |
| Published | 2011-07-25 13:47 |