Table Lookup and Xlate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Table Lookup and Xlate

  • Creator
    Topic
  • #48548
    Femina Jaffer
    Participant

      Hello,

      Can I use the table lookup with an IF statement in the xlate.  I am having a difficult time and need someone to “guide me to the right path”.  We have a vendor that only allows certain doctors and cc’d doctors to pass / send across the interface.  Is it easier to do this via tcl and using a key1set, or can this be done in an xlate? If I use the xlate, how can or can I use the table lookup and list the values in it, and then use the xlate to check each value of the table lookup and compare against the fields? The PV1 7 has only one occurence of this DR, but OBR 28 could have multiple occurences of this CC Dr.  Any help, much appreciated.

      fsj

    Viewing 3 reply threads
    • Author
      Replies
      • #58952
        Rentian Huang
        Participant

          Femina,

          1. Setup a table and put all Dr’s names into it. ie. Dr. A -> Send, Dr. B -> NotSend, Default = NotSend

          2. In your Xlate, do a Table Lookup and pass that result to a Temp variable

          3. Use an IF action to check this variable and do COPY base on the result.

          Use ITERATE if you have multiply occurences in OBR.28.

          Sam   8)

        • #58953
          Femina Jaffer
          Participant

            Thank you so much.  Could you give me an example of how I could do this?  Because I tried doing this and I did not get it to work correctly.

          • #58954
            Jim Kosloskey
            Participant

              Femina,

              I am guessing this table could be quite dynamic – that is requiring frequent updates.

              If that is so, you might consider the impact on your Integration Engineers having to maintain this table.

              Now it does not matter whether you use a lookup table or Tcl if the information is dynamic. The maintenance impact could be unacceptable.

              If you still want to do this in the engine, I would suggest using a Table but just put the exceptions in the Table (with the default being the complement to the exception). That way the Table size can be reduced and potentially so can the maintenance.

              Then do the filtering in the routing (pre – Xlate) with a Tcl proc doing the Table lookup using the Lookup Table you configure.

              It is more efficient to do message filtering pre Xlate.

              Jim Kosloskey

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

            • #58955
              Femina Jaffer
              Participant

                Thank you everyone.  I finally got this to work.  

                Jim, I ended up using Rentian’s method as I was having trouble with tcl code to filter (I couldn’t figure out how to check for field type repitions) in OBR.

                FSJ

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