Uitwisselprofiel IGJ Contextinformatie t.b.v. onaangekondigd inspectiebezoek

1.1.1. Wat is het aantal cliënten per wet?

Concepten

Relaties

Eigenschappen

SPARQL query

Code gekopieerd

...

Kopieer naar klembord

1# Indicator: IGJ 1.1.1
2# Parameters: ?vestigingsnummer, ?peildatum
3# Ontologie: versie 3.0.0
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
12    (SUM(?Wlz_uniek) AS ?aantal_wlz)
13    (SUM(?Zvw_uniek) AS ?aantal_zvw)
14    ((COUNT (DISTINCT(?client)) - ?aantal_wlz - ?aantal_zvw) AS ?aantal_overig)
15    (?aantal_wlz + ?aantal_zvw + ?aantal_overig AS ?aantal_uniek)
16{
17    SELECT DISTINCT
18        ?client
19        (MAX(?Wlz) AS ?Wlz_uniek)
20        (MAX(?Zvw) AS ?Zvw_uniek)
21
22    {
23#        BIND($(vestigingsnummer) AS ?vestigingsnummer)
24#        BIND($(peildatum) AS ?peildatum)
25        
26# Oude vestigingsnummer triple
27#        ?vestiging
28#            a onz-org:Vestiging ;
29#            onz-g:identifiedBy/onz-g:hasDataValue ?vestigingsnummer .
30
31# Nieuwe vestigingsnummer triple
32        ?vestiging 
33            a onz-org:Vestiging ;
34            onz-g:identifiedBy ?vestigingsnummer_object .
35        ?vestigingsnummer_object
36            a onz-org:Vestigingsnummer ;
37            onz-g:hasDataValue ?vestigingsnummer .
38
39        ?subtype_indicatie rdfs:subClassOf onz-zorg:IndicatieBesluit . 
40        ?client a onz-g:Human .
41
42        #selecteer de bijbehorende indicatie, om unieke clienten te kunnen bepalen
43        ?indicatie 
44            a ?subtype_indicatie ;
45            onz-g:startDatum ?start_indicatie ;
46            onz-g:isAbout ?client .
47        OPTIONAL {?indicatie onz-g:eindDatum ?eind_indicatie}
48        FILTER(?peildatum >= ?start_indicatie && (?peildatum <= ?eind_indicatie || !BOUND(?eind_indicatie)))
49        
50        #selecteer de zorgprocessen die voldoen aan de inclusiecriteria
51        ?zorgproces
52            a onz-g:CureAndCareProcess ;
53            onz-g:definedBy ?indicatie ;
54            onz-g:hasPerdurantLocation/onz-g:partOf* ?vestiging ;
55            onz-g:startDatum ?start_zorgproces .
56            OPTIONAL {?zorgproces onz-g:eindDatum ?eind_zorgproces}
57            FILTER (?start_zorgproces <= ?peildatum && ((?eind_zorgproces >= ?peildatum)||(!BOUND(?eind_zorgproces))))
58
59        #Per financieringsstroom
60        BIND(IF(?subtype_indicatie = onz-zorg:WlzIndicatie, 1, 0) AS ?Wlz)
61        BIND(IF(?subtype_indicatie = onz-zorg:ZvwIndicatie, 1, 0) AS ?Zvw)
62    } 
63    GROUP BY ?client
64}
65

Heb je feedback?

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