Skip to main content
. 2013 Jan 22;13:11. doi: 10.1186/1472-6947-13-11

Figure 5.

Figure 5

Algorithm in pseudo-code for mapping the structural constraints of archetypes to semantically comparable structures within the EHR system data model. The algorithm starts with function main(). It has access to the variable archetype, which holds the comprehensive archetype. Function create_FORM_from() creates a new form within the EHR system. Function is_leaf_node() tests whether a node is a leaf node of the archetype hierarchy, i.e., does not hold subnodes. Function is_repeating_node() tests whether a node has a greater maximum occurrence than 1. Function create_MULTI_ENTRY_FIELD_from() creates an entry field for a leaf node that may be dynamically duplicated during documentation and associates it with a label that integrates the names of all parent nodes to make the entry field’s context obvious. It further stores the complete path of the archetype leaf node, which is later used for the creation of EHR extracts from the collected data. Function create_SINGLE_ENTRY_FIELD_from() does the same for a single entry field.