/// <summary> /// 获取科室下专科病历表单(数据检索用) /// </summary> /// <param name="p_strDeptID"></param> /// <param name="p_objFormInfoArr"></param> /// <returns></returns> public long m_lngIMR_NewGetFormInfo(/*string p_strDeptID,*/ out iCareData.clsInpatMedRec_Type[] p_objFormInfoArr) { p_objFormInfoArr = null; DataTable dtResult; clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngIMR_GetFormInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial /*,p_strDeptID*/, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return(lngRes); } p_objFormInfoArr = new iCareData.clsInpatMedRec_Type[dtResult.Rows.Count]; for (int i = 0; i < dtResult.Rows.Count; i++) { p_objFormInfoArr[i] = new iCareData.clsInpatMedRec_Type(); p_objFormInfoArr[i].m_strTypeID = dtResult.Rows[i]["TYPEID"].ToString(); p_objFormInfoArr[i].m_strTypeName = dtResult.Rows[i]["TYPENAME"].ToString(); } return(lngRes); }
/// <summary> /// /// </summary> /// <param name="p_strSQL"></param> /// <param name="p_dtbValues"></param> /// <returns></returns> public long m_lngSearchesBySQL(string p_strSQL, ref DataTable p_dtbValues) { clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngSearchesBySQL(p_strSQL, ref p_dtbValues); } finally { //m_objService.Dispose(); } return(lngRes); }
/// <summary> /// 查询病人记录信息 /// </summary> /// <param name="p_strInPatientNO"></param> /// <param name="p_strInPatientDate"></param> /// <param name="p_dtbResult"></param> /// <returns></returns> public long m_lngGetPatientRecordCount(string p_strTypeID, string p_strTypeName, string p_strInPatientNO, string p_strInPatientDate, iCareData.clsCustom_SubmitValue[] p_objCustomForms, out DataTable p_dtbResult) { clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngGetPatientRecordCount(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strTypeID, p_strTypeName, p_strInPatientNO, p_strInPatientDate, p_objCustomForms, out p_dtbResult); } finally { //m_objService.Dispose(); } return(lngRes); }
public clsPatientList[] m_objGetPatientListArr(iCareData.clsRecordSearch_SearchInfo p_objSearchInfo) { DataTable dtResult; clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngGetPatientList(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_objSearchInfo, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return(null); } clsPatientList [] objPatientListArr = new clsPatientList[dtResult.Rows.Count]; DataRow objRow = null; for (int i = 0; i < dtResult.Rows.Count; i++) { objRow = dtResult.Rows[i]; clsPatientList objPatientList = new clsPatientList(); objPatientList.m_strInPatientNO = objRow["INPATIENTID"].ToString(); objPatientList.m_strInPatientDate = objRow["INPATIENTDATE"].ToString(); objPatientList.m_strOpenDate = objRow["OPENDATE"].ToString(); objPatientList.m_strFirstName = objRow["FIRSTNAME"].ToString(); objPatientList.m_strSex = objRow["SEX"].ToString(); objPatientList.m_strAge = objRow["AGE"].ToString(); objPatientList.m_strCreateDate = objRow["CREATEDATE"].ToString(); objPatientList.m_strCreateUserID = objRow["CREATEUSERID"].ToString(); objPatientList.m_strCreateUserName = objRow["CREATEUSERNAME"].ToString(); objPatientListArr[i] = objPatientList; } return(objPatientListArr); }
/// <summary> /// 获取表单的字段信息(数据检索用) /// </summary> /// <param name="p_strFormID"></param> /// <param name="p_objItemInfo"></param> public void m_mthIMR_NewGetItemInfo(string p_strFormID, out iCareData.clsInpatMedRec_Type_Item[] p_objItemInfo) { p_objItemInfo = null; if (p_strFormID == null || p_strFormID == "") { return; } DataTable dtResult; clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngIMR_GetFieldInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_strFormID, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return; } p_objItemInfo = new iCareData.clsInpatMedRec_Type_Item[dtResult.Rows.Count]; DataRow objRow = null; for (int i = 0; i < dtResult.Rows.Count; i++) { objRow = dtResult.Rows[i]; iCareData.clsInpatMedRec_Type_Item objItemInfo = new iCareData.clsInpatMedRec_Type_Item(); objItemInfo.m_strTypeID = p_strFormID; objItemInfo.m_strItemID = objRow["ITEMID"].ToString(); objItemInfo.m_strItemName = objRow["ITEMNAME"].ToString(); objItemInfo.m_strItemType = objRow["ITEMTYPE"].ToString(); p_objItemInfo[i] = objItemInfo; } }
/// <summary> /// 获取表单信息 /// </summary> /// <returns></returns> public clsFormInfo [] m_objGetFormInfoArr() { DataTable dtResult; clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngGetFormInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return(null); } clsFormInfo [] objFormInfoArr = new clsFormInfo[dtResult.Rows.Count]; DataRow objRow = null; for (int i = 0; i < dtResult.Rows.Count; i++) { objRow = dtResult.Rows[i]; clsFormInfo objFormInfo = new clsFormInfo(); objFormInfo.m_strFormName = objRow["FORMNAME"].ToString(); objFormInfo.m_strSearchInfoType = objRow["SEARCHINFOTYPE"].ToString(); objFormInfo.m_strMainSearchInfo = objRow["MAINSEARCHINFO"].ToString(); objFormInfoArr[i] = objFormInfo; } return(objFormInfoArr); }
/// <summary> /// 获取表单的字段信息 /// </summary> /// <param name="p_objFormInfo">表单信息</param> public void m_objGetFieldInfoArr(ref clsFormInfo p_objFormInfo) { DataTable dtResult; clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngGetFieldInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_objFormInfo.m_strFormName, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return; } clsFieldInfo[] objFieldInfoArr = new clsFieldInfo[dtResult.Rows.Count]; DataRow objRow = null; for (int i = 0; i < dtResult.Rows.Count; i++) { objRow = dtResult.Rows[i]; clsFieldInfo objFieldInfo = new clsFieldInfo(); objFieldInfo.m_strFieldName = objRow["FIELDNAME"].ToString(); objFieldInfo.m_strConditionFieldType = objRow["CONDITIONFIELDTYPE"].ToString(); objFieldInfo.m_strConditionFieldName = objRow["CONDITIONFIELDNAME"].ToString(); objFieldInfoArr[i] = objFieldInfo; } p_objFormInfo.m_objFieldInfoArr = objFieldInfoArr; }
/// <summary> /// 获取表单的字段信息(新专科病历用) /// </summary> /// <param name="p_objFormInfo">表单信息</param> public void m_mthIMR_GetFieldInfo(ref clsFormInfo p_objFormInfo) { if (p_objFormInfo == null || p_objFormInfo.m_strFormName == null) { return; } DataTable dtResult; clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngIMR_GetFieldInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, p_objFormInfo.m_strFormID, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return; } clsFieldInfo [] objFieldInfoArr = new clsFieldInfo[dtResult.Rows.Count + 5]; #region 固定内容 objFieldInfoArr[0] = new clsFieldInfo(); objFieldInfoArr[0].m_strFieldName = "住院号"; objFieldInfoArr[0].m_strConditionFieldType = "text"; objFieldInfoArr[0].m_strConditionFieldName = "b.InPatientID"; objFieldInfoArr[1] = new clsFieldInfo(); objFieldInfoArr[1].m_strFieldName = "患者姓名"; objFieldInfoArr[1].m_strConditionFieldType = "text"; objFieldInfoArr[1].m_strConditionFieldName = "PBI.FirstName"; objFieldInfoArr[2] = new clsFieldInfo(); objFieldInfoArr[2].m_strFieldName = "性别"; objFieldInfoArr[2].m_strConditionFieldType = "text"; objFieldInfoArr[2].m_strConditionFieldName = "PBI.Sex"; objFieldInfoArr[3] = new clsFieldInfo(); objFieldInfoArr[3].m_strFieldName = "年龄"; objFieldInfoArr[3].m_strConditionFieldType = "number"; objFieldInfoArr[3].m_strConditionFieldName = "datediff(year,PBI.Birth,getdate())"; objFieldInfoArr[4] = new clsFieldInfo(); objFieldInfoArr[4].m_strFieldName = "入院日期"; objFieldInfoArr[4].m_strConditionFieldType = "date"; objFieldInfoArr[4].m_strConditionFieldName = "b.InPatientDate"; #endregion for (int i = 0; i < dtResult.Rows.Count; i++) { objFieldInfoArr[i + 5] = new clsFieldInfo(); objFieldInfoArr[i + 5].m_strFieldName = dtResult.Rows[i]["ITEMNAME"].ToString(); switch (dtResult.Rows[i]["ITEMTYPE"].ToString().Trim()) { case "RichTextBox": case "ctlBorderTextBox": case "ctlComboBox": case "ctlRichTextBox": default: objFieldInfoArr[i + 5].m_strConditionFieldType = "text"; break; case "ctlTimePicker": objFieldInfoArr[i + 5].m_strConditionFieldType = "date"; break; case "RadioButton": case "CheckBox": objFieldInfoArr[i + 5].m_strConditionFieldType = "truefalse"; break; } objFieldInfoArr[i + 5].m_strConditionFieldName = @"b.ItemID = '" + dtResult.Rows[i]["ITEMID"].ToString() + "' and b.ItemContent"; } p_objFormInfo.m_objFieldInfoArr = objFieldInfoArr; }
/// <summary> /// 获取专科病历表单(新专科病历用) /// </summary> /// <param name="p_strDeptID">科室ID</param> /// <param name="p_objFormInfoArr"></param> /// <returns></returns> public long m_lngIMR_GetFormInfo(string p_strDeptID, out clsFormInfo[] p_objFormInfoArr) { p_objFormInfoArr = null; DataTable dtResult; string strSearchInfoSql = null; if (com.digitalwave.Emr.StaticObject.clsEMR_StaticObject.s_StrCurrentHospitalNO == "440104001") { strSearchInfoSql = @"select distinct PBI.FirstName,PBI.Sex,DATEDIFF(year, convert(datetime,PBI.Birth,120), getdate()) as Age, b.InPatientID,b.InPatientDate,b.OpenDate,EBI_Record.FirstName as CreateUserName, b.OpenDate as CreateDate,a.CreateUserID from InpatMedRec a inner join InpatMedRec_Item b on a.TypeID = b.TypeID and a.InPatientID = b.InPatientID and a.InPatientDate = b.InpatientDate and a.OpenDate = b.OpenDate inner join PatientBaseInfo PBI on a.InPatientID = PBI.InPatientID inner join EmployeeBaseInfo EBI_Record on a.CreateUserID = EBI_Record.EmployeeID inner join Dept_Employee DE on a.CreateUserID = DE.EmployeeID and DE.EndDate = $NULLDate$ where a.Status = 0 and a.TypeID = $TypeID$ and DE.DeptID = $DeptID$ and " ; } else { strSearchInfoSql = @"select distinct PBI.FirstName,PBI.Sex,to_number(To_Char(sysdate,'YYYY'))-to_number(To_Char(PBI.Birth,'YYYY')) as Age, b.InPatientID,b.InPatientDate,b.OpenDate,EBI_Record.FirstName as CreateUserName, b.OpenDate as CreateDate,a.CreateUserID from InpatMedRec a inner join InpatMedRec_Item b on a.TypeID = b.TypeID and a.InPatientID = b.InPatientID and a.InPatientDate = b.InpatientDate and a.OpenDate = b.OpenDate inner join PatientBaseInfo PBI on a.InPatientID = PBI.InPatientID inner join EmployeeBaseInfo EBI_Record on a.CreateUserID = EBI_Record.EmployeeID inner join Dept_Employee DE on a.CreateUserID = DE.EmployeeID and DE.EndDate = $NULLDate$ where a.Status = 0 and a.TypeID = $TypeID$ and DE.DeptID = $DeptID$ and " ; } clsRecordSearchService m_objService = (clsRecordSearchService)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsRecordSearchService)); long lngRes = 0; try { lngRes = m_objService.m_lngIMR_GetFormInfo(clsLoginContext.s_ObjLoginContext.m_ObjPrincial, out dtResult); } finally { //m_objService.Dispose(); } if (lngRes <= 0 || dtResult.Rows.Count == 0) { return(lngRes); } p_objFormInfoArr = new clsFormInfo[dtResult.Rows.Count]; DataRow objRow = null; for (int i = 0; i < dtResult.Rows.Count; i++) { clsFormInfo objFormInfo = new clsFormInfo(); objRow = dtResult.Rows[i]; objFormInfo.m_strFormID = objRow["TYPEID"].ToString(); objFormInfo.m_strFormName = objRow["TYPENAME"].ToString(); objFormInfo.m_strSearchInfoType = "AND"; objFormInfo.m_strMainSearchInfo = strSearchInfoSql; p_objFormInfoArr[i] = objFormInfo; } return(lngRes); }