Beispiel #1
0
 public EB03(string code, string descript)
 {
     this.code        = code;
     this.descript    = descript;
     this.serviceType = EbenefitCategory.None;          //ignored
     this.isSupported = false;
 }
Beispiel #2
0
 public EB03(string code, string descript, EbenefitCategory serviceType)
 {
     this.code        = code;
     this.descript    = descript;
     this.serviceType = serviceType;
     this.isSupported = true;
 }
Beispiel #3
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);
        }
Beispiel #4
0
		public static void CreateLimitation(long planNum,EbenefitCategory category,double amt){
			Benefit ben=new Benefit();
			ben.PlanNum=planNum;
			ben.BenefitType=InsBenefitType.Limitations;
			ben.CovCatNum=CovCats.GetForEbenCat(category).CovCatNum;
			ben.CoverageLevel=BenefitCoverageLevel.Individual;
			ben.MonetaryAmt=amt;
			ben.TimePeriod=BenefitTimePeriod.CalendarYear;
			Benefits.Insert(ben);
		}
Beispiel #5
0
 public static int CountForEbenCat(EbenefitCategory eben)
 {
     //No need to check RemotingRole; no call to db.
     int retVal=0;
     for(int i=0;i<CovCatC.ListShort.Count;i++) {
         if(CovCatC.ListShort[i].EbenefitCat == eben) {
             retVal++;
         }
     }
     return retVal;
 }
Beispiel #6
0
 ///<summary>Gets a matching benefit category from the short list.  Returns null if not found, which should be tested for.</summary>
 public static CovCat GetForEbenCat(EbenefitCategory eben)
 {
     for (int i = 0; i < CovCatB.ListShort.Length; i++)
     {
         if (eben == CovCatB.ListShort[i].EbenefitCat)
         {
             return(CovCatB.ListShort[i]);
         }
     }
     return(null);
 }
Beispiel #7
0
        public static void CreateLimitation(long planNum, EbenefitCategory category, double amt)
        {
            Benefit ben = new Benefit();

            ben.PlanNum       = planNum;
            ben.BenefitType   = InsBenefitType.Limitations;
            ben.CovCatNum     = CovCats.GetForEbenCat(category).CovCatNum;
            ben.CoverageLevel = BenefitCoverageLevel.Individual;
            ben.MonetaryAmt   = amt;
            ben.TimePeriod    = BenefitTimePeriod.CalendarYear;
            Benefits.Insert(ben);
        }
Beispiel #8
0
 ///<summary>Gets a matching benefit category from the short list.  Returns null if not found, which should be tested for.</summary>
 public static CovCat GetForEbenCat(EbenefitCategory eben)
 {
     //No need to check RemotingRole; no call to db.
     for (int i = 0; i < CovCatC.ListShort.Count; i++)
     {
         if (eben == CovCatC.ListShort[i].EbenefitCat)
         {
             return(CovCatC.ListShort[i]);
         }
     }
     return(null);
 }
Beispiel #9
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);
        }
Beispiel #10
0
        public static void CreateCategoryPercent(long planNum, EbenefitCategory category, int percent)
        {
            Benefit ben = new Benefit();

            ben.PlanNum       = planNum;
            ben.BenefitType   = InsBenefitType.CoInsurance;
            ben.CovCatNum     = CovCats.GetForEbenCat(category).CovCatNum;
            ben.CoverageLevel = BenefitCoverageLevel.None;
            ben.Percent       = percent;
            ben.TimePeriod    = BenefitTimePeriod.CalendarYear;
            Benefits.Insert(ben);
        }
Beispiel #11
0
        public static Benefit CreateExclusionForCategory(long planNum, EbenefitCategory category)
        {
            Benefit ben = new Benefit();

            ben.PlanNum       = planNum;
            ben.CovCatNum     = CovCats.GetForEbenCat(category).CovCatNum;
            ben.BenefitType   = InsBenefitType.Exclusions;
            ben.CoverageLevel = BenefitCoverageLevel.None;
            ben.TimePeriod    = BenefitTimePeriod.CalendarYear;
            Benefits.Insert(ben);
            return(ben);
        }
Beispiel #12
0
        public static void CreateFrequencyCategory(long planNum, EbenefitCategory category, BenefitQuantity quantityQualifier, Byte quantity)
        {
            Benefit ben = new Benefit();

            ben.PlanNum           = planNum;
            ben.BenefitType       = InsBenefitType.Limitations;
            ben.CovCatNum         = CovCats.GetForEbenCat(category).CovCatNum;
            ben.CoverageLevel     = BenefitCoverageLevel.None;
            ben.TimePeriod        = BenefitTimePeriod.None;
            ben.Quantity          = quantity;
            ben.QuantityQualifier = quantityQualifier;
            Benefits.Insert(ben);
        }
Beispiel #13
0
        public static int CountForEbenCat(EbenefitCategory eben)
        {
            //No need to check RemotingRole; no call to db.
            int retVal = 0;

            for (int i = 0; i < CovCatC.ListShort.Count; i++)
            {
                if (CovCatC.ListShort[i].EbenefitCat == eben)
                {
                    retVal++;
                }
            }
            return(retVal);
        }
Beispiel #14
0
        ///<summary>Returns a distinct list of valid ProcCodes for the given eBenefitCat.</summary>
        public static List <string> GetValidCodesForEbenCat(EbenefitCategory eBenefitCat)
        {
            //No need to check RemotingRole; no call to db.
            List <string> listValidStrings = new List <string>();
            List <CovCat> listCovCats      = CovCats.GetWhere(x => x.EbenefitCat == eBenefitCat, true);

            foreach (CovCat covCat in listCovCats)
            {
                CovSpan[] arrayCovSpans = CovSpans.GetForCat(covCat.CovCatNum);
                listValidStrings.AddRange(
                    ProcedureCodes.GetWhere(x => CovSpans.IsCodeInSpans(x.ProcCode, arrayCovSpans), true).Select(x => x.ProcCode).ToList()
                    );
            }
            return(listValidStrings.Distinct().ToList());
        }
Beispiel #15
0
        ///<summary>Deletes the current CovSpans for the given eBenefitCategory, then creates new code ranges from the ranges specified in arrayCodeRanges.  The values in arrayCodeRanges can be a single code such as "D0120" or a code range such as "D9000-D9999".</summary>
        private static void RecreateSpansForCategory(EbenefitCategory eBenefitCategory, params string[] arrayCodeRanges)
        {
            long covCatNum = GetForEbenCat(eBenefitCategory).CovCatNum;

            CovSpans.DeleteForCat(covCatNum);
            for (int i = 0; i < arrayCodeRanges.Length; i++)
            {
                string  codeRange = arrayCodeRanges[i];
                CovSpan span      = new CovSpan();
                span.CovCatNum = covCatNum;
                if (codeRange.Contains("-"))                 //Code range
                {
                    span.FromCode = codeRange.Substring(0, codeRange.IndexOf("-"));
                    span.ToCode   = codeRange.Substring(span.FromCode.Length + 1);
                }
                else                  //Single code
                {
                    span.FromCode = codeRange;
                    span.ToCode   = codeRange;
                }
                CovSpans.Insert(span);
            }
        }
Beispiel #16
0
		///<summary>Gets a matching benefit category from the short list.  Returns null if not found, which should be tested for.</summary>
		public static CovCat GetForEbenCat(EbenefitCategory eben){
			//No need to check RemotingRole; no call to db.
			for(int i=0;i<CovCatC.ListShort.Count;i++) {
				if(eben==CovCatC.ListShort[i].EbenefitCat) {
					return CovCatC.ListShort[i];
				}
			}
			return null;
		}
Beispiel #17
0
		public static void CreateCategoryPercent(long planNum,EbenefitCategory category,int percent){
			Benefit ben=new Benefit();
			ben.PlanNum=planNum;
			ben.BenefitType=InsBenefitType.CoInsurance;
			ben.CovCatNum=CovCats.GetForEbenCat(category).CovCatNum;
			ben.CoverageLevel=BenefitCoverageLevel.None;
			ben.Percent=percent;
			ben.TimePeriod=BenefitTimePeriod.CalendarYear;
			Benefits.Insert(ben);
		}
Beispiel #18
0
		///<summary>Deletes the current CovSpans for the given eBenefitCategory, then creates new code ranges from the ranges specified in arrayCodeRanges.  The values in arrayCodeRanges can be a single code such as "D0120" or a code range such as "D9000-D9999".</summary>
		private static void RecreateSpansForCategory(EbenefitCategory eBenefitCategory,params string[] arrayCodeRanges) {
			long covCatNum=GetForEbenCat(eBenefitCategory).CovCatNum;
			CovSpans.DeleteForCat(covCatNum);
			for(int i=0;i<arrayCodeRanges.Length;i++) {
				string codeRange=arrayCodeRanges[i];
				CovSpan span=new CovSpan();
				span.CovCatNum=covCatNum;
				if(codeRange.Contains("-")) {//Code range
					span.FromCode=codeRange.Substring(0,codeRange.IndexOf("-"));
					span.ToCode=codeRange.Substring(span.FromCode.Length+1);
				}
				else {//Single code
					span.FromCode=codeRange;
					span.ToCode=codeRange;
				}
				CovSpans.Insert(span);
			}
		}
Beispiel #19
0
		public static void CreateFrequencyCategory(long planNum,EbenefitCategory category,BenefitQuantity quantityQualifier,Byte quantity) {
			Benefit ben=new Benefit();
			ben.PlanNum=planNum;
			ben.BenefitType=InsBenefitType.Limitations;
			ben.CovCatNum=CovCats.GetForEbenCat(category).CovCatNum;
			ben.CoverageLevel=BenefitCoverageLevel.None;
			ben.TimePeriod=BenefitTimePeriod.None;
			ben.Quantity=quantity;
			ben.QuantityQualifier=quantityQualifier;
			Benefits.Insert(ben);
		}
Beispiel #20
0
 ///<summary>Gets a matching benefit category from the short list.  Returns null if not found, which should be tested for.</summary>
 public static CovCat GetForEbenCat(EbenefitCategory eben)
 {
     //No need to check RemotingRole; no call to db.
     return(CovCats.GetFirstOrDefault(x => x.EbenefitCat == eben, true));
 }
Beispiel #21
0
Datei: EB271.cs Projekt: mnisl/OD
		public EB03(string code,string descript) {
			this.code=code;
			this.descript=descript;
			this.serviceType=EbenefitCategory.None;//ignored
			this.isSupported=false;
		}
Beispiel #22
0
Datei: EB271.cs Projekt: mnisl/OD
		public EB03(string code,string descript,EbenefitCategory serviceType) {
			this.code=code;
			this.descript=descript;
			this.serviceType=serviceType;
			this.isSupported=true;
		}
Beispiel #23
0
 public static int CountForEbenCat(EbenefitCategory eben)
 {
     //No need to check RemotingRole; no call to db.
     return(CovCats.GetWhere(x => x.EbenefitCat == eben, true).Count);
 }
Beispiel #24
0
 public static Benefit CreateAgeLimitation(long planNum, EbenefitCategory category, int ageThrough,
                                           BenefitCoverageLevel coverageLevel = BenefitCoverageLevel.None, long codeNum = 0)
 {
     return(CreateFrequencyCategory(planNum, category, BenefitQuantity.AgeLimit, (byte)ageThrough, coverageLevel, codeNum));
 }
Beispiel #25
0
 public static void CreateAgeLimitation(long planNum, EbenefitCategory category, int ageThrough,
                                        BenefitCoverageLevel coverageLevel = BenefitCoverageLevel.None)
 {
     CreateFrequencyCategory(planNum, category, BenefitQuantity.AgeLimit, (byte)ageThrough, coverageLevel);
 }