using HL_FristAidPlatform_DataBase; using HL_FristAidPlatform_Help; using HL_FristAidPlatform_IDataBase; using HL_FristAidPlatform_Models; using System; using System.Collections.Generic; namespace HL_FristAidPlatform_Bussiness { public class T_Service_Apoplexy_PatientsTimeAxisBLL { private IT_Service_Apoplexy_PatientsTimeAxis IService = new T_Service_Apoplexy_PatientsTimeAxisDB(); private IT_Service_Patient IPatient = new T_Service_PatientDB(); public MessageModel Add(T_Service_Apoplexy_PatientsTimeAxis entity) { if (IService.Add(entity)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } public MessageModel DirectAdd(T_Service_Apoplexy_PatientsTimeAxis entity) { if (IService.DirectAdd(entity)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } public MessageModel Dels(dynamic[] ids) { if (IService.Dels(ids)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } public T_Service_Apoplexy_PatientsTimeAxis Get(long id) { return IService.Get(id); } public TableModel GetPageList(int pageIndex, int pageSize) { return IService.GetPageList(pageIndex, pageSize); } public MessageModel Update(T_Service_Apoplexy_PatientsTimeAxis entity) { if (IService.Update(entity)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 获取患者列表--动态时间节点列 /// /// 起始页 /// 每页大小 /// 所属院区GUID /// 所属模块ID /// 开始时间(创建) /// 结束时间(创建) /// 关键词 /// public string GetPatientsTime(int pageIndex, int pageSize, string hospitalGuid, string startTime, string endTime, string name, int gender, int status, int reportingStatus, string aczlType, int age1, int age2, string bcRyType, string bcLyType, string keyWord) { return IService.GetPatientsTime(pageIndex, pageSize, hospitalGuid, startTime, endTime, name, gender, status, reportingStatus, aczlType, age1, age2, bcRyType, bcLyType, keyWord); } /// /// 卒中患者列表 /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// public TableModel GetApoplexyPatientList(int pageIndex, int pageSize, string hospitalGuid, string startTime, string endTime, string name, int gender, int auditStatus, string aczlType, int age1, int age2, string bcRyType, string bcLyType, int status, string GreenWay, string illessLevel, string ywb, string diagnose) { return IService.GetApoplexyPatientList(pageIndex, pageSize, hospitalGuid, startTime, endTime, name, gender, auditStatus, aczlType, age1, age2, bcRyType, bcLyType, status, GreenWay, illessLevel, ywb, diagnose); } /// /// 根据病人编号获取所有记录节点时间 /// /// 病人编号 /// 是否显示到时间轴0是1否 /// public string GetPatientDetailTime(string patientID, int isDisplayTimeAxis) { return IService.GetPatientDetailTime(patientID, isDisplayTimeAxis); } /// /// 根据病人编号+时间节点标识 获取记录时间 /// /// 病人编号 /// 时间节点编号:-1查询该病人的全部节点 /// public TableModel GetRecordingTime(string patientGuid, long timeAxisID) { return IService.GetRecordingTime(patientGuid, timeAxisID); } /// /// 根据病人编号和时间节点编号更改记录时间 /// 用于快速扫码记录 /// /// 病人编号 /// 时间节点编号 /// 操作时间 /// public MessageModel UpdateRecordingTimeByPatientIDAndTimeAxisID(T_Service_Apoplexy_PatientsTimeAxis PatientsTimeAxis) { if (IService.UpdateRecordingTimeByPatientIDAndTimeAxisID(PatientsTimeAxis)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 根据病人编号和时间节点编号更改参考正常时间 /// /// /// /// /// public MessageModel UpdateNormalTime(T_Service_Apoplexy_PatientsTimeAxis PatientsTimeAxis) { if (IService.UpdateNormalTime(PatientsTimeAxis)) { return new MessageModel { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = false, Msg = "操作失败" }; } } /// /// 根据条件查询数据 /// /// /// public TableModel GetModelByReport(string where) { return IService.GetModelByReport(where); } /// /// 获取患者列表--动态时间节点列 /// /// 起始页 /// 每页大小 /// 所属院区GUID /// 所属模块ID /// 开始时间(创建) /// 结束时间(创建) /// 急救状态:-1全部 0未结束(对应急救中0+住院中1) 1已结束(对应已转归2) /// 关键词 /// public string GetPatientsTimeForApp(int pageIndex, int pageSize, string hospitalGuid, long systemModuleID, string startTime, string endTime, int state, string keyWord, string acZLType, int Status) { return IService.GetPatientsTimeForApp(pageIndex, pageSize, hospitalGuid, systemModuleID, startTime, endTime, state, keyWord, acZLType, Status); } /// /// 根据卒中患者GUID查询时间轴 /// /// /// public List GetApoplexyPatientTimeAixs(string patientGuid) { return IService.GetApoplexyPatientTimeAixs(patientGuid); } /// /// 审核病例 /// /// /// public MessageModel AuditCase(AuditCaseModel model) { T_Service_Patient patient = new T_Service_Patient(); patient = IPatient.Get(model.GUID); if (patient == null) { return new MessageModel { Success = false, Msg = "该患者不存在" }; } else { patient.Auditor_Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); patient.Submit_Audit_Person_ID = model.AduditUser; patient.AuditStatus = model.AuditStatus; if (IService.AuditCase(patient)) { return new MessageModel { Success = true, Msg = "审核完成" }; } else { return new MessageModel { Success = false, Msg = "审核失败" }; } } } ///GetQualityList public List GetQualityList(string starttime, string endtime, string name, string sqltext, string hospitalGuid) { return IService.GetQualityList(starttime, endtime, name, sqltext, hospitalGuid); } public MessageModel UpdateApoplexyPatientTimeAixs(UpdateApoplexyTimes model) { if (IService.UpdateApoplexyPatientTimeAixs(model)) { return new MessageModel { Success = true, Msg = "更新完成" }; } else { return new MessageModel { Success = false, Msg = "更新失败" }; } } } }