private void gridFees_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e) { Fee FeeCur = Fees.GetFeeByOrder(ProcCode.ADACode, e.Row); //tbFees.SelectedRow=e.Row; //tbFees.ColorRow(e.Row,Color.LightGray); FormFeeEdit FormFE = new FormFeeEdit(); if (FeeCur == null) { FeeCur = new Fee(); FeeCur.ADACode = ProcCode.ADACode; FeeCur.FeeSched = DefB.Short[(int)DefCat.FeeSchedNames][e.Row].DefNum; Fees.Insert(FeeCur); FormFE.IsNew = true; } FormFE.FeeCur = FeeCur; FormFE.ShowDialog(); if (FormFE.DialogResult == DialogResult.OK) { FeeChanged = true; } Fees.Refresh(); //tbFees.SelectedRow=-1; FillFees(); }
private void gridMain_CellDoubleClick(object sender, UI.ODGridClickEventArgs e) { Fee fee = (Fee)gridMain.Rows[e.Row].Tag; FormFeeEdit FormFE = new FormFeeEdit(); if (fee.FeeNum == 0) { FormFE.IsNew = true; fee.CodeNum = _procCode.CodeNum; Fees.Insert(fee); //Pre-insert the fee before opening the edit window. } FormFE.FeeCur = fee; FormFE.ShowDialog(); if (FormFE.DialogResult == DialogResult.OK) { //FormFE could have manipulated the fee. Refresh our local cache and grids to reflect the changes. FillAndSortListFees(); FillGrid(); } }
private void gridFees_CellDoubleClick(object sender,OpenDental.UI.ODGridClickEventArgs e) { Fee FeeCur=Fees.GetFee(ProcCode.CodeNum,FeeSchedC.ListShort[e.Row].FeeSchedNum); //tbFees.SelectedRow=e.Row; //tbFees.ColorRow(e.Row,Color.LightGray); FormFeeEdit FormFE=new FormFeeEdit(); if(FeeCur==null) { FeeCur=new Fee(); FeeCur.FeeSched=FeeSchedC.ListShort[e.Row].FeeSchedNum; FeeCur.CodeNum=ProcCode.CodeNum; Fees.Insert(FeeCur); FormFE.IsNew=true; } FormFE.FeeCur=FeeCur; FormFE.ShowDialog(); if(FormFE.DialogResult==DialogResult.OK) { FeeChanged=true; } Fees.RefreshCache(); //tbFees.SelectedRow=-1; FillFees(); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { if(IsSelectionMode){ SelectedCodeNum=PIn.Long(ProcTable.Rows[e.Row]["CodeNum"].ToString()); DialogResult=DialogResult.OK; return; } //else not selecting a code if(!Security.IsAuthorized(Permissions.Setup,DateTime.MinValue,true)){ return; } long codeNum=PIn.Long(ProcTable.Rows[e.Row]["CodeNum"].ToString()); //string =ProcTable.Rows[e.Row]["ProcCode"].ToString(); if(e.Col>3){//if double clicked on a fee Fee FeeCur=null; long feesched=0; if(e.Col==4){ feesched=FeeSchedC.ListShort[listFeeSched.SelectedIndex].FeeSchedNum; FeeCur=Fees.GetFee(codeNum,feesched); } if(e.Col==5) { if(comboCompare1.SelectedIndex==0){ return; } feesched=FeeSchedC.ListShort[comboCompare1.SelectedIndex-1].FeeSchedNum; FeeCur=Fees.GetFee(codeNum,feesched); } if(e.Col==6) { if(comboCompare2.SelectedIndex==0) { return; } feesched=FeeSchedC.ListShort[comboCompare2.SelectedIndex-1].FeeSchedNum; FeeCur=Fees.GetFee(codeNum,feesched); } FormFeeEdit FormFE=new FormFeeEdit(); if(FeeCur==null) { FeeCur=new Fee(); FeeCur.FeeSched=feesched; FeeCur.CodeNum=codeNum; Fees.Insert(FeeCur); //SecurityLog is updated in FormFeeEdit. FormFE.IsNew=true; } FormFE.FeeCur=FeeCur; FormFE.ShowDialog(); if(FormFE.DialogResult==DialogResult.OK) { Fees.RefreshCache(); changed=true; FillGrid(); } } else {//not on a fee: Edit code instead FormProcCodeEdit FormPCE=new FormProcCodeEdit(ProcedureCodes.GetProcCodeFromDb(codeNum)); FormPCE.IsNew=false; FormPCE.ShowDialog(); if(FormPCE.DialogResult==DialogResult.OK) { //ProcedureCodes.Refresh(); changed=true; //Fees.Refresh();//fees were already refreshed within procCodeEdit FillGrid(); } } }
private void butUpdateAllowed_Click(object sender, System.EventArgs e) { InsPlan plan=InsPlans.GetPlan(ClaimProcCur.PlanNum,PlanList); if(plan==null){ //this should never happen } if(plan.AllowedFeeSched==0 && plan.PlanType!="p"){ MsgBox.Show(this,"Plan must either be a PPO type or it must have an 'Allowed' fee schedule set."); return; } long feeSched=-1; if(plan.AllowedFeeSched!=0) { feeSched=plan.AllowedFeeSched; } else if(plan.PlanType=="p") { feeSched=plan.FeeSched; } if(FeeScheds.GetIsHidden(feeSched)){ MsgBox.Show(this,"Allowed fee schedule is hidden, so no changes can be made."); return; } Fee FeeCur=Fees.GetFee(proc.CodeNum,feeSched); FormFeeEdit FormFE=new FormFeeEdit(); if(FeeCur==null){ FeeCur=new Fee(); FeeCur.FeeSched=feeSched; FeeCur.CodeNum=proc.CodeNum; Fees.Insert(FeeCur); FormFE.IsNew=true; } FormFE.FeeCur=FeeCur; FormFE.ShowDialog(); if(FormFE.DialogResult==DialogResult.OK){ Fees.RefreshCache(); DataValid.SetInvalid(InvalidType.Fees); } FillAllowed(); ComputeAmounts();//? }
private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { if (IsSelectionMode) { SelectedADA = ProcTable.Rows[e.Row]["ADACode"].ToString(); DialogResult = DialogResult.OK; return; } //else not selecting a code if (!Security.IsAuthorized(Permissions.Setup, DateTime.MinValue, true)) { return; } string ada = ProcTable.Rows[e.Row]["ADACode"].ToString(); if (e.Col > 3) //if double clicked on a fee { Fee FeeCur = null; int feesched = 0; if (e.Col == 4) { FeeCur = Fees.GetFeeByOrder(ada, listFeeSched.SelectedIndex); feesched = DefB.Short[(int)DefCat.FeeSchedNames][listFeeSched.SelectedIndex].DefNum; } if (e.Col == 5) { if (comboCompare1.SelectedIndex == 0) { return; } FeeCur = Fees.GetFeeByOrder(ada, comboCompare1.SelectedIndex - 1); feesched = DefB.Short[(int)DefCat.FeeSchedNames][comboCompare1.SelectedIndex - 1].DefNum; } if (e.Col == 6) { if (comboCompare2.SelectedIndex == 0) { return; } FeeCur = Fees.GetFeeByOrder(ada, comboCompare2.SelectedIndex - 1); feesched = DefB.Short[(int)DefCat.FeeSchedNames][comboCompare2.SelectedIndex - 1].DefNum; } FormFeeEdit FormFE = new FormFeeEdit(); if (FeeCur == null) { FeeCur = new Fee(); FeeCur.ADACode = ada; FeeCur.FeeSched = feesched; Fees.Insert(FeeCur); FormFE.IsNew = true; } FormFE.FeeCur = FeeCur; FormFE.ShowDialog(); if (FormFE.DialogResult == DialogResult.OK) { Fees.Refresh(); changed = true; FillGrid(); } } else //not on a fee: Edit code instead { FormProcCodeEdit FormPCE = new FormProcCodeEdit(ProcedureCodes.GetProcCode(ada)); FormPCE.IsNew = false; FormPCE.ShowDialog(); if (FormPCE.DialogResult == DialogResult.OK) { //ProcedureCodes.Refresh(); changed = true; //Fees.Refresh();//fees were already refreshed within procCodeEdit FillGrid(); } } }
private void butUpdateAllowed_Click(object sender, System.EventArgs e) { InsPlan plan=InsPlans.GetPlan(ClaimProcCur.PlanNum,PlanList); if(plan==null){ //this should never happen } if(plan.AllowedFeeSched==0 && plan.PlanType!="p"){ MsgBox.Show(this,"Plan must either be a PPO type or it must have an 'Allowed' fee schedule set."); return; } long feeSched=-1; if(plan.AllowedFeeSched!=0) { feeSched=plan.AllowedFeeSched; } else if(plan.PlanType=="p") { //The only other way to manually edit allowed fee schedule amounts is blocked via the Setup permission. //We only want to block PPO patients so that we don't partially break Blue Book users. if(!Security.IsAuthorized(Permissions.Setup)) { return; } feeSched=plan.FeeSched; } if(FeeScheds.GetIsHidden(feeSched)){ MsgBox.Show(this,"Allowed fee schedule is hidden, so no changes can be made."); return; } Fee FeeCur=Fees.GetFee(proc.CodeNum,feeSched); FormFeeEdit FormFE=new FormFeeEdit(); if(FeeCur==null){ FeeCur=new Fee(); FeeCur.FeeSched=feeSched; FeeCur.CodeNum=proc.CodeNum; Fees.Insert(FeeCur); //SecurityLog is updated in FormFeeEdit. FormFE.IsNew=true; } //Make an audit entry that the user manually launched the Fee Edit window from this location. SecurityLogs.MakeLogEntry(Permissions.ProcFeeEdit,0,Lan.g(this,"Procedure")+": "+ProcedureCodes.GetStringProcCode(FeeCur.CodeNum) +", "+Lan.g(this,"Fee: ")+""+FeeCur.Amount.ToString("c")+", "+Lan.g(this,"Fee Schedule")+": "+FeeScheds.GetDescription(FeeCur.FeeSched) +". "+Lan.g(this,"Manually launched Edit Fee window via Edit Claim Procedure window."),FeeCur.CodeNum); FormFE.FeeCur=FeeCur; FormFE.ShowDialog(); if(FormFE.DialogResult==DialogResult.OK){ Fees.RefreshCache(); DataValid.SetInvalid(InvalidType.Fees); } FillAllowed(); ComputeAmounts();//? }