Implement group construct.

Description

Implement the construct shown in the following example:
SECTION[at0001] occurrences matches {0..1} matches { – Subjective
items cardinality matches {0..*; ordered} matches {

group cardinality matches {0..1} occurrences matches {0..*} matches { – sub-group of any number of problems & diagnoses
allow_archetype EVALUATION[at0006] matches { – Problem
include
archetype_id/value matches {/openEHR-EHR-EVALUATION\.problem\.v*/}
}
allow_archetype EVALUATION[at0007] matches { – Diagnosis
include
archetype_id/value matches {/openEHR-EHR-EVALUATION\.problem-diagnosis\.v*/}
}
}

allow_archetype EVALUATION[at0008] occurrences matches {1} matches { – Plan
include
archetype_id/value matches {/openEHR-EHR-EVALUATION\.plan\.v*/}
}
allow_archetype INSTRUCTION[at0009] occurrences matches {*} matches { – INtervention
include
archetype_id/value matches {/openEHR-EHR-INSTRUCTION\.plan\.v*/}
}
}

Proposed production rules:

group_block ::= 'group' 'matches' cardinality_constraint occurrences_constraint '{' ( object_block )+ '}'
cardinality_constraint ::= '{' n [ ';' uniqueness_constraint ] [ ';' ordering_constraint ] '}' | '{' n '..' m [ ';' uniqueness_constraint ] '}'
occurrences_constraint ::= '{' n '}' | '{' n '..' m '}'
uniqueness_constraint ::= 'unique'
ordering_constraint ::= 'ordered' | 'unordered'

See http://www.openehr.org/wiki/display/spec/Ordering+and+choice+in+archetypes+and+templates for details.

Status

Assignee

Unassigned

Reporter

Thomas Beale

Raised By

Thomas Beale

Affects versions

ADL 1.5 beta 1

Priority

Major
Configure