Пример #1
0
        private void butPatPicker_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            if (_jobQuote.PatNum != 0)
            {
                FormPS.ExplicitPatNums = new List <long> {
                    _jobQuote.PatNum
                };
            }
            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            Patient pat = Patients.GetPat(FormPS.SelectedPatNum);

            if (pat != null)
            {
                _jobQuote.PatNum = pat.PatNum;
                textPatient.Text = pat.GetNameFL();
            }
            else
            {
                _jobQuote.PatNum = 0;
                textPatient.Text = "Missing Patient - " + _jobQuote.PatNum;
            }
        }
Пример #2
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            //Only Jordan should be able to add resellers.
            if (!Security.IsAuthorized(Permissions.SecurityAdmin))
            {
                return;
            }
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (Patients.GetLim(FormPS.SelectedPatNum).Guarantor != FormPS.SelectedPatNum)
            {
                MsgBox.Show(this, "Customer must be a guarantor before they can be added as a reseller.");
                return;
            }
            if (Resellers.IsResellerFamily(FormPS.SelectedPatNum))
            {
                MsgBox.Show(this, "Customer is already a reseller.  CustomerNum: " + FormPS.SelectedPatNum);
                return;
            }
            Reseller reseller = new Reseller();

            reseller.PatNum = FormPS.SelectedPatNum;
            Resellers.Insert(reseller);
            FillGrid();
        }
Пример #3
0
        private void butMoveTo_Click(object sender, EventArgs e)
        {
            if (gridMain.GetSelectedIndex() < 0)
            {
                MsgBox.Show(this, "Please select a card first.");
                return;
            }
            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Move this credit card information to a different patient account?"))
            {
                return;
            }
            FormPatientSelect form = new FormPatientSelect();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            int        selected   = gridMain.GetSelectedIndex();
            CreditCard creditCard = _listCreditCards[selected];
            long       patNumOrig = creditCard.PatNum;

            creditCard.PatNum = form.SelectedPatNum;
            CreditCards.Update(creditCard);
            FillGrid();
            MsgBox.Show(this, "Credit card moved successfully");
            SecurityLogs.MakeLogEntry(Permissions.CreditCardMove, patNumOrig, $"Credit card moved to PatNum: {form.SelectedPatNum}");
            SecurityLogs.MakeLogEntry(Permissions.CreditCardMove, form.SelectedPatNum, $"Credit card moved from PatNum: {patNumOrig}");
        }
Пример #4
0
        private void butChange_Click(object sender, System.EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.SelectionModeOnly = true;
            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (Cur.ObjectType == TaskObjectType.Patient)
            {
                Cur.KeyNum = FormPS.SelectedPatNum;
            }
            if (Cur.ObjectType == TaskObjectType.Appointment)
            {
                FormApptsOther FormA = new FormApptsOther(FormPS.SelectedPatNum);
                FormA.SelectOnly = true;
                FormA.ShowDialog();
                if (FormA.DialogResult == DialogResult.Cancel)
                {
                    return;
                }
                Cur.KeyNum = FormA.AptSelected;
            }
            FillObject();
        }
Пример #5
0
        private void butMoveTo_Click(object sender, EventArgs e)
        {
            if (listCreditCards.SelectedIndex == -1)
            {
                MsgBox.Show(this, "Please select a card first.");
                return;
            }
            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Move this credit card information to a different patient account?"))
            {
                return;
            }
            FormPatientSelect form = new FormPatientSelect();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            int        selected   = listCreditCards.SelectedIndex;
            CreditCard creditCard = creditCards[selected];

            creditCard.PatNum = form.SelectedPatNum;
            CreditCards.Update(creditCard);
            RefreshCardList();
            MessageBox.Show("Credit card moved successfully");
        }
		private void butSearchTo_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.SelectionModeOnly=true;
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			ToPatNum=FormPS.SelectedPatNum;
			ShowPats();
		}
Пример #7
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            Referral refCur        = new Referral();
            bool     referralIsNew = true;

            if (MsgBox.Show(this, MsgBoxButtons.YesNo, "Is the referral source an existing patient?"))
            {
                FormPatientSelect FormPS = new FormPatientSelect();
                FormPS.SelectionModeOnly = true;
                FormPS.ShowDialog();
                if (FormPS.DialogResult != DialogResult.OK)
                {
                    return;
                }
                refCur.PatNum = FormPS.SelectedPatNum;
                Referral referral = Referrals.GetFirstOrDefault(x => x.PatNum == FormPS.SelectedPatNum);
                if (referral != null)
                {
                    refCur        = referral;
                    referralIsNew = false;
                }
            }
            FormReferralEdit FormRE2 = new FormReferralEdit(refCur);          //the ReferralNum must be added here

            FormRE2.IsNew = referralIsNew;
            FormRE2.ShowDialog();
            if (FormRE2.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            if (IsSelectionMode)
            {
                if (IsDoctorSelectionMode && !FormRE2.RefCur.IsDoctor)
                {
                    MsgBox.Show(this, "Please select a doctor referral.");
                    gridMain.SetSelected(false);                    //Remove selection to prevent caching issue on OK click.  This line is an attempted fix.
                    FillTable();
                    return;
                }
                SelectedReferral = FormRE2.RefCur;
                DialogResult     = DialogResult.OK;
                return;
            }
            else
            {
                FillTable();
                for (int i = 0; i < listRef.Count; i++)
                {
                    if (listRef[i].ReferralNum == FormRE2.RefCur.ReferralNum)
                    {
                        gridMain.SetSelected(i, true);
                    }
                }
            }
        }
Пример #8
0
		private void butChangePatientFrom_Click(object sender,EventArgs e) {
			FormPatientSelect fps=new FormPatientSelect();
			if(fps.ShowDialog()==DialogResult.OK) {
				long selectedPatNum=fps.SelectedPatNum;//to prevent warning about marshal-by-reference
				this.textPatientIDFrom.Text=selectedPatNum.ToString();
				Patient pat=Patients.GetPat(selectedPatNum);
				this.textPatientNameFrom.Text=pat.GetNameFLFormal();
				this.textPatFromBirthdate.Text=pat.Birthdate.ToShortDateString();
			}
			CheckUIState();
		}
Пример #9
0
        private void butPatPicker_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.SelectionModeOnly = true;
            if (FormPS.ShowDialog() == DialogResult.OK)
            {
                long patNum = FormPS.SelectedPatNum;
                textPatNum.Text = patNum.ToString();
            }
        }
Пример #10
0
        private void butFind_Click(object sender, EventArgs e)
        {
            FormPatientSelect formPatientSelect = new FormPatientSelect();

            if (formPatientSelect.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            _patNum          = formPatientSelect.SelectedPatNum;
            textPatient.Text = Patients.GetLim(_patNum).GetNameLF();
        }
Пример #11
0
        private void butPatSelect_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.SelectionModeOnly = true;
            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            textPatNum.Text = FormPS.SelectedPatNum.ToString();
        }
Пример #12
0
        private void butFind_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            _selectedPat = Patients.GetPat(FormPS.SelectedPatNum);
            FillGrid();
        }
Пример #13
0
        private void butPatSelect_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            PatCur = Patients.GetPat(FormPS.SelectedPatNum);
            FillPatientPicker();
        }
Пример #14
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            Referral refCur        = new Referral();
            bool     referralIsNew = true;

            if (MessageBox.Show(Lan.g(this, "Is the referral source an existing patient?"), ""
                                , MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                FormPatientSelect FormPS = new FormPatientSelect();
                FormPS.SelectionModeOnly = true;
                FormPS.ShowDialog();
                if (FormPS.DialogResult != DialogResult.OK)
                {
                    return;
                }
                refCur.PatNum = FormPS.SelectedPatNum;
                for (int i = 0; i < Referrals.List.Length; i++)
                {
                    if (Referrals.List[i].PatNum == FormPS.SelectedPatNum)                   //referral already existed
                    {
                        refCur        = Referrals.List[i];
                        referralIsNew = false;
                        break;
                    }
                }
            }
            FormReferralEdit FormRE2 = new FormReferralEdit(refCur);          //the ReferralNum must be added here

            FormRE2.IsNew = referralIsNew;
            FormRE2.ShowDialog();
            if (FormRE2.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            if (IsSelectionMode)
            {
                SelectedReferral = FormRE2.RefCur;
                DialogResult     = DialogResult.OK;
                return;
            }
            else
            {
                FillTable();
                for (int i = 0; i < listRef.Count; i++)
                {
                    if (listRef[i].ReferralNum == FormRE2.RefCur.ReferralNum)
                    {
                        gridMain.SetSelected(i, true);
                    }
                }
            }
        }
Пример #15
0
        private void butFind_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.SelectionModeOnly = true;
            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            SelectedPatNum = FormPS.SelectedPatNum;
            FillGrid();
        }
Пример #16
0
        private void butPickResponsParty_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.SelectionModeOnly = true;
            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            PlanCur.ResponsParty  = FormPS.SelectedPatNum;
            textResponsParty.Text = Patients.GetLim(PlanCur.ResponsParty).GetNameLF();
        }
        private void butMoveTo_Click(object sender, EventArgs e)
        {
            FormPatientSelect form = new FormPatientSelect();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            RegKey.PatNum = form.SelectedPatNum;
            RegistrationKeys.Update(RegKey);
            MessageBox.Show("Registration key moved successfully");
            DialogResult = DialogResult.OK;          //Chart module grid will refresh after closing this form, showing that the key is no longer in the ptinfo grid of the chart.
        }
Пример #18
0
        private void butMore_Click(object sender, System.EventArgs e)
        {
            FormPatientSelect FormP = new FormPatientSelect();

            FormP.SelectionModeOnly = true;
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            SelectedPatNum = FormP.SelectedPatNum;
            DialogResult   = DialogResult.OK;
        }
Пример #19
0
        private void butFind_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormP = new FormPatientSelect();

            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            PatNum           = FormP.SelectedPatNum;
            textPatient.Text = Patients.GetLim(PatNum).GetNameLF();
            FillGrid();
        }
        private void butPatientSelect_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPs = new FormPatientSelect();

            FormPs.SelectionModeOnly = true;
            FormPs.ShowDialog();
            if (FormPs.DialogResult != DialogResult.OK)
            {
                return;
            }
            _patNum = FormPs.SelectedPatNum;
            UpdateTextPatient();
        }
Пример #21
0
        private void butChangePatientFrom_Click(object sender, EventArgs e)
        {
            FormPatientSelect fps = new FormPatientSelect();

            if (fps.ShowDialog() == DialogResult.OK)
            {
                long selectedPatNum = fps.SelectedPatNum;              //to prevent warning about marshal-by-reference
                this.textPatientIDFrom.Text = selectedPatNum.ToString();
                Patient pat = Patients.GetPat(selectedPatNum);
                this.textPatientNameFrom.Text  = pat.GetNameFLFormal();
                this.textPatFromBirthdate.Text = pat.Birthdate.ToShortDateString();
            }
            CheckUIState();
        }
Пример #22
0
 private void butSelect_Click(object sender,EventArgs e)
 {
     FormPatientSelect FormPs=new FormPatientSelect();
     FormPs.SelectionModeOnly=true;
     FormPs.ShowDialog();
     if(FormPs.DialogResult!=DialogResult.OK) {
         return;
     }
     SelectedPatNum=FormPs.SelectedPatNum;
     //Security log for patient select.
     Patient pat=Patients.GetPat(SelectedPatNum);
     SecurityLogs.MakeLogEntry(Permissions.SheetEdit,SelectedPatNum,"Web form imported from: "+LnameEntered+", "+FnameEntered+" "+BdateEntered.ToShortDateString()
         +"\r\nUser selected pat: "+pat.LName+", "+pat.FName+" "+pat.Birthdate.ToShortDateString());
     DialogResult=DialogResult.OK;
 }
Пример #23
0
        private void butFind_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.SelectionModeOnly = true;
            if (FormPS.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            Family fam = Patients.GetFamily(FormPS.SelectedPatNum);

            textPatient.Text        = fam.GetNameInFamLF(FormPS.SelectedPatNum);
            _listSelectedFamPatNums = fam.ListPats.Select(x => x.PatNum).ToList();
            FillGrid();
        }
Пример #24
0
		private void butSelect_Click(object sender,EventArgs e) {
			FormPatientSelect FormPs=new FormPatientSelect();
			FormPs.SelectionModeOnly=true;
			FormPs.ShowDialog();
			if(FormPs.DialogResult!=DialogResult.OK) {
				return;
			}
			SelectedPatNum=FormPs.SelectedPatNum;
			//Security log for patient select.
			Patient pat=Patients.GetPat(SelectedPatNum);
			SecurityLogs.MakeLogEntry(Permissions.SheetEdit,SelectedPatNum,"In the 'Pick Patient for Web Form', this user clicked the 'Select' button.  "
				+"By clicking the 'Select' button, the web form for this patient: "+LnameEntered+", "+FnameEntered+" "+BdateEntered.ToShortDateString()+"  "
				+"was manually attached to this other patient: "+pat.LName+", "+pat.FName+" "+pat.Birthdate.ToShortDateString());
			DialogResult=DialogResult.OK;
		}
Пример #25
0
        private void butPatientSelect_Click(object sender, EventArgs e)
        {
            FormPatientSelect formPS = new FormPatientSelect();

            if (formPS.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            Patient pat = Patients.GetPat(formPS.SelectedPatNum);

            textCustomer.Text = pat.GetNameLF();
            WebChatSession oldWebChatSession = _webChatSession.Clone();

            _webChatSession.PatNum = pat.PatNum;
            WebChatSessions.Update(_webChatSession, oldWebChatSession);           //update here so we can associate pats after chat has ended, or before ownership.
        }
Пример #26
0
        private void butSelectPat_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormP = new FormPatientSelect();

            FormP.SelectionModeOnly = true;
            FormP.ShowDialog();
            if (FormP.DialogResult != DialogResult.OK)
            {
                return;
            }
            ReqCur.PatNum    = FormP.SelectedPatNum;
            textPatient.Text = Patients.GetPat(ReqCur.PatNum).GetNameFL();
            //if the patient changed, then the appointment must be detached.
            ReqCur.AptNum        = 0;
            textAppointment.Text = "";
        }
Пример #27
0
        private void butPatFind_Click(object sender, EventArgs e)
        {
            FormPatientSelect formP = new FormPatientSelect();

            formP.ShowDialog();
            if (formP.DialogResult != DialogResult.OK)
            {
                return;
            }
            Patient patCur = Patients.GetPat(formP.SelectedPatNum);

            PatNum                 = patCur.PatNum;
            TxtMsgOk               = patCur.TxtMsgOk;
            textPatient.Text       = patCur.GetNameLF();
            textWirelessPhone.Text = patCur.WirelessPhone;
        }
Пример #28
0
        private void butPatSelect_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (PatCur != null && PatCur.PatNum == FormPS.SelectedPatNum)
            {
                return;
            }
            PatCur                   = Patients.GetPat(FormPS.SelectedPatNum);
            textName.Text            = PatCur.GetNameFL();
            labelExistingLab.Visible = true;
        }
Пример #29
0
        private void CreateTask()
        {
            if (gridVoiceMails.SelectedCell.Y == -1 || gridVoiceMails.Rows.Count <= gridVoiceMails.SelectedCell.Y)
            {
                MsgBox.Show(this, "No voice mail selected");
                return;
            }
            VoiceMail voiceMailCur = (VoiceMail)gridVoiceMails.Rows[gridVoiceMails.SelectedCell.Y].Tag;
            VoiceMail voiceMailOld = voiceMailCur.Copy();

            if (voiceMailCur.PatNum == 0)           //Multiple patients had a match for the phone number
            {
                FormPatientSelect FormPS = new FormPatientSelect(new Patient {
                    HmPhone = voiceMailCur.PhoneNumber
                });
                if (FormPS.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                voiceMailCur.PatNum = FormPS.SelectedPatNum;
                VoiceMails.Update(voiceMailCur, voiceMailOld);
                FillGrid();
            }
            Task task = new Task()
            {
                TaskListNum = -1
            };                                                  //don't show it in any list yet.

            Tasks.Insert(task);
            Task taskOld = task.Copy();

            task.UserNum        = Security.CurUser.UserNum;
            task.TaskListNum    = Tasks.TriageTaskListNum;
            task.DateTimeEntry  = voiceMailCur.DateCreated;
            task.PriorityDefNum = Tasks.TriageBlueNum;
            task.ObjectType     = TaskObjectType.Patient;
            task.KeyNum         = voiceMailCur.PatNum;
            task.Descript       = "VM " + TelephoneNumbers.AutoFormat(voiceMailCur.PhoneNumber) + " ";
            FormTaskEdit FormTE = new FormTaskEdit(task, taskOld);

            FormTE.IsNew = true;
            FormTE.Show();            //non-modal
            FormTE.BringToFront();
            //The reason the below line didn't work is because popups would appear behind the task.
            //FormTE.TopMost=true;//For some techs, when they open a task from this window, it goes behind all the other windows. This is an attempted fix.
        }
Пример #30
0
        ///<summary>Returns true if a task was inserted into the DB, when true formTaskEdit is set. Otherwise null.</summary>
        private bool TryCreateTaskAndForm(out FormTaskEdit formTaskEdit)
        {
            formTaskEdit = null;
            if (gridVoiceMails.SelectedCell.Y == -1 || gridVoiceMails.ListGridRows.Count <= gridVoiceMails.SelectedCell.Y)
            {
                MsgBox.Show(this, "No voice mail selected");
                return(false);
            }
            VoiceMail voiceMailCur = (VoiceMail)gridVoiceMails.ListGridRows[gridVoiceMails.SelectedCell.Y].Tag;
            VoiceMail voiceMailOld = voiceMailCur.Copy();

            if (voiceMailCur.PatNum == 0)           //Multiple patients had a match for the phone number
            {
                FormPatientSelect FormPS = new FormPatientSelect(new Patient {
                    HmPhone = voiceMailCur.PhoneNumber
                });
                if (FormPS.ShowDialog() != DialogResult.OK)
                {
                    return(false);
                }
                voiceMailCur.PatNum = FormPS.SelectedPatNum;
                VoiceMails.Update(voiceMailCur, voiceMailOld);
                FillGrid();
            }
            Task task = new Task()
            {
                TaskListNum = -1
            };                                                  //don't show it in any list yet.

            Tasks.Insert(task);
            Task taskOld = task.Copy();

            task.UserNum        = Security.CurUser.UserNum;
            task.TaskListNum    = Tasks.TriageTaskListNum;
            task.DateTimeEntry  = voiceMailCur.DateCreated;
            task.PriorityDefNum = Tasks.TriageBlueNum;
            task.ObjectType     = TaskObjectType.Patient;
            task.KeyNum         = voiceMailCur.PatNum;
            task.Descript       = "VM " + TelephoneNumbers.AutoFormat(voiceMailCur.PhoneNumber) + " ";
            FormTaskEdit FormTE = new FormTaskEdit(task, taskOld);

            FormTE.IsNew = true;
            formTaskEdit = FormTE;
            return(true);
        }
Пример #31
0
        private void butSelect_Click(object sender, EventArgs e)
        {
            FormPatientSelect FormPs = new FormPatientSelect();

            FormPs.SelectionModeOnly = true;
            FormPs.ShowDialog();
            if (FormPs.DialogResult != DialogResult.OK)
            {
                return;
            }
            SelectedPatNum = FormPs.SelectedPatNum;
            //Security log for patient select.
            Patient pat = Patients.GetPat(SelectedPatNum);

            SecurityLogs.MakeLogEntry(Permissions.SheetEdit, SelectedPatNum, "Web form imported from: " + LnameEntered + ", " + FnameEntered + " " + BdateEntered.ToShortDateString()
                                      + "\r\nUser selected pat: " + pat.LName + ", " + pat.FName + " " + pat.Birthdate.ToShortDateString());
            DialogResult = DialogResult.OK;
        }
Пример #32
0
        private void gridCustomers_TitleAddClick(object sender, EventArgs e)
        {
            FormPatientSelect FormPS = new FormPatientSelect();

            FormPS.ShowDialog();
            if (FormPS.DialogResult != DialogResult.OK)
            {
                return;
            }
            JobLink jobLink = new JobLink()
            {
                FKey     = FormPS.SelectedPatNum,
                LinkType = JobLinkType.Customer
            };

            _listJobLinks.Add(jobLink);
            FillGridCustomers();
        }
        private void butPatFind_Click(object sender, EventArgs e)
        {
            Patient patCur = new Patient();

            patCur.LName = _x835Claim.PatientName.Lname;
            patCur.FName = _x835Claim.PatientName.Fname;
            FormPatientSelect formP = new FormPatientSelect(patCur);

            formP.PreFillSearchBoxes(patCur);
            if (formP.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            _errorProvider.Clear();
            _patNum          = formP.SelectedPatNum;
            textPatient.Text = Patients.GetLim(_patNum).GetNameLF();
            FillGridClaims();
        }
Пример #34
0
 private void butAdd_Click(object sender,System.EventArgs e)
 {
     Referral refCur=new Referral();
     bool referralIsNew=true;
     if(MessageBox.Show(Lan.g(this,"Is the referral source an existing patient?"),""
         ,MessageBoxButtons.YesNo)==DialogResult.Yes) {
         FormPatientSelect FormPS=new FormPatientSelect();
         FormPS.SelectionModeOnly=true;
         FormPS.ShowDialog();
         if(FormPS.DialogResult!=DialogResult.OK) {
             return;
         }
         refCur.PatNum=FormPS.SelectedPatNum;
         for(int i=0;i<Referrals.List.Length;i++) {
             if(Referrals.List[i].PatNum==FormPS.SelectedPatNum) {//referral already existed
                 refCur=Referrals.List[i];
                 referralIsNew=false;
                 break;
             }
         }
     }
     FormReferralEdit FormRE2=new FormReferralEdit(refCur);//the ReferralNum must be added here
     FormRE2.IsNew=referralIsNew;
     FormRE2.ShowDialog();
     if(FormRE2.DialogResult==DialogResult.Cancel) {
         return;
     }
     if(IsSelectionMode) {
         SelectedReferral=FormRE2.RefCur;
         DialogResult=DialogResult.OK;
         return;
     }
     else {
         FillTable();
         for(int i=0;i<listRef.Count;i++) {
             if(listRef[i].ReferralNum==FormRE2.RefCur.ReferralNum) {
                 gridMain.SetSelected(i,true);
             }
         }
     }
 }
Пример #35
0
		private void butPickResponsParty_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.SelectionModeOnly=true;
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK){
				return;
			}
			PlanCur.ResponsParty=FormPS.SelectedPatNum;
			textResponsParty.Text=Patients.GetLim(PlanCur.ResponsParty).GetNameLF();
		}
Пример #36
0
 private void butChangeGuar_Click(object sender, System.EventArgs e)
 {
     if(PayPlans.GetAmtPaid(PayPlanCur.PayPlanNum)!=0){
         MsgBox.Show(this,"Not allowed to change the guarantor because payments are attached.");
         return;
     }
     if(table.Rows.Count>0){
         MsgBox.Show(this,"Not allowed to change the guarantor without first clearing the amortization schedule.");
         return;
     }
     FormPatientSelect FormPS=new FormPatientSelect();
     FormPS.SelectionModeOnly=true;
     FormPS.ShowDialog();
     if(FormPS.DialogResult!=DialogResult.OK){
         return;
     }
     PayPlanCur.Guarantor=FormPS.SelectedPatNum;
     textGuarantor.Text=Patients.GetLim(PayPlanCur.Guarantor).GetNameLF();
 }
Пример #37
0
		private void butChangePat_Click(object sender,EventArgs e) {
			if(gridEmailMessages.SelectedIndices.Length==0) {
				MsgBox.Show(this,"Please select an email message.");
				return;
			}
			FormPatientSelect form=new FormPatientSelect();
			if(form.ShowDialog()!=DialogResult.OK) {
				return;
			}
			for(int i=0;i<gridEmailMessages.SelectedIndices.Length;i++) {
				EmailMessage emailMessage=(EmailMessage)gridEmailMessages.Rows[gridEmailMessages.SelectedIndices[i]].Tag;
				emailMessage.PatNum=form.SelectedPatNum;
				EmailMessages.UpdatePatNum(emailMessage);
			}
			MessageBox.Show(Lan.g(this,"Email messages moved successfully")+": "+gridEmailMessages.SelectedIndices.Length);
			FillGridEmailMessages();//Refresh grid to show changed patient.
		}
Пример #38
0
		private void butPatSelect_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			PatCur=Patients.GetPat(FormPS.SelectedPatNum);
			FillPatientPicker();
		}
Пример #39
0
		private void butMore_Click(object sender, System.EventArgs e) {
			FormPatientSelect FormP=new FormPatientSelect();
			FormP.SelectionModeOnly=true;
			FormP.ShowDialog();
			if(FormP.DialogResult!=DialogResult.OK){
				return;
			}
			SelectedPatNum=FormP.SelectedPatNum;
			DialogResult=DialogResult.OK;
		}
Пример #40
0
		private void butFind_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.SelectionModeOnly=true;
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			SelectedPatNum=FormPS.SelectedPatNum;
			FillGrid();
		}
Пример #41
0
		///<summary>Double click on appt sheet or on a single appointment.</summary>
		private void ContrApptSheet2_DoubleClick(object sender,System.EventArgs e) {
			mouseIsDown=false;
			//this logic is a little different than mouse down for now because on the first click of a 
			//double click, an appointment control is created under the mouse.
			if(ContrApptSingle.ClickedAptNum!=0) {//on appt
				long patnum=PIn.Long(TempApptSingle.DataRoww["PatNum"].ToString());
				TempApptSingle.Dispose();
				if(Appointments.GetOneApt(ContrApptSingle.ClickedAptNum)==null) {
					MsgBox.Show(this,"Selected appointment no longer exists.");
					RefreshModuleDataPeriod();
					RefreshModuleScreenPeriod();
					return;
				}
				//security handled inside the form
				FormApptEdit FormAE=new FormApptEdit(ContrApptSingle.ClickedAptNum);
				FormAE.ShowDialog();
				if(FormAE.DialogResult==DialogResult.OK) {
					Appointment apt=Appointments.GetOneApt(ContrApptSingle.ClickedAptNum);
					if(apt!=null && DoesOverlap(apt)) {
						Appointment aptOld=apt.Clone();
						MsgBox.Show(this,"Appointment is too long and would overlap another appointment.  Automatically shortened to fit.");
						while(DoesOverlap(apt)) {
							apt.Pattern=apt.Pattern.Substring(0,apt.Pattern.Length-1);
							if(apt.Pattern.Length==1) {
								break;
							}
						}
						try {
							Appointments.Update(apt,aptOld);
						}
						catch(ApplicationException ex) {
							MessageBox.Show(ex.Message);
						}
					}
					ModuleSelected(patnum);//apt.PatNum);//apt might be null if user deleted appt.
					SetInvalid();
				}
			}
			//not on apt, so trying to schedule an appointment---------------------------------------------------------------------
			else {
				if(!Security.IsAuthorized(Permissions.AppointmentCreate)) {
					return;
				}
				FormPatientSelect FormPS=new FormPatientSelect();
				if(PatCur!=null) {
					FormPS.InitialPatNum=PatCur.PatNum;
				}
				FormPS.ShowDialog();
				if(FormPS.DialogResult!=DialogResult.OK) {
					return;
				}
				if(PatCur==null || FormPS.SelectedPatNum!=PatCur.PatNum) {//if the patient was changed
					RefreshModuleDataPatient(FormPS.SelectedPatNum);
					OnPatientSelected(PatCur);
					//RefreshModulePatient(FormPS.SelectedPatNum);
				}
				Appointment apt;
				if(FormPS.NewPatientAdded) {
					//Patient pat=Patients.GetPat(PatCurNum);
					apt=new Appointment();
					apt.PatNum=PatCur.PatNum;
					apt.IsNewPatient=true;
					apt.Pattern="/X/";
					if(PatCur.PriProv==0) {
						apt.ProvNum=PrefC.GetLong(PrefName.PracticeDefaultProv);
					}
					else {
						apt.ProvNum=PatCur.PriProv;
					}
					apt.ProvHyg=PatCur.SecProv;
					apt.AptStatus=ApptStatus.Scheduled;
					DateTime d=AppointmentL.DateSelected;
					if(ApptDrawing.IsWeeklyView) {
						d=WeekStartDate.AddDays(SheetClickedonDay);
					}
					//minutes always rounded down.
					int minutes=(int)(ContrAppt.SheetClickedonMin/ApptDrawing.MinPerIncr)*ApptDrawing.MinPerIncr;
					apt.AptDateTime=new DateTime(d.Year,d.Month,d.Day,ContrAppt.SheetClickedonHour,minutes,0);
					if(PatCur.AskToArriveEarly>0) {
						apt.DateTimeAskedToArrive=apt.AptDateTime.AddMinutes(-PatCur.AskToArriveEarly);
						MessageBox.Show(Lan.g(this,"Ask patient to arrive")+" "+PatCur.AskToArriveEarly
							+" "+Lan.g(this,"minutes early at")+" "+apt.DateTimeAskedToArrive.ToShortTimeString()+".");
					}
					apt.Op=SheetClickedonOp;
					Operatory curOp=Operatories.GetOperatory(apt.Op);
					//New patient. Set to prospective if operatory is set to set prospective.
					if(curOp.SetProspective) {
						if(MsgBox.Show(this,MsgBoxButtons.OKCancel,"Patient's status will be set to Prospective.")) {
							Patient patOld=PatCur.Copy();
							PatCur.PatStatus=PatientStatus.Prospective;
							Patients.Update(PatCur,patOld);
						}
					}
					//if(curOp.ProvDentist!=0) {//if no dentist is assigned to op, then keep the original dentist.  All appts must have prov.
					//  apt.ProvNum=curOp.ProvDentist;
					//}
					//apt.ProvHyg=curOp.ProvHygienist;
					long assignedDent=Schedules.GetAssignedProvNumForSpot(SchedListPeriod,curOp,false,apt.AptDateTime);
					long assignedHyg=Schedules.GetAssignedProvNumForSpot(SchedListPeriod,curOp,true,apt.AptDateTime);
					if(assignedDent!=0) {//if no dentist is assigned to op, then keep the original dentist.  All appts must have prov.
					  apt.ProvNum=assignedDent;
					}
					apt.ProvHyg=assignedHyg;
					apt.IsHygiene=curOp.IsHygiene;
					apt.TimeLocked=PrefC.GetBool(PrefName.AppointmentTimeIsLocked);
					if(curOp.ClinicNum==0){
						apt.ClinicNum=PatCur.ClinicNum;
					}
					else{
						apt.ClinicNum=curOp.ClinicNum;
					}
					try {
						Appointments.Insert(apt);
					}
					catch(ApplicationException ex) {
						MessageBox.Show(ex.Message);
					}
					FormApptEdit FormAE=new FormApptEdit(apt.AptNum);//this is where security log entry is made
					FormAE.IsNew=true;
					FormAE.ShowDialog();
					if(apt.IsNewPatient) {
						AutomationL.Trigger(AutomationTrigger.CreateApptNewPat,null,apt.PatNum);
					}
					if(FormAE.DialogResult==DialogResult.OK) {
						RefreshModuleDataPatient(PatCur.PatNum);
						OnPatientSelected(PatCur);
						//RefreshModulePatient(PatCurNum);
						if(apt!=null && DoesOverlap(apt)) {
							Appointment aptOld=apt.Clone();
							MsgBox.Show(this,"Appointment is too long and would overlap another appointment.  Automatically shortened to fit.");
							while(DoesOverlap(apt)) {
								apt.Pattern=apt.Pattern.Substring(0,apt.Pattern.Length-1);
								if(apt.Pattern.Length==1) {
									break;
								}
							}
							try {
								Appointments.Update(apt,aptOld);
							}
							catch(ApplicationException ex) {
								MessageBox.Show(ex.Message);
							}
						}
						RefreshPeriod();
						SetInvalid();
					}
				}
				else {//new patient not added
					if(Appointments.HasPlannedEtc(PatCur.PatNum) | (Plugins.HookMethod(this,"ContrAppt.ContrApptSheet2_DoubleClick_apptOtherShow"))) {
						DisplayOtherDlg(true);
					}
					else {
						FormApptsOther FormAO=new FormApptsOther(PatCur.PatNum);//doesn't actually get shown
						CheckStatus();
						FormAO.InitialClick=true;
						FormAO.MakeAppointment();
						//if(FormAO.OResult==OtherResult.Cancel) {//this wasn't catching user hitting cancel from within appt edit window
						//	return;
						//}
						if(FormAO.AptNumsSelected.Count>0) {
							ContrApptSingle.SelectedAptNum=FormAO.AptNumsSelected[0];
						}
						//RefreshModuleDataPatient(FormAO.SelectedPatNum);//patient won't have changed
						//OnPatientSelected(PatCur.PatNum,PatCur.GetNameLF(),PatCur.Email!="",PatCur.ChartNumber);
						apt=Appointments.GetOneApt(ContrApptSingle.SelectedAptNum);
						if(apt!=null && DoesOverlap(apt)) {
							Appointment aptOld=apt.Clone();
							MsgBox.Show(this,"Appointment is too long and would overlap another appointment.  Automatically shortened to fit.");
							while(DoesOverlap(apt)) {
								apt.Pattern=apt.Pattern.Substring(0,apt.Pattern.Length-1);
								if(apt.Pattern.Length==1) {
									break;
								}
							}
							try {
								Appointments.Update(apt,aptOld);
							}
							catch(ApplicationException ex) {
								MessageBox.Show(ex.Message);
							}
						}
						RefreshPeriod();
						SetInvalid();
					}
				}
			}
		}
Пример #42
0
		private void OnPatient_Click() {
			FormPatientSelect formPS=new FormPatientSelect();
			formPS.ShowDialog();
			if(formPS.DialogResult==DialogResult.OK) {
				CurPatNum=formPS.SelectedPatNum;
				Patient pat=Patients.GetPat(CurPatNum);
				if(ContrChart2.Visible) {//If currently in the chart module, then also refresh NewCrop prescription information on top of a regular refresh.
					ContrChart2.ModuleSelectedNewCrop(CurPatNum);
				}
				else {
					RefreshCurrentModule();
				}
				FillPatientButton(pat);
				Plugins.HookAddCode(this,"FormOpenDental.OnPatient_Click_end");   
			}
		}
Пример #43
0
		private void ToolButAddSuper_Click() {
			if(PatCur.SuperFamily==0) {
				Patients.AssignToSuperfamily(PatCur.Guarantor,PatCur.Guarantor);
			}
			else {//we must want to add some other family to this superfamily
				FormPatientSelect formPS = new FormPatientSelect();
				formPS.SelectionModeOnly=true;
				formPS.ShowDialog();
				if(formPS.DialogResult!=DialogResult.OK) {
					return;
				}
				Patient patSelected=Patients.GetPat(formPS.SelectedPatNum);
				if(patSelected.SuperFamily==PatCur.SuperFamily) {
					MsgBox.Show(this,"That patient is already part of this superfamily.");
					return;
				}
				Patients.AssignToSuperfamily(patSelected.Guarantor,PatCur.SuperFamily);
			}
			ModuleSelected(PatCur.PatNum);
		}
		private void butMoveTo_Click(object sender,EventArgs e) {
			if(listCreditCards.SelectedIndex==-1) {
				MsgBox.Show(this,"Please select a card first.");
				return;
			}
			if(!MsgBox.Show(this,MsgBoxButtons.OKCancel,"Move this credit card information to a different patient account?")) {
				return;
			}
			FormPatientSelect form=new FormPatientSelect();
			if(form.ShowDialog()!=DialogResult.OK) {
				return;
			}
			int selected=listCreditCards.SelectedIndex;
			CreditCard creditCard=creditCards[selected];
			creditCard.PatNum=form.SelectedPatNum;
			CreditCards.Update(creditCard);
			RefreshCardList();
			MessageBox.Show("Credit card moved successfully");
		}
Пример #45
0
		//private void butMovePat_Click(object sender, System.EventArgs e) {
		private void ToolButMove_Click() {
			//At HQ, we cannot allow users to move patients of reseller families.
			if(PrefC.GetBool(PrefName.DockPhonePanelShow) && Resellers.IsResellerFamily(PatCur.Guarantor)) {
				MsgBox.Show(this,"Cannot move patients of a reseller family.");
				return;
			}
			Patient PatOld=PatCur.Copy();
			//Patient PatCur;
			if(PatCur.PatNum==PatCur.Guarantor){//if guarantor selected
				if(FamCur.ListPats.Length==1){//and no other family members
					//no need to check insurance.  It will follow.
					if(!MsgBox.Show(this,true,"Moving the guarantor will cause two families to be combined.  The financial notes for both families will be combined and may need to be edited.  The address notes will also be combined and may need to be edited. Do you wish to continue?")) {
						return;
					}
					if(!MsgBox.Show(this,true,"Select the family to move this patient to from the list that will come up next.")) {
						return;
					}
					FormPatientSelect FormPS=new FormPatientSelect();
					FormPS.SelectionModeOnly=true;
					FormPS.ShowDialog();
					if(FormPS.DialogResult!=DialogResult.OK){
						return;
					}
					Patient patInNewFam=Patients.GetPat(FormPS.SelectedPatNum);
					if(PatCur.SuperFamily!=patInNewFam.SuperFamily){//If they are moving into or out of a superfamily
						if(PatCur.SuperFamily!=0) {//If they are currently in a SuperFamily and moving out.  Otherwise, no superfamily popups to worry about.
							Popups.CopyForMovingSuperFamily(PatCur,patInNewFam.SuperFamily);
						}
					}
					PatCur.Guarantor=patInNewFam.Guarantor;
					PatCur.SuperFamily=patInNewFam.SuperFamily;
					Patients.Update(PatCur,PatOld);
					FamCur=Patients.GetFamily(PatCur.PatNum);
					Patients.CombineGuarantors(FamCur,PatCur);
				}
				else{//there are other family members
					MessageBox.Show(Lan.g(this,"You cannot move the guarantor.  If you wish to move the guarantor, you must make another family member the guarantor first."));
				}
			}
			else{//guarantor not selected
				if(!MsgBox.Show(this,true,"Preparing to move family member.  Financial notes and address notes will not be transferred.  Popups will be copied.  Proceed to next step?")){
					return;
				}
				switch(MessageBox.Show(Lan.g(this,"Create new family instead of moving to an existing family?"),"",MessageBoxButtons.YesNoCancel)){
					case DialogResult.Cancel:
						return;
					case DialogResult.Yes://new family (split)
						Popups.CopyForMovingFamilyMember(PatCur);//Copy Family Level Popups to new family. 
						//Don't need to copy SuperFamily Popups. Stays in same super family.
						PatCur.Guarantor=PatCur.PatNum;
						//keep current superfamily
						Patients.Update(PatCur,PatOld);
						break;
					case DialogResult.No://move to an existing family
						if(!MsgBox.Show(this,true,"Select the family to move this patient to from the list that will come up next.")){
							return;
						}
						FormPatientSelect FormPS=new FormPatientSelect();
						FormPS.SelectionModeOnly=true;
						FormPS.ShowDialog();
						if(FormPS.DialogResult!=DialogResult.OK){
							return;
						}						
						Patient patInNewFam=Patients.GetPat(FormPS.SelectedPatNum);
						if(patInNewFam.Guarantor==PatCur.Guarantor) {
							return;// Patient is already a part of the family.
						}
						Popups.CopyForMovingFamilyMember(PatCur);//Copy Family Level Popups to new Family. 
						if(PatCur.SuperFamily!=patInNewFam.SuperFamily){//If they are moving into or out of a superfamily
							if(PatCur.SuperFamily!=0) {//If they are currently in a SuperFamily.  Otherwise, no superfamily popups to worry about.
								Popups.CopyForMovingSuperFamily(PatCur,patInNewFam.SuperFamily);
							}
						}
						PatCur.Guarantor=patInNewFam.Guarantor;
						PatCur.SuperFamily=patInNewFam.SuperFamily;//assign to the new superfamily
						Patients.Update(PatCur,PatOld);
						break;
				}
			}//end guarantor not selected
			ModuleSelected(PatCur.PatNum);
		}
Пример #46
0
		private void butAdd_Click(object sender, System.EventArgs e) {
			if(PrefC.GetBool(PrefName.PublicHealthScreeningUsePat)) {
				/*
				FormScreenPatEdit FormSPE=new FormScreenPatEdit();
				FormSPE.IsNew=true;
				while(true) {
					FormSPE.ScreenPatCur=new ScreenPat();
					FormSPE.ScreenPatCur.ScreenGroupNum=ScreenGroupCur.ScreenGroupNum;
					FormSPE.ScreenPatCur.SheetNum=PrefC.GetLong(PrefName.PublicHealthScreeningSheet);
					FormSPE.ScreenGroupCur=ScreenGroupCur;
					FormSPE.ScreenGroupCur.Description=textDescription.Text;
					FormSPE.ShowDialog();
					if(FormSPE.DialogResult!=DialogResult.OK) {
						return;
					}
					FillGridScreenPat();
				}
				*/
				FormScreenPatEdit FormSPE=new FormScreenPatEdit();
				while(true) {
					FormPatientSelect FormPS=new FormPatientSelect();
					FormPS.ShowDialog();
					if(FormPS.DialogResult!=DialogResult.OK) {
						return;
					}
					ScreenPat screenPat=new ScreenPat();
					screenPat.ScreenGroupNum=ScreenGroupCur.ScreenGroupNum;
					screenPat.SheetNum=PrefC.GetLong(PrefName.PublicHealthScreeningSheet);
					screenPat.PatNum=FormPS.SelectedPatNum;
					ScreenPats.Insert(screenPat);
					if(FormPS.DialogResult!=DialogResult.OK) {
						return;
					}
					FillGridScreenPat();
				}
			}
			else {
				FormScreenEdit FormSE=new FormScreenEdit();
				FormSE.ScreenGroupCur=ScreenGroupCur;
				FormSE.IsNew=true;
				if(ScreenList.Length==0) {
					FormSE.ScreenCur=new OpenDentBusiness.Screen();
					FormSE.ScreenCur.ScreenGroupOrder=1;
				}
				else {
					FormSE.ScreenCur=ScreenList[ScreenList.Length-1];//'remembers' the last entry
					FormSE.ScreenCur.ScreenGroupOrder=FormSE.ScreenCur.ScreenGroupOrder+1;//increments for next
				}
				while(true) {
					FormSE.ShowDialog();
					if(FormSE.DialogResult!=DialogResult.OK) {
						return;
					}
					FormSE.ScreenCur.ScreenGroupOrder++;
					FillGrid();
				}
			}
		}
Пример #47
0
		private void butFind_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			_selectedPat=Patients.GetPat(FormPS.SelectedPatNum);
			FillGrid();
		}
		//Allows user to change to a different patient by clicking 'Select Patient' in the File menu dropdown
		public void selectPatientToolStripMenuItem_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS = new FormPatientSelect();
			FormPS.ShowDialog();
			if(FormPS.DialogResult == DialogResult.OK) {
				this.Hide();
				CurPatNum = FormPS.SelectedPatNum;
				pat = Patients.GetPat(CurPatNum);
				Patient PatNum = Patients.GetPat(CurPatNum);
				AnestheticData AnestheticDataCur;
				AnestheticDataCur = new AnestheticData();
				FormAnestheticRecord FormAR = new FormAnestheticRecord(pat,AnestheticDataCur);
				FormAR.ShowDialog();
				//Catches exception: If patient we are switching from has no saved aneshetics, FillControls will generate a null ref exception 
				try {
					FillControls(CurPatNum,AnestheticRecords.GetRecordNumByDate(listAnesthetics.SelectedItem.ToString()));
				}
				catch {
				}
				//changes the patient in the underlying module to the newly selected patient
				PatCur.PatNum = CurPatNum;
			}
		}
Пример #49
0
 private void checkPatOtherFam_Click(object sender, System.EventArgs e)
 {
     //this happens after the check change has been registered
     if(checkPatOtherFam.Checked){
         FormPatientSelect FormPS=new FormPatientSelect();
         FormPS.SelectionModeOnly=true;
         FormPS.ShowDialog();
         if(FormPS.DialogResult!=DialogResult.OK){
             checkPatOtherFam.Checked=false;
             return;
         }
         PaySplitCur.PatNum=FormPS.SelectedPatNum;
     }
     else{//switch to family view
         PaySplitCur.PatNum=0;//this will reset the selected patient to current patient
     }
     FillPatient();
 }
Пример #50
0
		private void butChange_Click(object sender,System.EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.SelectionModeOnly=true;
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			if(TaskCur.ObjectType==TaskObjectType.Patient) {
				TaskCur.KeyNum=FormPS.SelectedPatNum;
			}
			if(TaskCur.ObjectType==TaskObjectType.Appointment) {
				FormApptsOther FormA=new FormApptsOther(FormPS.SelectedPatNum);
				FormA.SelectOnly=true;
				FormA.ShowDialog();
				if(FormA.DialogResult==DialogResult.Cancel) {
					return;
				}
				TaskCur.KeyNum=FormA.AptNumsSelected[0];
			}
			FillObject();
		}
Пример #51
0
		private void butFind_Click(object sender,EventArgs e) {
			FormPatientSelect FormP=new FormPatientSelect();
			FormP.ShowDialog();
			if(FormP.DialogResult!=DialogResult.OK){
				return;
			}
			PatNum=FormP.SelectedPatNum;
			textPatient.Text=Patients.GetLim(PatNum).GetNameLF();
			FillGrid();
		}
Пример #52
0
 private void OnPatient_Click()
 {
     FormPatientSelect formPS=new FormPatientSelect();
     formPS.ShowDialog();
     if(formPS.DialogResult==DialogResult.OK) {
         CurPatNum=formPS.SelectedPatNum;
         Patient pat=Patients.GetPat(CurPatNum);
         RefreshCurrentModule();
         FillPatientButton(CurPatNum,pat.GetNameLF(),pat.Email!="",pat.ChartNumber,pat.SiteNum);
         Plugins.HookAddCode(this,"FormOpenDental.OnPatient_Click_end");
     }
 }
Пример #53
0
		private void butSelectPat_Click(object sender,EventArgs e) {
			FormPatientSelect FormP=new FormPatientSelect();
			FormP.SelectionModeOnly=true;
			FormP.ShowDialog();
			if(FormP.DialogResult!=DialogResult.OK){
				return;
			}
			ReqCur.PatNum=FormP.SelectedPatNum;
			textPatient.Text=Patients.GetPat(ReqCur.PatNum).GetNameFL();
			//if the patient changed, then the appointment must be detached.
			ReqCur.AptNum=0;
			textAppointment.Text="";
		}
Пример #54
0
		private void butMoveTo_Click(object sender,EventArgs e) {
			FormPatientSelect form=new FormPatientSelect();
			if(form.ShowDialog()!=DialogResult.OK) {
				return;
			}
			RegKey.PatNum=form.SelectedPatNum;
			RegistrationKeys.Update(RegKey);
			MessageBox.Show("Registration key moved successfully");
			DialogResult=DialogResult.OK;//Chart module grid will refresh after closing this form, showing that the key is no longer in the ptinfo grid of the chart.
		}
Пример #55
0
 private void butStartName_Click(object sender,EventArgs e)
 {
     FormPatientSelect FormPS = new FormPatientSelect();
     FormPS.SelectionModeOnly = true;
     FormPS.ShowDialog();
     if(FormPS.DialogResult != DialogResult.OK) {
         return;
     }
     textStartName.Text=Patients.GetPat(FormPS.SelectedPatNum).GetNameLF();
 }
Пример #56
0
		private void butPatSelect_Click(object sender,EventArgs e) {
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			if(PatCur!=null && PatCur.PatNum==FormPS.SelectedPatNum) {
				return;
			}
			PatCur=Patients.GetPat(FormPS.SelectedPatNum);
			textName.Text=PatCur.GetNameFL();
			labelExistingLab.Visible=true;
		}
Пример #57
0
		private void butAdd_Click(object sender,EventArgs e) {
			//Only Jordan should be able to add resellers.
			if(!Security.IsAuthorized(Permissions.SecurityAdmin)) {
				return;
			}
			FormPatientSelect FormPS=new FormPatientSelect();
			FormPS.ShowDialog();
			if(FormPS.DialogResult!=DialogResult.OK) {
				return;
			}
			if(Patients.GetLim(FormPS.SelectedPatNum).Guarantor!=FormPS.SelectedPatNum) {
				MsgBox.Show(this,"Customer must be a guarantor before they can be added as a reseller.");
				return;
			}
			if(Resellers.IsResellerFamily(FormPS.SelectedPatNum)) {
				MsgBox.Show(this,"Customer is already a reseller.  CustomerNum: "+FormPS.SelectedPatNum);
				return;
			}
			Reseller reseller=new Reseller();
			reseller.PatNum=FormPS.SelectedPatNum;
			Resellers.Insert(reseller);
			FillGrid();
		}