Esempio n. 1
0
        /// <summary>
        /// 设置病人表单信息,必须覆盖
        /// </summary>
        /// <param name="p_objSelectedPatient">病人</param>
        protected override void m_mthSetPatientFormInfo(clsPatient p_objSelectedPatient)
        {
            this.m_dtpInpatientDate.Value = p_objSelectedPatient.m_DtmLastInDate;

            clsBedCardValue objBedCardValue = new clsBedCardValue();

            objBedCardValue.m_strInPatientID   = p_objSelectedPatient.m_StrInPatientID;
            objBedCardValue.m_strInPatientDate = p_objSelectedPatient.m_DtmLastInDate.ToString("yyyy-MM-dd HH:mm:ss");
            long lngRes = m_objBedCardDomain.m_lngGetBedCardValue(ref objBedCardValue);

            if (lngRes <= 0 || string.IsNullOrEmpty(objBedCardValue.m_strDoc_ManageBed))
            {
                string strDoctor = null;
                m_objBedCardDomain.m_lngGetManageDocWithBedID(p_objSelectedPatient.m_ObjInBedInfo.m_ObjLastBedInfo.m_ObjBed.m_StrBedID, out strDoctor);
                if (strDoctor != null)
                {
                    //clsEmployee objemp = new clsEmployee(strDoctor.Trim());
                    //this.m_txtManageDoc.Text = objemp.m_StrLastName;
                    //this.m_txtManageDoc.Tag = objemp;
                    clsEmrEmployeeBase_VO objEmpVO1 = new clsEmrEmployeeBase_VO();
                    objEmployeeSign.m_lngGetEmpByID(strDoctor.Trim(), out objEmpVO1);
                    if (objEmpVO1 != null)
                    {
                        m_txtManageDoc.Tag  = objEmpVO1;
                        m_txtManageDoc.Text = objEmpVO1.m_strLASTNAME_VCHR;
                    }
                }
            }
            else
            {
                clsEmrEmployeeBase_VO objEmpVO2 = new clsEmrEmployeeBase_VO();
                objEmployeeSign.m_lngGetEmpByID(objBedCardValue.m_strDoc_ManageBed, out objEmpVO2);
                if (objEmpVO2 != null)
                {
                    this.m_txtManageDoc.Text = objEmpVO2.m_strLASTNAME_VCHR;
                    this.m_txtManageDoc.Tag  = objEmpVO2;
                }
            }

            if (string.IsNullOrEmpty(objBedCardValue.m_strDoc_InCharge))
            {
                this.m_txtChargeDoc.Text = string.Empty;
                this.m_txtChargeDoc.Tag  = null;
            }
            else
            {
                clsEmrEmployeeBase_VO objEmpVO3 = new clsEmrEmployeeBase_VO();
                objEmployeeSign.m_lngGetEmpByID(objBedCardValue.m_strDoc_InCharge, out objEmpVO3);
                if (objEmpVO3 != null)
                {
                    this.m_txtChargeDoc.Text = objEmpVO3.m_strLASTNAME_VCHR;
                    this.m_txtChargeDoc.Tag  = objEmpVO3;
                }
            }

            this.m_cboStatus.SelectedIndex = ((objBedCardValue.m_intState < -1 || objBedCardValue.m_intState > 3)? -1 :objBedCardValue.m_intState);
        }
Esempio n. 2
0
        private void m_trvPatient_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            if (m_trvPatient.SelectedNode == null)
            {
                return;
            }
            if ((m_trvPatient.SelectedNode.Tag is clsInPatientArea || m_trvPatient.SelectedNode.Tag is clsDepartment) &&
                m_trvPatient.SelectedNode.Nodes.Count > 0)
            {
                m_lsvDitail.BeginUpdate();
                m_lsvDitail.Visible = true;
                m_lstDetail.Visible = false;
                m_lsvDitail.Items.Clear();
                foreach (TreeNode node in m_trvPatient.SelectedNode.Nodes)
                {
                    clsCaseGradeValue objGradeValue = node.Tag as clsCaseGradeValue;
                    if (objGradeValue == null)
                    {
                        continue;
                    }

                    clsPatient objPatient = new clsPatient(objGradeValue.m_strInPatientID);
                    string     strGrade   = "";
                    //					string strCount = "";
                    for (int i = 0; i < objGradeValue.m_objItemValueArr.Length; i++)
                    {
                        if (objGradeValue.m_objItemValueArr[i].m_strItemID == "m_txtAllResult")
                        {
                            strGrade = objGradeValue.m_objItemValueArr[i].m_strItemContent;
                            break;
                        }
                    }
                    clsBedCardValue objBedCardValue = new clsBedCardValue();
                    objBedCardValue.m_strInPatientID   = objGradeValue.m_strInPatientID;
                    objBedCardValue.m_strInPatientDate = objGradeValue.m_strInPatientDate;
                    new clsBedCardManageDomain().m_lngGetBedCardValue(ref objBedCardValue);
                    string       strChargeDoc = objBedCardValue.m_strDoc_InCharge == null?"":new clsEmployee(objBedCardValue.m_strDoc_InCharge.Trim()).m_StrFirstName;
                    ListViewItem item         = new ListViewItem(new string[] { objGradeValue.m_strInPatientID, objPatient.m_StrName, objPatient.m_ObjInBedInfo.m_objGetSessionByInDate(DateTime.Parse(objGradeValue.m_strInPatientDate)).m_ObjInBedInfo.m_ObjLastBedInfo.m_ObjBed.m_StrBedName, objGradeValue.m_strInPatientDate, strChargeDoc, strGrade });
                    item.Tag = objGradeValue;
                    m_lsvDitail.Items.Add(item);
                }
                m_lsvDitail.EndUpdate();
            }
            else if (m_trvPatient.SelectedNode.Tag is clsCaseGradeValue)
            {
                clsCaseGradeValue objGradeValue2 = m_trvPatient.SelectedNode.Tag as clsCaseGradeValue;
                m_mthSetItem(objGradeValue2);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 保存床头卡信息
        /// </summary>
        /// <param name="p_objBedCardvalue"></param>
        /// <returns></returns>
        public long m_lngSaveBedCardValue(clsBedCardValue p_objBedCardvalue)
        {
            com.digitalwave.BedCardManageServ.clsBedCardManageServ m_objBedCardSev =
                (com.digitalwave.BedCardManageServ.clsBedCardManageServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.BedCardManageServ.clsBedCardManageServ));

            long lngRes = 0;

            try
            {
                lngRes = m_objBedCardSev.m_lngSaveBedCardValue(p_objBedCardvalue);
            }
            finally
            {
                //m_objBedCardSev.Dispose();
            }
            return(lngRes);
        }
Esempio n. 4
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        protected override long m_lngSubAddNew()
        {
            if (m_objBaseCurrentPatient == null)
            {
                clsPublicFunction.ShowInformationMessageBox("病人为空,请选择病人!");
                return(0);
            }
            if (this.m_txtChargeDoc.Text.Trim() == "" || this.m_txtChargeDoc.Tag == null)
            {
                clsPublicFunction.ShowInformationMessageBox("主治医生为空,或者不是本科室员工!");
                this.m_txtChargeDoc.Focus();
                return(0);
            }

            if (this.m_txtManageDoc.Text.Trim() == "" || this.m_txtManageDoc.Tag == null)
            {
                clsPublicFunction.ShowInformationMessageBox("管床医生为空,或者不是本科室医生!");
                this.m_txtManageDoc.Focus();
                return(0);
            }
            //获取服务器时间
            clsPublicDomain m_objPDomain = new clsPublicDomain();

            clsBedCardValue objBedCardValue = new clsBedCardValue();

            objBedCardValue.m_strInPatientID   = m_objBaseCurrentPatient.m_StrInPatientID;
            objBedCardValue.m_strInPatientDate = m_objBaseCurrentPatient.m_DtmLastInDate.ToString("yyyy-MM-dd HH:mm:ss");
            objBedCardValue.m_strOpenDate      = m_objPDomain.m_strGetServerTime();
            if (this.m_txtChargeDoc.Tag != null)
            {
                objBedCardValue.m_strDoc_InCharge = ((clsEmrEmployeeBase_VO)(this.m_txtChargeDoc.Tag)).m_strEMPID_CHR;
            }
            else
            {
                objBedCardValue.m_strDoc_InCharge = string.Empty;
            }
            if (this.m_txtManageDoc.Tag != null)
            {
                objBedCardValue.m_strDoc_ManageBed = ((clsEmrEmployeeBase_VO)(this.m_txtManageDoc.Tag)).m_strEMPID_CHR;
            }
            else
            {
                objBedCardValue.m_strDoc_ManageBed = string.Empty;
            }
            objBedCardValue.m_intState = this.m_cboStatus.SelectedIndex;
            long lngRes = 0;

            try
            {
                lngRes = m_objBedCardDomain.m_lngSaveBedCardValue(objBedCardValue);
                if (lngRes > 0)
                {
                    clsPublicFunction.ShowInformationMessageBox("保存成功!");
                }
            }
            catch (Exception e)
            {
//				clsPublicFunction.ShowInformationMessageBox("保存失败!");
            }
            finally
            {
                if (lngRes <= 0)
                {
                    clsPublicFunction.ShowInformationMessageBox("保存失败!");
                }
            }
            return(lngRes);
        }