https://cacontology.projectvic.org/partnerships/shapes#NationalInitiativeDataQualityShape
Validates data quality for national initiative program instances.
@prefix cacontology-partnerships: <https://cacontology.projectvic.org/partnerships#> .
@prefix cacontology-partnerships-shapes: <https://cacontology.projectvic.org/partnerships/shapes#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
cacontology-partnerships-shapes:NationalInitiativeDataQualityShape a sh:NodeShape ;
rdfs:label "National Initiative Data Quality Shape"@en ;
rdfs:comment "Validates data quality for national initiative program instances."@en ;
sh:sparql [ sh:message "National initiative programs should have realistic case processing numbers relative to their duration."@en ;
sh:prefixes [ sh:declare [ sh:namespace "https://cacontology.projectvic.org/partnerships#"^^xsd:anyURI ;
sh:prefix "cacontology-partnerships" ] ] ;
sh:select """
SELECT $this
WHERE {
$this cacontology-partnerships:casesProcessed ?cases ;
cacontology-partnerships:launchedDate ?launched .
BIND (NOW() AS ?now)
BIND ((?now - ?launched) / (365.25 * 24 * 60 * 60) AS ?yearsActive)
BIND (?cases / ?yearsActive AS ?casesPerYear)
FILTER (?casesPerYear > 5000)
}
""" ] ;
sh:targetClass cacontology-partnerships:NationalInitiativeProgram .