Paul Bishop

Forum Replies Created

Viewing 15 replies – 1 through 15 (of 108 total)
  • Author
    Replies
  • in reply to: Enhancement Request: Option to wrap testing tool output #121697
    Paul Bishop
    Participant

      You just need to upgrade your monitor to a 72″ widescreen Jim!  ;-p

      Paul Bishop
      Carle Foundation Hospital
      Urbana, IL

      Paul Bishop
      Participant

        There are multiple ways to do it.  Off the top of my head, if you know that the input will ALWAYS be in that format (YYYYMMDDHHMMSS), then you can use the clock command (copy pre-proc):
        <pre>lassign $xlateInVals in_obx_5
        set out_obx_5 [clock format [clock scan $in_obx_5 -format “%Y%m%d%H%M%S”] -format “%m/%d/%Y %H:%M”]
        set xlateOutVals

          </pre>
          The problem with using the clock command is that if it doesn’t match the input format on the scan portion, it will fail.

          Another way of doing it is to use string range commands to pull out each element of the date and time, and then set the output variable to what you need it to be.

          There is also the format command, but I always have to look up all the options for it.  Those are the first ones I thought of off the top of my head, but I’m sure there are many other ways as well.

          I would put coding before it to verify it matches the input format you are expecting (length, all numeric, etc).

          Hope this helps!

          Paul Bishop
          Carle Foundation Hospital
          Urbana, IL

          in reply to: reset number of error in thread status #120821
          Paul Bishop
          Participant

            Through the GUI (version 19 and above I believe?), you can double click on the thread in Network Monitor (or right click –> Control –> Full) and on the bottom right column is a “reset statistics” option.  This will reset ALL  statistics except times, not just the error count.

            Or through a command line, use the hcimsiutil command.  Options are:

            -X will zero all threads on the site and keep the times
            -xt <thread> will zero the specific thread and keep the times
            -xp <process> will zero the threads in the specific process and keep the times
            -Z will zero all threads on the site including the times
            -zt <thread> will zero the specific thread including the times
            -zp <process> will zero the threads in the specific process including the times
            -E will zero error counts on all threads in the site
            -ep <proc> will zero error counts on all threads for the specific process
            -et <thread> will zero error counts for the specific thread

            I don’t know what version the -E/-e options became available.  entering hcimsiutil without arguments will display the options available in your version.

            Paul Bishop
            Carle Foundation Hospital
            Urbana, IL

            in reply to: Need to remove leading character #120816
            Paul Bishop
            Participant

              As Jim says, if you are prior to 6.0, the translate string action isn’t available.  This code snippet will do the trick using the copy action in a translate and will remove the first character regardless of what it is.  If your original value happens to be only one character long, it will return a null value.

              lassign $xlateInVals in_val
              set out_val [string range $in_val 1 end]
              set xlateOutVals

                Source will be the field the data is coming from, and Destination will be where you want it to go.

                Paul Bishop
                Carle Foundation Hospital
                Urbana, IL

                Paul Bishop
                Participant

                  What is the “Error:” setting set to on the copy or if command?  If it is set to “Skip”, then you’re correct, it won’t stop with an error.  If it is set to “Error”, you will get a “Fetch failure on ‘<variable name’” error and the process will stop.

                  • This reply was modified 1 year, 3 months ago by Paul Bishop.

                  Paul Bishop
                  Carle Foundation Hospital
                  Urbana, IL

                  in reply to: Unable to bind tcp/ip socket: Address already in use #120785
                  Paul Bishop
                  Participant

                    We have run into this also and it is because of the ephemeral ports (on AIX and same ranges as James’).

                    For AIX you can find what is using that port by using a couple of commands.

                    This returns the PID that is using the port:

                    lsof -i:<port>

                    This will then show what the process is:

                    ps -ef|grep <pid>

                    You can then top the process using the port, start the thread that needs the port, and then restart the process that you just stopped.  Again, this is AIX – not sure what Radhat would use.

                    Paul Bishop
                    Carle Foundation Hospital
                    Urbana, IL

                    in reply to: reset stats for status thread #120758
                    Paul Bishop
                    Participant

                      Look at the hcimsiutil command.  It has options to zero just the counts or the counts and the times, and you can do it by thread, process or the whole site.

                      Paul Bishop
                      Carle Foundation Hospital
                      Urbana, IL

                      in reply to: steps post moving threads to new site #120431
                      Paul Bishop
                      Participant

                        Really the only thing that you need to do after stopping the process and removing any threads in the process on the old site is to delete the process directory located in $HCIROOT/<old site name>/exec/processes/.  I would make sure there aren’t any files in the process directory you want to keep first (process log or error log files), or if you have a thread writing to a file in the process directory.

                        • This reply was modified 1 year, 8 months ago by Paul Bishop.

                        Paul Bishop
                        Carle Foundation Hospital
                        Urbana, IL

                        in reply to: remove \F\ or \T\ or \R\ or \T\ from an HL7 field #120417
                        Paul Bishop
                        Participant

                          You can do it with a string map command without looping through and finding each occurrence.  I do question why they need to be removed – those are valid escape sequences in HL7 that should be replaced in the destination system when the message is filed.  For example, “\R\” would be replaced by “~” (assuming “|^~\&” on the MSH segment).  I do remember having to do this for a vendor’s embedded and encoded PDF one time because they went through and replaced all the delimiter characters in the encoded PDF – made for a magnificent crash when decoding the PDF.

                          To do it properly, you should pull out the delimiter characters from the MSH field first and use those rather than hard-coding values.  Assuming this is done in a UPOC tcl:

                          keylget args MSGID mh
                          set msg [msgget $mh]
                          #separator
                          set fldSep [string index $msg 3]
                          set subSep [string index $msg 4]
                          set repSep [string index $msg 5]
                          set escSep [string index $msg 6]
                          set sb2Sep [string index $msg 7]

                          set map_list

                            # pull out the field from the message you want to change, for example an OBX-5 value, then use the string map command
                            set obx_5 [string map $map_list $obx_5]

                            # then replace the OBX-5 value in the message with the one you just fixed above.

                            If you need more detail on the pulling out and replacing of fields, I can provide that information as well.

                            Doing this within a translate is also possible, although I’ve never done it that way.  Same concept, just a TCL fragment on the OBX-5 copy.

                            Paul Bishop
                            Carle Foundation Hospital
                            Urbana, IL

                            Paul Bishop
                            Participant

                              There’s really not much you can do in a case like this since you don’t know how many pipes they put in the field.  You can try pushing back at the vendor who is creating the message and see if they can follow the HL7 standards for escaping any delimiter characters, which for the field separator would be “\E\” (assuming “|^~\&” in the MSH segment).

                              I did get to thinking though, is this in the NTE segment?  If so, the number of fields is limited so you might be able to figure out which pipes are part of the comment.

                              Paul Bishop
                              Carle Foundation Hospital
                              Urbana, IL

                              Paul Bishop
                              Participant

                                this would be done through the route replies function on the outbound thread.  Say you’re routing messages from a vendor to epic with messages coming from thread f_vendor_t and routed to thread t_epic_t.  On the t_epic_t thread, Route Replies tab you would setup a static route back to f_vendor_t.  Make sure that the Outbound tab, Inbound Replies section does not have the hcitpsmsgkill proc setup in the TPS Inbound Reply field or it will kill the replies instead of routing them.

                                We have this setup for our infusion orders/verifications between the IV pumps and Epic.  When we originally set it up, Epic was insisting that it couldn’t be done through an interface engine but we showed it could and have it working without issues.

                                Paul Bishop
                                Carle Foundation Hospital
                                Urbana, IL

                                Paul Bishop
                                Participant

                                  There is a package of text utilities that I have used to split a line into specific lengths.  At the top of your proc, include the line “package require textutil”, then the function “textutil::adjust” will split the line to the specified length, returning the lines in a list separated by a line feed.  In the tcl proc we use it in, I have the command:

                                  set split_OBX5_list [split [textutil::adjust $obx5 -full 1 -length $max_length] \n]

                                  where $obx5 is the original value in obx-5 from the message and $max_length is the maximum length each line can be on the returned value.  The value placed in split_OBX5_list is the returned value split by the carriage return.  You can then loop through split_OBX5_list and create the new OBX lines.

                                  If you search for “tcl textutil” you can find the full help text of all the package procedures and options for textutil.

                                  Paul Bishop
                                  Carle Foundation Hospital
                                  Urbana, IL

                                  in reply to: Using Wild Card Routes with MSH.3 instead of MSH.9? #120218
                                  Paul Bishop
                                  Participant

                                    You can use a TrxID upoc to change how the Transaction ID is built for routing.  These procs can pull in the current message so you can parse it out, then the returned value is the transaction id (trxId) which is then used in the routing instead of the normalized MSH-9 field.

                                    For instance, we have one of these procs setup for messages from our lab system so the different types of result messages (all ORU^R01) can be routed based on the MSH-3 field along with the MSH-9 so the blood bank results go through one translate, the micro results another, the pathology results a third, and then a default for everything else.  This is because a different HL7 variant was needed for each type of message.

                                    On the inbound thread, in Inbound/Inbound Data tab, you would then change the “Trx ID Determination Format:” to be “UPOC” and plug your proc into the setting under the Edit button.

                                    Hope this helps!

                                    Paul Bishop
                                    Carle Foundation Hospital
                                    Urbana, IL

                                    in reply to: Convert OBX to NTE using Xlate #120116
                                    Paul Bishop
                                    Participant

                                      The TCL portion is written out for you in my first post (starting with the “lassign” line and ending with the “set xlateOutVals” line.

                                      As with most things in Cloverleaf, there are multiple ways to get to the end results you want.  With the given information, I would probably do this in a translate as opposed to writing a TCL proc, but that could also change depending on if other parts of the message are being translated as well.

                                      Paul Bishop
                                      Carle Foundation Hospital
                                      Urbana, IL

                                      in reply to: Convert OBX to NTE using Xlate #120112
                                      Paul Bishop
                                      Participant

                                        So it looks like you will be splitting the source data by the comma?  You should be able to do this fairly simply in a translate with some in-line TCL coding.  You will need to set and increment the NTE segment index within the translate, including any other NTE segments that are copied from the original message.  Pseudo code wise it would look something like this:

                                        1. Initialize the outbound NTE segment index to zero (copy =0 to $%s91)
                                        2. Initialize the outbound NTE-1 field to one (copy =1 to @nte_cntr)
                                        3. start looping over the inbound OBX segments.
                                        4. For the OBX segment with OBX-3 equal 123-1, copy OBX-5 to @nte_name and @nte_clia using a TCL snippet:

                                          lassign $xlateInVals in_obx_5
                                          set out_name [lindex [split $in_obx_5 “,”] 0]
                                          set out_clia [lindex [split $in_obx_5 “,”] 1]
                                          set xlateOutVals

                                          1. copy @nte_cntr to the NTE(%s91)-1 field, “P” to the NTE(%s91)-2 field, and @nte_name to the NTE(%s91)-3 field
                                          2. increment $nte_cntr and $%s91 by 1
                                          3. copy @nte_cntr to the NTE(%s91)-1 field, “P” to the NTE(%s91)-2 field, and @nte_clia to the NTE(%s91)-3 field
                                          4. For the OBX segment with OBX-3 equal 123-2, copy OBX-5 to @nte_addr_1, @nte_addr_2, and @nte_provider using a TCL snippet:

                                            lassign $xlateInVals in_obx_5
                                            set out_addr_1 [lindex [split $in_obx_5 “,”] 0]
                                            set out_addr_2 [lindex [split $in_obx_5 “,”] 1]
                                            set out_provider [lindex [split $in_obx_5 “,”] 2]
                                            set xlateOutVals

                                            1. copy @nte_cntr to the NTE(%s91)-1 field, “P” to the NTE(%s91)-2 field, and @nte_addr_1 to the NTE(%s91)-3 field
                                            2. increment $nte_cntr and $%s91 by 1
                                            3. copy @nte_cntr to the NTE(%s91)-1 field, “P” to the NTE(%s91)-2 field, and @nte_addr_2 to the NTE(%s91)-3 field
                                            4. increment $nte_cntr and $%s91 by 1
                                            5. copy @nte_cntr to the NTE(%s91)-1 field, “P” to the NTE(%s91)-2 field, and @nte_provider to the NTE(%s91)-3 field

                                            It’s important to set the xlateOutVals value using the list command so your values are set to the correct variables.

                                            If you need more information, let me know and I can help you through it over email.

                                            Paul Bishop
                                            Carle Foundation Hospital
                                            Urbana, IL

                                          Viewing 15 replies – 1 through 15 (of 108 total)