예제 #1
0
        /// <summary>
        /// 重写treeview事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void m_trvInPatientDate_AfterSelect(object sender, TreeViewEventArgs e)
        {
            clsMiniBloodSugarChk_GXServ objservice =
                (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ));


            try
            {
                //清空病人记录信息
                m_mthClearPatientRecordInfo();

                if (m_trvInPatientDate.SelectedNode == null || m_trvInPatientDate.SelectedNode == m_trvInPatientDate.Nodes[0] || m_objCurrentPatient == null)
                {
                    return;
                }

                m_objCurrentPatient.m_DtmSelectedInDate = DateTime.Parse(m_trvInPatientDate.SelectedNode.Text);

                //获取病人记录列表
                clsTransDataInfo[] objTansDataInfoArr;
                string             m_strInPatientID   = m_objCurrentPatient.m_StrInPatientID;
                string             m_strInPatientDate = m_trvInPatientDate.SelectedNode.Text; //m_objCurrentPatient.m_ObjInBedInfo.m_ObjLastSessionInfo.m_DtmInDate.ToString("yyyy-MM-dd HH:mm:ss");
                //获取指定入院时间的记录列表
                DataTable dt     = new DataTable();
                long      lngRes = objservice.m_lngGetRecoedByInPatient(null, m_strInPatientID, DateTime.Parse(m_strInPatientDate), out dt);
                if (dt != null)
                {
                     dgvRecords.DataSource = dt;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
예제 #2
0
        /// <summary>
        /// 当打开窗体时load数据
        /// </summary>
        private void m_mthLoad()
        {
            clsMiniBloodSugarChk_GXServ objservice =
                (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ));

            //检查参数
            if (strRecordInPatientID == null || strRecordInPatientID == string.Empty)
            {
                MessageBox.Show("未指定记录", "iCare message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            try
            {
                long lngRes = objservice.m_lngGetRecoedByInPatient(null, strRecordInPatientID, DateTime.Parse(strRecordInPatientDate), DateTime.Parse(strRecordCreateDate), out m_objRecord);
                if (m_objRecord != null)
                {
                    m_mthSetGUIFromContent(m_objRecord);

                    m_mthEnableModify(false);

                    m_mthSetModifyControl(m_objRecord, false);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objservice = null;
            }
        }
예제 #3
0
        /// <summary>
        /// 设置自定义标头名
        /// </summary>
        /// <param name="p_strCustomName">自定义标头名</param>
        /// <param name="p_strColumnName">对应的字段名</param>
        /// <param name="p_strInPatientID">住院号</param>
        /// <param name="p_dtmInPatientDate">入院日期</param>
        /// <returns></returns>
        public long m_lngSetCustomName(string p_strCustomName,
                                       string p_strColumnName,
                                       string p_strInPatientID,
                                       DateTime p_dtmInPatientDate)
        {
            clsMiniBloodSugarChk_GXServ m_objServ =
                (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ));

            long lngResult = m_objServ.m_lngSetCustomName(p_strCustomName, p_strColumnName, p_strInPatientID, p_dtmInPatientDate);

            return(lngResult);
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_strInPatientID"></param>
        /// <param name="p_dtmInPatientDate"></param>
        /// <param name="p_objValues"></param>
        /// <returns></returns>
        public long m_lngGetRecoedByInPatient(string p_strInPatientID, DateTime p_dtmInPatientDate, out clsMiniBloodSugarChkValue_GX[] p_objValues)
        {
            clsMiniBloodSugarChk_GXServ m_objServ =
                (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ));

            long lngResult = 0;

            try
            {
                lngResult = m_objServ.m_lngGetRecoedByInPatient(p_strInPatientID, p_dtmInPatientDate, out p_objValues);
            }
            finally
            {
                //m_objServ.Dispose();
            }
            return(lngResult);
        }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_objValue"></param>
        /// <returns></returns>
        public long m_lngDeleteRecoed(clsMiniBloodSugarChkValue_GX p_objValue)
        {
            clsMiniBloodSugarChk_GXServ m_objServ =
                (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ));

            long lngResult = 0;

            try
            {
                lngResult = m_objServ.m_lngDeleteRecoed(p_objValue);
            }
            finally
            {
                //m_objServ.Dispose();
            }
            return(lngResult);
        }
예제 #6
0
        /// <summary>
        /// 修改数据
        /// </summary>
        /// <returns></returns>
        protected override long m_lngSubModify()
        {
            long lngRes = 0;

            clsMiniBloodSugarChk_GXServ objservice =
                (clsMiniBloodSugarChk_GXServ)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsMiniBloodSugarChk_GXServ));

            try
            {
                #region 获取内容
                //获取内容
                m_objRecord.m_strInPatientID      = strRecordInPatientID;
                m_objRecord.m_dtmInPatientDate    = DateTime.Parse(strRecordInPatientDate);
                m_objRecord.m_dtmOpenDate         = m_dtpCreateDate.Value; //记录时间取窗体上控件值
                m_objRecord.m_dtmCreateDate       = DateTime.Now;          //创建时间取当前时间
                m_objRecord.m_strCreateUserID     = clsEMRLogin.LoginInfo.m_strEmpID;
                m_objRecord.m_dtmModifyDate       = DateTime.Now;
                m_objRecord.m_strMeatType         = cmbMealType.Text;
                m_objRecord.m_strBloodSugar_Right = m_txtValue.m_strGetRightText();
                m_objRecord.m_strBloodSugar       = m_txtValue.Text;
                m_objRecord.m_strBloodSugarXML    = m_txtValue.m_strGetXmlText();
                m_objRecord.m_strDescription      = m_txtDesription.Text;

                //获取lsvsign签名
                m_objRecord.objSignerArr = new clsEmrSigns_VO[1];
                strUserIDList            = "";
                strUserNameList          = "";
                m_mthGetSignArr(new Control[] { txtSign }, ref m_objRecord.objSignerArr, ref strUserIDList, ref strUserNameList);
                //for (int i = 0; i < 1; i++)
                //{
                //    m_objRecord.objSignerArr[i] = new clsEmrSigns_VO();
                //    m_objRecord.objSignerArr[i].objEmployee = new clsEmrEmployeeBase_VO();
                //    m_objRecord.objSignerArr[i].objEmployee = (clsEmrEmployeeBase_VO)(txtSign.Tag);
                //    m_objRecord.objSignerArr[i].controlName = "txtSign";
                //    m_objRecord.objSignerArr[i].m_strFORMID_VCHR = "frmMiniBooldSugarContent";//注意大小写
                //    m_objRecord.objSignerArr[i].m_strREGISTERID_CHR = com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentPatient.m_strREGISTERID_CHR;
                //    //痕迹格式 0972,0324,

                //    strUserIDList = strUserIDList + m_objRecord.objSignerArr[i].objEmployee.m_strEMPID_CHR.Trim() + ",";
                //    strUserNameList = strUserNameList + m_objRecord.objSignerArr[i].objEmployee.m_strLASTNAME_VCHR.Trim() + ",";
                //}
                m_objRecord.m_strModifyUserID = strUserIDList;
                #endregion

                ArrayList objSignerArr = new ArrayList();
                for (int i = 0; i < m_objRecord.objSignerArr.Length; i++)
                {
                    if (m_objRecord.objSignerArr[i].controlName == "lsvSign" || m_objRecord.objSignerArr[i].controlName == "txtSign")
                    {
                        objSignerArr.Add(m_objRecord.objSignerArr[i].objEmployee);
                    }
                }
                //数字签名
                //记录ID通常为 住院号+住院时间 || 住院号+记录时间 来识别唯一 格式 00000056-2005-10-10 10:20:20
                clsEmrDigitalSign_VO objSign_VO = new clsEmrDigitalSign_VO();
                objSign_VO.m_strFORMID_VCHR       = this.Name;
                objSign_VO.m_strFORMRECORDID_VCHR = m_objRecord.m_strInPatientID.Trim() + "-" + m_objRecord.m_dtmInPatientDate.ToString("yyyy-MM-dd HH:mm:ss");
                objSign_VO.m_strSIGNIDID_VCHR     = clsEMRLogin.LoginInfo.m_strEmpID;
                objSign_VO.m_strRegisterId        = m_objBaseCurrentPatient.m_StrRegisterId;
                clsCheckSignersController objCheck = new clsCheckSignersController(objSignerArr, false);
                if (objCheck.CheckSigner(m_objRecord, objSign_VO) == -1)
                {
                    return(-1);
                }
                //保存记录
                clsPreModifyInfo objModifyInfo = null;
                lngRes = objservice.m_lngModifyRecoed(null, m_objRecord);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objservice = null;
            }

            return(lngRes);
        }