I am trying to create an archetype that screens for health risks. All the questions have ordinal data. Based on the values selected for the questions, the consolidate risk value is calculated.
I want the UIi to display appropriate warnings (coloring the risk value etc) based on a reference range for the value. How can I include the reference range in the archetype so that the UI can read that and display the warnings?
This is a common scenario, that right now is mostly handled in application code.
My understanding of normal_range/reference_ranges (part of the quantity model) is that these are intended to carry the normal ranges that apply to a biological observation such as lab_test or perhaps imaging_ exam, rather than (as in your case) a sort of rule that is applied to caclulate or categorise risk.
The most high profile comparable example I know of , is the NEWS score.
Archetype at NEWS (UK RCP), Published archetype [Internet]. openEHR Foundation, openEHR Clinical Knowledge Manager [cited: 2017-04-13]. Available from: http://openehr.org/ckm/#showArchetype_1013.1.2423
There is also some interest in folding aspects of GDL inside archetypes as part of the ‘rules’ aspect of ADL. One of the barriers to getting this working at scale, is deciding what ‘vendor-neutral’ rules definition language to use. Not everyone is a fan of javascript but I do see some potential in this space given its ubiquity in the market.