Example #1
0
        private void caseNo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                try
                {
                    if (this.caseNo.Text == "")
                    {
                        this.caseNo.Focus();

                        MessageBox.Show("请输入病案号");
                        return;
                    }
                    caseNo.Text = caseNo.Text.PadLeft(10, '0');
                    Caselist    = null;
                    Caselist    = baseDml.QueryCaseBaseInfoByCaseNO(this.caseNo.Text);
                    if (Caselist == null)
                    {
                        this.caseNo.SelectAll();
                        MessageBox.Show("查询病案信息出错");
                        return;
                    }
                    if (Caselist.Count == 0)
                    {
                        this.caseNo.SelectAll();
                        MessageBox.Show("没有查到相关信息");
                        return;
                    }
                    //判断是否已经借出了
                    Neusoft.HISFC.Models.HealthRecord.Base info = (Neusoft.HISFC.Models.HealthRecord.Base)Caselist[0];
                    if (info.LendStat == "O") //是字母 O
                    {
                        this.caseNo.SelectAll();
                        MessageBox.Show("该病案已经借出.");
                        return;
                    }
                    this.AddCaseInfo(Caselist);
                    this.caseNo.SelectAll();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Example #2
0
        /// <summary>
        /// 查询
        /// </summary>
        private void Query()
        {
            this.neuSpread1_Sheet1.Rows.Count = 0;

            string    strCaseNO = txtCaseNO.Text.PadLeft(10, '0');
            ArrayList list      = baseMgr.QueryCaseBaseInfoByCaseNO(strCaseNO);

            if (list == null)
            {
                MessageBox.Show("查询病案失败 " + baseMgr.Err);
                return;
            }

            if (list.Count == 0)
            {
                MessageBox.Show("没有病案信息");
                return;
            }
            #region 病案主表信息
            foreach (Neusoft.HISFC.Models.HealthRecord.Base obj in list)
            {
                this.neuSpread1_Sheet1.Rows.Add(0, 1);
                //操作时间
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.OperTime].Text = obj.OperInfo.OperTime.ToShortDateString();
                //住院流水号
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.InpatientNO].Text = obj.PatientInfo.ID;
                //姓名
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.Name].Text = obj.PatientInfo.Name;
                string SexID = "";

                if (obj.PatientInfo.Sex.ID != null)
                {
                    SexID = obj.PatientInfo.Sex.ID.ToString();
                }
                //性别
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.Sex].Text = objSex.GetName(SexID);
                if (obj.PatientInfo.CaseState == "1")
                {
                    //状态
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.CaseState].Text = "没有形成病案";
                }
                else if (obj.PatientInfo.CaseState == "2")
                {
                    //状态
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.CaseState].Text = "医生站形成病案";
                }
                else if (obj.PatientInfo.CaseState == "3")
                {
                    //状态
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.CaseState].Text = "病案室形成病案";
                }
                else if (obj.PatientInfo.CaseState == "4")
                {
                    //状态
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.CaseState].Text = "病案封存";
                }
            }
            #endregion

            ArrayList cardList = caseCard.QueryLendInfoByCaseNO(strCaseNO);
            if (cardList == null)
            {
                MessageBox.Show("查询病案借阅信息失败 " + baseMgr.Err);
                return;
            }
            if (cardList.Count == 0)
            {
                return;
            }
            #region 病案借阅信息
            foreach (Neusoft.HISFC.Models.HealthRecord.Lend info in cardList)
            {
                this.neuSpread1_Sheet1.Rows.Add(0, 1);
                //操作时间
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.OperTime].Text = info.OperInfo.OperTime.ToShortDateString();
                //住院流水号
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.InpatientNO].Text = info.CaseBase.PatientInfo.ID;
                //姓名
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.Name].Text = info.CaseBase.PatientInfo.Name;
                string SexID = "";

                if (info.CaseBase.PatientInfo.Sex.ID != null)
                {
                    SexID = info.CaseBase.PatientInfo.Sex.ID.ToString();
                }
                //性别
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.Sex].Text = objSex.GetName(SexID);
                if (info.LendStus == "1")
                {
                    //状态
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.CaseState].Text = "病案借出";
                }
                else if (info.LendStus == "2")
                {
                    //状态
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.CaseState].Text = "借阅后返还";
                    //归还日期
                    this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.ReturnTime].Text = info.ReturnDate.ToShortDateString();
                }
                //借阅日期
                this.neuSpread1_Sheet1.Cells[0, (int)EnumCols.LendTime].Text = info.LendDate.ToShortDateString();
            }
            #endregion
        }