Tuesday, June 10, 2008

Values for status of properties

1. Not Permitted The property must never appear in an instance. Applications may raise an error if they receive it.
2. Optional The element may be supported by applications if they choose (and they must
declare their decision in their conformance statement). If not supported, the element must be ignored if received. I.e. Applications MUST NOT raise an error upon receiving an unsupported optional element.
3. Required The property must be supported by all applications (they are able to capture and/or display it), but won't necessarily always be present in an instance.
4. Populated The property must be supported (able to be captured and/or displayed) and must always appear in the instance, but may appear with a flavor of null
5. Mandatory The property must be supported and must always be present with a non-null
value.

In general, if an attribute (or data type property) is not available (i.e. cannot be valued), then the rest of the data type properties (mandatory or not) should not be present. Exceptions to this rule will be documented in affected data types (e.g. CD).

In addition, data type properties may indicate maximum lengths. Systems will be able to capture and display an element as long as the maximum length, but it will not be able to send an element that is longer. Therefore a sending application must never send more than allowed by the specification and receiving applications. If longer data is truncated (within the maximum length) a warning message should
be provided.