public static InsuranceInfo AddInsurance(Patient pat, string carrierName, string planType = "", long feeSchedNum = 0, int ordinal = 1, bool isMedical = false, EnumCobRule cobRule = EnumCobRule.Basic, long copayFeeSchedNum = 0) { Carrier carrier = CarrierT.CreateCarrier(carrierName); InsPlan plan = InsPlanT.CreateInsPlan(carrier.CarrierNum, cobRule); InsPlan planOld = plan.Copy(); plan.PlanType = planType; plan.FeeSched = feeSchedNum; plan.IsMedical = isMedical; plan.CopayFeeSched = copayFeeSchedNum; InsPlans.Update(plan, planOld); InsSub sub = InsSubT.CreateInsSub(pat.PatNum, plan.PlanNum); PatPlan patPlan = PatPlanT.CreatePatPlan((byte)ordinal, pat.PatNum, sub.InsSubNum); return(new InsuranceInfo { ListCarriers = new List <Carrier> { carrier }, ListInsPlans = new List <InsPlan> { plan }, ListInsSubs = new List <InsSub> { sub }, ListPatPlans = new List <PatPlan> { patPlan }, }); }
public void AddInsurance(Patient pat, string carrierName, string planType = "", long feeSchedNum = 0, int ordinal = 1, bool isMedical = false, EnumCobRule cobRule = EnumCobRule.Basic, long copayFeeSchedNum = 0, int monthRenew = 0, string subscriberID = "1234", ExclusionRule exclusionRule = ExclusionRule.PracticeDefault) { Carrier carrier = CarrierT.CreateCarrier(carrierName); InsPlan plan = InsPlanT.CreateInsPlan(carrier.CarrierNum, cobRule); InsPlan planOld = plan.Copy(); plan.PlanType = planType; plan.MonthRenew = (byte)monthRenew; plan.FeeSched = feeSchedNum; plan.IsMedical = isMedical; plan.CopayFeeSched = copayFeeSchedNum; plan.ExclusionFeeRule = exclusionRule; InsPlans.Update(plan, planOld); InsSub sub = InsSubT.CreateInsSub(pat.PatNum, plan.PlanNum, subscriberID); PatPlan patPlan = PatPlanT.CreatePatPlan((byte)ordinal, pat.PatNum, sub.InsSubNum); ListCarriers.Add(carrier); ListInsPlans.Add(plan); ListInsSubs.Add(sub); ListPatPlans.Add(patPlan); Pat = pat; }