Upon saving a template, the Validation tab shows recommendations and warnings based on the constraints defined in the template. The following rules are taken into consideration:

  • Template context is not found within the schema. In earlier versions of Trifolia (prior to version 2.0), users could free-text the template context-type.  If the context type was spelled incorrectly, the schema validation would fail.  Template context validation could also fail if we changes/updates are made to the schema, and the portion of the schema that the template represents no longer exists. One example of this is with FHIR profiles.  If any resource types is removed, then the context of templates built on that resource type would not be able to be found in the schema.
  • Custom Schematron Syntax. Trifolia compiles all custom Schematron when the template/profile is saved and determines if the Schematron is syntactically correct.
  • Primitive constraint with no prose. Occurs when creating a primitive constraint but not specifying the constraint prose. Primitive constraints without any prose are ignored during export.
  • Constraint’s context not found in schema. This can occur in templates that were designed using legacy versions of Trifolia, which allows template/profile authors to freely edit the context of the constraint. This can also occur when a template/profile has been moved from one type/context to another type/context (ex: section to entry) and the constraints within the template/profile have not been reconciled to the new type’s structure.
  • Branch/slice without identifiers. At least one identifier should be present within every branch/slice to indicate how the one branch/slice is different from other branches.
  • Invalid contained template. The context of a contained template/profile does not match the data-type of the constraint containing the template.
  • Invalid constraint cardinality. The constraint loosens the cardinality requirements from the base standard/schema (ex: base schema requires 1..1 code and a constraint in the template/profile indicates 0..1 code).