예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_objValue"></param>
        /// <returns></returns>
        public long m_lngAddNewRecoed(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_lngAddNewRecoed(p_objValue);
            }
            finally
            {
                //m_objServ.Dispose();
            }
            return(lngResult);
        }
예제 #2
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <returns></returns>
        protected override long m_lngSubAddNew()
        {
            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_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_lngAddNewRecoed(null, m_objRecord);
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                objservice = null;
            }

            return(lngRes);
        }