I use a tcl in my xlate to format the timestamp from YYYMMDDHHMM to YYYY-MM-DDTHH:MM:SS
The seconds (SS) are always set to “00” in the tcl.
When I run the xlate in the Testin Tool I get the following error:
MESSAGE 1
[0:TEST] Warning: The format of source value ‘2011-09-08T16:47:00’ is inconsistent with its type: ‘ts’
[0:TEST] Message encode warnings: Error generated during parsing. – Element ‘datotid’ got Datatype error, Type:SchemaDateTimeException, Message:buffer not initialized yet!. – Line 1, Col 130
Output validation errors: Error generated during parsing. – Element ‘datotid’ got Datatype error, Type:SchemaDateTimeException, Message:buffer not initialized yet!. – Line 1, Col 130
[0:TEST] Error generated during parsing. – Element ‘datotid’ got Datatype error, Type:SchemaDateTimeException, Message:buffer not initialized yet!. – Line 1, Col 172
If I then “Hardcode” the value “2011-09-08T16:47:00” in the xlate instead of taking it from the HL7-message there is no problem parsing it to the xml datetime-field.
MESSAGE 1
testDatoTid.datotid.#text: >2011-09-08T16:47:00< If I get the timestamp from a text-field in the HL7-message I can also format and parse it to the xml datetime-field without problems.