Пример #1
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            DataRow         row             = (DataRow)gridMain.ListGridRows[e.Row].Tag;
            long            selectedLabCase = PIn.Long(row["LabCaseNum"].ToString());
            FormLabCaseEdit FormL           = new FormLabCaseEdit();

            FormL.CaseCur = LabCases.GetOne(selectedLabCase);
            FormL.ShowDialog();
            switch (FormL.DialogResult)
            {
            default:
            case DialogResult.Cancel:                    //==Jordan don't refresh unless we have to.  It messes up the user's ordering.
                return;

            case DialogResult.Abort:                    //User was forced out of window due to a null object, refresh grid to remove missing row.
                FillGrid();
                return;

            case DialogResult.OK:
                //Intentionally blank
                break;
            }
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["LabCaseNum"].ToString() == selectedLabCase.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Пример #2
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            int             selectedLabCase = PIn.PInt(table.Rows[e.Row]["LabCaseNum"].ToString());
            FormLabCaseEdit FormL           = new FormLabCaseEdit();

            FormL.CaseCur = LabCases.GetOne(selectedLabCase);
            FormL.ShowDialog();
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["LabCaseNum"].ToString() == selectedLabCase.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Пример #3
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            LabCase lab = new LabCase();

            lab.PatNum = PatNum;
            Patient pat = Patients.GetPat(PatNum);

            lab.ProvNum         = Patients.GetProvNum(pat);
            lab.DateTimeCreated = MiscData.GetNowDateTime();
            FormLabCaseEdit FormL = new FormLabCaseEdit();

            FormL.CaseCur = lab;
            FormL.IsNew   = true;
            FormL.ShowDialog();
            if (FormL.DialogResult != DialogResult.OK)
            {
                return;
            }
            SelectedLabCaseNum = FormL.CaseCur.LabCaseNum;
            DialogResult       = DialogResult.OK;
        }
Пример #4
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            DataRow         row             = (DataRow)gridMain.Rows[e.Row].Tag;
            long            selectedLabCase = PIn.Long(row["LabCaseNum"].ToString());
            FormLabCaseEdit FormL           = new FormLabCaseEdit();

            FormL.CaseCur = LabCases.GetOne(selectedLabCase);
            FormL.ShowDialog();
            if (FormL.DialogResult != DialogResult.OK)
            {
                return;                //don't refresh unless we have to.  It messes up the user's ordering.
            }
            FillGrid();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (table.Rows[i]["LabCaseNum"].ToString() == selectedLabCase.ToString())
                {
                    gridMain.SetSelected(i, true);
                    break;
                }
            }
        }
Пример #5
0
		private void butLab_Click(object sender,EventArgs e) {
			if(DS.Tables["Misc"].Rows[0]["LabCaseNum"].ToString()=="0"){//no labcase
				//so let user pick one to add
				FormLabCaseSelect FormL=new FormLabCaseSelect();
				FormL.PatNum=AptCur.PatNum;
				FormL.IsPlanned=AptCur.AptStatus==ApptStatus.Planned;
				FormL.ShowDialog();
				if(FormL.DialogResult!=DialogResult.OK){
					return;
				}
				if(AptCur.AptStatus==ApptStatus.Planned){
					LabCases.AttachToPlannedAppt(FormL.SelectedLabCaseNum,AptCur.AptNum);
				}
				else{
					LabCases.AttachToAppt(FormL.SelectedLabCaseNum,AptCur.AptNum);
				}
			}
			else{//already a labcase attached
				FormLabCaseEdit FormLCE=new FormLabCaseEdit();
				FormLCE.CaseCur=LabCases.GetOne(PIn.Long(DS.Tables["Misc"].Rows[0]["LabCaseNum"].ToString()));
				FormLCE.ShowDialog();
				if(FormLCE.DialogResult!=DialogResult.OK){
					return;
				}
				//Deleting or detaching labcase would have been done from in that window
			}
			DS.Tables.Remove("Misc");
			DS.Tables.Add(Appointments.GetApptEdit(AptCur.AptNum).Tables["Misc"].Copy());
			textLabCase.Text=DS.Tables["Misc"].Rows[0]["labDescript"].ToString();
		}
Пример #6
0
 private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     DataRow row=(DataRow)gridMain.Rows[e.Row].Tag;
     long selectedLabCase=PIn.Long(row["LabCaseNum"].ToString());
     FormLabCaseEdit FormL=new FormLabCaseEdit();
     FormL.CaseCur=LabCases.GetOne(selectedLabCase);
     FormL.ShowDialog();
     if(FormL.DialogResult!=DialogResult.OK) {
         return;//don't refresh unless we have to.  It messes up the user's ordering.
     }
     FillGrid();
     for(int i=0;i<table.Rows.Count;i++){
         if(table.Rows[i]["LabCaseNum"].ToString()==selectedLabCase.ToString()){
             gridMain.SetSelected(i,true);
             break;
         }
     }
 }
Пример #7
0
		private void gridProg_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			Chartscrollval=gridProg.ScrollValue;
			DataRow row=(DataRow)gridProg.Rows[e.Row].Tag;
			if(row["ProcNum"].ToString()!="0"){
				if(checkAudit.Checked){
					MsgBox.Show(this,"Not allowed to edit procedures when in audit mode.");
					return;
				}
				Procedure proc=Procedures.GetOneProc(PIn.Long(row["ProcNum"].ToString()),true);
				if(ProcedureCodes.GetStringProcCode(proc.CodeNum)==ProcedureCodes.GroupProcCode){
					FormProcGroup FormP=new FormProcGroup();		
					List<ProcGroupItem> groupItemList=ProcGroupItems.GetForGroup(proc.ProcNum);
					List<Procedure> procList=new List<Procedure>();
					for(int i=0;i<groupItemList.Count;i++){
						procList.Add(Procedures.GetOneProc(groupItemList[i].ProcNum,false));
					}
					FormP.GroupCur=proc;
					FormP.GroupItemList=groupItemList;
					FormP.ProcList=procList;
					FormP.ShowDialog();
					if(FormP.DialogResult==DialogResult.OK){
						ModuleSelected(PatCur.PatNum);
						FillProgNotes();
					}
					return;
				}
				else{
					FormProcEdit FormP=new FormProcEdit(proc,PatCur,FamCur);
					Plugins.HookAddCode(this, "ContrChart.gridProg_CellDoubleClick_proc", proc, FormP);
					if(!FormP.IsDisposed) { //Form might be disposed by the above hook.
						FormP.ShowDialog();
					} 
					Plugins.HookAddCode(this, "ContrChart.gridProg_CellDoubleClick_proc2", proc, FormP);
					if(FormP.DialogResult!=DialogResult.OK) {
						return;
					}
				}
			}
			else if(row["CommlogNum"].ToString()!="0"){
				Commlog comm=Commlogs.GetOne(PIn.Long(row["CommlogNum"].ToString()));
				FormCommItem FormC=new FormCommItem(comm);
				FormC.ShowDialog();
				if(FormC.DialogResult!=DialogResult.OK){
					return;
				}
			}
			else if(row["RxNum"].ToString()!="0") {
				RxPat rx=RxPats.GetRx(PIn.Long(row["RxNum"].ToString()));
				FormRxEdit FormRxE=new FormRxEdit(PatCur,rx);
				FormRxE.ShowDialog();
				if(FormRxE.DialogResult!=DialogResult.OK){
					return;
				}
			}
			else if(row["LabCaseNum"].ToString()!="0") {
				LabCase lab=LabCases.GetOne(PIn.Long(row["LabCaseNum"].ToString()));
				FormLabCaseEdit FormL=new FormLabCaseEdit();
				FormL.CaseCur=lab;
				FormL.ShowDialog();
				//needs to always refresh due to complex ok/cancel
			}
			else if(row["TaskNum"].ToString()!="0") {
				Task task=Tasks.GetOne(PIn.Long(row["TaskNum"].ToString()));
				if(task==null) {
					MsgBox.Show(this,"This task has been deleted by another user.");
				}
				else {
					FormTaskEdit FormT=new FormTaskEdit(task,task.Copy());
					FormT.Closing+=new CancelEventHandler(TaskGoToEvent);
					FormT.Show();//non-modal
				}
			}
			else if(row["AptNum"].ToString()!="0") {
				//Appointment apt=Appointments.GetOneApt(
				FormApptEdit FormA=new FormApptEdit(PIn.Long(row["AptNum"].ToString()));
				//PinIsVisible=false
				FormA.IsInChartModule=true;
				FormA.ShowDialog();
				if(FormA.CloseOD) {
					((Form)this.Parent).Close();
					return;
				}
				if(FormA.DialogResult!=DialogResult.OK) {
					return;
				}
			}
			else if(row["EmailMessageNum"].ToString()!="0") {
				EmailMessage msg=EmailMessages.GetOne(PIn.Long(row["EmailMessageNum"].ToString()));
				if(msg.SentOrReceived==EmailSentOrReceived.WebMailReceived
					|| msg.SentOrReceived==EmailSentOrReceived.WebMailRecdRead
					|| msg.SentOrReceived==EmailSentOrReceived.WebMailSent
					|| msg.SentOrReceived==EmailSentOrReceived.WebMailSentRead) 
				{
					//web mail uses special secure messaging portal
					FormWebMailMessageEdit FormWMME=new FormWebMailMessageEdit(PatCur.PatNum,msg.EmailMessageNum);
					if(FormWMME.ShowDialog()!=DialogResult.OK) {
						return;
					}
				}
				else {
					FormEmailMessageEdit FormE=new FormEmailMessageEdit(msg);
					FormE.ShowDialog();
					if(FormE.DialogResult!=DialogResult.OK) {
						return;
					}
				}
			}
			else if(row["SheetNum"].ToString()!="0") {
				Sheet sheet=Sheets.GetSheet(PIn.Long(row["SheetNum"].ToString()));
				FormSheetFillEdit FormSFE=new FormSheetFillEdit(sheet);
				FormSFE.ShowDialog();
				if(FormSFE.DialogResult!=DialogResult.OK) {
					return;
				}
			}
			else if(row["FormPatNum"].ToString()!="0"){
				FormPat form=FormPats.GetOne(PIn.Long(row["FormPatNum"].ToString()));
				FormFormPatEdit FormP=new FormFormPatEdit();
				FormP.FormPatCur=form;
				FormP.ShowDialog();
				if(FormP.DialogResult==DialogResult.OK)
				{
					ModuleSelected(PatCur.PatNum);//Why is this called here and down 3 lines? Do we need the Allocator, or should we return here?
				}
			}
			ModuleSelected(PatCur.PatNum);
			Reporting.Allocators.MyAllocator1_ProviderPayment.AllocateWithToolCheck(this.PatCur.Guarantor);
		}
Пример #8
0
		private void Tool_LabCase_Click() {
			LabCase lab=new LabCase();
			lab.PatNum=PatCur.PatNum;
			lab.ProvNum=Patients.GetProvNum(PatCur);
			lab.DateTimeCreated=MiscData.GetNowDateTime();
			LabCases.Insert(lab);//it will be deleted inside the form if user clicks cancel.
			//We need the primary key in order to attach lab slip.
			FormLabCaseEdit FormL=new FormLabCaseEdit();
			FormL.CaseCur=lab;
			FormL.IsNew=true;
			FormL.ShowDialog();
			//needs to always refresh due to complex ok/cancel
			ModuleSelected(PatCur.PatNum);
		}
Пример #9
0
		private void gridProg_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			//Chartscrollval = gridProg.ScrollValue;
			DataRow row = (DataRow)gridProg.Rows[e.Row].Tag;
			if(row["ProcNum"].ToString() != "0") {
				if(checkAudit.Checked) {
					MsgBox.Show(this,"Not allowed to edit procedures when in audit mode.");
					return;
				}
				Procedure proc = Procedures.GetOneProc(PIn.Long(row["ProcNum"].ToString()),true);
				FormProcEdit FormP = new FormProcEdit(proc,PatCur,FamCur);
				FormP.ShowDialog();
				if(FormP.DialogResult != DialogResult.OK) {
					return;
				}
			}
			else if(row["CommlogNum"].ToString() != "0") {
				Commlog comm = Commlogs.GetOne(PIn.Long(row["CommlogNum"].ToString()));
				FormCommItem FormC = new FormCommItem(comm);
				FormC.ShowDialog();
				if(FormC.DialogResult != DialogResult.OK) {
					return;
				}
			}
			else if(row["RxNum"].ToString() != "0") {
				RxPat rx = RxPats.GetRx(PIn.Long(row["RxNum"].ToString()));
				FormRxEdit FormRxE = new FormRxEdit(PatCur,rx);
				FormRxE.ShowDialog();
				if(FormRxE.DialogResult != DialogResult.OK) {
					return;
				}
			}
			else if(row["LabCaseNum"].ToString() != "0") {
				LabCase lab = LabCases.GetOne(PIn.Long(row["LabCaseNum"].ToString()));
				FormLabCaseEdit FormL = new FormLabCaseEdit();
				FormL.CaseCur = lab;
				FormL.ShowDialog();
			}
			else if(row["TaskNum"].ToString() != "0") {
				Task task = Tasks.GetOne(PIn.Long(row["TaskNum"].ToString()));
				FormTaskEdit FormT = new FormTaskEdit(task,task.Copy());
				FormT.Closing+=new CancelEventHandler(TaskGoToEvent);
				FormT.Show();//non-modal
			}
			else if(row["AptNum"].ToString() != "0") {
				//Appointment apt=Appointments.GetOneApt(
				FormApptEdit FormA = new FormApptEdit(PIn.Long(row["AptNum"].ToString()));
				//PinIsVisible=false
				FormA.ShowDialog();
				if(FormA.DialogResult != DialogResult.OK) {
					return;
				}
			}
			else if(row["EmailMessageNum"].ToString() != "0") {
				EmailMessage msg = EmailMessages.GetOne(PIn.Long(row["EmailMessageNum"].ToString()));
				FormEmailMessageEdit FormE = new FormEmailMessageEdit(msg);
				FormE.ShowDialog();
				if(FormE.DialogResult != DialogResult.OK) {
					return;
				}
			}
			ModuleSelected(PatCur.PatNum);
		}
Пример #10
0
		private void butAdd_Click(object sender,EventArgs e) {
			LabCase lab=new LabCase();
			lab.PatNum=PatNum;
			Patient pat=Patients.GetPat(PatNum);
			lab.ProvNum=Patients.GetProvNum(pat);
			lab.DateTimeCreated=MiscData.GetNowDateTime();
			LabCases.Insert(lab);
			FormLabCaseEdit FormL=new FormLabCaseEdit();
			FormL.CaseCur=lab;
			FormL.IsNew=true;
			FormL.ShowDialog();
			if(FormL.DialogResult!=DialogResult.OK){
				return;
			}
			SelectedLabCaseNum=FormL.CaseCur.LabCaseNum;
			DialogResult=DialogResult.OK;
		}