示例#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(); //新增的
            }
        }
示例#2
0
        /// <summary>
        /// 将数据表中与此对象同一段位的'出院'状态更新至下一个段位
        /// </summary>
        /// <param name="id">排除项</param>
        /// <param name="patID">首页序号</param>
        /// <param name="dtime">时间:yyyy-MM-dd HH:mm</param>
        public void UpdateToNextTimeDiv(string id, string patID, string dtime)
        {
            DataTable dtState = MethodSet.GetStatesByNoPatID(patID);

            string sqlWhere = " 1=1 ";

            if (!string.IsNullOrEmpty(id))
            {
                sqlWhere += " and id not in(" + id + ") ";
            }
            DataRow[] drows = dtState.Select(sqlWhere + " and ccode = '7003' and dotime like '%" + DateTime.Parse(dtime).ToString("yyyy-MM-dd") + "%'");
            if (drows.Length > 0)
            {
                PatientInfo pinfo = new PatientInfo();
                foreach (DataRow dr in drows)
                {
                    PatStateEntity entity = new PatStateEntity();
                    entity.ID        = dr["id"].ToString();
                    entity.NOOFINPAT = dr["noofinpat"].ToString();
                    entity.CCODE     = dr["ccode"].ToString();
                    entity.PATID     = dr["patid"].ToString();
                    //判断是否在同一段位
                    DataTable timePoints = PublicSet.MethodSet.GetTimePoint();
                    if (pinfo.CompareTimePoint(timePoints, DateTime.Parse(dr["dotime"].ToString()), DateTime.Parse(dtime)))
                    {
                        entity.DOTIME = GetNextPointDatetime(DateTime.Parse(dr["dotime"].ToString())).ToString("yyyy-MM-dd HH:mm");
                        MethodSet.SaveStateData(entity, "2");
                    }
                }
            }
        }
示例#3
0
        /// <summary>
        /// 绑定此患者的已经填写好的状态信息
        /// </summary>
        private void InitSateData()
        {
            DataTable m_StateData = new DataTable();

            m_StateData = MethodSet.GetStateData(NoOfFirstPage);
            gridControlState.DataSource = m_StateData;
        }
示例#4
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();
            }
        }
示例#5
0
        private void SetPrintOthers(int everpagecount, List <NurseRecordEntity> nurseRecordEntityList)
        {
            //对list进行处理 使其是everpagecount的倍数
            if (nurseRecordEntityList.Count == 0)
            {
                for (int i = 0; i < everpagecount; i++)
                {
                    nurseRecordEntityList.Add(new NurseRecordEntity());
                }
            }
            int yushu  = nurseRecordEntityList.Count % everpagecount;
            int zheshu = nurseRecordEntityList.Count / everpagecount;

            if (yushu > 0)
            {
                zheshu = zheshu + 1;
                int lastint = everpagecount - yushu;
                for (int i = 0; i < lastint; i++)
                {
                    nurseRecordEntityList.Add(new NurseRecordEntity());
                }
            }
            int n = 1;

            for (int i = 0; i < zheshu; i++)
            {
                List <NurseRecordEntity> nurseRecordEntityListEve = new List <NurseRecordEntity>();
                for (int j = (n - 1) * everpagecount; j < everpagecount * n; j++)
                {
                    if (j < nurseRecordEntityList.Count)
                    {
                        nurseRecordEntityListEve.Add(nurseRecordEntityList[j]);
                    }
                    else
                    {
                        break;
                    }
                }
                PrintRecordModel printRecordModel = new PrintRecordModel();
                printRecordModel.PrintHeaderModel            = new PrintHeaderModel();
                printRecordModel.PrintHeaderModel.PersonName = MethodSet.CurrentInPatient.Name;
                printRecordModel.PrintHeaderModel.InNo       = MethodSet.CurrentInPatient.RecordNoOfHospital;
                DataTable dt = MethodSet.GetPatientInfoForThreeMeasureTable(MethodSet.CurrentInPatient.NoOfFirstPage);
                if (dt != null && dt.Rows.Count > 0)
                {
                    printRecordModel.PrintHeaderModel.InBedNo    = dt.Rows[0]["outbed"].ToString();
                    printRecordModel.PrintHeaderModel.DepartName = dt.Rows[0]["dept_name"].ToString();
                }
                printRecordModel.NurseRecordEntityList = nurseRecordEntityListEve;
                LoadPrint(printRecordModel);
                n++;
            }
        }
示例#6
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;
            }
        }
示例#7
0
 /// <summary>
 /// 删除操作
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDel_Click(object sender, EventArgs e)
 {
     try
     {
         MethodSet.SaveStateData(SetEntityByPage(), "3");
         MethodSet.App.CustomMessageBox.MessageShow("删除成功!");
         RefreshData();
     }
     catch (Exception)
     {
         MethodSet.App.CustomMessageBox.MessageShow("删除失败!");
     }
 }
示例#8
0
        /// <summary>
        /// 检测数据
        /// </summary>
        /// <returns></returns>
        public bool CheckData()
        {
            if (!IsInput)
            {
                return(true);         //空退出
            }
            //edit by wyt 2012-11-05 修改使血压可录入中文(根据配置)
            string IsHidePainHeight = MethodSet.GetConfigValueByKey("IsHidePainHeight_NursingRecord");

            if (IsHidePainHeight.Substring(35, 1) == "0")
            {
                double intBp;

                if (!Dataprocessing.IsNumber(txtSBP.Text.Trim().ToString(), 0))
                {
                    MethodSet.App.CustomMessageBox.MessageShow("收缩压必须为数字");
                    txtSBP.Focus();
                    return(false);
                }
                else
                {
                    intBp = double.Parse(txtSBP.Text.Trim());
                    if (!(intBp > 0 && intBp <= 300))//仁和需求 add by ywk
                    {
                        MethodSet.App.CustomMessageBox.MessageShow("收缩压必须在1mmHg至300mmHg之间。");
                        txtSBP.Focus();
                        return(false);
                    }
                }

                if (!Dataprocessing.IsNumber(txtDBP.Text.Trim(), 0))
                {
                    MethodSet.App.CustomMessageBox.MessageShow("舒张压必须为数字");
                    txtDBP.Focus();
                    return(false);
                }
                else
                {
                    intBp = Convert.ToInt32(txtDBP.Text.Trim());
                    if (!(intBp > 0 && intBp <= 200))
                    {
                        MethodSet.App.CustomMessageBox.MessageShow("舒张压必须在1mmHg至200mmHg之间。");
                        txtDBP.Focus();
                        return(false);
                    }
                }
            }

            return(true);
        }
        /// <summary>
        /// Checks that the given method and arguments
        /// match the expectation and argument constraints
        /// </summary>
        /// <param name="method"></param>
        /// <param name="arguments"></param>
        /// <returns></returns>
        public override bool MatchesCall(MethodInfo method, object[] arguments)
        {
            var argumentsMatch = MatchesCallArguments(arguments);

            if (MethodGet != null && MethodGet.Equals(method))
            {
                return(argumentsMatch);
            }

            if (MethodSet != null && MethodSet.Equals(method))
            {
                return(argumentsMatch);
            }

            return(false);
        }
示例#10
0
        private void UCOutAndInpRecord_Load(object sender, EventArgs e)
        {
            if (nurseRecordBiz == null)
            {
                nurseRecordBiz = new NurseRecordBiz();
            }
            //设置标题
            DataTable dt = MethodSet.GetHospitalInfo();

            if (null != dt && dt.Rows.Count > 0)
            {
                this.lbl_title1.Text = dt.Rows[0]["NAME"].ToString();
                this.lbl_title2.Text = dt.Rows[0]["SUBNAME"].ToString();
            }
            RefreshData();
        }
示例#11
0
        /// <summary>
        /// 判断是否存在同一时间段位的'入院'和'出院'记录
        /// </summary>
        /// author:cyq
        /// date:2012-08-16
        /// <param name="id">id:null-新增;不为null:修改</param>
        /// <returns></returns>
        public bool CheckPatiStateDiv(string id)
        {
            bool      boo     = false;
            DataTable dtState = MethodSet.GetStatesByNoPatID(NoOfinPat);
            //DataTable dtState = MethodSet.GetStatesByNoPatID(m_currInpatient.Code.ToString());
            DateTime    dtime      = DateTime.Parse(this.dateEdit.DateTime.ToString("yyyy-MM-dd ") + this.txtTime.Text);
            DataTable   timePoints = PublicSet.MethodSet.GetTimePoint();
            PatientInfo pinfo      = new PatientInfo();
            string      sqlWhere   = " 1=1 ";

            if (!string.IsNullOrEmpty(id))
            {
                sqlWhere += " and id not in(" + id + ") ";
            }
            if (this.lookUpState.CodeValue == "7003")
            {
                DataRow[] drState1 = dtState.Select(sqlWhere + " and ccode=7008 ");
                if (drState1.Length > 0)
                {
                    foreach (DataRow dr in drState1)
                    {
                        if (pinfo.CompareTimePoint(timePoints, DateTime.Parse(dr["dotime"].ToString()), dtime) == true)
                        {
                            boo = true;
                            break;
                        }
                    }
                }
            }
            else if (this.lookUpState.CodeValue == "7008")
            {
                DataRow[] drState2 = dtState.Select(sqlWhere + " and ccode=7003 ");
                if (drState2.Length > 0)
                {
                    foreach (DataRow dr in drState2)
                    {
                        if (pinfo.CompareTimePoint(timePoints, DateTime.Parse(dr["dotime"].ToString()), dtime) == true)
                        {
                            boo = true;
                            break;
                        }
                    }
                }
            }

            return(boo);
        }
示例#12
0
        private void SetTitlelbl()
        {
            ///设置标题栏
            DataTable dtHos = MethodSet.GetHospitalInfo();

            lbl_title1.Text  = dtHos.Rows[0]["Name"].ToString();
            lbl_title2.Text  = dtHos.Rows[0]["SubName"].ToString();
            lbl_nameTxt.Text = MethodSet.CurrentInPatient.Name;
            DataTable patientInfo = PublicSet.MethodSet.GetPatientInfoForThreeMeasureTable(MethodSet.CurrentInPatient.NoOfFirstPage);

            if (patientInfo.Rows.Count > 0)
            {
                lbl_departmentTxt.Text = patientInfo.Rows[0]["dept_name"].ToString();
                lbl_bedNoTxt.Text      = patientInfo.Rows[0]["outbed"].ToString();
            }
            lbl_inpNoTxt.Text = MethodSet.CurrentInPatient.RecordNoOfHospital;
        }
示例#13
0
 /// <summary>
 /// 删除操作
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDel_Click(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.dateEdit.Text) || string.IsNullOrEmpty(this.lookUpState.CodeValue))
         {
             MethodSet.App.CustomMessageBox.MessageShow("请选择要删除的状态");
             return;
         }
         MethodSet.SaveStateData(SetEntityByPage(), "3");
         MessageBox.Show("删除成功!");
         RefreshData();
     }
     catch (Exception)
     {
         MessageBox.Show("删除失败!");
     }
 }
示例#14
0
        /// <summary>
        /// 初始化病人的状态信息(手术,分娩,死亡等)
        /// add by ywk 2012年4月23日10:01:56
        /// </summary>
        private void InitPainetState()
        {
            lookUpWState.SqlHelper = MethodSet.App.SqlHelper;
            DataTable DTState = MethodSet.GetStates();

            DTState.Columns["ID"].Caption   = "状态编码";
            DTState.Columns["NAME"].Caption = "状态名称";
            Dictionary <string, int> cols = new Dictionary <string, int>();

            cols.Add("NAME", 120);
            SqlWordbook StateWordBook = new SqlWordbook("querybook", DTState, "ID", "NAME", cols);

            lookUpState.SqlWordbook = StateWordBook;

            this.txtTime.Enabled     = false;
            this.dateEdit.Enabled    = false;
            this.lookUpState.Enabled = false;
        }
示例#15
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(); //新增的病人的首页序号
            }
        }
示例#16
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <returns></returns>
 private bool SaveData(PatStateEntity patStateEnt)
 {
     try
     {
         string edittype = "";
         if (m_EditState == EditState.Add)
         {
             edittype = "1";
         }
         else
         {
             edittype = "2";
         }
         MethodSet.SaveStateData(patStateEnt, edittype);
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
示例#17
0
        /// <summary>
        /// 绑定此患者的已经填写好的状态信息
        /// </summary>
        private void InitSateData()
        {
            DataTable m_StateData = new DataTable();
            //ywk  增加入院和出院时间,筛选查询结果
            string    outwarddate = string.Empty; //出院时间
            string    admitdate   = string.Empty; //入院时间
            DataTable dtInfo      = PublicSet.MethodSet.GetPatData(NoOfinPat);

            //DataTable dtInfo = PublicSet.MethodSet.GetPatData(m_currInpatient.NoOfFirstPage.ToString());
            if (dtInfo.Rows.Count > 0)
            {
                outwarddate = dtInfo.Rows[0]["OUTWARDDATE"].ToString();
                admitdate   = dtInfo.Rows[0]["INWARDDATE"].ToString();
            }
            if (string.IsNullOrEmpty(admitdate))
            {
                return;
            }
            //m_StateData = MethodSet.GetStateData(m_currInpatient.RecordNoOfHospital.ToString(), m_currInpatient.NoOfFirstPage.ToString(), outwarddate, admitdate);
            m_StateData = MethodSet.GetStateData(RecordNoofinpat, NoOfinPat, outwarddate, admitdate);
            gridControlState.DataSource = m_StateData;
        }
示例#18
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();//新增的
            }
        }
示例#19
0
 /// <summary>
 /// 删除操作
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDel_Click(object sender, EventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.dateEdit.Text) || string.IsNullOrEmpty(this.lookUpState.CodeValue))
         {
             MethodSet.App.CustomMessageBox.MessageShow("请选择一条状态记录");
             return;
         }
         //edit by cyq 2012-11-02 删除确认
         if (DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show("您确定删除状态 " + this.lookUpState.Text.Trim() + " 吗?", "", DrectSoft.Common.Ctrs.DLG.MyMessageBoxButtons.OkCancel) == DialogResult.Cancel)
         {
             return;
         }
         MethodSet.SaveStateData(SetEntityByPage(), "3");
         MethodSet.App.CustomMessageBox.MessageShow("删除成功");
         RefreshData();
     }
     catch (Exception)
     {
         MethodSet.App.CustomMessageBox.MessageShow("删除失败");
     }
 }
示例#20
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);
            }
        }
示例#21
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        private bool SaveData(PatStateEntity patStateEnt)
        {
            try
            {
                string edittype = "";
                if (m_EditState == EditState.Add)
                {
                    edittype = "1";
                }
                else
                {
                    edittype = "2";
                }

                #region "段位順移(更新数据库的时间-后移一个段位) - 已弃用"
                /// <summary>
                /// 新增(或者修改)病人状态记录时,如果同时存在'入院'和'出院'记录且为同一时间段位时,
                /// 则将出院状态改至下一个时间段位
                /// </summary>
                //if (edittype == "1")
                //{
                //    if (patStateEnt.CCODE == "7003")
                //    {//出院
                //        if (CheckPatiStateDiv(null))
                //        {
                //            patStateEnt.DOTIME = GetNextPointDatetime(DateTime.Parse(patStateEnt.DOTIME)).ToString("yyyy-MM-dd HH:mm");
                //        }
                //    }
                //    else if (patStateEnt.CCODE == "7008")
                //    {//入院
                //        if (CheckPatiStateDiv(null))
                //        {
                //            UpdateToNextTimeDiv(null, patStateEnt.PATID, patStateEnt.DOTIME);
                //        }
                //    }
                //}
                //else
                //{
                //    if (patStateEnt.CCODE == "7003")
                //    {
                //        if (CheckPatiStateDiv(patStateEnt.ID))
                //        {
                //            patStateEnt.DOTIME = GetNextPointDatetime(DateTime.Parse(patStateEnt.DOTIME)).ToString("yyyy-MM-dd HH:mm");
                //        }
                //    }
                //    else if (patStateEnt.CCODE == "7008")
                //    {
                //        if (CheckPatiStateDiv(patStateEnt.ID))
                //        {
                //            UpdateToNextTimeDiv(patStateEnt.ID, patStateEnt.PATID, patStateEnt.DOTIME);
                //        }
                //    }
                //}
                #endregion

                MethodSet.SaveStateData(patStateEnt, edittype);
                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
示例#22
0
        private void SetPrintInAndOut(int everpagecount, List <NurseRecordEntity> nurseRecordEntityList)
        {
            List <NurseRecordEntity> nurseRecordEntityInOut1 = new List <NurseRecordEntity>();
            List <NurseRecordEntity> nurseRecordEntityInOut2 = new List <NurseRecordEntity>();
            List <NurseRecordEntity> nurseRecordEntityInOut3 = new List <NurseRecordEntity>();

            //对list进行处理 使其是everpagecount的倍数
            for (int i = 0; i < nurseRecordEntityList.Count; i++)
            {
                if (i % 3 == 0)
                {
                    nurseRecordEntityInOut1.Add(nurseRecordEntityList[i]);
                }

                if (i % 3 == 1)
                {
                    nurseRecordEntityInOut2.Add(nurseRecordEntityList[i]);
                }

                if (i % 3 == 2)
                {
                    nurseRecordEntityInOut3.Add(nurseRecordEntityList[i]);
                }
            }

            PrintRecordModel printRecordModel = new PrintRecordModel();

            printRecordModel.PrintHeaderModel            = new PrintHeaderModel();
            printRecordModel.PrintHeaderModel.PersonName = MethodSet.CurrentInPatient.Name;
            printRecordModel.PrintHeaderModel.InNo       = MethodSet.CurrentInPatient.RecordNoOfHospital;
            DataTable dt = MethodSet.GetPatientInfoForThreeMeasureTable(MethodSet.CurrentInPatient.NoOfFirstPage);

            if (dt != null && dt.Rows.Count > 0)
            {
                printRecordModel.PrintHeaderModel.InBedNo    = dt.Rows[0]["outbed"].ToString();
                printRecordModel.PrintHeaderModel.DepartName = dt.Rows[0]["dept_name"].ToString();
            }

            if (nurseRecordEntityInOut1.Count == 0)
            {
                for (int i = 0; i < everpagecount; i++)
                {
                    nurseRecordEntityInOut1.Add(new NurseRecordEntity());
                }
            }
            if (nurseRecordEntityInOut2.Count == 0)
            {
                for (int i = 0; i < everpagecount; i++)
                {
                    nurseRecordEntityInOut2.Add(new NurseRecordEntity());
                }
            }
            if (nurseRecordEntityInOut3.Count == 0)
            {
                for (int i = 0; i < everpagecount; i++)
                {
                    nurseRecordEntityInOut3.Add(new NurseRecordEntity());
                }
            }

            int yushu1  = nurseRecordEntityInOut1.Count % everpagecount;
            int zheshu1 = nurseRecordEntityInOut1.Count / everpagecount;

            if (yushu1 > 0)
            {
                zheshu1 = zheshu1 + 1;
                int lastint = everpagecount - yushu1;
                for (int i = 0; i < lastint; i++)
                {
                    nurseRecordEntityInOut1.Add(new NurseRecordEntity());
                }
            }


            int yushu2  = nurseRecordEntityInOut2.Count % everpagecount;
            int zheshu2 = nurseRecordEntityInOut2.Count / everpagecount;

            if (yushu2 > 0)
            {
                zheshu2 = zheshu2 + 1;
                int lastint = everpagecount - yushu2;
                for (int i = 0; i < lastint; i++)
                {
                    nurseRecordEntityInOut2.Add(new NurseRecordEntity());
                }
            }

            int yushu3  = nurseRecordEntityInOut3.Count % everpagecount;
            int zheshu3 = nurseRecordEntityInOut3.Count / everpagecount;

            if (yushu3 > 0)
            {
                zheshu3 = zheshu3 + 1;
                int lastint = everpagecount - yushu3;
                for (int i = 0; i < lastint; i++)
                {
                    nurseRecordEntityInOut3.Add(new NurseRecordEntity());
                }
            }



            int n = 1;

            for (int i = 0; i < zheshu1; i++)
            {
                List <NurseRecordEntity> nurseRecordEntityListEve1 = new List <NurseRecordEntity>();
                List <NurseRecordEntity> nurseRecordEntityListEve2 = new List <NurseRecordEntity>();
                List <NurseRecordEntity> nurseRecordEntityListEve3 = new List <NurseRecordEntity>();
                for (int j = (n - 1) * everpagecount; j < everpagecount * n; j++)
                {
                    if (j < nurseRecordEntityInOut1.Count)
                    {
                        nurseRecordEntityListEve1.Add(nurseRecordEntityInOut1[j]);
                    }
                    if (j < nurseRecordEntityInOut2.Count)
                    {
                        nurseRecordEntityListEve2.Add(nurseRecordEntityInOut2[j]);
                    }
                    if (j < nurseRecordEntityInOut3.Count)
                    {
                        nurseRecordEntityListEve3.Add(nurseRecordEntityInOut3[j]);
                    }

                    else
                    {
                        break;
                    }
                }
                printRecordModel.NurseRecordEntityListInOut1 = nurseRecordEntityListEve1;
                printRecordModel.NurseRecordEntityListInOut2 = nurseRecordEntityListEve2;
                printRecordModel.NurseRecordEntityListInOut3 = nurseRecordEntityListEve3;
                LoadPrint(printRecordModel);
                n++;
            }
        }
示例#23
0
        /// <summary>
        /// 绑定Grid控件
        /// </summary>
        private void BindCurrentPatient()
        {
            DataTable dt = MethodSet.GetCurrentPatient(m_loguser.CurrentDeptId, m_loguser.CurrentWardId);

            this.gridControl1.DataSource = dt;
        }