Design Patterns
This page is used to describe patterns that may be re-used in template/profile design. The goal of this page is to demonstrate methods of writing computable constraints for more complicated scenarios.
Alternative Entry Templates
Scenario: You have a section that needs to contain one of two entry templates, or both.
Example
- SHALL contain 1..* entry
- SHOULD contain 1..1 entry, such that it
- SHALL contain 1..1 XXXX (template: oid)
- SHOULD contain 1..1 entry, such that it
- SHALL contain 1..1 YYYY (template: oid)
Explanation
- The first constraint requires that at least one entry be present. It does not care what type of entry, just that at least one exists.
- The second and third constraints indicate what types of entries you should use.