Ontology Version: 2.2.0

cacontology-prevention:PreventionProgramDeliveryValidationShape leaf node


URI

https://cacontology.projectvic.org/prevention#PreventionProgramDeliveryValidationShape

Label

Prevention Program Delivery Validation Shape

Description

Validates that prevention programs have delivery specialists.

Shape Properties

Instances of cacontology-prevention:PreventionProgram can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

cacontology-prevention:PreventionProgram
cacontology-prevention:participantCount 0 1 xsd:nonNegativeInteger
cacontology-prevention:programDuration 0 1 xsd:decimal
0 1 xsd:dateTime
1 1 xsd:string
1 1 xsd:dateTime

Implementation

@prefix cacontology-prevention: <https://cacontology.projectvic.org/prevention#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
cacontology-prevention:PreventionProgramDeliveryValidationShape a sh:NodeShape ;
    rdfs:label "Prevention Program Delivery Validation Shape"@en ;
    rdfs:comment "Validates that prevention programs have delivery specialists."@en ;
    sh:sparql [ sh:message "Prevention program should have assigned specialists."@en ;
            sh:select """
            SELECT $this
            WHERE {
                $this a cacontology-prevention:PreventionProgram .
                FILTER NOT EXISTS {
                    $this cacontology-prevention:deliveredBy ?specialist .
                    ?specialist a cacontology-prevention:PreventionSpecialist .
                }
            }
        """ ] ;
    sh:targetClass cacontology-prevention:PreventionProgram .