# Policy based node occurrences **Category:** [General Discussion](https://discourse.openehr.org/c/general-discussion/132) **Created:** 2024-07-21 07:20 UTC **Views:** 34 **Replies:** 0 **URL:** https://discourse.openehr.org/t/policy-based-node-occurrences/5498 --- ## Post #1 by @joostholslag Just some crazy idea. Currently we define occurrences/cardinality of information points (nodes) in archetypes and templates. With usually very simple hierarchies: 1 template of a few mostly unspecialised archetypes all of a singular lineage. With ADL2 it’s much easier to have more elaborate lineage, with being able to specialise templates and much more easily specialise archetypes (because both are differential artefacts). Now a first use case that adds a bit more complexity is to have specific templates for individual doctors, e.g. hypertension consultation. One doctor always ask the patients for family history of aneurysms, while another requires info on the social impact of the antihypertensive medication. While the national guideline mandates recording smoking status. A nice pattern for this would be a template at national level for hypertension consultation . With 2 specialisations, one for each doctor. Each adding the datapoint they care about. Now a use case that would be a bit more complicated is if the questions are conditional: ‘I always ask for aneurysms only if the patients parents are deceased.’ We can use rules (basic) expression language. To express these types of constraints if all nodes are defined in the template. Now, what we all know as doctors is that consultations are unpredictable and it’s ‘impossible’ to model a template for every optional information of interest of a specific complaint. What I think we need is dynamic templates, where entry archetypes are added to a template at run-time. Where additions are determined by information discovered during the consultation. We can possibly already do this with runtime generation of a template. Where entries get added in an open slot, and this template is a specialisation of a basic ‘national’ or doctor specific template. (Off course this does put some contraints on AQL capabilities for that template, since the exact entries are for a part unpredictable.) Now, this morning I read [this article](https://www.science.org/doi/10.1126/science.adn9602) by Eric Topol, famous ‘tech MD’ in science about AI. Till now I didn’t much like AI for it’s inherent faultiness and marketing messaging it will replace doctors, and focus on the wrong problem. But basically dr. Topol is suggesting AI can give specific recommendations to a doctor to improve a diagnosis based on the current information in a case. Especially for rare ones. E.g. if patient is young and complains of progressive pain and gait problems, consider occult spina bifida. This seems like a very interesting strategy to me. Off course IBM Watson already failed, so it’s ok to be sceptic, but the usefulness of AI is not the topic of this post. What it made me question is how this AI recommendation could be expressed in a way that it’s computer interpretable in an openEHR ecosystem. Now: the access control work made me think from the perspective of policies. What if we could see the recommendation of AI as a constraint on a template, for the cardinality of information being recorded. E.g. an composition.content.instruction.service_request.MRI cardinality matches {1} constraint in the dynamic template. Now, probably this type of constraint is too strong and too dynamic. But I think a good there’s a lot of use for defining a cardinality/occurrences constraint independent of a specific templates. I imagine a combination of AQL, CDS hooks, GDL, ADL and access policy thinking. E.g. if obs.blood_pressure.systolic > 140 then cluster.sign.name matches ‘headache’ occurrences matches {1} Really curious for your thoughts. --- **Canonical:** https://discourse.openehr.org/t/policy-based-node-occurrences/5498 **Original content:** https://discourse.openehr.org/t/policy-based-node-occurrences/5498