/// <summary> /// 诊断、检查、化验、用药信息查看/用于时间轴 /// </summary> /// <param name="pclsCache"></param> /// <param name="UserId"></param> /// <param name="Type"></param> /// <param name="VisitId"></param> /// <param name="Date"></param> /// <returns></returns> public ClinicInfoViewModel GetClinicInfoDetail(DataConnection pclsCache, string UserId, string Type, string VisitId, string Date) { ClinicInfoViewModel list = new ClinicInfoViewModel(); List<DiagnosisInfo> DiagnosisInfo_DataViewModel = null; List<ExamInfo> ExamInfo_DataViewModel = null; List<LabTestList> LabTestList_DataViewModel = null; List<DrugRecordList> DrugRecordList_DataViewModel = null; string condition = ""; try { switch (Type) { case "DiagnosisInfo": DiagnosisInfo_DataViewModel = new ClinicInfoMethod().PsDiagnosisGetDiagnosisInfo(pclsCache, UserId, VisitId);//诊断表 List<DiagnosisInfo> DiagnosisInfo_DataViewModel_copy = new List<DiagnosisInfo>(); foreach (DiagnosisInfo item in DiagnosisInfo_DataViewModel) { if (item.RecordDateCom == Date) { DiagnosisInfo_DataViewModel_copy.Add(item); } } list.DiagnosisInfo_DataViewModel = DiagnosisInfo_DataViewModel_copy; break; case "ExaminationInfo": ExamInfo_DataViewModel = new ClinicInfoMethod().PsExaminationGetExaminationList(pclsCache, UserId, VisitId); //检查表(有子表) List<ExamInfo> ExamInfo_DataViewModel_copy = new List<ExamInfo>(); foreach (ExamInfo item in ExamInfo_DataViewModel) { if (item.ExamDateCom == Date) { ExamInfo_DataViewModel_copy.Add(item); } } list.ExamInfo_DataViewModel = ExamInfo_DataViewModel_copy; break; case "LabTestInfo": LabTestList_DataViewModel = new ClinicInfoMethod().GetLabTestList(pclsCache, UserId, VisitId); //化验表(有子表) List<LabTestList> LabTestList_DataViewModel_copy = new List<LabTestList>(); foreach (LabTestList item in LabTestList_DataViewModel) { if (item.LabTestDateCom == Date) { LabTestList_DataViewModel_copy.Add(item); } } list.LabTestList_DataViewModel = LabTestList_DataViewModel_copy; break; case "DrugRecord": DrugRecordList_DataViewModel = new ClinicInfoMethod().GetDrugRecordList(pclsCache, UserId, VisitId); //用药 condition = "StartDateTimeCom = '" + Date + "'"; list.DrugRecordList_DataViewModel = DrugRecordList_DataViewModel; break; default: break; } //list肯定不为空 return list; } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "ClinicInfoMethod.GetClinicInfoDetail", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return null; } finally { pclsCache.DisConnect(); } }
//根据患者Id,获取药物治疗列表 GL 2015-10-13 public List<PsDrugRecord> GetPatientDrugRecord(DataConnection pclsCache, string PatientId, string Module) { try { List<PsDrugRecord> list = new List<PsDrugRecord>(); list = new ClinicInfoMethod().GetPsDrugRecord(pclsCache, PatientId, Module); if (list != null) { if (list.Count > 0) //排序(降序) { list.Sort((x, y) => -(x.StartDateTime).CompareTo(y.StartDateTime)); } } return list; } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "GetPatientDrugRecord", "PlanInfoRepository error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return null; throw (ex); } }