Exemple #1
0
        ///<summary>Returns feeSchedNum</summary>
        public static long CreateFeeSched(FeeScheduleType feeSchedType, string suffix, bool isGlobal = true)
        {
            FeeSched feeSched = GetNewFeeSched(feeSchedType, suffix, isGlobal);

            FeeScheds.RefreshCache();
            return(feeSched.FeeSchedNum);
        }
Exemple #2
0
		///<summary>Returns feeSchedNum</summary>
		public static long CreateFeeSched(FeeScheduleType feeSchedType,string suffix){
			FeeSched feeSched=new FeeSched();
			feeSched.FeeSchedType=feeSchedType;
			feeSched.Description="FeeSched"+suffix;
			FeeScheds.Insert(feeSched);
			FeeScheds.RefreshCache();
			return feeSched.FeeSchedNum;
		}
Exemple #3
0
        public static FeeSched GetNewFeeSched(FeeScheduleType feeSchedType, string suffix, bool isGlobal = true)
        {
            FeeSched feeSched = new FeeSched();

            feeSched.FeeSchedType = feeSchedType;
            feeSched.Description  = "FeeSched" + suffix;
            feeSched.IsGlobal     = isGlobal;
            FeeScheds.Insert(feeSched);
            return(feeSched);
        }
Exemple #4
0
        ///<summary>Returns feeSchedNum</summary>
        public static long CreateFeeSched(FeeScheduleType feeSchedType, string suffix)
        {
            FeeSched feeSched = new FeeSched();

            feeSched.FeeSchedType = feeSchedType;
            feeSched.Description  = "FeeSched" + suffix;
            FeeScheds.Insert(feeSched);
            FeeScheds.RefreshCache();
            return(feeSched.FeeSchedNum);
        }
		///<summary>Will return null if exact name not found.</summary>
		public static FeeSched GetByExactName(string description,FeeScheduleType feeSchedType){
			//No need to check RemotingRole; no call to db.
			for(int i=0;i<FeeSchedC.ListLong.Count;i++){
				if(FeeSchedC.ListLong[i].FeeSchedType!=feeSchedType){
					continue;
				}
				if(FeeSchedC.ListLong[i].Description==description){
					return FeeSchedC.ListLong[i].Copy();
				}
			}
			return null;
		}
Exemple #6
0
 ///<summary>Will return null if exact name not found.</summary>
 public static FeeSched GetByExactName(string description, FeeScheduleType feeSchedType)
 {
     //No need to check RemotingRole; no call to db.
     for (int i = 0; i < FeeSchedC.ListLong.Count; i++)
     {
         if (FeeSchedC.ListLong[i].FeeSchedType != feeSchedType)
         {
             continue;
         }
         if (FeeSchedC.ListLong[i].Description == description)
         {
             return(FeeSchedC.ListLong[i].Copy());
         }
     }
     return(null);
 }
Exemple #7
0
        ///<summary>Only used in FormInsPlan and FormFeeScheds.</summary>
        public static List <FeeSched> GetListForType(FeeScheduleType feeSchedType, bool includeHidden)
        {
            //No need to check RemotingRole; no call to db.
            List <FeeSched> retVal = new List <FeeSched>();

            for (int i = 0; i < FeeSchedC.ListLong.Count; i++)
            {
                if (!includeHidden && FeeSchedC.ListLong[i].IsHidden)
                {
                    continue;
                }
                if (FeeSchedC.ListLong[i].FeeSchedType == feeSchedType)
                {
                    retVal.Add(FeeSchedC.ListLong[i].Copy());
                }
            }
            return(retVal);
        }
        private void FormFeeSchedules_Load(object sender, System.EventArgs e)
        {
            _listFeeScheds    = FeeScheds.GetDeepCopy(_isSelectionMode);
            _listFeeSchedsOld = _listFeeScheds.Select(x => x.Copy()).ToList();
            listType.Items.Add(Lan.g(this, "All"));
            Array arrayValues = Enum.GetValues(typeof(FeeScheduleType));

            for (int i = 0; i < arrayValues.Length; i++)
            {
                FeeScheduleType feeSchedType = ((FeeScheduleType)arrayValues.GetValue(i));
                if (feeSchedType == FeeScheduleType.OutNetwork)
                {
                    listType.Items.Add("Out of Network");
                }
                else
                {
                    listType.Items.Add(arrayValues.GetValue(i).ToString());
                }
            }
            listType.SelectedIndex = 0;
            if (!Security.IsAuthorized(Permissions.SecurityAdmin, true))
            {
                butCleanUp.Visible      = false;
                labelCleanUp.Visible    = false;
                butHideUnused.Visible   = false;
                labelHideUnused.Visible = false;
            }
            if (_isSelectionMode)
            {
                butOK.Visible           = true;
                butUp.Visible           = false;
                butDown.Visible         = false;
                butSort.Visible         = false;
                labelSort.Visible       = false;
                butAdd.Visible          = false;
                butCleanUp.Visible      = false;
                labelCleanUp.Visible    = false;
                butHideUnused.Visible   = false;
                labelHideUnused.Visible = false;
                groupBox7.Visible       = false;
            }
            FillGrid();
        }
Exemple #9
0
        ///<summary>Used to find FeeScheds of a certain type from within a given list.</summary>
        public static List <FeeSched> GetListForType(FeeScheduleType feeSchedType, bool includeHidden, List <FeeSched> listFeeScheds = null)
        {
            //No need to check RemotingRole; no call to db.
            listFeeScheds = listFeeScheds ?? GetDeepCopy();
            List <FeeSched> retVal = new List <FeeSched>();

            for (int i = 0; i < listFeeScheds.Count; i++)
            {
                if (!includeHidden && listFeeScheds[i].IsHidden)
                {
                    continue;
                }
                if (listFeeScheds[i].FeeSchedType == feeSchedType)
                {
                    retVal.Add(listFeeScheds[i]);
                }
            }
            return(retVal);
        }
        private void FormFeesForIns_Load(object sender, EventArgs e)
        {
            Array arrayValues = Enum.GetValues(typeof(FeeScheduleType));

            for (int i = 0; i < arrayValues.Length; i++)
            {
                FeeScheduleType feeSchedType = ((FeeScheduleType)arrayValues.GetValue(i));
                if (feeSchedType == FeeScheduleType.OutNetwork)
                {
                    listType.Items.Add("Out of Network");
                }
                else
                {
                    listType.Items.Add(arrayValues.GetValue(i).ToString());
                }
            }
            listType.SelectedIndex = 0;
            ResetSelections();
            FillGrid();
        }
        private void FormFeeSchedEdit_Load(object sender, System.EventArgs e)
        {
            textDescription.Text = FeeSchedCur.Description;
            if (!FeeSchedCur.IsNew)
            {
                listType.Enabled = false;
            }
            Array arrayValues = Enum.GetValues(typeof(FeeScheduleType));

            for (int i = 0; i < arrayValues.Length; i++)
            {
                FeeScheduleType feeSchedType = ((FeeScheduleType)arrayValues.GetValue(i));
                if (feeSchedType == FeeScheduleType.OutNetwork)
                {
                    listType.Items.Add("Out of Network");
                }
                else
                {
                    listType.Items.Add(arrayValues.GetValue(i).ToString());
                }
                if (FeeSchedCur.FeeSchedType == feeSchedType)
                {
                    listType.SetSelected(i, true);
                }
            }
            checkIsHidden.Checked = FeeSchedCur.IsHidden;
            if (Clinics.ClinicNum == 0)           //HQ clinic, let them change if a fee sched can be localized or not.
            {
                checkIsGlobal.Enabled = true;
            }
            if (FeeSchedCur.IsNew)
            {
                checkIsGlobal.Checked = true;
            }
            else
            {
                checkIsGlobal.Checked = FeeSchedCur.IsGlobal;
            }
            _listProviders = Providers.GetDeepCopy(true);
        }
Exemple #12
0
 ///<summary>Will return null if exact name not found.</summary>
 public static FeeSched GetByExactName(string description, FeeScheduleType feeSchedType)
 {
     //No need to check RemotingRole; no call to db.
     return(GetFirstOrDefault(x => x.FeeSchedType == feeSchedType && x.Description == description));
 }
Exemple #13
0
 ///<summary>Only used in FormInsPlan and FormFeeScheds.</summary>
 public static List<FeeSched> GetListForType(FeeScheduleType feeSchedType,bool includeHidden)
 {
     //No need to check RemotingRole; no call to db.
     List<FeeSched> retVal=new List<FeeSched>();
     for(int i=0;i<FeeSchedC.ListLong.Count;i++) {
         if(!includeHidden && FeeSchedC.ListLong[i].IsHidden){
             continue;
         }
         if(FeeSchedC.ListLong[i].FeeSchedType==feeSchedType){
             retVal.Add(FeeSchedC.ListLong[i].Copy());
         }
     }
     return retVal;
 }
Exemple #14
0
		///<summary>Based on the four supplied parameters, it updates all similar plans.  Used in a specific tool: FormFeesForIns.</summary>
		public static long SetFeeSched(long employerNum,string carrierName,string groupNum,string groupName,long feeSchedNum,
			FeeScheduleType feeSchedType)
		{
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetLong(MethodBase.GetCurrentMethod(),employerNum,carrierName,groupNum,groupName,feeSchedNum,feeSchedType);
			}
			//FIXME:UPDATE-MULTIPLE-TABLES
			/*string command="UPDATE insplan,carrier SET insplan.FeeSched="+POut.PInt(feeSchedNum)
				+" WHERE carrier.CarrierNum = insplan.CarrierNum "//employer.EmployerNum = insplan.EmployerNum "
				+"AND insplan.EmployerNum='"+POut.PInt(employerNum)+"' "
				+"AND carrier.CarrierName='"+POut.PString(carrierName)+"' "
				+"AND insplan.GroupNum='"+POut.PString(groupNum)+"' "
				+"AND insplan.GroupName='"+POut.PString(groupName)+"'";
			 return Db.NonQ(command);
			 */
			//Code rewritten so that it is not only MySQL compatible, but Oracle compatible as well.
			string command="SELECT insplan.PlanNum FROM insplan,carrier "
				+"WHERE carrier.CarrierNum = insplan.CarrierNum "//employer.EmployerNum = insplan.EmployerNum "
				+"AND insplan.EmployerNum='"+POut.Long(employerNum)+"' "
				+"AND carrier.CarrierName='"+POut.String(carrierName)+"' "
				+"AND insplan.GroupNum='"+POut.String(groupNum)+"' "
				+"AND insplan.GroupName='"+POut.String(groupName)+"'";
			DataTable table=Db.GetTable(command);
			if(table.Rows.Count==0){
				return 0;
			}
			command="UPDATE insplan SET ";
			if(feeSchedType==FeeScheduleType.Normal){
				command+="insplan.FeeSched ="+POut.Long(feeSchedNum)
					+" WHERE insplan.FeeSched !="+POut.Long(feeSchedNum);
			}
			else if(feeSchedType==FeeScheduleType.OutNetwork){
				command+="insplan.AllowedFeeSched ="+POut.Long(feeSchedNum)
					+" WHERE insplan.AllowedFeeSched !="+POut.Long(feeSchedNum);
			}
			else if(feeSchedType==FeeScheduleType.CoPay){
				command+="insplan.CopayFeeSched ="+POut.Long(feeSchedNum)
					+" WHERE insplan.CopayFeeSched !="+POut.Long(feeSchedNum);
			}
			command+=" AND (";
			for(int i=0;i<table.Rows.Count;i++){
				command+="PlanNum="+table.Rows[i][0].ToString();
				if(i<table.Rows.Count-1){
					command+=" OR ";
				}
			}
			command+=")";
			return Db.NonQ(command);
		}
Exemple #15
0
		///<summary>Used in FormFeesForIns</summary>
		public static DataTable GetListFeeCheck(string carrierName,string carrierNameNot,long feeSchedWithout,long feeSchedWith,
			FeeScheduleType feeSchedType)
		{
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetTable(MethodBase.GetCurrentMethod(),carrierName,carrierNameNot,feeSchedWithout,feeSchedWith,feeSchedType);
			}
			string pFeeSched="FeeSched";
			if(feeSchedType==FeeScheduleType.OutNetwork){
				pFeeSched="AllowedFeeSched";//This is the name of a column in the insplan table and cannot be changed to OutNetworkFeeSched
			}
			if(feeSchedType==FeeScheduleType.CoPay){
				pFeeSched="CopayFeeSched";
			}
			string command=
				"SELECT insplan.GroupName,insplan.GroupNum,employer.EmpName,carrier.CarrierName,"
				+"insplan.EmployerNum,insplan.CarrierNum,feesched.Description AS FeeSchedName,insplan.PlanType,"
				+"insplan."+pFeeSched+" feeSched "
				+"FROM insplan "
				+"LEFT JOIN employer ON employer.EmployerNum = insplan.EmployerNum "
				+"LEFT JOIN carrier ON carrier.CarrierNum = insplan.CarrierNum "
				+"LEFT JOIN feesched ON feesched.FeeSchedNum = insplan."+pFeeSched+" "
				+"WHERE carrier.CarrierName LIKE '%"+POut.String(carrierName)+"%' ";
			if(carrierNameNot!=""){
				command+="AND carrier.CarrierName NOT LIKE '%"+POut.String(carrierNameNot)+"%' ";
			}
			if(feeSchedWithout!=0){
				command+="AND insplan."+pFeeSched+" !="+POut.Long(feeSchedWithout)+" ";
			}
			if(feeSchedWith!=0) {
				command+="AND insplan."+pFeeSched+" ="+POut.Long(feeSchedWith)+" ";
			}
			command+="ORDER BY carrier.CarrierName,employer.EmpName,insplan.GroupNum";
			return Db.GetTable(command);
		}