Error when attempting to add Lab Results from OLIS to INBOX
open source web-based Electronic Medical Record (EMR) system
Brought to you by:
davidhcchan,
jaygallagher
Here are the log messages
I think I found the pattern. When the OBR record has a collection date but no time then the error occurs. If the OBR record has both date and time then it can be loaded into the inbox - no problems.
I have been doing more digging into this and here is the OBR record:
OBR|1|64238_JW9210036-00_115^^2.16.840.1.113883.3.59.1:5687^ISO|64238_JW9210036-00_115^^2.16.840.1.113883.3.59.1:5687^ISO|TR10477-8^Complete Blood Count^HL79901|||20161116|||||||20161116142000-0500
According to the OLIS specification the date/time field after the HL79901 should be date/time and not just the date.
When MessageUploader parses the date/time it is expecting a date/time and generates "Error parsing obr date :" if the value is not date/time.
Below is the segment of code where we are failing
// reformat date
String format = "yyyy-MM-dd HH:mm:ss".substring(0, obrDate.length() - 1);
obrDate = UtilDateUtilities.DateToString(UtilDateUtilities.StringToDate(obrDate, format), "yyyy-MM-dd HH:mm:ss");
} catch (Exception e) {
logger.error("Error parsing obr date : ", e);
throw e;
}
That date Utility being used has messed up a lot of other labs too. Or depending on perspective - the labs have messed up the date utility.
This can be fixed by adding a couple of lines to compensate for the changes in date formats.
Dennis Warren
Consultant
Colcamex Resources
dwarren@colcamex.com
778.386.9264