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

  1. SHALL contain 1..* entry
    1. SHOULD contain 1..1 entry, such that it
  2. SHALL contain 1..1 XXXX (template: oid)
    1. SHOULD contain 1..1 entry, such that it
  3. 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.