Jason Garrant

Forum Replies Created

Viewing 9 replies – 1 through 9 (of 9 total)
  • Author
    Replies
  • in reply to: GM 5.0 #74360
    Jason Garrant
    Participant

      To expand on #3, I would like to be able to suppress or parametize the site daemon.  Currently it will reflect ‘dead’ if the daemon is up and running properly, if  a thread or process is dead.  This will lead to confusion for hlep desk, as there are processes that shoudl remain dead, to which they willnot have access, as we will not give them access to the threads associated.

      Thanks,

      Jay

      in reply to: Migration from 3.0 to 5.0 questions #74155
      Jason Garrant
      Participant

        I was able to install 5.0 on the same server that 3.0 is currently running without affecting 3.0.

        in reply to: ODBC process hangs and stops processing #73963
        Jason Garrant
        Participant

          This is the code in the startup:

          start {

          set sql_stmt “Startup”

          set conn_rVal [{namespace}::odbc_connect]

          return “”

                }

          Where in the curly braces you putyour name space.  By creating the procs int he namespace, makes it easier throughout the code if you lose connectivity to simply call it.

          Here is the odbc_connect proc:

          proc odbc_connect {args} {

                 global hdbc hstmt henv dsn usr pass

                 global HciConnName server from subject address

                 #Setting database connection variables

                 #Table to insert into

                 set dsn TableToInsertInto

                 #Username to use for access

                 set usr UserName

                 #Password

                 set pass Password    

                 set err [odbc SQLAllocHandle SQL_HANDLE_ENV SQL_NULL_HANDLE henv]

                 set err [odbc SQLSetEnvAttr $henv SQL_ATTR_ODBC_VERSION SQL_OV_ODBC3 0]

                 #Allocate connection handle

                 set err [odbc SQLAllocHandle SQL_HANDLE_DBC $henv hdbc]

                 #Make an ODBC connection by passing user id and password

                 set err [odbc SQLConnect $hdbc $dsn SQL_NTS $usr

          SQL_NTS $pass SQL_NTS]

                 set retries 3

                 set sleep_int 5

                 while {$retries && [string equal $err SQL_ERROR]} {

                   sleep $sleep_int

            set err [odbc SQLConnect $hdbc $dsn SQL_NTS $usr

          SQL_NTS $pass SQL_NTS]

                    incr retries -1

                 }

                 if {[string equal $err SQL_ERROR]} {

              set rVal [{namespace}::odbc_error hdbc]

                  set logRet [{namespace::logSQLStatement $rVal]

                 }        

                 return $err

              }

          This is the proc I use to send the statement:

          proc odbc_sql {sql_stmt} {

                 global hdbc hstmt henv dsn usr pass

                 global HciConnName server from subject address

                 

                 set err SQL_ERROR

                 echo ODBC_SQL:>>>>> $sql_stmt <<<<<<<

          # Drop previous statement handle & create new handle

          catch {odbc SQLFreeStmt $hstmt SQL_DROP}

          #checking to see if we are still connected. Doing a get date from database to check connection

          catch {set err [odbc SQLAllocHandle SQL_HANDLE_STMT $hdbc hstmt]}

                 if {[string equal $err SQL_SUCCESS]} {

                   set db_chk_sql “select getdate()”

           set err [odbc SQLAllocHandle SQL_HANDLE_STMT $hdbc hstmt]        

           set err [odbc SQLExecDirect $hstmt $db_chk_sql SQL_NTS]

                 }          

                 if {[string equal $err SQL_ERROR]} {

                     if {[string equal $err SQL_ERROR]} {

                        set err [{namespace}::odbc_connect]

                     }  

                 }  

                 

                 if {[string equal $err SQL_SUCCESS]} {

           catch {odbc SQLFreeStmt $hstmt SQL_DROP}

           set err [odbc SQLAllocHandle SQL_HANDLE_STMT $hdbc hstmt]        

           set err [odbc SQLExecDirect $hstmt $sql_stmt SQL_NTS]

                     return $err

                 }

                 return hdbc

              }

          Let me know if this helps or if you need more info.

          in reply to: Global Monitor for Operations monitoring #73177
          Jason Garrant
          Participant

            This functionality is available in GM 5.0.

            in reply to: ODBC process hangs and stops processing #73960
            Jason Garrant
            Participant

              There are a limited number of connections you can make at one time.  I encountered a similar issue.  I resolved this by connecting to the database in startup, and just making sure I am still connected prior to sedning, if I am not connected, then I reconnect.  

              What was happening with me was during busy times, the connections woudl not time out and close in time for me to make more connections.  

              The other problem might be you log files are getting too big causing the process to choke.  I would suggest limiting if not removing all of your echos.

              in reply to: setroot and setsite in a tcl proc for windows #70213
              Jason Garrant
              Participant

                Hi Max,

                It’s saying there is no such file or directory.  I followed the path, and it is there, but it is still coming back with the error.

                in reply to: easy expression question #70228
                Jason Garrant
                Participant

                  Assumptions:

                  1. orignialList is the list of segments from FINAL Cytology to the end of list

                  2. obxList is the list that will be contain the final list of obx.5’s that will be sent out.

                  Code:

                  set foundAddenda 0

                  set obxlist “”

                  #loop through list of obx.5’s looing for the addenda line

                  foreach item $originalList {

                    if {[string equal “PROCEDURE/ADD…” $item]} {

                       #if the addenda line is found set found variable to 1

                       set foundAddenda 1

                    }

                  }

                  #if the addenda flag has not been set

                  if {[string equal $foundAddenda 0]} {

                    set stopRequest 0

                    #since there is no addenda only take up to electronic sig line

                    foreach line $originalList {

                       if {[string equal “(Electron…” $line} {

                          set stopRequest 1

                       } else {

                       }

                       if {[string equal $stopRequest 0]} {

                          lappend obxList $line

                       } else {

                       }

                    }

                  } else {

                    set obxList $originalList

                  }

                  in reply to: easy expression question #70226
                  Jason Garrant
                  Participant

                    Hi Mark,

                    I might be confused about what you are looking for, but if you are saying if the HPV line is somewhere in the list, then take the whole list.  If HPV is not anywhere in the list then take up to the electronic sig line.  The following code will accomplish this.

                    Code:

                    set foundHPV “”
                    set obxlist “”
                    foreach item $originalList {
                      if {[string equal “The HPV…” $item]} {
                         set foundHPV 1
                      }
                    }

                    if {![string equal $foundHPV 1]} {
                      set stopRequest 0
                      foreach line $originalList {
                         if {[string equal “(Electron…” $line} {
                            set stopRequest 1
                         } else {
                         }
                         if {[string equal $stopRequest 0]} {
                            lappend obxList $line
                         } else {
                         }
                      }
                    } else {
                      set obxList $originalList
                    }

                    in reply to: easy expression question #70224
                    Jason Garrant
                    Participant

                      Hi Mark,

                      Try this:

                      if {[string equal “FINAL CYTOLOGIC DIAGNOSIS:” $field]} {

                        set bool 1

                      } elseif { [string equal “The HPV……” $field]} {

                        set bool 0

                      } elseif {[string equal “(Electron….” $field]} {

                        set bool 0

                      } else {

                      }

                      if {[string equal $bool 1]} {

                        lappend obxlist $field

                      }

                    Viewing 9 replies – 1 through 9 (of 9 total)