Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updates for Length and FractionDigits

...


Attributes:

OIDoid

Namename

DataType(text | integer | decimal | float | double | date | time | datetime | string | boolean | double | hexBinary | base64Binary | hexFloat | base64Float | partialDate | partialTime | partialDatetime | durationDatetime | intervalDatetime | incompleteDatetime | incompleteDate | incompleteTime | URI )

LengthpositiveInteger(optional)
SignificantDigitsFractionDigitsnonNegativeInteger(optional)
SASFieldNamesasName(optional)
SDSVarNamesasName(optional)
Origintext(optional)
Commenttext(optional)

...

An ItemDef describes a type of item that can occur within a study. Item properties include name, datatype, measurement unitsrange, range or codelist restrictions, and several other properties.

The DataType attribute specifies how the allowable values and the intended use of the corresponding value elements, but not necessarily how systems will store them. The receiver is expected to preserve the value and precision of the data and can use the ODM-specified datatype to determine the best representation of the data in their system.

The Length attribute is optional for all datatypes.  are to be interpreted for comparison and storage. The Length attribute is required when DataType is text or string, optional when DataType is integer or float, and should not be given for the other datatypes. The SignificantDigits attribute is optional when DataType is float, and should not be given for the other datatypes. When DataType is float both Length and SignificantDigits must be given or both be absent.

Note: In version 1.3.0 2 the usage of Length and SignificantDigits was ambiguous. The above text clarifies the intention of these two attributes.

If DataType=integer, Length=N is a requirement that the receiving system be able to process and store all whole number values of magnitude less than 10N. Larger values may be rejected.

If DataType=float, Length=N and SignificantDigits=S is a requirement that the receiving system be able to process and store all numeric values of magnitude less than 10N-S that are multiples of 10-S. Larger values may be rejected. Intermediate values may be rounded to the nearest multiple of 10-Sattributes were used to express the requirements for the receiving system.  In version 2.0.0 the meaning of the Length attribute remains the same for the text and string datatypes, but was changed for the numeric datatypes and became optional for all datatypes.  The SignificantDigits attribute was renamed to FractionDigits.

If DataType=text or string and the Length attribute is provided, Length=N is a requirement that the receiving system be system be able to process and store all text string values of length less than or
equal to N. All characters are allowed are allowed in text string values. Data of type Text should be transmitted in an ItemDataString element.

For all the other datatypes when the Length attribute is provided, Length=N means that when a value of an item is represented as a text, its length must be less or equal to N.

Length is a statement Note: Length and SignificantDigits are statements about an item's data s data values, not the number of characters used to represent these values in value in value elements. For example, the character "<&lt;" might be represented as
"&amp;lt;".

There are 3 datatypes available for floating-point values: decimal, float and double. The decimal datatype represents a subset of the real numbers, which can be represented by decimal numerals. This datatype should be used for items with floating-point values when the number of decimal places is known in advance. In this case, attribute FractionDigits should be used to define the maximum number of fractional digits, or digits after the decimal point. FractionDigits controls the size of the minimum difference between item values by restricting the values to numbers that are expressible as i x 10-n where i and n are integers and 0 <= n <= FractionDigits. For the decimal datatype, Length=N means that the number of characters required to represent the full numeric value, including the decimal character, must be less than or equal to N.  For datatype decimal, the Length and FractionDigits attributes must both be present or both be absent.

In case the number of decimal places is not known in advance or is not important, either float or double datatypes should be used. Both of them are patterned after the IEEE floating-point types. DataType=float corresponds to 4-byte single-precision floating-point type, with the basic value space consisting of the values m x 2e, where m is an integer whose absolute value is less than 224, and e is an integer between -149 and 104, inclusive. DataType=double corresponds to 8-byte double-precision floating-point type, with the basic value space consisting of the values m x 2e, where m is an integer whose absolute value is less than 253, and e is an integer between -1075 and 970, inclusive.

Note: Data Note: Data characters that are not included in the encoding character set for a particular ODM file must be represented using XML entities or character references. For example, Æ could be represented as "&#198;".

...

The Question element contains the text shown to a human user when prompted to provide data for this Item. The ExternalQuestion element does the same but refers to an externally defined question. If both are present, they should be consistent.The MeasurementUnitRefs list the acceptable measurement units for this type of item. Only numeric items can have measurement units. If only one MeasurementUnitRef is present, all items of this type carry this measurement unit by default, i.e. if a MeasurementUnitRef is defined on the ItemDef, and no MeasurementUnitRef is given on the corresponding ItemData, the value given by the ItemData has the units given by the ItemDef-MeasurementUnitRef.
If no MeasurementUnitRef is present on the definition of a numeric Item, the Item's value is scalar (i.e., a pure number).

The RangeChecks constrain the acceptable values for items of this type.

...