Help with xlate & TCL Script

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Help with xlate & TCL Script

  • Creator
    Topic
  • #53909
    Shannon Laughlin
    Participant

      Hello!  I have an xlate in our test environment that takes the value of OBX;7.1 (reference range) and parses it to set OBX;7.2 = low range and OBX;7.3 = high range.  This is working successfully in test but when it is migrated to prod it doesn’t work.  I’ve confirmed that the data is being sent the same way in test as it is in prod and I’ve triple checked the code is the same in test as prod.  The xlate sets the variables @low and @high to @null and then does the following

      copy:

      1(%g1).OBX(0).#7.(0) –> 1(0).1(0).1(%g00.OBX(0).#7(0)

      1(%g1).OBX(0).#7(0).[0] –> @low (tcl pre proc here for obx;7.1)

      1(%g1).OBX(0).#7(0).[0] –> @high (tcl pre proc here for obx;7.2)

      @low –> 1(0).1(0).1(%g99).OBX(0).#7(0).[1]

      @high –> 1(0).1(0).1(%g99).OBX(0).#7(0).[1]

      Tcl Pre Proc for OBX;7.1

      set pos [string first “-”  $xlateInVals]

      set pos2 [expr $pos – 1]

      set xlateOutVals [string range $xlateInVals 0 $pos2]

      echo ”


      pos2 is -> $pos2″

      echo ”


      xlateOutVals is -> $xlateOutVals”

      Tcl Pre Proc for OBX;7.2

      set pos [string first “-”  $xlateInVals]

             set len [string length $xlateInVals]

             set pos1 [expr $pos + 1 ]

             set xlateOutVals [string range $xlateInVals $pos1 $len]

      Data as Received Inbound to Cloverleaf prod:

      |12|ST|ATHBC||10.2|g/dL|10.0-17.0||||F|

      |13|ST|AO2HBC||95.4|%|92.0-98.5||||F|

      |14|ST|ACOHBC||0.3|%|0.5-1.5|L|||F|

      |15|ST|AMHBC||0.7|%|0.0-1.5||||F|

      Message as sent outbound from Cloverleaf prod

      |7|NM|LABATHBC||10.2||10.0-17.0||||F|||20131106042500

      |8|NM|LABAO2HBC||95.4||92.0-98.5||||F|||20131106042500

      |9|NM|LABACOHBC||0.3||0.5-1.5^0.|L|||F|||20131106042500

      |10|NM|LABAMHBC||0.7||0.0-1.5^0.||||F|||20131106042500

      Data as received inbound to Cloverleaf test:

      OBX|1|ST|CPHBGC||6.723||7.300-7.400|LL|||F|||20131104130324||5636~00||^^31347^Rapidpoint 500|20131104130324|

      OBX|2|ST|CO2SC||82.5|%|||||F|

      OBX|3|ST|CHCO3C||20.5|mmol/L|20.0-28.0||||F|

      OBX|4|ST|CBEC||-19.0|mmol/L|||||F|

      OBX|5|ST|CPCO2C||160.6|mmHg|35.0-50.0|HH|||F|

      OBX|6|ST|CPO2C||92.9|mmHg|35.0-50.0|H|||F|

      OBX|7|ST|Samp. Type||BLDC||||||F|

      OBX|8|ST|Drawn||11/4/2013 12:50:00 PM||||||F|

      OBX|9|ST|Received||11/4/2013 1:00:15 PM||||||F|

      Message as sent outbound from Cloverleaf test:

      OBX|1|NM|LABCPHBGC||6.723||7.300-7.400^7.300^7.400|LL|||F|||20131104125000

      OBX|2|NM|LABCO2SC||82.5||||||F|||20131104125000

      OBX|3|NM|LABCHCO3C||20.5||20.0-28.0^20.0^28.0||||F|||20131104125000

      OBX|4|NM|LABCBEC||-19.0||||||F|||20131104125000

      OBX|5|NM|LABCPCO2C||160.6||35.0-50.0^35.0^50.0|HH|||F|||20131104125000

      OBX|6|NM|LABCPO2C||92.9||35.0-50.0^35.0^50.0|H|||F|||20131104125000

      Any suggestions or thoughts are greatly appreciated.

      Best Regards,

      Shannon

    Viewing 5 reply threads
    • Author
      Replies
      • #79495
        Jim Kosloskey
        Participant

          Shannon,

          Check the field length for OBX-7 in your variant.

          I am guessing there is a difference in the length between Test and Prod.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #79496
          Shannon Laughlin
          Participant

            Hi Jim,

            The length for OBX;7 is set to 10 in both test and prod.

          • #79497
            Jim Kosloskey
            Participant

              Shannon,

              Is that true of the outbound variant?

              email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

            • #79498
              Shannon Laughlin
              Participant

                Hi Jim,

                Excellent catch!!!  The length of the reference range field for the outbound variant is 10 in prod but -1 in test.  Is there a way I can change the length of that field for that variant in prod?

                Thank you so much!

                Best Regards,

                Shannon[/code]

              • #79499
                Jim Kosloskey
                Participant

                  Shannon,

                  If you are on a release of Cloverleaf before 6.0 then you need to edit the fields file. There may not be one if you have never changed a field. In that case change the field in the H?7 Configurator to something other than 10.

                  Now there will be a fields file in the formats directory for that variant. Edit that fields file and change the value for the length of that field to -1. Until you get to Cloverleaf 6.0 don’t ever edit that field in the HL/7 Configurator as it will not be -1 and you will have to rememeber to change it.

                  Or you can copy the variant from Test to Production since there may be other differences as well.

                  email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

                • #79500
                  Shannon Laughlin
                  Participant

                    Hi Jim,

                    I was able to update the field to match the settings in cert and everything is parsing correctly now.  Thank you very much for pointing me in the right direction and for helping me resolve this issue!  

                    Best Regards,

                    Shannon

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