public frmInvokeTemplateByICD10() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // m_objDomain = new clsTemplateDomain(); }
protected long m_lngAddNewRecord() { //检查当前病人变量是否为null if (m_objCurrentPatient == null) { return((long)enmOperationResult.Parameter_Error); } if (m_ObjCurrentEmrPatientSession == null) { #if !Debug clsPublicFunction.ShowInformationMessageBox("请选择病人入院日期。"); #endif return(-7); } //获取服务器时间 clsPublicDomain m_objPDomain = new clsPublicDomain(); //从界面获取记录信息 clsAYQBabyAssessmentContent objContent = m_objGetContentFromGUI(); string strDiseaseID = new clsTemplateDomain().m_strGetAssociateIDBySetID(m_strGetTemplateSetID(), (int)enmAssociate.Disease); //界面输入值出错 if (objContent == null) { return((long)enmOperationResult.Parameter_Error); } //设置 clsInPatientCaseHistoryContent 的信息(使用服务器时间设置m_dtmOpenDate和m_dtmModifyDate) objContent.m_bytIfConfirm = 0; objContent.m_bytStatus = 0; objContent.m_dtmInPatientDate = m_objCurrentPatient.m_DtmSelectedInDate; objContent.m_dtmModifyDate = DateTime.Parse(m_objPDomain.m_strGetServerTime()); objContent.m_dtmOpenDate = DateTime.Parse(m_objPDomain.m_strGetServerTime()); //objContent.m_strCreateUserID =MDIParent.strOperatorID; objContent.m_strInPatientID = m_objCurrentPatient.m_StrInPatientID; objContent.m_strModifyUserID = objContent.m_strModifyUserID; objContent.m_dtmCreateDate = DateTime.Parse(this.m_dtpCreateDate.Text); //保存记录 clsPreModifyInfo p_objModifyInfo = null; long lngRes = m_objDomain.m_lngAddNewRecord(objContent, objPicValueArr, strDiseaseID, out p_objModifyInfo); //根据结果做不同的处理 switch ((enmOperationResult)lngRes) { case enmOperationResult.DB_Succeed: m_objCurrentRecordContent = objContent; m_dtmCreatedDate = objContent.m_dtmOpenDate; m_mthHandleAddRecordSucceed(); this.m_dtpCreateDate.Enabled = false; break; case enmOperationResult.Record_Already_Exist: m_mthShowRecordTimeDouble(); return(lngRes); } //返回结果 return(lngRes); }