private InsPlan GeneratePPOPlan(string suffix, bool codeSubstNone = true) { long baseFeeSchedNum = FeeSchedT.CreateFeeSched(FeeScheduleType.Normal, "Normal_" + suffix, true); Carrier carrier = CarrierT.CreateCarrier("Carrier_" + suffix); return(InsPlanT.CreateInsPlanPPO(carrier.CarrierNum, baseFeeSchedNum, codeSubstNone)); }
private InsPlan GenerateMediFlatInsPlan(string suffix, bool codeSubstNone = true) { long baseFeeSchedNum = FeeSchedT.CreateFeeSched(FeeScheduleType.Normal, "Normal_" + suffix, true); long copayFeeSchedNum = FeeSchedT.CreateFeeSched(FeeScheduleType.CoPay, "Copay_" + suffix, true); Carrier carrier = CarrierT.CreateCarrier("Carrier_" + suffix); return(InsPlanT.CreateInsPlanMediFlatCopay(carrier.CarrierNum, baseFeeSchedNum, copayFeeSchedNum, codeSubstNone)); }
private InsPlan GenerateCapPlan(string suffix, bool createAllowed = true, bool codeSubstNone = true) { long baseFeeSchedNum = FeeSchedT.CreateFeeSched(FeeScheduleType.Normal, "Normal_" + suffix, true); long allowedFeeSchedNum = 0; if (createAllowed) { allowedFeeSchedNum = FeeSchedT.CreateFeeSched(FeeScheduleType.Normal, "Allowed_" + suffix, true); } Carrier carrier = CarrierT.CreateCarrier("Carrier_" + suffix); return(InsPlanT.CreateInsPlanCapitation(carrier.CarrierNum, baseFeeSchedNum, allowedFeeSchedNum, codeSubstNone)); }
public void Claims_CalculateAndUpdate_PreauthOrderWriteoff() { string suffix = MethodBase.GetCurrentMethod().Name; //create the patient and insurance information Patient pat = PatientT.CreatePatient(suffix); //proc - Crown Procedure proc = ProcedureT.CreateProcedure(pat, "D2750", ProcStat.C, "8", 1000); long feeSchedNum1 = FeeSchedT.CreateFeeSched(FeeScheduleType.Normal, suffix); FeeT.CreateFee(feeSchedNum1, proc.CodeNum, 900); Carrier carrier = CarrierT.CreateCarrier(suffix); InsPlan insPlan = InsPlanT.CreateInsPlanPPO(carrier.CarrierNum, feeSchedNum1); BenefitT.CreateAnnualMax(insPlan.PlanNum, 1000); BenefitT.CreateCategoryPercent(insPlan.PlanNum, EbenefitCategory.Crowns, 100); InsSub sub = InsSubT.CreateInsSub(pat.PatNum, insPlan.PlanNum); PatPlan pp = PatPlanT.CreatePatPlan(1, pat.PatNum, sub.InsSubNum); //create lists and variables required for ComputeEstimates() List <InsSub> SubList = InsSubs.RefreshForFam(Patients.GetFamily(pat.PatNum)); List <InsPlan> listInsPlan = InsPlans.RefreshForSubList(SubList); List <PatPlan> listPatPlan = PatPlans.Refresh(pat.PatNum); List <Benefit> listBenefits = Benefits.Refresh(listPatPlan, SubList); List <Procedure> listProcsForPat = Procedures.Refresh(pat.PatNum); List <Procedure> procsForClaim = new List <Procedure>(); procsForClaim.Add(proc); //Create the claim and associated claimprocs //The order of these claimprocs is the whole point of the unit test. //Create Preauth ClaimProcs.CreateEst(new ClaimProc(), proc, insPlan, sub, 0, 500, true, true); //Create Estimate ClaimProcs.CreateEst(new ClaimProc(), proc, insPlan, sub, 1000, 1000, true, false); List <ClaimProc> listClaimProcs = ClaimProcs.Refresh(pat.PatNum); Claim claimWaiting = ClaimT.CreateClaim("W", listPatPlan, listInsPlan, listClaimProcs, listProcsForPat, pat, procsForClaim, listBenefits, SubList, false); Assert.AreEqual(100, claimWaiting.WriteOff, "WriteOff Amount"); }
public void InsPlans_GetAllowed_NoFeeSched() { Carrier carrier = CarrierT.CreateCarrier(MethodBase.GetCurrentMethod().Name); InsPlan plan = new InsPlan(); plan.CarrierNum = carrier.CarrierNum; plan.PlanType = ""; plan.CobRule = EnumCobRule.Basic; plan.PlanNum = InsPlans.Insert(plan); ProcedureCode procCode = _listProcCodes[13]; procCode.SubstitutionCode = _listProcCodes[14].ProcCode; ProcedureCodes.Update(procCode); Provider prov = Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv)); long provFeeSched = FeeSchedT.CreateFeeSched(FeeScheduleType.Normal, MethodBase.GetCurrentMethod().Name); prov.FeeSched = provFeeSched; Providers.Update(prov); Providers.RefreshCache(); Fee defaultFee = FeeT.GetNewFee(Providers.GetProv(PrefC.GetLong(PrefName.PracticeDefaultProv)).FeeSched, ProcedureCodes.GetSubstituteCodeNum(procCode.ProcCode, ""), 80); double amt = InsPlans.GetAllowed(procCode.ProcCode, plan.FeeSched, plan.AllowedFeeSched, plan.CodeSubstNone, plan.PlanType, "", 0, 0); Assert.AreEqual(defaultFee.Amount, amt); }