Let op: dit is een oudere versie van deze publicatie. Ga naar de laatste versie

Uitwisselprofiel Zorgkantoren Inkoopondersteuning en beleidsontwikkeling

15.4.1.0 Aantal cliënten per financieringsstroom

Concepten

Relaties

Eigenschappen

SPARQL query

Code gekopieerd

...

Kopieer naar klembord

1# Indicator: Zorgkantoren 15.4.1.0
2# Parameters: 
3# Ontologie: versie 2.0.0 of nieuwer
4
5PREFIX onz-zorg: <http://purl.org/ozo/onz-zorg#>
6PREFIX onz-org: <http://purl.org/ozo/onz-org#>
7PREFIX onz-g: <http://purl.org/ozo/onz-g#>
8PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
10
11SELECT ?vestiging
12(SUM(?Wlz) as ?aantal_wlz)
13(SUM(?Wmo) as ?aantal_wmo)
14(SUM(?Zvw) as ?aantal_zvw)
15
16WHERE {
17    BIND($(peildatum) AS ?peildatum)
18    
19    VALUES ?type_indicatie
20            { 
21                onz-zorg:WlzIndicatie
22                onz-zorg:WmoIndicatie
23                onz-zorg:ZvwIndicatie
24            }  
25    ?wooneenheid 
26        a onz-org:WoonEenheid ;
27        onz-g:hasQuality ?occ ;
28        onz-g:partOf ?locatie . # locatie bevat niet alleen vestigingen
29    ?occ
30        a onz-g:Quality ;
31        onz-g:hasQualityValue ?occ_waarde .
32    ?occ_waarde a onz-g:OccupancyValue ;
33        onz-g:hasOccupancyObject ?client .
34    ?client a onz-g:Human .
35    
36    #selecteer de bijbehorende indicatie, om unieke clienten te kunnen bepalen
37    ?indicatie 
38        a ?type_indicatie ;
39        onz-g:isAbout ?client .
40    
41    #selecteer de zorgprocessen die voldoen aan de inclusiecriteria
42    ?zorgproces
43        a onz-zorg:NursingProcess ;
44        onz-g:definedBy ?indicatie ;
45        onz-g:hasPerdurantLocation/onz-g:partOf* ?locatie ; # locatie bevat niet alleen vestigingen
46        onz-g:startDatum ?start_zorgproces .
47        OPTIONAL {?zorgproces onz-g:eindDatum ?eind_zorgproces}
48        FILTER (?start_zorgproces <= ?peildatum && ((?eind_zorgproces >= ?peildatum)||(!BOUND(?eind_zorgproces))))
49    {
50    ?locatie 
51            a onz-org:Vestiging ;
52            onz-g:identifiedBy ?vest_nr.
53        ?vest_nr a onz-org:Vestigingsnummer ;
54                 onz-g:hasDataValue ?vestiging .
55    }
56    UNION {
57        #Includeer ook de organisatie als geheel en label deze als vestiging
58        ?locatie onz-org:vestigingVan ?organisatie_uri .
59        ?organisatie_uri 
60            a onz-g:Business ;
61            rdfs:label ?Organisatie .
62        BIND(CONCAT('Totaal ',?Organisatie) AS ?vestiging)
63    }
64    #Per financieringsstroom
65    BIND(IF(?type_indicatie = onz-zorg:WlzIndicatie, 1, 0) AS ?Wlz)
66    BIND(IF(?type_indicatie = onz-zorg:WmoIndicatie, 1, 0) AS ?Wmo)
67    BIND(IF(?type_indicatie = onz-zorg:ZvwIndicatie, 1, 0) AS ?Zvw)
68} 
69GROUP BY ?vestiging
70ORDER BY ?vestiging
71

Heb je feedback?

Loopt u tegen een issue of vraag aan bij het KIK-V product? Neem dan contact met ons op!