ItemData values being imported are validated against data type and length.

During data import the XML Entity representation of characters in ItemData values are treated as literals. So an Item Data value of

“bread” & “butter”

would be exported as

"bread" & "butter"

and if it were then imported back into OpenClinica would be saved as

"bread& amp;quot; & amp;amp; & amp;quot;butter& amp;quot;

Whitespace, including linebreaks and tabs in ItemData values are preserved, but the validations on different data types react differently to whitespace.  Single-select and multi-select values do not accept whitespace upon import, instead generating the hard validation check error message, This is not in the correct response set.  Whitespace generated in date types passes validation, but is stripped out and does not re-export; tabs are kept in other data types, but returns are not kept.

For example, a set of Items in XML that is imported as the following:

            <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_06″ Value=”Heart Attack      “/>

             <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_07″ Value=”2009-12-16       “/>

             <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_08″ Value=”11/02/2009         “/>

Will be returned as the following:

             <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_06″ Value=”Heart Attack”/>

             <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_07″ Value=”2009-12-16″/>

             <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_08″ Value=”11/02/2009″/>

Items imported with non-ASCII characters will be exported using escaped ASCII codes.  For example, the following line

            <ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_06″ Value=”??? ????”/>

 

Will be returned as the following:

<ItemData ItemOID=”I_GROU_TC_ADV_PRIMARY_06″ Value=”&#1087;&#1088;&#1086; &#1099;&#1091;&#1080;&#1091;  “/>

Note that, if the above ASCII values are copied and inserted back into the database, they are still saved as UTF-8 values, and will be exported the same way, without any degradation (as in the above example with XML escaped characters).