Announcement

Collapse
No announcement yet.

Multiple segment HL7 message and Strict Parser

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

  • Multiple segment HL7 message and Strict Parser

    I'm trying to generate HL7 message containing multiple segments (ORC and OBR in ORM-O01). I put ORM-O01 message to outbound template and I'm trying to modify it using JavaScript.

    TEMPLATE:
    MSH|^~\&|CLININET|NONE|Modu.||20020603121707||ORM^ O01|CLININET20020603121707|P|2.3|||AL|NE|POL||PL|
    PID||73051213886^^^^PESEL|17741||FIN^FRANCESCA||19 730512|F|||REDA&34^^CITY^^20-457|||||||||
    PV1|1|O||||||||||||||||||||||||||||||||||||||||||| ||||||||
    IN1|||134&HIS|KH&07R
    My destination transformer JavaScript:
    Code:
    var orc = <ORC> <ORC.2> <ORC.2.1>17741</ORC.2.1> </ORC.2> </ORC>;
    var obr = <OBR> <OBR.2> <OBR.2.1>obrTest</OBR.2.1> </OBR.2> </OBR>;
    for (var i = 0; i < 4; i++){
      	tmp['ORC'][i] = orc;
     	tmp['OBR'][i] = obr;
    }
    Until default parser (non-strict) is used everything is OK. My outbound mesage contains modified template.
    MSH|^~\&|CLININET|NONE|Modu.||20020603121707||ORM^ O01|CLININET20020603121707|P|2.3|||AL|NE|POL||PL|
    PID||73051213886^^^^PESEL|17741||FIN^FRANCESCA||19 730512|F|||REDA&34^^CITY^^20-457|||||||||
    PV1|1|O||||||||||||||||||||||||||||||||||||||||||| ||||||||
    IN1|||134&HIS|KH&07R
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    ORC|17741
    OBR|obrTest
    When I activate strict parser('use strict parser') outbound message contains untransformed template. I've also tried to use real (good) segments for orc variable. Result was the same.

    The question is: How to validate HL7 message generated using JavaScript. Is it possible to use some method that will return true when message is correct or false if not.

  • #2
    I'm having this problem too.

    Everything goes right (transformation from HL7 to XML using XSLT) when not using HL7 Strict Parse and Validation.
    Once I activate those two features it stops transforming the message... tho the messages are still sent (they are valid).

    What's the problem with this?

    Comment


    • #3
      Solved... Had to strip the namespaces!

      Comment

      Working...
      X