Product enhancement request: Dynamic Table Lookup

Clovertech Forums Cloverleaf Product enhancement request: Dynamic Table Lookup

  • Creator
    Topic
  • #121688
    Jim Kosloskey
    Participant

      I think it would be useful to have the TABLE Action of the Xlate have a dynamic capability.

      That is, currently one has to specify the name of the Table in the TABLE Action. It would be useful to have the ability to name the table dynamically at execution time in addition to or instead of, the static name. I am sure it can be done as I am about finished with a Tcl proc that does exactly that.

      I had a proc that did that with traditional tables and now I am adding the ability for use with DB Lookups as well. This feature allows for the design of a hierarchy of ‘driver’ tables wherein, for example, a client table would return a list of other table names that would be used for things a specific hospital or client had different than others (each of those tables might then also name other tables, and so on. Then in a multiple hospital or client environment common Xlates could be configured which are driven by dynamically following the hierarchy of Tables.

      If anyone is interested in this proc when I am finished in lieu of an enhancement to the product, email me and I will provide the tool and all of the support stuff for it.

       

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

    Viewing 1 reply thread
    • Author
      Replies
      • #121704
        Robert Kersemakers
        Participant

          Hi Jim,

          To dynamically name the required table, you could use the tcl command ‘hcitbllookup’ and a variable to define the name of the table. Right? That would be a workaround for what you want.

           

          What I would like to see is the ability to load in a complete table at runtime, so you can use both the in and out sides of the table to search for certain values.
          A normal TABLE operation will search for a specified value on the ‘in’ side and, if found, return the ‘out’ side value. However sometimes I need/want to use Tables differently. For example on the ‘in’ side I will have lists of several codes: “{A B C} {X Y}” and on the ‘out’ side will be a resulting code, say “R”. If the message contains a code A, B or C AND a code X or Y, then the resulting code will be ‘R’.

          I got this to work (a long time ago) by loading the complete Table as a variable:
          <pre>set recid “Combination_codes.tbl”
          TioReset $recid
          TioLoad $recid Combination_codes.tbl</pre>
          Not sure how long this solution will keep on working. For example it doesn’t work if the specified Table isn’t in the site of the running process, but in the Master site; this method doen’t work with master sites.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #121705
          Jim Kosloskey
          Participant

            Robert,

            Thanks, I have produced a proc that does what I want for both standard and DB Lookup Tables. My thought is this would be a nice enhancement to have built-in to the product as an Xlate Action. If anyone would like a copy of the proc(s) and User Doc I have built, they can email me.

            Yours is an interesting challenge especially to work within the expanding framework of the Cloverleaf architecture. Perhaps an API for Tables similar to NCI would be an answer to getting the table information you seek.

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

        Viewing 1 reply thread
        • You must be logged in to reply to this topic.