Announcement

Collapse

Mirth Connect 4.1.0 Released!

Mirth Connect 4.1.0 is now available as an appliance update and on our GitHub page. Mirth Connect 4.1.0 includes new features such as new event log messages, additional fields to the Welcome to Mirth Connect screen, new information included in alerts as well as many smaller changes, updates, and improvements. This release also contains several improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Message parsing problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Message parsing problem

    Hi

    We encounter what seems to be a parsing error for the messages we been receiving. Below is a sample message:

    MSH|^~\&|CPSS||iPHARM|iPHARM|20060713003438||ORM^O 01|TUCP0607130034380001|P|2.3||||||||
    PID||D12345636A|||PATIENT NAME||19680617|M||||||||||||||||||||||
    PV1||O|||||||||||||||||||||||||||||||||||||||||||| ||||||
    ORC|NW|894373|||||||20060713003400|||11106F|WDSC|| |||||
    RXO|NS^cephalexin||||||||||||||||||||||
    RXR|||||
    ZCO||||OP
    ZXO|3|W2||20060713003437|||1|500MG|||
    RXO|0004-28-168-E^synflex||||TA||||||||||||||||||
    RXR|||||
    ZCO||||OP
    ZXO|2|W2||20060713003437|||2|275MG|||
    RXO|0004-56-018-E^famotidine||||TA||||||||||||||||||
    RXR|||||
    ZCO||||OP
    ZXO|2|W2||20060713003437|||3|20MG|||

    Using hl7 inspector (http://www.elomagic.de/index.php?page=hl7), The parsed message shows all RXO (and RXR, ZCO, ZXO) are on the same level, but when mirth parses the message. The first RXO component is one level above the other RXO components. This causes a problem when we are trying to obtain the RXO data. Is this a HL7 message template problem or something wrong with the library? Thanks

  • #2
    Re: Message parsing problem

    I wouldn't necessarily classify this as an error, but a different way of parsing the messages. We will look into the HAPI libraries and see how this situation is handled and what the options are.

    In terms of getting the RXO data, you can use this syntax:

    for (rxo in msg..RXO){
    var test = rxo['RXO.1']
    }

    the syntax msg..RXO will get all RXO segments in the message in order, no matter which level they occur.
    Chris Lang

    Comment

    Working...
    X