Пример #1
0
 private void butAdd_Click(object sender,EventArgs e)
 {
     if(!Security.IsAuthorized(Permissions.InsPayCreate)) {//date not checked here, but it will be checked when saving the check to prevent backdating
         return;
     }
     ClaimPayment claimPayment=new ClaimPayment();
     claimPayment.CheckDate=DateTime.Now;
     claimPayment.IsPartial=true;
     FormClaimPayEdit FormCPE=new FormClaimPayEdit(claimPayment);
     FormCPE.IsNew=true;
     FormCPE.ShowDialog();
     if(FormCPE.DialogResult!=DialogResult.OK) {
         return;
     }
     FormClaimPayBatch FormCPB=new FormClaimPayBatch(claimPayment);
     //FormCPB.IsFromClaim=IsFromClaim;
     FormCPB.ShowDialog();
     if(FormCPB.GotoClaimNum!=0) {
         GotoClaimNum=FormCPB.GotoClaimNum;
         GotoPatNum=FormCPB.GotoPatNum;
         Close();
     }
     else {
         FillGrid();
     }
 }
Пример #2
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.InsPayCreate))             //date not checked here, but it will be checked when saving the check to prevent backdating
            {
                return;
            }
            ClaimPayment claimPayment = new ClaimPayment();

            claimPayment.CheckDate = DateTime.Now;
            claimPayment.IsPartial = true;
            FormClaimPayEdit FormCPE = new FormClaimPayEdit(claimPayment);

            FormCPE.IsNew = true;
            FormCPE.ShowDialog();
            if (FormCPE.DialogResult != DialogResult.OK)
            {
                return;
            }
            FormClaimPayBatch FormCPB = new FormClaimPayBatch(claimPayment);

            //FormCPB.IsFromClaim=IsFromClaim;
            FormCPB.ShowDialog();
            if (FormCPB.GotoClaimNum != 0)
            {
                GotoClaimNum = FormCPB.GotoClaimNum;
                GotoPatNum   = FormCPB.GotoPatNum;
                Close();
            }
            else
            {
                FillGrid();
            }
        }
Пример #3
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.InsPayCreate))             //date not checked here, but it will be checked when saving the check to prevent backdating
            {
                return;
            }
            ClaimPayment claimPayment = new ClaimPayment();

            claimPayment.CheckDate = DateTime.Now;
            claimPayment.IsPartial = true;
            FormClaimPayEdit FormCPE = new FormClaimPayEdit(claimPayment);

            FormCPE.IsNew = true;
            FormCPE.ShowDialog();
            if (FormCPE.DialogResult != DialogResult.OK)
            {
                return;
            }
            FormClaimPayBatch FormCPB = new FormClaimPayBatch(claimPayment, true);

            FormCPB.Show();
            FormCPB.FormClosed += FormCPB_FormClosed;
        }
Пример #4
0
		private void butClaimPayEdit_Click(object sender,EventArgs e) {
			FormClaimPayEdit FormCPE=new FormClaimPayEdit(ClaimPaymentCur);
			FormCPE.ShowDialog();
			FillClaimPayment();
			FillGrids();//For customer 5769, who was getting ocassional Chinese chars in the Amount boxes.
		}
Пример #5
0
		/*
		///<summary>Creates insurance check</summary>
		private void butCheckAdd_Click(object sender, System.EventArgs e) {
			if(!Security.IsAuthorized(Permissions.InsPayCreate)){//date not checked here, but it will be checked when saving the check to prevent backdating
				return;
			}
			bool existsReceived=false;
			for(int i=0;i<ClaimProcsForClaim.Count;i++){
				if((ClaimProcsForClaim[i].Status==ClaimProcStatus.Received
					|| ClaimProcsForClaim[i].Status==ClaimProcStatus.Supplemental)
					&& ClaimProcsForClaim[i].InsPayAmt!=0)
				{
					existsReceived=true;
				}
			}
			if(!existsReceived){
				MessageBox.Show(Lan.g(this,"There are no valid received payments for this claim."));
				return;
			}
			long tempClaimNum=ClaimCur.ClaimNum;
			ClaimPayment ClaimPaymentCur=new ClaimPayment();
			ClaimPaymentCur.CheckDate=DateTime.Today;
			ClaimPaymentCur.ClinicNum=PatCur.ClinicNum;
			ClaimPaymentCur.CarrierName=Carriers.GetName(InsPlans.GetPlan(ClaimCur.PlanNum,PlanList).CarrierNum);
			ClaimPayments.Insert(ClaimPaymentCur);
			FormClaimPayEditOld FormCPE=new FormClaimPayEditOld(ClaimPaymentCur);
			FormCPE.OriginatingClaimNum=ClaimCur.ClaimNum;
			FormCPE.IsNew=true;
			FormCPE.ShowDialog();
			//ClaimPaymentCur gets deleted within that form if user clicks cancel.
			ClaimList=Claims.Refresh(PatCur.PatNum);
			ClaimProcList=ClaimProcs.Refresh(PatCur.PatNum);
			FillGrids();
		}*/

		private void butBatch_Click(object sender,EventArgs e) {
			if(!Security.IsAuthorized(Permissions.InsPayCreate)) {//date not checked here, but it will be checked when saving the check to prevent backdating
				return;
			}
			if(!ClaimIsValid()) {
				return;
			}
			UpdateClaim();
			bool existsReceived=false;
			for(int i=0;i<ClaimProcsForClaim.Count;i++) {
				if((ClaimProcsForClaim[i].Status==ClaimProcStatus.Received
					|| ClaimProcsForClaim[i].Status==ClaimProcStatus.Supplemental)
					&& ClaimProcsForClaim[i].InsPayAmt!=0) 
				{
					existsReceived=true;
				}
			}
			if(!existsReceived) {
				MessageBox.Show(Lan.g(this,"There are no valid received payments for this claim."));
				return;
			}
			ClaimPayment claimPayment=new ClaimPayment();
			claimPayment.CheckDate=DateTime.Now;
			claimPayment.IsPartial=true;
			claimPayment.ClinicNum=PatCur.ClinicNum;
			claimPayment.CarrierName=Carriers.GetName(InsPlans.GetPlan(ClaimCur.PlanNum,PlanList).CarrierNum);
			ClaimPayments.Insert(claimPayment);
			double amt=ClaimProcs.AttachAllOutstandingToPayment(claimPayment.ClaimPaymentNum);
			claimPayment.CheckAmt=amt;
			ClaimPayments.Update(claimPayment);
			FormClaimPayEdit FormCPE=new FormClaimPayEdit(claimPayment);
			//FormCPE.IsNew=true;//not new.  Already added.
			FormCPE.ShowDialog();
			if(FormCPE.DialogResult!=DialogResult.OK) {
				ClaimPayments.Delete(claimPayment);
				return;
			}
			FormClaimPayBatch FormCPB=new FormClaimPayBatch(claimPayment);
			FormCPB.IsFromClaim=true;
			FormCPB.IsNew=true;
			FormCPB.ShowDialog();
			if(FormCPB.DialogResult!=DialogResult.OK) {
				//The user attached EOBs to the new claim payment and then clicked cancel. Then the user was asked if they wanted to delete the payment and they chose yes.
				//Since we are deleting the claim payment we must remove the attached EOBs or else ClaimPayments.Delete() will throw an exception.
				List<EobAttach> eobsAttached=EobAttaches.Refresh(claimPayment.ClaimPaymentNum);
				for(int i=0;i<eobsAttached.Count;i++) {
					EobAttaches.Delete(eobsAttached[i].EobAttachNum);
				}
				ClaimPayments.Delete(claimPayment);
				return;
			}
			//ClaimList=Claims.Refresh(PatCur.PatNum);
			//ClaimProcList=ClaimProcs.Refresh(PatCur.PatNum);
			//FillGrids();
			DialogResult=DialogResult.OK;
		}
Пример #6
0
 private void butClaimPayEdit_Click(object sender,EventArgs e)
 {
     FormClaimPayEdit FormCPE=new FormClaimPayEdit(ClaimPaymentCur);
     FormCPE.ShowDialog();
     FillClaimPayment();
 }
Пример #7
0
		private void butAdd_Click(object sender,EventArgs e) {
			if(!Security.IsAuthorized(Permissions.InsPayCreate)) {//date not checked here, but it will be checked when saving the check to prevent backdating
				return;
			}
			ClaimPayment claimPayment=new ClaimPayment();
			claimPayment.CheckDate=DateTime.Now;
			claimPayment.IsPartial=true;
			FormClaimPayEdit FormCPE=new FormClaimPayEdit(claimPayment);
			FormCPE.IsNew=true;
			FormCPE.ShowDialog();
			if(FormCPE.DialogResult!=DialogResult.OK) {
				return;
			}
			FormClaimPayBatch FormCPB=new FormClaimPayBatch(claimPayment);
			//FormCPB.IsFromClaim=IsFromClaim;
			FormCPB.ShowDialog();
			if(IsDisposed) {//Auto-Logoff was causing an unhandled exception below.  Can't use dialogue result check here because we want to referesh the grid below even if user clicked cancel.
				return; //Don't refresh the grid, as the form is already disposed.
			}
			if(FormCPB.GotoClaimNum!=0) {
				GotoClaimNum=FormCPB.GotoClaimNum;
				GotoPatNum=FormCPB.GotoPatNum;
				Close();
			}
			else {
				FillGrid();
			}
		}               
Пример #8
0
		/*
		///<summary>Creates insurance check</summary>
		private void butCheckAdd_Click(object sender, System.EventArgs e) {
			if(!Security.IsAuthorized(Permissions.InsPayCreate)){//date not checked here, but it will be checked when saving the check to prevent backdating
				return;
			}
			bool existsReceived=false;
			for(int i=0;i<ClaimProcsForClaim.Count;i++){
				if((ClaimProcsForClaim[i].Status==ClaimProcStatus.Received
					|| ClaimProcsForClaim[i].Status==ClaimProcStatus.Supplemental)
					&& ClaimProcsForClaim[i].InsPayAmt!=0)
				{
					existsReceived=true;
				}
			}
			if(!existsReceived){
				MessageBox.Show(Lan.g(this,"There are no valid received payments for this claim."));
				return;
			}
			long tempClaimNum=ClaimCur.ClaimNum;
			ClaimPayment ClaimPaymentCur=new ClaimPayment();
			ClaimPaymentCur.CheckDate=DateTime.Today;
			ClaimPaymentCur.ClinicNum=PatCur.ClinicNum;
			ClaimPaymentCur.CarrierName=Carriers.GetName(InsPlans.GetPlan(ClaimCur.PlanNum,PlanList).CarrierNum);
			ClaimPayments.Insert(ClaimPaymentCur);
			FormClaimPayEditOld FormCPE=new FormClaimPayEditOld(ClaimPaymentCur);
			FormCPE.OriginatingClaimNum=ClaimCur.ClaimNum;
			FormCPE.IsNew=true;
			FormCPE.ShowDialog();
			//ClaimPaymentCur gets deleted within that form if user clicks cancel.
			ClaimList=Claims.Refresh(PatCur.PatNum);
			ClaimProcList=ClaimProcs.Refresh(PatCur.PatNum);
			FillGrids();
		}*/

		private void butBatch_Click(object sender,EventArgs e) {
			if(!Security.IsAuthorized(Permissions.InsPayCreate)) {//date not checked here, but it will be checked when saving the check to prevent backdating
				return;
			}
			if(!ClaimIsValid()) {
				return;
			}
			UpdateClaim();
			bool existsReceived=false;
			bool isSupplemental=false;
			for(int i=0;i<ClaimProcsForClaim.Count;i++) {
				if((ClaimProcsForClaim[i].Status==ClaimProcStatus.Received
					|| ClaimProcsForClaim[i].Status==ClaimProcStatus.Supplemental)
					&& ClaimProcsForClaim[i].InsPayAmt!=0) 
				{
					existsReceived=true;
				}
				//Supplemental, has an insurance payment amount entered, and is not attached to a check yet, therefore it will be attached to the check below.
				if(ClaimProcsForClaim[i].Status==ClaimProcStatus.Supplemental && ClaimProcsForClaim[i].InsPayAmt!=0 && ClaimProcsForClaim[i].ClaimPaymentNum==0) {
					isSupplemental=true;
				}
			}
			if(!existsReceived) {
				MessageBox.Show(Lan.g(this,"There are no valid received payments for this claim."));
				return;
			}
			ClaimPayment claimPayment=new ClaimPayment();
			if(isSupplemental) {
				claimPayment.CheckDate=DateTimeOD.Today;//We cannot use the date the claim was received, because the claim received date corresponds to the first check.
			}
			else {
				claimPayment.CheckDate=ClaimCur.DateReceived;//This date is validated and parsed from the UI when UpdateClaim() is called above.
			}
			claimPayment.IsPartial=true;
			claimPayment.ClinicNum=PatCur.ClinicNum;
			claimPayment.CarrierName=Carriers.GetName(InsPlans.GetPlan(ClaimCur.PlanNum,PlanList).CarrierNum);
			ClaimPayments.Insert(claimPayment);
			double amt=ClaimProcs.AttachAllOutstandingToPayment(claimPayment.ClaimPaymentNum);
			claimPayment.CheckAmt=amt;
			ClaimPayments.Update(claimPayment);
			FormClaimPayEdit FormCPE=new FormClaimPayEdit(claimPayment);
			//FormCPE.IsNew=true;//not new.  Already added.
			FormCPE.ShowDialog();
			if(FormCPE.DialogResult!=DialogResult.OK) {
				ClaimPayments.Delete(claimPayment);
				return;
			}
			FormClaimPayBatch FormCPB=new FormClaimPayBatch(claimPayment);
			FormCPB.IsFromClaim=true;
			FormCPB.IsNew=true;
			FormCPB.ShowDialog();
			if(FormCPB.DialogResult!=DialogResult.OK) {
				//The user attached EOBs to the new claim payment and then clicked cancel. Then the user was asked if they wanted to delete the payment and they chose yes.
				//Since we are deleting the claim payment we must remove the attached EOBs or else ClaimPayments.Delete() will throw an exception.
				List<EobAttach> eobsAttached=EobAttaches.Refresh(claimPayment.ClaimPaymentNum);
				for(int i=0;i<eobsAttached.Count;i++) {
					EobAttaches.Delete(eobsAttached[i].EobAttachNum);
				}
				ClaimPayments.Delete(claimPayment);
				return;
			}
			//ClaimList=Claims.Refresh(PatCur.PatNum);
			//ClaimProcList=ClaimProcs.Refresh(PatCur.PatNum);
			//FillGrids();
			//At this point we know the user just added an insurance payment.  Check to see if they want the provider transfer window to show.
			ShowProviderTransferWindow();
			DialogResult=DialogResult.OK;
		}