Code gekopieerd
...Kopieer naar klembord
1PREFIX onz-g: <http://purl.org/ozo/onz-g#> 2PREFIX onz-zorg: <http://purl.org/ozo/onz-zorg#> 3PREFIX onz-org: <http://purl.org/ozo/onz-org#> 4PREFIX onz-pers: <http://purl.org/ozo/onz-pers#> 5PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 6PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 7 8SELECT 9 ?vestiging 10 (SUM(?tlr) AS ?teller) 11 (COUNT(?client) AS ?noemer) 12 (ROUND(100 * SUM(?tlr) / COUNT(?client)) AS ?indicator) 13{ 14 { 15 SELECT 16 ?client 17 (MAX(?start_proces) AS ?start_laatste_locatie) 18 (MAX(?inclusie_teller) AS ?tlr) 19 { 20 { 21 SELECT 22 ?client 23 ?start_periode 24 ?eind_periode 25 { 26 { 27 SELECT 28 ?client 29 ?start_periode 30 ?eind_periode 31 (MIN(?start_proces) AS ?start_inclusie) 32 (MAX(?eind_proces_corr) AS ?eind_inclusie) 33 { 34 BIND("2022-01-01"^^xsd:date AS ?start_periode) 35 BIND("2022-10-31"^^xsd:date AS ?eind_periode) 36 37 VALUES ?zorgprofiel { onz-zorg:4VV onz-zorg:5VV onz-zorg:6VV onz-zorg:7VV onz-zorg:8VV onz-zorg:9BVV onz-zorg:10VV } 38 39 #selecteer de clienten die op eind van de periode minimaal 6 maanden in dienst zijn 40 ?zorgproces 41 a onz-zorg:NursingProcess ; 42 onz-g:hasParticipant ?client ; 43 onz-g:definedBy/onz-g:hasPart ?zorgprofiel ; 44 onz-g:startDatum ?start_proces . 45 OPTIONAL {?zorgproces onz-g:eindDatum ?eind_proces} 46 BIND(IF(!BOUND(?eind_proces) || ?eind_proces > ?eind_periode, ?eind_periode, ?eind_proces) AS ?eind_proces_corr) 47 } 48 GROUP BY ?client ?start_periode ?eind_periode 49 } 50 #Bereken correcte aantal dagen tijd in zorg 51 BIND ((360 * (YEAR(?eind_inclusie + "P1D"^^xsd:duration) - YEAR(?start_inclusie))) + 52 (30 * (MONTH(?eind_inclusie + "P1D"^^xsd:duration) - MONTH(?start_inclusie))) + 53 (DAY(?eind_inclusie + "P1D"^^xsd:duration) - DAY(?start_inclusie)) 54 AS ?tijd_in_zorg) 55 FILTER ((?eind_inclusie - ?start_inclusie) > "P180D"^^xsd:duration) 56 } 57 } 58 VALUES ?zorgprofiel { onz-zorg:4VV onz-zorg:5VV onz-zorg:6VV onz-zorg:7VV onz-zorg:8VV onz-zorg:9BVV onz-zorg:10VV } 59 ?zorgproces 60 a onz-zorg:NursingProcess ; 61 onz-g:hasParticipant ?client ; 62 onz-g:definedBy/onz-g:hasPart ?zorgprofiel ; 63 onz-g:startDatum ?start_proces . 64 OPTIONAL {?zorgproces onz-g:eindDatum ?eind_proces} 65 FILTER (?start_proces <= ?eind_periode && (!BOUND(?eind_proces) || ?eind_proces >= ?start_periode)) 66 OPTIONAL { 67 ?medicatiereview 68 a onz-zorg:MedicatieReview ; 69 onz-g:hasTime ?datum_review ; 70 onz-g:isAbout ?client . 71 FILTER (?datum_review >= ?start_periode && ?datum_review <= ?eind_periode) 72 } 73 BIND(IF(BOUND(?medicatiereview), 1, 0) AS ?inclusie_teller) 74 } 75 GROUP BY ?client 76 } 77 # Rapporteer bij de vestiging van het meest recente (in de gevraagde periode) zorgproces van de geincludeerde clienten 78 ?laatsteproces 79 onz-g:hasParticipant ?client ; 80 onz-g:startDatum ?start_laatste_locatie ; 81 onz-g:hasPerdurantLocation ?locatie . 82 ?locatie 83 onz-g:partOf* ?vestiging_uri . 84 ?vestiging_uri 85 a onz-org:Vestiging ; 86 onz-g:identifiedBy ?vest_nr . 87 ?vest_nr 88 a onz-org:Vestigingsnummer ; 89 onz-g:hasDataValue ?vestiging . 90} 91GROUP BY ?vestiging
Loopt u tegen een issue of vraag aan bij het KIK-V product? Neem dan contact met ons op!