Search Entire OBX segment

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Search Entire OBX segment

  • Creator
    Topic
  • #52022
    Gena Gill
    Participant

      I have a transcription system that sends MDM message types, but does not include any of the carbon copy doctors in the message except at the end of the body of the report, which is contained in OBX 5.  Because report lengths vary, these CC’s are never in the same place, so I’ve not been able to extract the CC’s from the message.

      In certain cases, I need to search the body for a specific provider’s name, and if found, copy certain information to another field.

      I’m thinking a TCL proc would probably be the best way to accomplish this, but as I’m just now learning TCL, have no idea what commands I’d use to search the OBX segment.

      Any ideas?

    Viewing 2 reply threads
    • Author
      Replies
      • #72755
        Jim Kosloskey
        Participant

          Gena,

          I recently had to do something similar to this.

          The difference I had is there was something in the OBX on which I could ‘anchor’. In other words I could find the Copy to DR’s OBX by a literal that was in the OBX-5 as I recall. That literal was only in the OBX-5 if the Copy to Dr info existed.

          What I did then is as I ITERATEd through the OBX Group I checked the OBX-5 to see if it contained the anchor (this is Cloverleaf 5.6 which has the ‘like’ oerator in the IF Action and I used this as I recall). If I found the ‘anchor’ then I retrieved the Doc info from either another field in the message (maybe even the OBX) or within the OBX-5 that contained the anchor.

          I may have had to use some Tcl at this point to get the Doc name but I only used Tcl for that specific purpose if at all.

          The bottom line is you can use the Xlate to search through the OBX to find the occurrence you are looking for. You may need some xltp tcl there depending on the situation but you should not need Tcl just to scan the OBX groups.

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

        • #72756
          Gena Gill
          Participant

            I think I’m trying to make this too difficult.  I’ll set up a test translation and play with it and see what I can come up with.

            Thanks!

          • #72757
            Gena Gill
            Participant

              I was able to write a 2-line TCL proc that I put on a copy in the translation where if a particular word was found it returned a state of “True”, and then was able to put the doctor’s number in the correct field.

              My next step is to play around with it and see if I can get it to work while referencing a table and matching that word to the doctor number.

              Thanks for your help, Ron.  You steered me in the right direction!

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