Uitwisselprofiel IGJ Contextinformatie t.b.v. onaangekondigd inspectiebezoek

1.1.2 Wat is het aantal cliënten met een Wlz-indicatie per (combinatie van) leveringsvorm(en) per zorgprofiel?

Concepten

Relaties

Eigenschappen

Instanties

SPARQL query

Code gekopieerd

...

Kopieer naar klembord

1# Indicator: IGJ 1.1.2
2# Parameters: ?vestigingsnummer, ?peildatum
3# Ontologie: versie 3.0.0
4
5PREFIX onz-g: <http://purl.org/ozo/onz-g#>
6PREFIX onz-org: <http://purl.org/ozo/onz-org#>
7PREFIX onz-zorg: <http://purl.org/ozo/onz-zorg#>
8PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
10
11SELECT 
12    ?zorgprofiel
13    (SUM(?max_verblijf_met_behandeling) AS ?verblijf_met_behandeling)
14    (SUM(?max_verblijf_zonder_behandeling) AS ?verblijf_zonder_behandeling)
15    (SUM(?max_pgb) AS ?pgb)
16    (SUM(?max_mpt) AS ?mpt)	
17    (SUM(?max_vpt) AS ?vpt)
18    (SUM(?is_pgb_en_mpt) AS ?pgb_en_mpt)
19    (COUNT(DISTINCT ?client) AS ?aantal_uniek)
20{
21    {
22        SELECT 
23            ?client
24            ?zorgprofiel
25            (MAX(?is_verblijf_met_behandeling) AS ?max_verblijf_met_behandeling)
26            (MAX(?is_verblijf_zonder_behandeling) AS ?max_verblijf_zonder_behandeling)
27            (MAX(?is_pgb) AS ?max_pgb)
28            (MAX(?is_mpt) AS ?max_mpt)	
29            (MAX(?is_vpt) AS ?max_vpt)
30        {
31#            BIND($(vestigingsnummer) AS ?vestigingsnummer)
32#            BIND($(peildatum) AS ?peildatum)
33            BIND(?peildatum AS ?peildatum_argument)
34
35        # Nieuwe vestigingsnummer triple
36            ?vestiging 
37                a onz-org:Vestiging ;
38                onz-g:identifiedBy ?vestigingsnummer_object .
39            ?vestigingsnummer_object
40                a onz-org:Vestigingsnummer ;
41                onz-g:hasDataValue ?vestigingsnummer .
42            ?leveringsvorm
43                a onz-zorg:Leveringsvorm .
44            ?zorgprofiel
45                    a onz-zorg:ZorgProfiel .
46
47            ?client
48                a onz-g:Human .
49            ?indicatie 
50                a onz-zorg:WlzIndicatie ;
51                onz-g:startDatum ?start_indicatie ;
52                onz-zorg:heeftIndicatieBehandeling ?behandeling ;
53                onz-g:isAbout ?client ;
54                onz-g:isAbout ?zorgproces ;
55                onz-g:hasPart ?leveringsvorm ;
56                onz-g:hasPart ?zorgprofiel .
57            OPTIONAL {?indicatie onz-g:eindDatum ?eind_indicatie}
58            FILTER(?peildatum_argument >= ?start_indicatie && (?peildatum_argument <= ?eind_indicatie || !BOUND(?eind_indicatie)))
59            #FILTER(?peildatum >= ?start_indicatie && (?peildatum <= ?eind_indicatie || !BOUND(?eind_indicatie)))
60                
61            ?zorgproces
62                a onz-zorg:NursingProcess ;
63                onz-g:startDatum ?start_zorgproces ;
64                onz-g:hasPerdurantLocation/onz-g:partOf* ?vestiging ;
65                OPTIONAL {?zorgproces onz-g:eindDatum ?eind_zorgproces}
66            FILTER(?peildatum_argument >= ?start_zorgproces && (?peildatum_argument <= ?eind_zorgproces || !BOUND(?eind_zorgproces)))    
67            #FILTER(?peildatum >= ?start_zorgproces && (?peildatum <= ?eind_zorgproces || !BOUND(?eind_zorgproces)))
68            BIND(IF(?leveringsvorm = onz-zorg:instelling && ?behandeling, 1, 0) AS ?is_verblijf_met_behandeling)
69            BIND(IF(?leveringsvorm = onz-zorg:instelling && !?behandeling, 1, 0) AS ?is_verblijf_zonder_behandeling)
70            BIND(IF(?leveringsvorm = onz-zorg:pgb, 1, 0) AS ?is_pgb)
71            BIND(IF(?leveringsvorm = onz-zorg:mpt, 1, 0) AS ?is_mpt)
72            BIND(IF(?leveringsvorm = onz-zorg:vpt, 1, 0) AS ?is_vpt)
73            
74        } 
75        GROUP BY ?client ?zorgprofiel
76    }
77    BIND(IF(?max_pgb = 1 && ?max_mpt = 1, 1, 0) AS ?is_pgb_en_mpt)
78}
79GROUP BY ?zorgprofiel
80

Heb je feedback?

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