Process OBX before TXA

Homepage Clovertech Forums Read Only Archives Cloverleaf Tcl Library Process OBX before TXA

  • Creator
    Topic
  • #52753
    Josh Stanek
    Participant

    Hello,

    What I need to do is set the TXA.17 field to a certain string based on a value in the OBX.5 [repetitive] field.  When testing my code, what looks to be happening is that I’m able to find the OBX.5 value, but only AFTER it processes thru the TXA segment.  Therefore, when I put the message back together, the TXA.17 isn’t changed correctly.

    What I need to do is somehow process thru the OBX segment prior to the TXA.  Is this possible within a single tcl-proc?  If so, how?

    Thanks,

    Josh

Viewing 0 reply threads
  • Author
    Replies
    • #75383
      Jeff Dinsmore
      Participant

      You have a few options.

      1) you can loop through the message twice – once to get the OBX info you need, then a second time to make changes to the TXA.

      2) you can do something similar to #1, but use your regexp and/or string tools to find the OBX(s) in the message string, then loop through the message making the required TXA changes.

      3) Or, build a library of Tcl procs to read and write HL7 messages (my personal favorite). That way, you can parse the message, direct-access the OBX info you need for your decision, then write required changes directly to the TXA. When you’re done, encode the modified message and send it on its way.

      Jeff Dinsmore
      Chesapeake Regional Healthcare

Viewing 0 reply threads
  • The forum ‘Tcl Library’ is closed to new topics and replies.

Forum Statistics

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