Menu

#4476 Error when attempting to add Lab Results from OLIS to INBOX

OSCAR Main Trunk
open
nobody
None
7
2016-11-22
2016-11-18
No

Getting "ERROR" when trying to add a lab report for a patient to the Inbox. From the log it looks like there is an error with the date.

This is a report from Liblabs and this does not happen with all of them. I have not been able to see a pattern yet.

The doctor is able to view the results by just selecting Preview, but she is unable to add the lab results to the patients echart.

See attached log entries and screen shot.

1 Attachments

Discussion

  • Adolph Kahan

    Adolph Kahan - 2016-11-18

    Here are the log messages

     
  • Adolph Kahan

    Adolph Kahan - 2016-11-18

    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.

     
  • Adolph Kahan

    Adolph Kahan - 2016-11-22

    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;
    }

     
    • DWarren

      DWarren - 2016-11-23

      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.

              String dateFormat = "yyyy-MM-dd HH:mm:ss".substring( 0, time.length() );
              this.dateTimeObr = UtilDateUtilities.getDateFromString(time, dateFormat);
      

      Dennis Warren
      Consultant
      Colcamex Resources
      dwarren@colcamex.com
      778.386.9264

      On Nov 22, 2016, at 2:55 PM, Adolph Kahan awkahan@users.sf.net wrote:

      |20161116