trxid proc problem – driving me crazy

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf trxid proc problem – driving me crazy

  • Creator
    Topic
  • #49265
    Rich Durkee
    Participant

      I wrote a trxid proc. When I run it through the Testing Tool using a data file that has HL7 messages I keep getting this error:

      [0:TEST] Tcl error:

         msgId    = message0

         proc       = junk

         args       = ”

         result     = ‘wrong # args: should be “junk mh”‘

         

      Here is the trxid proc:

      proc junk { mh } {

               set trxId AAAAAA

               return $trxId

              }

      I realize this doesn’t do much. My original proc was much bigger but I kept cutting things out, trying to get rid of the error, until I ended up with this. I couldn’t make it any smaller but still get the error, so I have turned to the experts.

      I know it’s probably something small and stupid, but I just cannot see the problem.

    Viewing 3 reply threads
    • Author
      Replies
      • #61305
        Jonathan Hamilton
        Participant

          Where do you have the proc applied.  On the inbound tab of your thread you should have the ‘Trx id determination Format:’ set to ‘Fixed Record Layout (FRL)’ then when you click edit you need to change the radio button to ‘Proc:’ then select your proc from the list.

          My guess is you have the proc applied to the Inbound Data TPS stack.  Also to test a TrxId script you have to use the Route test with the proc applied to your NetConfig (as described above), not the TPS testing tool.

          Here is a TrxId script I wrote a while back for reference but I think you have the coding piece correct.

          proc trxid_irl_DoH { mh } {

             global env

             set debug 0

             set module “trxid_irl_DoH”

             package require utilities

             set data [msgget $mh]

             set mType [string trim [lindex [split $data “|”] 0] ” “]

             switch -exact — $mType {

                 L {set trxId “doh_lab”}

                 M {set trxId “doh_micro”}

                 default {set trxId “unknown”}

             }

             return $trxId ;# return it

          }

        • #61306
          Rich Durkee
          Participant

            Thanks, Jonathan, for giving me something to try. as I finally got it working. Here’s what I had to do:

            On the Inbound Tab, in the Trx id determination Format, I had to select “UPOC”, which allows you to enter the name of the trxid tcl program you write. It then started working.

            Also the testing tool started working after I changed the Inbound Tab, and used the Route test rather than the TPS test.

            Thanks again.

          • #61307
            Jonathan Hamilton
            Participant

              What version of Cloverleaf are you on?  Upto 5.4 there has never been an option for UPoC in the TrxID.

            • #61308
              Rich Durkee
              Participant

                I think they added that option in 5.4.1. It is in 5.5 and I imagine it will be in all future releases.

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