6.2.3 Inclusion of Templates

A Template may specify another Template to be included by specifying “INCLUDE” in the Value Type field and the identifier of the included Template in the Concept Name field. All of the rows of the specified Template are in included in the invoking Template, effectively substituting the specified template for the row where the inclusion is invoked. Whether or not the inclusion is user optional, mandatory or conditional is specified in the Requirement and Condition fields. The number of times the included Template may be repeated is specified in the VM field. Template Parameters

A Template that is included by another Template may include parameters that are replaced by values defined in the invoking Template. Parameters may be used to specify coded concepts or Context Groups in the Concept Name, Condition, or Value Set Constraint fields of a Template.

An included Template that accepts parameters shall be introduced by a table listing those parameters of the form:

Parameter Name Parameter Usage

Parameters are indicated by a name beginning with the character "$".

The invoking Template may specify the value of the parameters in the included Template by name in the Value Set Constraint field of the INCLUDE row. The parameter in the included Template shall be replaced by the specified parameter value. Specification of a parameter value shall be of one of the following forms:

Notation Definition
$parametername = EV or DT (CV, CSD, "CM") The parameter passed to the template is the specified coded term.
$parametername = (CV, CSD, "CM") The parameter passed to the template is the specified coded term, used as a parameter in a Condition field of the included Template.
$parametername = BCID or DCID (CID) CNAME The parameter passed to the template is the Context Group.
$parametername = MemberOf {BCID or DCID (CID) CNAME} The parameter passed to the template is a single coded term from the Context Group in curly braces.

The specification of a parameter value is valid only for the directly included template. Therefore, it needs to be explicitly respecified in templates intermediate between the originally specifying Template and the target Template. The intermediate Template may use the same parameter name as used by the Template it invokes; in such a case, the intermediate Template would invoke the subsidiary Template with a specification in the Value Set Constraint field such as:

$parametername = $parametername

Note: In this case, the left hand instance of $parametername is the name in the subsidiary template, and the right hand instance is the (parameterized) value passed into the current template.

The invoking template is not required to specify all parameters of included templates. If not specified, the value set (term or context group) for that parameter is unconstrained. An unconstrained value in a Condition will cause the condition to fail.