コード例 #1
0
 public EB03(string code, string descript)
 {
     this.code        = code;
     this.descript    = descript;
     this.serviceType = EbenefitCategory.None;          //ignored
     this.isSupported = false;
 }
コード例 #2
0
 public EB03(string code, string descript, EbenefitCategory serviceType)
 {
     this.code        = code;
     this.descript    = descript;
     this.serviceType = serviceType;
     this.isSupported = true;
 }
コード例 #3
0
ファイル: X271.cs プロジェクト: ChemBrain/OpenDental
        ///<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);
        }
コード例 #4
0
ファイル: BenefitT.cs プロジェクト: mnisl/OD
		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);
		}
コード例 #5
0
ファイル: CovCats.cs プロジェクト: nampn/ODental
 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;
 }
コード例 #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);
 }
コード例 #7
0
ファイル: BenefitT.cs プロジェクト: royedwards/DRDNet
        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);
        }
コード例 #8
0
ファイル: CovCats.cs プロジェクト: nampn/ODental
 ///<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);
 }
コード例 #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);
        }
コード例 #10
0
ファイル: BenefitT.cs プロジェクト: royedwards/DRDNet
        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);
        }
コード例 #11
0
ファイル: BenefitT.cs プロジェクト: ChemBrain/OpenDental
        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);
        }
コード例 #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);
        }
コード例 #13
0
ファイル: CovCats.cs プロジェクト: nampn/ODental
        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);
        }
コード例 #14
0
ファイル: CovCats.cs プロジェクト: azzedinerise/OpenDental
        ///<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());
        }
コード例 #15
0
ファイル: CovCats.cs プロジェクト: azzedinerise/OpenDental
        ///<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);
            }
        }
コード例 #16
0
ファイル: CovCats.cs プロジェクト: romeroyonatan/opendental
		///<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;
		}
コード例 #17
0
ファイル: BenefitT.cs プロジェクト: mnisl/OD
		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);
		}
コード例 #18
0
ファイル: CovCats.cs プロジェクト: mnisl/OD
		///<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);
			}
		}
コード例 #19
0
ファイル: BenefitT.cs プロジェクト: mnisl/OD
		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);
		}
コード例 #20
0
ファイル: CovCats.cs プロジェクト: azzedinerise/OpenDental
 ///<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));
 }
コード例 #21
0
ファイル: EB271.cs プロジェクト: mnisl/OD
		public EB03(string code,string descript) {
			this.code=code;
			this.descript=descript;
			this.serviceType=EbenefitCategory.None;//ignored
			this.isSupported=false;
		}
コード例 #22
0
ファイル: EB271.cs プロジェクト: mnisl/OD
		public EB03(string code,string descript,EbenefitCategory serviceType) {
			this.code=code;
			this.descript=descript;
			this.serviceType=serviceType;
			this.isSupported=true;
		}
コード例 #23
0
ファイル: CovCats.cs プロジェクト: azzedinerise/OpenDental
 public static int CountForEbenCat(EbenefitCategory eben)
 {
     //No need to check RemotingRole; no call to db.
     return(CovCats.GetWhere(x => x.EbenefitCat == eben, true).Count);
 }
コード例 #24
0
ファイル: BenefitT.cs プロジェクト: ChemBrain/OpenDental
 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));
 }
コード例 #25
0
ファイル: BenefitT.cs プロジェクト: royedwards/DRDNet
 public static void CreateAgeLimitation(long planNum, EbenefitCategory category, int ageThrough,
                                        BenefitCoverageLevel coverageLevel = BenefitCoverageLevel.None)
 {
     CreateFrequencyCategory(planNum, category, BenefitQuantity.AgeLimit, (byte)ageThrough, coverageLevel);
 }