/// <summary> /// 查询是否存在指定的用户科室记录 /// </summary> /// <param name="iuserDeptDict"></param> /// <returns></returns> public override bool Exists(IModel iuserDeptDict) { MUserDeptDict userDeptDict = (MUserDeptDict)iuserDeptDict; strSql = "select * from " + TableName + " where DEPT_CODE='" + userDeptDict.DEPT_CODE + "'"; return(recordIsExist(strSql)); }
/// <summary> /// 插入一条用户科室记录 /// </summary> /// <param name="iuserDeptDict"></param> /// <returns></returns> public override int Add(IModel iuserDeptDict) { MUserDeptDict userDeptDict = (MUserDeptDict)iuserDeptDict; Hashtable ht = new Hashtable(); ht.Add("DEPT_AREA", userDeptDict.DEPT_AREA); ht.Add("DEPT_CODE", userDeptDict.DEPT_CODE); ht.Add("DEPT_NAME", userDeptDict.DEPT_NAME); ht.Add("RPT_HANDUP_STYLE", userDeptDict.RPT_HANDUP_STYLE); ht.Add("RPT_ISSUANCE_STYLE", userDeptDict.RPT_ISSUANCE_STYLE); ht.Add("STUDY_UID_HEADER", userDeptDict.STUDY_UID_HEADER); return(ExecuteSql(StringConstructor.InsertSql(TableName, ht).ToString())); }
/// <summary> /// 获取检查申请号 /// 注意:mWorkList.EXAM_ACCESSION_NUM = mUserDeptDict.DEPT_AREA + mWorkList.ACCESSION_NO;,即检查申请序号=科室域+检查序号,科室域:检查科室:RY,申请科室:CD ///mWorkList.STUDY_INSTANCE_UID = mUserDeptDict.STUDY_UID_HEADER + mWorkList.ACCESSION_NO;,即检查实例UID=检查UID头+检查序号,检查序号为数据库自动生成,为当前最大值 /// </summary> /// <param name="iWorklist"></param> /// <param name="iUser"></param> /// <param name="ACCESSION_NO"></param> /// <returns></returns> public bool GetExamAccessionNum(IModel iWorklist) { MWorkList mWorkList = (MWorkList)iWorklist; bool issuccess = true; //生成ACCESSION_NO,EXAM_ACCESSION_NO,STUDY_INSTANCE_UID BClinicOfficeDict bClinicOfficeDict = new BClinicOfficeDict(); MUserDeptDict mUserDeptDict = (MUserDeptDict)bClinicOfficeDict.GetModel(mWorkList.EXAM_DEPT); if (mWorkList.EXAM_ACCESSION_NUM == null || mWorkList.EXAM_ACCESSION_NUM == "") { mWorkList.EXAM_ACCESSION_NUM = mUserDeptDict.DEPT_AREA + mWorkList.ACCESSION_NO; mWorkList.STUDY_INSTANCE_UID = mUserDeptDict.STUDY_UID_HEADER + mWorkList.ACCESSION_NO; } else { issuccess = false; } return(issuccess); }
/// <summary> /// 获取符合条件的用户科室列表 /// </summary> /// <param name="DEPT_CODE"></param> /// <returns></returns> public override IModel GetModel(string DEPT_CODE) { strSql = "select * from " + TableName + " where DEPT_CODE = '" + DEPT_CODE + "'"; DataTable dt = GetDataTable(strSql); if (dt.Rows.Count == 0) { return(null); } MUserDeptDict userDeptDict = new MUserDeptDict(); userDeptDict.DEPT_AREA = dt.Rows[0]["DEPT_AREA"].ToString(); userDeptDict.DEPT_CODE = dt.Rows[0]["DEPT_CODE"].ToString(); userDeptDict.DEPT_NAME = dt.Rows[0]["DEPT_NAME"].ToString(); userDeptDict.STUDY_UID_HEADER = dt.Rows[0]["STUDY_UID_HEADER"].ToString(); if (dt.Rows[0]["RPT_HANDUP_STYLE"].ToString() == "") { userDeptDict.RPT_HANDUP_STYLE = null; } else { userDeptDict.RPT_HANDUP_STYLE = Convert.ToInt32(dt.Rows[0]["RPT_HANDUP_STYLE"].ToString()); } if (dt.Rows[0]["RPT_ISSUANCE_STYLE"].ToString() == "") { userDeptDict.RPT_ISSUANCE_STYLE = null; } else { userDeptDict.RPT_ISSUANCE_STYLE = Convert.ToInt32(dt.Rows[0]["RPT_ISSUANCE_STYLE"].ToString()); } return(userDeptDict); }