TPS Proc Arguments

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TPS Proc Arguments

  • Creator
    Topic
  • #53927
    Andrea Mancini
    Participant

      Hi, I am very new and completely forgot how to add arguments to the “arguments” box when specifying a TPS proc.  Can someone give me the syntax?

      i.e. SITE WIH or SITE “WIH”

    Viewing 4 reply threads
    • Author
      Replies
      • #79563
        David Barr
        Participant

          Usually it is something like this:

          { SITE WIH }

        • #79564
          Andrea Mancini
          Participant

            WOW that was quick!  My first post!

            Thanks, that didn’t seem to work.

            This is the code in the “start” section

            # Get the “SITE” argument

            set site [keylget args ARGS.SITE]

            This is the code calling it…

            # Do table lookup here by site argument

            set sLookUpValue [hcitbllookup tbl_FacilityByEpicDept $MSH3]

            # If it’s not the site that was passed in via argument, then kill the message

            if { $sLookUpValue ne $site } {

            puts “KILLING message: Invalid site 2.”

            set disp KILL

            }

            This is my error in the testing tool:

            Please Wait ……

            Command Issued: hcitpstest -r run -x ASCII -f nl -c sms_ib_data /hci/cis6.0/integrator/site_dev_alm/data/Cerner_WIH_ORU_Basic_Out.dat “tps_filterByFacility { SITE WIH }”

            Command output:

            [0:TEST] Tcl error:

            msgId = message0

            proc = ‘tps_filterByFacility’

            args = ‘{ SITE WIH }’

            result = ‘can’t read “site”: no such variable’

            errorInfo: ‘

            can’t read “site”: no such variable

               while executing

            “if { $sLookUpValue ne $site } {

            puts “KILLING message: Invalid site 2.”

            set disp KILL

            }”

               (procedure “tps_filterByFacility” line 51)

               invoked from within

            “tps_filterByFacility {MSGID message0} {CONTEXT sms_ib_data} {ARGS {{ SITE WIH }}} {MODE run} {VERSION 3.0}”‘

          • #79565
            Jim Kosloskey
            Participant

              I am guessing the code referencing ths variable ‘site’ is in the ‘run’ section,

              So if that is true, did you specify ‘site’ as a global?

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

            • #79566
              Andrea Mancini
              Participant

                Thanks Jim!  I thought if you set a local variable in the “start” section that it could be called in the “run” section.  Just using a copied proc from my instructor!  Thanks again!

              • #79567
                Jim Kosloskey
                Participant

                  Andrea,

                  The important thing is now YOU know  ðŸ™‚

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

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