Peter Heggie

Forum Replies Created

Viewing 15 replies – 1 through 15 (of 617 total)
  • Author
    Replies
  • in reply to: My Profile Photo #122352
    Peter Heggie
    Participant

      I always notice your car!

      Very cool. Not too many mid-engine cars with that big of an engine.

      I had an X 1/9.. well, three of them. I got mine up to 85 going downhill…

      Congratulations!

      Peter Heggie
      PeterHeggie@crouse.org

      in reply to: Use database connection defined in site preferences #122302
      Peter Heggie
      Participant

        We use Cloverleaf tables, that are database tables, from within shell scripts. That being said, we still need Cloverleaf. The Cloverleaf tables have to live somewhere, and maybe someone has figured out how to use a Cloverleaf table whose definition is not stored in Cloverleaf, but we have not.

        Sometimes we use our Master site to hold Cloverleaf database tables, just because the tables are not related to any particular interface or business process that is associated with a Cloverleaf site. I believe the Network Monitor has to be bounced once after creating the table in the site. But we also store such Cloverleaf DB tables in an “application” site, the example below uses site “chargeprd”.

        Here is an example. We have a shell script that functions as the job (parent level processing), it calls a utility script (Generic_Charges_Report_New.tcl) which invokes the DB table:

        dbl_prGenericCharges_Report

        which is an Advanced Database Lookup stored procedure:

        {?=CALL prGenericCharges_Report( <@StartDateTimeString> , <@EndDateTimeString>,<@Source> , @Count1V OUT , @Count2V OUT , @RCode OUT , @RDesc OUT )};

        IN: @StartDateTimeString,@EndDateTimeString,@Source

        OUT: _CLRC_,RS_tstamp,RS_mrn,RS_ecd,RS_c_svccode,RS_c_svcdate,RS_prlocation,OUT_@Count1V,OUT_@Count2V,OUT_@RCode,OUT_@RDesc

        Notice that the output has both record set (RS) data and stored procedure output (OUT) variables. Don’t know if you have had both RS and OUT data on the same stored procedure but you will notice that the result data has multiple rows, and each row has multiple data items (the RS items). But tacked on the end of each row will be the output items (OUT), and those values will be the same on each row (so they are kind of like duplicate data).

        with this code:

        set result [dblookup -maxrow 999999 dbl_prGenericCharges_Report $startdatetime $enddatetime $datasource]
        if {$debug} {echo “[gts] $result RESULTS”}
        if {$debug} {debugw “[gts] $result RESULTS”}

        set rows [split “$result” “\n\r”]
        set numrows [llength $rows]
        if {$debug} {echo “[gts] $module results had $numrows rows”}
        if {$debug} {debugw “[gts] $module results had $numrows rows”}

        fyi – ‘debugw’ writes the information to a file, while ‘echo’ writes to the parent shell script. Don’t forget to set -MAXROW to a high number, to get all your output rows.

        The utility script goes on to process each row in a loop. fyi – the utility script is TCL ; the parent script is a UNIX KSH shell script

        This is from the parent ‘job’ shell script. Variable clsfx is the environment suffix, tst or prd.

        prc=0
        echo “omtstart-date +%Y%m%d%H%M%S”

        # set site charge – to get to table dbl_prGenericCharges_Report
        setsite charge${clsfx}; clCheckSite “$prc” “setsite” “charge${clsfx}” ; prc=$?

        # run query SQL – this produces output to a file
        Generic_Charges_Report_New.tcl “$startdatetime” “$enddatetime” “$email_fr” “$email_to” “$email_su” “$runtime” “$datasource” ; prc=$?

        # set audit return code for the entire job and echo a timestamp to the log
        omtend

        When you run TCL in a batch script you need something like this at the top:

        #! /usr/bin/ksh
        # The following line is seen as a continuecomment by Tcl\
        exec $QUOVADX_INSTALL_DIR/integrator/bin/hcitcl “$0″ ${1+”$@”}

         

        At the bottom of the TCL script, after all the subroutines, is the main TCL script code, here is a snippet:

        # main routine
        set startdatetime [lindex $argv 0 ]
        set enddatetime [lindex $argv 1 ]
        set email_fr [lindex $argv 2 ]
        set email_to [lindex $argv 3 ]
        set email_su [lindex $argv 4 ]
        set runtime [lindex $argv 5 ]
        set datasource [lindex $argv 6]

        When you are building and testing, what is very helpful is to use this utility on the command line: hcitcl

        it creates another shell / command line, where you can set variables and then invoke your dblookup stored procedure call. You will get the results back to your screen (or to a variable). This is really helpful, to make sure the database part of your solution is working, before running it out of a bigger script. Don’t forget to do a setsite first.

        hope this helps

        Peter

        Peter Heggie
        PeterHeggie@crouse.org

        in reply to: Adding new OBX segments to an iteration? #122242
        Peter Heggie
        Participant

          I believe this falls under the “fun with indexes” category. You will need to maintain separate indexes/variables for the NTE segments vs the OBX segments. As you mentioned, you may want to “insert” a new OBX segment at the top. You will have math functions to increment counters that are used as the OBX indexes. This means that your OBX index will end up being greater than your NTE index.

          Example – if you know there will be five patient identification OBX segments, write those out first, incrementing the index for each OBX, from 0 through 4. Then when you get into your NTE-based loop, use that same OBX index, currently valued at 4, and add 1 to it for each NTE segment that you are copying over to an OBX.

          This will take some time to work out, but everything is addressable.

          Peter Heggie
          PeterHeggie@crouse.org

          in reply to: Closing down Cloverleaf completely (Linux) #121905
          Peter Heggie
          Participant

            To start Cloverleaf, start the lock manager and monitor first, then start the processes. I think it is desirable to have the lock manager running before messages are processed through threads.

            it is interesting that our HACMP environment, configured by Infor, has a shell script that determines all the processes in a site and does a kill -9 on the PIDs, then a kill -9 on the lock manager and the monitor. And does that for all sites. Then kills the host server. So nine sites with a total of 400 threads will end in about eight seconds. Never lost a message, never had a problem. We use Recovery Databases for everything.

             

            Peter Heggie
            PeterHeggie@crouse.org

            in reply to: ‘Failed to query data: The index 1 is out of range.’ #121903
            Peter Heggie
            Participant

              This is how we use LIKE – if that is what you are looking for?

               

              select status from dbo.prl_charges WITH (NOLOCK) where keyvalue like ‘%’ + <keyvalue> + ‘%’

              in_column_name=keyvalue
              out_column_name=status

              Peter Heggie
              PeterHeggie@crouse.org

              in reply to: Need Help With Mapping Unknown Chars From Cerner #121784
              Peter Heggie
              Participant

                We had bad (character) actors.. but from one specific source. A doctor cut and pasted dictation/consult notes from Word into a text reader that sends them as an ORU into Cloverleaf. This included some strange formatting characters that did not convert to ASCII . We tried education, to no effect. We ended up creating a TCL proc that performed string maps. Every few weeks we added more string mapping From and To characters. That was almost two years ago and we still get that input but the TCL catches it and fixes it.

                 

                Peter Heggie
                PeterHeggie@crouse.org

                in reply to: EPIC integration with Cloverleaf #121748
                Peter Heggie
                Participant

                  Can EPIC take in lab results in an older version of HL7? Our current lab vendor sends us results in v2.3. So not all data is discrete and not all meta-data is discrete. Does that mean documents like CCDAs, sent through Care Everywhere, could not be ingested in other EMRs, because some of the data is textual, not discrete?

                  Peter Heggie
                  PeterHeggie@crouse.org

                  in reply to: EPIC integration with Cloverleaf #121730
                  Peter Heggie
                  Participant

                    This is great detail – thank you. Our current financials/ADT interface from our EMR is 2.7, so I think we are good there. But our clinical interfaces – orders, results – are 2.4, so we may have a lot of work to do with clinical interfaces.

                    Is a TS person an EPIC employee? I’m wondering where the line is, between what we would do and what they would do.

                    Right now, with Cerner/Oracle, we have Cloverleaf connecting to Openlink. We don’t do any programming in Openlink. On rare occasions, maybe five or six times in the last eight years, we have had Cerner make changes to Openlink. But 99.9% of the time, we do everything in Cloverleaf, when it comes to translation and transformation of interface data to and from ancillary systems. As far as doing everything in Cloverleaf, does that remain the same? And there is a potential for less interfaces if some of our modalities are part of the EPIC component set?

                    The ACK work sounds interesting; we only do the immediate, “message received” ACK for the most part, except for a state registry interface, which sends us application ACKs.

                    Peter

                    Peter Heggie
                    PeterHeggie@crouse.org

                    Peter Heggie
                    Participant

                      adding email

                      Peter Heggie
                      PeterHeggie@crouse.org

                      in reply to: EPIC integration with Cloverleaf #121720
                      Peter Heggie
                      Participant

                        adding email

                        Peter Heggie
                        PeterHeggie@crouse.org

                        Peter Heggie
                        Participant

                          Hi Nancy,

                          Sorry to hijack this thread, but I couldn’t help notice that the above eligibility verification functionality is something that we are also looking at implementing. We looked at an Experian package called eCare Next Base Platform, and with it, Premium Eligibility Services. We also use HDX and the above package included costs for HDX configuration.

                          But what you are describing sounds more automated, and faster, than what we are looking at. I’m just wondering if this is actually a different service than the Experian eCare. It sounds like you have a direct tcp/ip connection. I assume you have a VPN?

                          And for anyone else (!), is there a similar service using web services or FHIR? The tcp/ip flavor seems easier?

                          Peter

                          Peter Heggie
                          PeterHeggie@crouse.org

                          in reply to: Can Cloverleaf query Active Directory for additional data? #121563
                          Peter Heggie
                          Participant

                            #following

                            Peter Heggie
                            PeterHeggie@crouse.org

                            in reply to: Alerts and Holidays #121496
                            Peter Heggie
                            Participant

                              I am very interested in any responses to your question. We have been struggling with false positives on holidays and wanted a simple way to turn off or turn on sets of alerts that should not be running on a holiday.

                              We looked at using the AND alert type, to connect a “normal” alert and a holiday alert (which could be a TCL alert that would look at a calendar file and figure out if today was a holiday), but we would need to do this for every normal alert, so we could easily end up with double the number of existing alerts.

                              i was hoping for an additional function contained in each alert that allows me to callout to a TCL and get a 0 or 1 return code – this would be in additional to all the other attributes of an alert.

                              So…  you may have to create an alternate alert file that you would load via the command line, that has the right alerts for that holiday.

                              I think this is the syntax??
                              <p class=”- topic/p p”>Use this format to run a specific alert. In this example, the alert file is named foo.alert:</p>

                              <pre class=”+ topic/pre pr-d/codeblock pre codeblock”><code>hcisitectl -s a -A “<var class=”+ topic/keyword sw-d/varname keyword varname”>a</var>=-cl foo.alert”</code></pre>
                              We played with this once and could not get the command line command to work so hopefully you will figure it out.

                              Peter Heggie
                              PeterHeggie@crouse.org

                              in reply to: So long, and thanks for all the fish. #121451
                              Peter Heggie
                              Participant

                                We too are grateful for your support and your service to this Cloverleaf Community.

                                We only go back to 1998 when we used the SNA protocols to connect to the mainframe, to SMS, then Invision. I remember looking on Clovertech for answers and seeing your posts with looong TCL procs… 🙂

                                We will miss you on the strategy and new offering webinars as well!

                                Peter

                                Peter Heggie
                                PeterHeggie@crouse.org

                                in reply to: TCL Error #121450
                                Peter Heggie
                                Participant

                                  I have not used the HL7 package and I’m notso great with namespaces, but maybe this line:

                                  set hl7 [hl7::parse_msg [msgget $mh]]

                                  it just makes me wonder if it is confusing that you are creating/updating a variable that has the same name as the namespace?

                                  Maybe you use a different variable name:

                                  set hl7msg [hl7::parse_msg [msgget $mh]]

                                  and then change the lines that come after that to use the different variable name:

                                  set MSH_3 [hl7::get_field hl7msg MSH.3]

                                   

                                  Peter Heggie
                                  PeterHeggie@crouse.org

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