private void FixSelections(HealthBenefit1Calculator hcBenefit1)
 {
     if (hcBenefit1.Demographics == null)
     {
         hcBenefit1.Demographics = new Demog1();
     }
     Demog1.FixSelections(hcBenefit1.Demographics);
 }
Example #2
0
 public virtual void CopyDemog1Properties(
     Demog1 calculator)
 {
     this.Age            = calculator.Age;
     this.EducationYears = calculator.EducationYears;
     this.Race           = calculator.Race;
     this.Housing        = calculator.Housing;
     this.Gender         = calculator.Gender;
     this.WorkStatus     = calculator.WorkStatus;
     this.MaritalStatus  = calculator.MaritalStatus;
     this.LocationId     = calculator.LocationId;
 }
Example #3
0
 public static void FixSelections(Demog1 demogs)
 {
     if (demogs.Race == string.Empty)
     {
         demogs.Race = RACE_TYPE.white.ToString();
     }
     if (demogs.Housing == string.Empty)
     {
         demogs.Housing = HOUSING_TYPE.independentliving.ToString();
     }
     if (demogs.Gender == string.Empty)
     {
         demogs.Gender = GENDER_TYPE.female.ToString();
     }
     if (demogs.WorkStatus == string.Empty)
     {
         demogs.WorkStatus = WORK_TYPE.paidwork.ToString();
     }
     if (demogs.MaritalStatus == string.Empty)
     {
         demogs.MaritalStatus = MARITAL_TYPE.nevermarried.ToString();
     }
 }
 public void SetHealthBenefit1Attributes(string attNameExtension,
                                         ref XElement currentCalculationsElement)
 {
     if (Demographics == null)
     {
         Demographics = new Demog1();
     }
     Demographics.SetDemog1Attributes(attNameExtension, ref currentCalculationsElement);
     //don't set any input attributes; each calculator should set what's needed separately
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cOutputCost, attNameExtension), this.OutputCost);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cBenefitAdjustment, attNameExtension), this.BenefitAdjustment);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cAdjustedBenefit, attNameExtension), this.AdjustedBenefit);
     CalculatorHelpers.SetAttribute(currentCalculationsElement,
                                    string.Concat(cOutputEffect1Name, attNameExtension), this.OutputEffect1Name);
     CalculatorHelpers.SetAttribute(currentCalculationsElement,
                                    string.Concat(cOutputEffect1Unit, attNameExtension), this.OutputEffect1Unit);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cOutputEffect1Amount, attNameExtension), this.OutputEffect1Amount);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cOutputEffect1Price, attNameExtension), this.OutputEffect1Price);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cOutputEffect1Cost, attNameExtension), this.OutputEffect1Cost);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cAverageBenefitRating, attNameExtension), this.AverageBenefitRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cPhysicalHealthRating, attNameExtension), this.PhysicalHealthRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cEmotionalHealthRating, attNameExtension), this.EmotionalHealthRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cSocialHealthRating, attNameExtension), this.SocialHealthRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cEconomicHealthRating, attNameExtension), this.EconomicHealthRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cHealthCareDeliveryRating, attNameExtension), this.HealthCareDeliveryRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cBeforeQOLRating, attNameExtension), this.BeforeQOLRating);
     CalculatorHelpers.SetAttributeInt(currentCalculationsElement,
                                       string.Concat(cAfterQOLRating, attNameExtension), this.AfterQOLRating);
     CalculatorHelpers.SetAttributeDoubleF2(currentCalculationsElement,
                                            string.Concat(cBeforeYears, attNameExtension), this.BeforeYears);
     CalculatorHelpers.SetAttributeDoubleF2(currentCalculationsElement,
                                            string.Concat(cAfterYears, attNameExtension), this.AfterYears);
     CalculatorHelpers.SetAttributeDoubleF2(currentCalculationsElement,
                                            string.Concat(cAfterYearsProb, attNameExtension), this.AfterYearsProb);
     CalculatorHelpers.SetAttributeDoubleF2(currentCalculationsElement,
                                            string.Concat(cTimeTradeoffYears, attNameExtension), this.TimeTradeoffYears);
     CalculatorHelpers.SetAttributeDoubleF2(currentCalculationsElement,
                                            string.Concat(cEquityMultiplier, attNameExtension), this.EquityMultiplier);
     CalculatorHelpers.SetAttribute(currentCalculationsElement,
                                    string.Concat(cBenefitAssessment, attNameExtension), this.BenefitAssessment);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cQALY, attNameExtension), this.QALY);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cICERQALY, attNameExtension), this.ICERQALY);
     CalculatorHelpers.SetAttributeDoubleF3(currentCalculationsElement,
                                            string.Concat(cTTOQALY, attNameExtension), this.TTOQALY);
     CalculatorHelpers.SetAttributeBool(currentCalculationsElement,
                                        string.Concat(cWillDoSurvey, attNameExtension), this.WillDoSurvey);
 }
        //attname and attvalue generally passed in from a reader
        public virtual void SetHealthBenefit1Properties(string attName,
                                                        string attValue)
        {
            if (Demographics == null)
            {
                Demographics = new Demog1();
            }
            Demographics.SetDemog1Properties(attName, attValue);
            switch (attName)
            {
            case cOutputCost:
                this.OutputCost = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cBenefitAdjustment:
                this.BenefitAdjustment = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cAdjustedBenefit:
                this.AdjustedBenefit = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cOutputEffect1Name:
                this.OutputEffect1Name = attValue;
                break;

            case cOutputEffect1Unit:
                this.OutputEffect1Unit = attValue;
                break;

            case cOutputEffect1Amount:
                this.OutputEffect1Amount = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cOutputEffect1Price:
                this.OutputEffect1Price = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cOutputEffect1Cost:
                this.OutputEffect1Cost = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cAverageBenefitRating:
                this.AverageBenefitRating = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cPhysicalHealthRating:
                this.PhysicalHealthRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cEmotionalHealthRating:
                this.EmotionalHealthRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cSocialHealthRating:
                this.SocialHealthRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cEconomicHealthRating:
                this.EconomicHealthRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cHealthCareDeliveryRating:
                this.HealthCareDeliveryRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cBeforeQOLRating:
                this.BeforeQOLRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cAfterQOLRating:
                this.AfterQOLRating = CalculatorHelpers.ConvertStringToInt(attValue);
                break;

            case cBeforeYears:
                this.BeforeYears = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cAfterYears:
                this.AfterYears = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cAfterYearsProb:
                this.AfterYearsProb = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTimeTradeoffYears:
                this.TimeTradeoffYears = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cEquityMultiplier:
                this.EquityMultiplier = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cBenefitAssessment:
                this.BenefitAssessment = attValue;
                break;

            case cQALY:
                this.QALY = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cICERQALY:
                this.ICERQALY = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cTTOQALY:
                this.TTOQALY = CalculatorHelpers.ConvertStringToDouble(attValue);
                break;

            case cWillDoSurvey:
                this.WillDoSurvey = CalculatorHelpers.ConvertStringToBool(attValue);
                break;

            default:
                break;
            }
        }
Example #6
0
 //copy constructor
 public Demog1(Demog1 demog11)
 {
     CopyDemog1Properties(demog11);
 }