Tcl to split ORU_R01 result based on OBR.4.1 value

Homepage Clovertech Forums Read Only Archives Cloverleaf Tcl Library Tcl to split ORU_R01 result based on OBR.4.1 value

  • Creator
    Topic
  • #51898
    Tom Gilbert
    Participant

    Hope this is not to confusing.  I have a result ORU_R01 message coming from our lab system.  Our problem is that if a Micro Biology Result is in the message and we have to extract it and send as a seperate HL7 message and the rest of the result can go but w/o the Micro Biology Result.

    The plan is to look at the OBR.4.1 and if the code begins with ‘MB’ that that states the result that follows is a Micro Biology Result. So the previous line ‘ORC’ and down to the next ‘ORC’ line but not inclusive needs to be extracted and creates it’s own HL7 message.

    Does any have a tcl or xlate to handle this process.

Viewing 0 reply threads
  • Author
    Replies
    • #72177
      Jim Kosloskey
      Participant

      Tom,

      Given what is stated, this should be relatively simple to do in an Xlate.

      You will need Tcl in the Xlate to get the first 2 characters of OBR-4.1 and put them in a temp variable (for example), then you can do an IF Action against the temp variable to see if it is equal to ‘MB’.

      If it is equal you would create a message and CONTINUE, if it is not equal, then you would create a message and CONTINUE.

      You would need a SUPRESS at the beginning of the Xlate to stop Xlate from producing it’s default message.

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

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

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,448
Topic Tags
288
Empty Topic Tags
10