Derivation
top-criticalities
An entry shows the highest criticality any member states: high over low over unable to assess. Only allergies state one.
The query
PREFIX cascade: <https://ns.cascadeprotocol.org/cascade#>
PREFIX pav: <http://purl.org/pav/>
CONSTRUCT { ?entry cascade:topCriticality ?top }
WHERE {
{ SELECT ?entry (MAX(?rank) AS ?topRank)
WHERE {
?r cascade:inEntry ?entry ;
pav:hasCurrentVersion/cascade:allergyCriticality ?c .
BIND (IF(?c = "high", 2, IF(?c = "low", 1, 0)) AS ?rank)
}
GROUP BY ?entry }
BIND (IF(?topRank = 2, "high", IF(?topRank = 1, "low", "unable-to-assess")) AS ?top)
}
Terms it reads
cascade:inEntry · cascade:topCriticality · pav:hasCurrentVersion
Rules and decision notes that name it
No rule or decision note writes its path.