CPV is consistent with the contract nature type
Rule Definition
For every procedure, at least 1 classification code (CPV code, main or additional) is consistent with the contract nature type.
Additional Information
Rule elaboration
Consistency Business Rule with ID CON008 as defined in deliverable D06.06 – Data Quality Action Plan.
Ontology property involved:
http://data.europa.eu/a4g/ontology#hasContractNatureType
http://data.europa.eu/a4g/ontology#hasMainClassification
Rule source
Rule implementation
ppsh:ContractTerm-hasContractNatureTypeQuery
Implementation note
Implementation in PPDS SHACL shapes graph:
ppsh:ContractTerm-hasContractNatureTypeQuery a sh:SPARQLConstraint ;
sh:description "At least 1 main classification (CPV code) must be aligned with the contract nature type." ;
sh:severity sh:Warning ;
sh:message "CON008" ;
sh:name "Contract term nature type" ;
sh:prefixes epo: ;
sh:select """
PREFIX epo: <http://data.europa.eu/a4g/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT $this ((epo:hasMainClassification) AS ?path) (?resultBind as ?value)
WHERE{
$this a epo:Notice .
$this epo:refersToProcedure ?procedure .
?procedure epo:foreseesContractSpecificTerm/epo:hasContractNatureType ?nature .
?procedure epo:hasPurpose/epo:hasMainClassification ?classification .
BIND(xsd:integer(SUBSTR(?classification , 31, 2)) AS ?numClassification)
BIND(IF(((?numClassification >= 0 && ?numClassification <= 44) || (?numClassification = 48)) && ?nature = 'Goods',True,
IF(((?numClassification >= 0 && ?numClassification <= 44) || (?numClassification = 48)) && ?nature = 'Goods',True,
IF(?numClassification = 45 && ?nature = 'Works',True,
IF(?numClassification >= 46 && ?nature = 'Services',True,False)))) AS ?resultBind)
}
""" .
Related rules
Related generic rule
(If the rule is a specialisation of a generic rule registered in this Rulebook, include here URL of that generic rule)
History note
(If applicable, add here a note about a previous state of the rule, before the Rulebook)