6 Replies Latest reply: Jun 10, 2016 5:00 PM by Linda Pembroke RSS

    "Unknown" Load Error

    Linda Pembroke

      Hi,

      I am trying to load the following script and am getting an "Unknown" error. The script will run if I comment the concatenated table, but I need to be able to add a new table for each month. Also, before I added the _PCR2Calc_KEY field, the two tables concatenated fine... Does anyone know what might be wrong?

      Thanks.

       

      PCR_Calc:

      LOAD *,

      WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
      WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
      WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;


      LOAD

      _PCR2CalcMoYr as _PCR2Calc_KEY,
      Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
      Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
      Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
      Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
      Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
      Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
      Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105


      Resident PCR_DETAILS_HEDIS2016

      Where (Match (_PCR2CalcMoYr, 'PCR2Feb2017'));


      Concatenate PCR_Calc:

      LOAD *,

      WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
      WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
      WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;


      LOAD

      _PCR2CalcMoYr as _PCR2Calc_KEY,
      Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
      Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
      Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
      Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
      Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
      Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
      Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105


      Resident PCR_DETAILS_HEDIS2016

      Where (Match (_PCR2CalcMoYr, 'PCR2Jan2017'));

        • Re: "Unknown" Load Error
          Sunny Talwar

          The syntax to concatenate is like this:

           

          Concatenate (PCR_Calc)

           

          intead of this:


          Concatenate PCR_Calc:

          • Re: "Unknown" Load Error
            m w

            Sum without Group By

              • Re: "Unknown" Load Error
                Linda Pembroke

                The calculations are working fine. The error began after I added this field to both tables: _PCR2CalcMoYr as _PCR2Calc_KEY,

                  • Re: "Unknown" Load Error
                    Sunny Talwar

                    This is what m w meant:

                     

                    PCR_Calc:

                    LOAD *,

                    WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
                    WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
                    WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;

                     

                    LOAD _PCR2CalcMoYr as _PCR2Calc_KEY,
                    Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
                    Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
                    Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
                    Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
                    Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
                    Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
                    Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105

                    Resident PCR_DETAILS_HEDIS2016

                     

                    Where (Match (_PCR2CalcMoYr, 'PCR2Feb2017'))

                    Group By _PCR2CalcMoYr;

                     

                    Concatenate PCR_Calc:

                    LOAD *,

                    WeightOfAdjProb65_74 * AvgAdjProb_65to74 as WeightedCal_74,
                    WeightOfAdjProb75_84 * AvgAdjProb_75to84 as WeightedCal_84,
                    WeightOfAdjProb85_105 * AvgAdjProb_85to105 as WeightedCal_105;

                     

                    LOAD _PCR2CalcMoYr as _PCR2Calc_KEY,
                    Sum(If(AgeFlag=1,NUMERATOR_PCR,0)) as Age64_105Num,
                    Sum(AgeFlag74)/Sum(AgeFlag) as WeightOfAdjProb65_74,
                    Sum(AgeFlag84)/Sum(AgeFlag) as WeightOfAdjProb75_84,
                    Sum(AgeFlag105)/Sum(AgeFlag) as WeightOfAdjProb85_105,
                    Sum(If(AgeFlag74=1,[Average Probability of readmission],0))/Sum(AgeFlag74) as AvgAdjProb_65to74,
                    Sum(If(AgeFlag84=1,[Average Probability of readmission],0))/Sum(AgeFlag84) as AvgAdjProb_75to84,
                    Sum(If(AgeFlag105=1,[Average Probability of readmission],0))/Sum(AgeFlag105) as AvgAdjProb_85to105

                    Resident PCR_DETAILS_HEDIS2016

                     

                    Where (Match (_PCR2CalcMoYr, 'PCR2Jan2017'))

                    Group By _PCR2CalcMoYr;