Beispiel #1
0
        /// <summary>
        /// 初始化病人基本信息
        /// </summary>
        private void InitInpatInfo()
        {
            DataTable dt = null;

            //此处的DataTable数据的提取,就区分开是否是切换病人后的数据
            if (IsChagedPat)//是跳转来的
            {
                dt = MethodSet.GetRedactPatientInfoFrm("14", "", NoOfInpat);
            }
            else
            {
                dt = MethodSet.GetRedactPatientInfoFrm("14", "", MethodSet.CurrentInPatient.NoOfFirstPage.ToString());
            }
            //DataTable dt = MethodSet.GetRedactPatientInfoFrm("14", "", MethodSet.CurrentInPatient.NoOfFirstPage.ToString());
            if (dt.Rows.Count == 1)
            {
                //如果入科时间为空,则读取入院时间,否则以入科时间为准
                MethodSet.AdmitDate = string.IsNullOrEmpty(dt.Rows[0]["inwarddate"].ToString().Trim()) ?
                                      dt.Rows[0]["AdmitDate"].ToString().Trim() : dt.Rows[0]["inwarddate"].ToString().Trim();

                MethodSet.OutHosDate  = dt.Rows[0]["status"].ToString().Trim() == "1503" ? dt.Rows[0]["OutHosDate"].ToString().Trim() : "";
                MethodSet.PatID       = dt.Rows[0]["PatID"].ToString();
                MethodSet.OutWardDate = dt.Rows[0]["status"].ToString().Trim() == "1502" ? dt.Rows[0]["OutWardDate"].ToString().Trim() : "";
                MethodSet.PatName     = dt.Rows[0]["Name"].ToString().Trim();   //新增的
                MethodSet.BedID       = dt.Rows[0]["OutBed"].ToString().Trim(); //新增的
            }
        }
Beispiel #2
0
        /// <summary>
        /// 初始化病人基本信息
        /// </summary>
        private void InitInpatInfo()
        {
            DataTable dt = MethodSet.GetRedactPatientInfoFrm("14", "", MethodSet.App.CurrentPatientInfo.NoOfFirstPage.ToString());

            if (dt.Rows.Count == 1)
            {
                MethodSet.AdmitDate  = dt.Rows[0]["AdmitDate"].ToString().Trim();
                MethodSet.OutHosDate = dt.Rows[0]["OutHosDate"].ToString().Trim();
                MethodSet.PatID      = dt.Rows[0]["PatID"].ToString();
            }
        }
Beispiel #3
0
        /// <summary>
        /// 初始化病人基本信息
        /// </summary>
        private void InitInpatInfo(string currentInpatient)
        {
            try
            {
                DataTable dt = null;
                if (IsChagedPat)//是跳转来的
                {
                    dt = MethodSet.GetRedactPatientInfoFrm("14", "", NoOfInpat);
                }
                else
                {
                    NoOfInpat = currentInpatient;
                    dt        = MethodSet.GetRedactPatientInfoFrm("14", "", currentInpatient);
                }
                if (dt.Rows.Count == 1)
                {
                    if (dt.Rows[0]["inwarddate"].ToString() != "" && dt.Rows[0]["inwarddate"].ToString() != null)
                    {
                        m_InTime = dt.Rows[0]["inwarddate"].ToString();
                    }
                    else if (dt.Rows[0]["ADMITDATE"].ToString() != null && dt.Rows[0]["ADMITDATE"].ToString() != "")
                    {
                        m_InTime = dt.Rows[0]["ADMITDATE"].ToString();
                    }
                    else
                    {
                        throw new Exception("入院和入科时间不能同时为空");
                    }
                    m_outTime            = dt.Rows[0]["OUTWARDDATE"].ToString().Trim();
                    MethodSet.AdmitDate  = dt.Rows[0]["AdmitDate"].ToString().Trim();
                    MethodSet.PatName    = dt.Rows[0]["Name"].ToString().Trim();//新增的
                    MethodSet.OutHosDate = dt.Rows[0]["OutHosDate"].ToString().Trim();
                    MethodSet.PatID      = dt.Rows[0]["PatID"].ToString();
                    MyPatID = dt.Rows[0]["PatID"].ToString();
                    if (dt.Rows[0]["isbaby"].ToString().Equals("1"))
                    {
                        txtPatID.Text = new DataLoader().GetMotherPatid(dt.Rows[0]["mother"].ToString());
                    }
                    else
                    {
                        txtPatID.Text = MethodSet.PatID;
                    }

                    MethodSet.OutHosDate = dt.Rows[0]["OutWardDate"].ToString().Trim();
                    MethodSet.BedID      = dt.Rows[0]["OutBed"].ToString().Trim();//新增的
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 初始化病人基本信息
        /// </summary>
        private void InitInpatInfo(Inpatient currInpatient)
        {
            DataTable dt = null;

            //此处的DataTable数据的提取,就区分开是否是切换病人后的数据
            if (IsChagedPat)//是跳转来的
            {
                dt = MethodSet.GetRedactPatientInfoFrm("14", "", NoOfInpat);
            }
            else
            {
                NoOfInpat = currInpatient.NoOfFirstPage.ToString();
                dt        = MethodSet.GetRedactPatientInfoFrm("14", "", currInpatient.NoOfFirstPage.ToString());
            }
            //DataTable dt = MethodSet.GetRedactPatientInfoFrm("14", "", MethodSet.CurrentInPatient.NoOfFirstPage.ToString());
            if (dt.Rows.Count == 1)
            {
                //如果入科时间为空,则读取入院时间,否则以入科时间为准
                MethodSet.AdmitDate = string.IsNullOrEmpty(dt.Rows[0]["inwarddate"].ToString().Trim()) ?
                                      dt.Rows[0]["AdmitDate"].ToString().Trim() : dt.Rows[0]["inwarddate"].ToString().Trim();
                //PatientInfo.IsBaby
                //if (PatientInfo.IsBaby == "1")//如果是婴儿 add by ywk 2012年11月22日19:59:18
                //{
                //    MethodSet.PatID = PublicSet.MethodSet.GetPatData(PatientInfo.Mother).Rows[0]["Patid"].ToString();
                //}
                //else
                //{
                MethodSet.PatID = dt.Rows[0]["PatID"].ToString();
                //}

                MethodSet.OutHosDate = dt.Rows[0]["status"].ToString().Trim() == "1503" ? dt.Rows[0]["OutHosDate"].ToString().Trim() : "";
                //MethodSet.PatID = dt.Rows[0]["PatID"].ToString();
                MethodSet.OutWardDate = dt.Rows[0]["status"].ToString().Trim() == "1502" ? dt.Rows[0]["OutWardDate"].ToString().Trim() : "";
                MethodSet.PatName     = dt.Rows[0]["Name"].ToString().Trim();           //新增的
                MethodSet.BedID       = dt.Rows[0]["OutBed"].ToString().Trim();         //新增的
                MethodSet.Age         = dt.Rows[0]["AGESTR"].ToString().Trim();         //新增的
                //add by ywk 二〇一三年五月二十八日 15:21:51
                MethodSet.NoOfinPat = dt.Rows[0]["NOOFINPAT"].ToString().Trim();        //新增的病人的首页序号

                MethodSet.RecordNoofinpat = dt.Rows[0]["NOOFRECORD"].ToString().Trim(); //新增的病人的首页序号
            }
        }
Beispiel #5
0
        /// <summary>
        /// 初始化病人基本信息
        /// </summary>
        private void InitInpatInfo()
        {
            DataTable dt = null;

            if (IsChagedPat)//是跳转来的
            {
                dt = MethodSet.GetRedactPatientInfoFrm("14", "", NoOfInpat);
            }
            else
            {
                dt = MethodSet.GetRedactPatientInfoFrm("14", "", MethodSet.CurrentInPatient.NoOfFirstPage.ToString());
            }
            if (dt.Rows.Count == 1)
            {
                MethodSet.AdmitDate  = dt.Rows[0]["AdmitDate"].ToString().Trim();
                MethodSet.PatName    = dt.Rows[0]["Name"].ToString().Trim();//新增的
                MethodSet.OutHosDate = dt.Rows[0]["OutHosDate"].ToString().Trim();
                MethodSet.PatID      = dt.Rows[0]["PatID"].ToString();
                MethodSet.OutHosDate = dt.Rows[0]["OutWardDate"].ToString().Trim();
                MethodSet.BedID      = dt.Rows[0]["OutBed"].ToString().Trim();//新增的
            }
        }
Beispiel #6
0
        public void RefreshDate(Inpatient currInpatient)
        {
            try
            {
                DataTable dt = MethodSet.GetRedactPatientInfoFrm("14", "", m_currInpatient.NoOfFirstPage.ToString());
                MethodSet.DaysAfterSurgery = m_DaysAfterSurgery;
                if (currInpatient != null)
                {
                    InitInpatInfo(currInpatient);
                    if (dt.Rows[0]["isbaby"].ToString().Equals("1"))//如果是婴儿
                    {
                        txtPatID.Text = PublicSet.MethodSet.GetPatData(dt.Rows[0]["mother"].ToString()).Rows[0]["Patid"].ToString();
                    }
                    else
                    {
                        txtPatID.Text = MethodSet.PatID;
                    }

                    //txtPatID.Text = MethodSet.PatID;
                    txtInpatName.Text = MethodSet.PatName;
                    //新增的床号显示
                    txtBedID.Text = MethodSet.BedID;
                    //txtInpatName.Text = MethodSet.CurrentInPatient.Name;
                    //txtAge.Text = PatientInfo.Age;
                    txtAge.Text = MethodSet.Age;//wyt

                    #region 已注释
                    //MethodSet.DaysAfterSurgery = m_DaysAfterSurgery;
                    //if (currInpatient != null)
                    //{
                    //    InitInpatInfo(currInpatient);
                    //    if (patientInfo.IsBaby == "1")//如果是婴儿 add by ywk 2012年11月22日19:59:18
                    //    {
                    //        txtPatID.Text = PublicSet.MethodSet.GetPatData(patientInfo.Mother).Rows[0]["Patid"].ToString();
                    //    }
                    //    else
                    //    {
                    //        txtPatID.Text = MethodSet.PatID;
                    //    }

                    //    //txtPatID.Text = MethodSet.PatID;
                    //    txtInpatName.Text = MethodSet.PatName;
                    //    //新增的床号显示
                    //    txtBedID.Text = MethodSet.BedID;
                    //    //txtInpatName.Text = MethodSet.CurrentInPatient.Name;
                    //    //txtAge.Text = PatientInfo.Age;
                    //    txtAge.Text = MethodSet.Age;//wyt
                    #endregion
                }
                else
                {
                    btnSave.Enabled = false;
                }

                ucNursingRecordTable1.InitForm();

                //add by cyq 2013-03-05
                dateEdit.DateTimeChanged -= new EventHandler(dateEdit_DateTimeChanged);
                if (IsChagedPat)//是跳转来的
                {
                    dateEdit.Text = InputDate;
                }
                else
                {//add by cyq 2013-03-05
                    DataTable inps = DS_SqlService.GetInpatientByID((int)currInpatient.NoOfFirstPage);
                    if (null != inps && inps.Rows.Count == 1)
                    {
                        if (inps.Rows[0]["status"].ToString() == "1502" || inps.Rows[0]["status"].ToString() == "1503")
                        {
                            dateEdit.Text = DateTime.Parse(inps.Rows[0]["outhosdate"].ToString()).ToString("yyyy-MM-dd");
                        }
                        else
                        {
                            dateEdit.Text = DateTime.Now.Date.ToString("yyyy-MM-dd");
                        }
                    }
                    else
                    {
                        dateEdit.Text = DateTime.Now.Date.ToString("yyyy-MM-dd");
                    }
                }
                //add by cyq 2013-03-05
                dateEdit.DateTimeChanged += new EventHandler(dateEdit_DateTimeChanged);

                //dateEdit.Text = DateTime.Now.Date.ToString("yyyy-MM-dd");
                //体征录入界面刚进入时,进入自定义控件进行计算要显示的手术后天数  2012年5月15日 09:44:02
                //设置手术后天数
                string inputdate = dateEdit.Text;
                //现新表已经取得的真实的首页序号 add by ywk 2013-4-8 16:10:04
                ucNursingRecordTable1.SetDaysAfterSurgery(inputdate, currInpatient.NoOfFirstPage.ToString());
                ucNursingRecordTable1.CurrentOperTime = DateTime.Parse(inputdate);//add by wyt

                //ucNursingRecordTable1.SetDaysAfterSurgery(m_DaysAfterSurgery);
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex);
            }
        }