Exemple #1
0
        ///<summary>Returns a non-empty string if there would be a display issue due to invalid settings.
        ///Use the result to block the display from the user when needed.</summary>
        public static string ValidateSettings()
        {
            string validationErrors  = "";
            Array  arrayEbenetitCats = Enum.GetValues(typeof(EbenefitCategory));

            for (int i = 0; i < arrayEbenetitCats.Length; i++)
            {
                EbenefitCategory ebenCat = (EbenefitCategory)arrayEbenetitCats.GetValue(i);
                if (ebenCat == EbenefitCategory.None)
                {
                    continue;
                }
                CovCat covCat = CovCats.GetForEbenCat(ebenCat);
                if (covCat == null)
                {
                    if (validationErrors != "")
                    {
                        validationErrors += ", ";
                    }
                    validationErrors += ebenCat.ToString();
                }
            }
            if (validationErrors != "")
            {
                validationErrors = "Missing or hidden insurance category for each of the following E-benefits:" + "\r\n"
                                   + validationErrors + "\r\n"
                                   + "Go to Setup then Insurance Categories to add or edit.";
            }
            return(validationErrors);
        }
Exemple #2
0
        private string ToStringHelper(bool isLeadingIncluded = false)
        {
            //return base.ToString();
            string retVal = "";

            retVal += BenefitType.ToString();          //EB01: Eligibility or benefit information. Required
            if (CoverageLevel != BenefitCoverageLevel.None)
            {
                retVal += ", " + CoverageLevel.ToString();            //EB02: Coverage level code. Situational
            }
            EbenefitCategory ebenCat = CovCats.GetEbenCat(CovCatNum);

            if (ebenCat != EbenefitCategory.None)
            {
                retVal += ", " + ebenCat.ToString();            //EB03: Service type code. Situational
            }
            //EB04: Insurance type code. Situational.  Not a Benefit field.  We treat it as plan level.
            //EB05: Plan coverage description. Situational.  Not a Benefit field.  We treat it as plan level.
            if (TimePeriod != BenefitTimePeriod.None)
            {
                retVal += ", " + TimePeriod.ToString();            //EB06: Time period qualifier. Situational
            }
            if (MonetaryAmt != -1)
            {
                retVal += ", " + MonetaryAmt.ToString("c");            //EB07: Monetary amount. Situational
            }
            if (Percent != -1)
            {
                string leadingStr = "";
                if (isLeadingIncluded)
                {
                    leadingStr = "Insurance Pays ";
                }
                retVal += ", " + leadingStr + Percent.ToString() + "%";        //EB08: Percent. Situational
            }
            if (QuantityQualifier != BenefitQuantity.None)
            {
                retVal += ", " + QuantityQualifier.ToString();            //EB09: Quantity qualifier. Situational
            }
            if (Quantity != 0)
            {
                retVal += ", " + Quantity.ToString();            //EB10: Quantity. Situational
            }
            //EB11: Authorization Required. Situational.  Not a Benefit field.
            //EB12: In plan network.  Situational.  Not a Benefit field.
            //EB13:  Procedure identifier. Situational.  We don't import this from EB, but we can show it anyway.
            if (CodeNum != 0)
            {
                ProcedureCode proccode = ProcedureCodes.GetProcCode(CodeNum);
                retVal += ", " + proccode.ProcCode + " - " + proccode.AbbrDesc;
            }
            return(retVal);
        }