Constraints
The Constraints tab first shows only the element/attributes from the base standard/schema. Element/nodes (or nodes) that are associated with constraints are bold.
After selecting a node in the tree, the constraint editor window opens on the right side of the screen. The view displayed in the constraint editor depends on whether the node has been constrained. The constraints editor view also varies with the “Role” selected for the template/profile editor as a whole (Analyst, Editor, and Engineer).
Computable constraints are constraints based on the element/attributes within the schema that can be represented using the fields supported by Trifolia (such as Conformance, Cardinality, Contained Template, Value Set, etc.). All computable constraints have a context, such as “@classCode”.
Primitive constraints are free-text constraints that cannot be represented using the standard computable fields within Trifolia. Primitive constraints are always shown below computable constraints so that the order of computable constraints can be preserved and accurately reflected in exports. Primitive constraints do not have a context; instead, primitive constraints show “N/A” for the context.
- To create a constraint on a node within the tree, select a node and select the + icon (Create Computable) icon in the header of the constraint editor.
- To create a primitive constraint at the top-level of the tree, select the T “Add Top-Level Primitive” icon located in the header of the tree, after the Value column.
- To create a primitive constraint within a computable constraint, select a computable constraint and select the T “Add Child Primitive” icon in the header of the constraint editor.
- To remove a constraint and return the node to the default definition of the schema, select the Trash can (Remove) icon in the header of the constraint editor.
- To create a note on a constraint (which is only available to template/profile authors, and is not included in exports), select the “Edit Note” icon in the header of the constraint editor.
- The constraint editor window can be expanded and collapsed with the "Minimize/maximize" in the upper left corner of the Constraint Editor window.
See FHIR > Extensions for information on using pre-defined/reusable extensions.