#150 ORL_O34 structure definition contains cycle

closed-fixed
5
2012-07-05
2012-06-26
Jure Grom
No

For this reason parsing ORL_O34 message cause StackOverflowError.

Current simplified definition (only relevant branch of message strucutre) is:
ORL_O34 -> ORL_O34_RESPONSE -> ORL_O34_PATIENT->ORL_O34_SPECIMEN->ORL_O34_ORDER->ORL_O34_OBSERVATION_REQUEST->ORL_O34_SPECIMEN (!cycle reference).
Instead of last ORL_O34_SPECIMEN there should be ORL_O34_OBSERVATION_REQUEST_SPECIMEN.

This is problem in v2.5 and v2.5.1.

TestCase:

import ca.uhn.hl7v2.parser.PipeParser;
import org.junit.Test;

/**
* @author Jure Grom
*/
public class ORLO34ParsingTest
{
@Test
public void testParse() throws Exception
{
new PipeParser().parse(message);
}

private static final String message =
"MSH|^~\\&|LIS|LAB|HIS|HOSP_SYS|20110329142202||ORL^O34^ORL_O34|90|P|2.5.1\r" +
"MSA|AA|12201\r" +
"PID|1||32XX77^^^^HIS_PAC||SAMPLE^PATIENT^^^^^L||19981126|M\r" +
"SPM|25081299|36201^0310170||K^kri-EDTA|||||||||||||20110329142201.267+0200|||||||||1\r" +
"ORC|OK|36201|02000110170|40201|||||20110329142201.312+0200||||||||||||44129-A^^^^^^ORG^^^Redna ambulanta\r" +
"TQ1|||||||||R\r" +
"OBR||36201|02000110170|020001^K-Hemogram^KC_PEK_LIS_PRE||||||||||||12345^TEST^DOCTOR||||||||O\r" +
"SPM|25081299|36201^0310170||K^kri-EDTA|||||||||||||20110329142201.267+0200|||||||||1\r";
}

Discussion

  • Christian Ohr

    Christian Ohr - 2012-06-27
    • assigned_to: nobody --> jamesagnew
     
  • James Agnew

    James Agnew - 2012-07-05

    This has been fixed and checked in. Note that it only appears to affect v2.5.1, but a unit test has been added which checks all versions (and any future versions).

     
  • James Agnew

    James Agnew - 2012-07-05
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks