So it looks like this was an error in my test cases and this is not an issue at all.

A colleague of mine pointed out that I had test cases that had an hour field but did not populate the minutes field.

That is quite clearly against the spec format, I had better read the spec more thoroughly next time :-)

We were using the NoValidation validation context which has let us get away with no minute test cases in the past.

Sorry for the confusion.

-Mike



On 3/11/2020 10:10 am, Mike Mills wrote:
I have been working a lot with DT and TS fields in Hapi.

If you create a default ADT_A01 message and attempt to set a new MSH-7 value it will throw a DataTypeException if that field is not fully populated with fields of Year through to Seconds.

In the API documentation it states that the field can have this format:


YYYY[MM[DD[HHMM[SS[.S[S[S[S]]]]]]]][+/-ZZZZ]


But if you attempt to just use the YYYYMMDD format with no time components then you get an exception.


So what is correct validation for this field, the spec as defined in the TsComponentOne api documentation or the time specified down to seconds?





_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to