Help XLT with two message types in the same thread

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Help XLT with two message types in the same thread

  • Creator
    Topic
  • #53529
    Hyo-Chan Lee
    Participant

    I have the inbound  lab HL7 messages with ORM^O01 and ORU^R01 both message types in same thread.

    If the message type is ORU^R01 then i want to copy  a field OBR-7 to OBR-27.    

    I set ORU message in XLT and when I receive the type ORM, there is an error from the testing tool, MESSAGE 1

    [0:TEST] [mid:0x1528a9c] The # 1 segment encountered ‘OBR’ is out of order for message type ‘ORM_O01’.  Segment ignored.

    0(0).MSH(0)  : >|^~&|XXXXXXX||||20130122090300||ORM^O01|193021487|P|2.3< Anyone can help me for how can I set a Variant and a message in XLT inorder to handle both message types? Thanks, Hyo-Chan

Viewing 8 reply threads
  • Author
    Replies
    • #78003
      bill bearden
      Participant

      Greetings,

      When I have that problem, what I have done is created separate routes for each message type. I go in to the route, create one for ORM_.* (or something like that that matches your trxid proc) and I put the ORM xlate on that route. Then I add another route to the same place for ORU_.* and use the ORU xlate on that one.

      I don’t know if that is the best way to do it. It is just what I have done. I create 2 xlates, one for ORM and one for ORU.

      Bill

    • #78004
      Jim Kosloskey
      Participant

      Create 2 Xlates one for the ORM and one for the ORU. Then in your route definition specify the ORM Xlate for the ORM and the ORU Xlate for the ORU.

      Each of the Xlates can use the same variant for inbound and will simply reference the appropriate Message structure.

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #78005
      Hyo-Chan Lee
      Participant

      It seems to me that two routes will work.

      I’ll try and let you know.

      Thank you.

      Hyo-Chan Lee

    • #78006
      Charlie Bursell
      Participant

      What is wrong with routing both through the same translate?  Easier to maintain.

      Just make sure though the use of optional segments that both look the same.

      Then if you need to do something different for the R0i do something like:

      if MSH.9.1 eq “R01”

      Just a thought

    • #78007
      bill bearden
      Participant

      Charlie,

      I am interested to know how this would work. I have never been able to get certain combinations of messages to go through the same xlate because the variant on the xlate must be one or the other. How does the xlate deal with the segments that are in one type of message (e.g. ORM) but not in the other (e.g. ORU) if the variant you choose is the second one?

      Thanks,

      Bill

    • #78008
      Charlie Bursell
      Participant

      It will work as long as the segments in all messages are squentially the same.  Just make the segments that are not common optional.

      Same as for ADT.  Will work for most but not for ADT_A17 because not sequentially the same – repeating PID/PV1

    • #78009
      John Stafford
      Participant

      Charlie Bursell wrote:

      It will work as long as the segments in all messages are squentially the same.

    • #78010
      Charlie Bursell
      Participant

      What I mean to say is, why would you not be able to define the PID/PV1 group as repeating, with non-A17 messages having just a “single repetition”?

      You would change the addressing of this and subsequent segments.

      With ADT I make all events look exactly the same in the variant.  Use A01 or A08 as the model.  Make sure any segments not common to all are formatted.  Make sure everyone also contains the Z segment at the end.  Make it optional

      On the output side you may have to do the same.  You may be able to use the same variant for each

      I *ALWAYS* use a single Xlate for all ADT messages (Except A17).  Why would I want to maintain 15 different Xlate configurations if I can do it with one.  Almost all the translations apply to all messages and where they do not use an IF statement

    • #78011
      John Stafford
      Participant

      Ah, since it would create a new group, the addresses for all of the subsequent segments would be incremented. That does make sense.

      As for the issue I’m having with A02/A03 and my custom segment, it is being translated into a FRL. The FRL is the same for all message types, but it appears that the inbound message is not mapping correctly to the input variant. I used A08 as the foundation, but I made some changes to accommodate for all message types (added an MRG segment to group 0, and a ZAC segment to group 6).

      When I run through the testing tool, I do not get any messages about segments not being defined, or being out of order. It just doesn’t seem to find the ZJM segment and therefore doesn’t do anything with it.

      Edit: After messing around a bit, I realized that it appears to be using the ADT_A02 variant definition for A02s, even though the xlate specifies that it should use the A08 input format. Within the A02 variant, the ZJM segment is in group 2. I guess I have to copy the modified A08 message structure to every message type? I thought that specifying that ADT_A08 was the input format within the xlate would force it to use it, regardless of what message type came in.

Viewing 8 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10