I've always followed advice like
http://www.hl7resources.com/Public/index.html?a55433.htm
and constructed my own as YYYYMMDDHHMMSS + right(system_uptime_seconds,6)
For some reason the HAPI JavaDocs at
http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/...
are no longer working, so I can't see if you can drop that in or not.
Tom
On 18/10/17 23:53, Mike Mills wrote:
Hi,
we have had an interface in production fail when we try to create a
new message and call .initQuickstart().
What is happening is the id_file is read and the value is coerced into
a number. Unfortunately the code uses an Int (10 chars long, max
value 2147483647) so once the value in the id_file is increased beyond
that limit this error occurs.
Is this a known limitation with using initQuickstart?
We have fixed it by resetting the value in the id_file to 1 (not ideal
as it no longer guarantees uniqueness)
As the MSH-10 is a string up to 20 chars surely this would work with
Long values (19 chars max value: 9223372036854775807)?
To replicate this issue create an id_file in your working dir with
value: 2147483600
Then run this code:
Message msg = new ADT_A01();
msg.initQuickstart("ADT","A01", "X");
// throws NumberFormatException
-Mike
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel