Exemple #1
0
        private Inpatient CurrentInpatient;//add by ywk
        private void btn_OK_Click(object sender, EventArgs e)
        {
            try
            {
                //设置当前病人(修复m_App病人丢失问题)
                if (null == m_App || null == m_App.CurrentPatientInfo || m_App.CurrentPatientInfo.NoOfFirstPage.ToString() != m_IemInfo.IemBasicInfo.NoOfInpat)
                {
                    CurrentInpatient = YD_SqlService.GetPatientInfo(m_IemInfo.IemBasicInfo.NoOfInpat);
                }
                else
                {
                    CurrentInpatient = m_App.CurrentPatientInfo;
                }

                GetUI();
                //edit by 2012-12-20 张业兴 关闭弹出框只关闭提示框
                //((ShowUC)this.Parent).Close(true, m_IemInfo);
                //点击确认按钮就将数据更新到数据库
                //CurrentInpatient = m_App.CurrentPatientInfo;
                if (null != CurrentInpatient)
                {
                    CurrentInpatient.ReInitializeAllProperties();
                }
                IemMainPageManger manger = new IemMainPageManger(m_App, CurrentInpatient);
                manger.SaveData(m_IemInfo);

                //add by cyq 2012-12-05 病案室人员编辑后状态改为已归档
                if (editFlag)
                {
                    YD_BaseService.SetRecordsRebacked(int.Parse(CurrentInpatient.NoOfFirstPage.ToString().Trim()));
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }
Exemple #2
0
        private void FillUIInner()
        {
            try
            {
                #region 已注释
                //if (m_IemInfo.IemBasicInfo.Iem_Mainpage_NO == "")
                //{
                //    //to do 病患基本信息
                //}
                //else
                //{
                //出院诊断
                //DataTable dataTableOper = new DataTable();
                //foreach (Iem_Mainpage_Diagnosis im in m_IemInfo.IemDiagInfo)
                //{
                //    if (m_DiagInfoForm == null)
                //        m_DiagInfoForm = new IemNewDiagInfoForm(m_App);
                //    if (im.Diagnosis_Type_Id == 7 || im.Diagnosis_Type_Id == 8)
                //    {
                //        m_DiagInfoForm.IemOperInfo = im;
                //        DataTable dataTable = m_DiagInfoForm.DataOper;
                //        if (dataTableOper.Rows.Count == 0)
                //            dataTableOper = dataTable.Clone();
                //        foreach (DataRow row in dataTable.Rows)
                //        {
                //            dataTableOper.ImportRow(row);
                //        }
                //        //dataTableOper.AcceptChanges();
                //    }

                //}
                //DataTable dataTableOper = m_IemInfo.IemDiagInfo.OutDiagTable;//这种取值,进行编辑后再进入娶不到值
                #endregion

                #region
                //设置当前病人(修复m_App病人丢失问题)
                Inpatient currentPatientInfo = null;
                if (null == m_App || null == m_App.CurrentPatientInfo)
                {
                    currentPatientInfo = YD_SqlService.GetPatientInfo(m_IemInfo.IemBasicInfo.NoOfInpat);
                }
                else
                {
                    currentPatientInfo = m_App.CurrentPatientInfo;
                }

                IemMainPageManger IemM          = new IemMainPageManger(m_App, null == m_App.CurrentPatientInfo ? currentPatientInfo : m_App.CurrentPatientInfo);
                DataTable         dataTableOper = IemM.GetIemInfo().IemDiagInfo.OutDiagTable;

                this.gridControl1.DataSource = null;
                this.gridControl1.BeginUpdate();
                if (dataTableOper.Select("Diagnosis_Type_Id = '7' or Diagnosis_Type_Id = '8'").Length != 0)
                {
                    this.gridControl1.DataSource = dataTableOper.Select("Diagnosis_Type_Id = '7' or Diagnosis_Type_Id = '8'").CopyToDataTable();
                }
                this.gridControl1.EndUpdate();

                m_App.PublicMethod.ConvertGridDataSourceUpper(gridViewDiagnose);

                lueHurt_Toxicosis_Ele.CodeValue = m_IemInfo.IemDiagInfo.Hurt_Toxicosis_ElementID;
                //modify by xlb 2013-03-22
                lookUpEditPathologyName.Text = m_IemInfo.IemDiagInfo.Pathology_Diagnosis_Name;
                txtPathologyID.Text          = m_IemInfo.IemDiagInfo.Pathology_Diagnosis_ID;
                txtPathologySn.Text          = m_IemInfo.IemDiagInfo.Pathology_Observation_Sn;


                txtAllergicDrug.Text = m_IemInfo.IemDiagInfo.Allergic_Drug;
                if (m_IemInfo.IemDiagInfo.Allergic_Flag == "1")
                {
                    chkAllergic1.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.Allergic_Flag == "2")
                {
                    chkAllergic2.Checked = true;
                }

                if (m_IemInfo.IemBasicInfo.Autopsy_Flag == "1")
                {
                    chkAutopsy1.Checked = true;
                }
                else if (m_IemInfo.IemBasicInfo.Autopsy_Flag == "2")
                {
                    chkAutopsy2.Checked = true;
                }

                if (m_IemInfo.IemDiagInfo.BloodType == "1")
                {
                    chkBlood1.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.BloodType == "2")
                {
                    chkBlood2.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.BloodType == "3")
                {
                    chkBlood3.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.BloodType == "4")
                {
                    chkBlood4.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.BloodType == "5")
                {
                    chkBlood5.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.BloodType == "6")
                {
                    chkBlood6.Checked = true;
                }


                if (m_IemInfo.IemDiagInfo.Rh == "1")
                {
                    chkRH1.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.Rh == "2")
                {
                    chkRH2.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.Rh == "3")
                {
                    chkRH3.Checked = true;
                }
                else if (m_IemInfo.IemDiagInfo.Rh == "4")
                {
                    chkRH4.Checked = true;
                }


                foreach (DataRow im in dataTableOper.Rows)
                {
                    if (im["Diagnosis_Type_Id"].ToString() == "13")
                    {
                        this.lueOutDiag.CodeValue = im["Diagnosis_Code"].ToString() == "" ? "" : im["Diagnosis_Code"].ToString();
                    }
                    //else if (im["Diagnosis_Type_Id"].ToString() == "2")
                    //    this.lueInDiag.CodeValue = im["Diagnosis_Code"].ToString() == "" ? "" : im["Diagnosis_Code"].ToString();
                }
                //如果dataTableOper为0,将门诊诊断的值赋给下拉框add by ywk 2012年6月15日 13:32:01
                if (dataTableOper.Rows.Count == 0 && !string.IsNullOrEmpty(m_IemInfo.IemDiagInfo.OutDiagID))
                {
                    this.lueOutDiag.CodeValue = m_IemInfo.IemDiagInfo.OutDiagID;
                }

                lueKszr.CodeValue       = m_IemInfo.IemDiagInfo.Section_DirectorID;
                lueZrys.CodeValue       = m_IemInfo.IemDiagInfo.DirectorID;
                lueZzys.CodeValue       = m_IemInfo.IemDiagInfo.Vs_EmployeeID;
                lueZyys.CodeValue       = m_IemInfo.IemDiagInfo.Resident_EmployeeID;
                lueDuty_Nurse.CodeValue = m_IemInfo.IemDiagInfo.Duty_NurseID;
                luejxys.CodeValue       = m_IemInfo.IemDiagInfo.Refresh_EmployeeID;
                lueSxys.CodeValue       = m_IemInfo.IemDiagInfo.InterneID;
                lueBmy.CodeValue        = m_IemInfo.IemDiagInfo.Coding_UserID;
                //病案质量
                if (Convertmy.ToDecimal(m_IemInfo.IemDiagInfo.Medical_Quality_Id) == 1)
                {
                    chkMedicalQuality1.Checked = true;
                }
                if (Convertmy.ToDecimal(m_IemInfo.IemDiagInfo.Medical_Quality_Id) == 2)
                {
                    chkMedicalQuality2.Checked = true;
                }
                if (Convertmy.ToDecimal(m_IemInfo.IemDiagInfo.Medical_Quality_Id) == 3)
                {
                    chkMedicalQuality3.Checked = true;
                }
                lueZkys.CodeValue = m_IemInfo.IemDiagInfo.Quality_Control_DoctorID;
                lueZkhs.CodeValue = m_IemInfo.IemDiagInfo.Quality_Control_NurseID;
                if (!String.IsNullOrEmpty(m_IemInfo.IemDiagInfo.Quality_Control_Date))
                {
                    deZkDate.DateTime = Convert.ToDateTime(m_IemInfo.IemDiagInfo.Quality_Control_Date);
                    //teZkDate.Time = Convert.ToDateTime(m_IemInfo.IemDiagInfo.Quality_Control_Date);
                }

                #endregion
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }