Exemple #1
0
 void grdWorkList_DoubleClick(object sender, EventArgs e)
 {
     _LastDoubleMode = AppType.AppEnum.DoubleMode.WorkList;
     _DoubleMode = AppType.AppEnum.DoubleMode.WorkList;
     BeginExam();
 }
Exemple #2
0
        public void BeginExam()
        {
            try
            {
                if (tabControl2.SelectedIndex == 0 && (grdWorkList.RowCount <= 0 || grdWorkList.CurrentRow == null))
                {
                    mdlStatic.SetMsg(lblMsg, MultiLanguage.GetText(globalVariables.DisplayLanguage, "Bạn phải chọn Bệnh nhân để bắt đầu chụp", "you have to choose one patient to begin service"), true);
                    return;
                }
                if (_CurrAct == action.FirstOrFinished)
                {
                    if (tabControl2.SelectedIndex == 1 && (grdWorkListSuspending.RowCount <= 0 || grdWorkListSuspending.CurrentRow == null))
                    {
                        mdlStatic.SetMsg(lblMsg, MultiLanguage.GetText(globalVariables.DisplayLanguage, "Bạn phải chọn Bệnh nhân để bắt đầu chụp", "You have to choose one patient to begin service"), true);
                        return;
                    }
                }
                if (grdWorkList.CurrentRow == null && grdWorkListSuspending.CurrentRow == null) return;
                IsClicking = false;
                _Click(cmdAcq, new EventArgs());
                cmdAcq.PerformClick();

                AcquisitionFromWL = true;
                //mdlStatic.SetMsg(lblAcqMsg, "", true);
                DataRow dr;
                if (tabControl2.SelectedIndex == 0 || _CurrAct == action.Insert)
                    dr = ((DataRowView)grdWorkList.CurrentRow.DataBoundItem).Row;
                else
                {
                    dr = ((DataRowView)grdWorkListSuspending.CurrentRow.DataBoundItem).Row;
                }
                CurrStudyInstanceUID = Utility.sDbnull(dr["StudyInstanceUID"], ClearCanvas.Dicom.DicomUid.GenerateUid().UID);
                if (dr["Patient_ID"].ToString() == "-1") ExecuteSavingAction(dr, null);
                CurrPatient_ID = Utility.Int32Dbnull(dr["Patient_ID"], -1);
                txtID2.Text = Utility.sDbnull(dr["Patient_Code"]);

                txtName2.Text = Utility.sDbnull(dr["Patient_Name"]);
                txtRegNumber2.Text = Utility.sDbnull(dr["REG_Number"]);
                Sex = Sex2Sex(Utility.sDbnull(dr["Sex"]));
                txtSex.Text = Utility.sDbnull(dr["Sex_Name"]);
                RegDate = Convert.ToDateTime(dr["CREATED_DATE"]);
                BirthDate = Convert.ToDateTime(dr["BIRTH_DATE"]);
                if (File.Exists(Application.StartupPath + @"\use.age"))
                    txtAge.Text = Utility.sDbnull(dr["Age"].ToString(), "0");
                else
                    txtAge.Text = (DateTime.Now.Year - Convert.ToDateTime(dr["BIRTH_DATE"]).Year).ToString();
                _DoubleMode = AppType.AppEnum.DoubleMode.WorkList;
                _LastDoubleMode = AppType.AppEnum.DoubleMode.WorkList;
                _currTab = AppType.AppEnum.TabMode.Acq;
                lblPName.Text = txtName2.Text.Trim() + " - " + txtSex.Text.Trim() + " - " + txtAge.Text + " T";
                //Chuyển về trạng thái not Suspending
                long Reg_ID = Convert.ToInt64(dr["Reg_ID"]);
                currREGID = Reg_ID;
                if (tabControl2.SelectedIndex == 1) MoveRow(dr, true);
                m_dtAcquisitionDataSource = new RegDetailController().GetAllData(Reg_ID).Tables[0];
                mdlStatic.isDisplayImg = false;
                CreateScheduled();
                ModifyAcqButton();
            }
            catch (Exception ex)
            {
                Utility.ShowMsg("6402 " + ex.Message);
            }
        }
Exemple #3
0
        void RepeatAcq()
        {
            try
            {
                _LastDoubleMode = AppType.AppEnum.DoubleMode.StudyList;
                _DoubleMode = AppType.AppEnum.DoubleMode.StudyList;

                if (grdStudyList.CurrentRow == null)
                {
                    Utility.ShowMsg("Bạn cần chọn bệnh nhân để tiếp tục chụp", "Thông báo");
                    return;
                }
                _Click(cmdAcq, new EventArgs());
                cmdAcq.PerformClick();
                AcquisitionFromWL = false;

                DataRow dr = ((DataRowView)grdStudyList.CurrentRow.DataBoundItem).Row;
                currentStudyRow = dr;
                long Reg_ID = Convert.ToInt64(dr["Reg_ID"]);
                currREGID = Reg_ID;
                //CurrPatient_ID = Utility.Int32Dbnull(dr["Patient_ID"], -1);
                CurrStudyInstanceUID = Utility.sDbnull(dr["StudyInstanceUID"], ClearCanvas.Dicom.DicomUid.GenerateUid().UID);
                txtID2.Text = Utility.sDbnull(dr["Patient_Code"]);
                CurrPatient_ID = Utility.Int32Dbnull(dr["Patient_ID"], -1);
                txtName2.Text = Utility.sDbnull(dr["Patient_Name"]);
                txtRegNumber2.Text = Utility.sDbnull(dr["REG_Number"]);
                txtSex.Text = Utility.sDbnull(dr["Sex_Name"]);
                RegDate = Convert.ToDateTime(dr["CREATED_DATE"]);
                if (File.Exists(Application.StartupPath + @"\use.age"))
                    txtAge.Text = Utility.sDbnull(dr["Age"].ToString());
                else
                    txtAge.Text = (DateTime.Now.Year - Convert.ToDateTime(dr["BIRTH_DATE"]).Year).ToString();
                CurrStudyInstanceUID = Utility.sDbnull(dr["StudyInstanceUID"], ClearCanvas.Dicom.DicomUid.GenerateUid().UID);
                Sex = Sex2Sex(Utility.sDbnull(dr["Sex"]));
                lblPName.Text = txtName2.Text.Trim() + " - " + txtSex.Text.Trim() + " - " + txtAge.Text + " T";
                m_dtAcquisitionDataSource = new RegDetailController().GetAllData(Convert.ToInt64(dr["Reg_ID"])).Tables[0];
                ModifyAcqButton();
                _currTab = AppType.AppEnum.TabMode.Acq;
                mdlStatic.isDisplayImg = false;
                CreateScheduled();
                //ViewImg();

            }
            catch
            {
            }

        }