StableVersion4.3/HL_FristAidPlatform_Bussiness/Service/T_Service_Apoplexy_Patients...

259 lines
11 KiB
C#
Raw Normal View History

2024-03-11 09:47:34 +08:00
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<T_Service_Apoplexy_PatientsTimeAxis> Add(T_Service_Apoplexy_PatientsTimeAxis entity)
{
if (IService.Add(entity))
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = false, Msg = "操作失败" };
}
}
public MessageModel<T_Service_Apoplexy_PatientsTimeAxis> DirectAdd(T_Service_Apoplexy_PatientsTimeAxis entity)
{
if (IService.DirectAdd(entity))
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = false, Msg = "操作失败" };
}
}
public MessageModel<T_Service_Apoplexy_PatientsTimeAxis> Dels(dynamic[] ids)
{
if (IService.Dels(ids))
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = false, Msg = "操作失败" };
}
}
public T_Service_Apoplexy_PatientsTimeAxis Get(long id)
{
return IService.Get(id);
}
public TableModel<T_Service_Apoplexy_PatientsTimeAxis> GetPageList(int pageIndex, int pageSize)
{
return IService.GetPageList(pageIndex, pageSize);
}
public MessageModel<T_Service_Apoplexy_PatientsTimeAxis> Update(T_Service_Apoplexy_PatientsTimeAxis entity)
{
if (IService.Update(entity))
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = false, Msg = "操作失败" };
}
}
/// <summary>
/// 获取患者列表--动态时间节点列
/// </summary>
/// <param name="pageIndex">起始页</param>
/// <param name="pageSize">每页大小</param>
/// <param name="hospitalGuid">所属院区GUID</param>
/// <param name="systemModuleID">所属模块ID</param>
/// <param name="startTime">开始时间(创建)</param>
/// <param name="endTime">结束时间(创建)</param>
/// <param name="keyWord">关键词</param>
/// <returns></returns>
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);
}
/// <summary>
/// 卒中患者列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="hospitalGuid"></param>
/// <param name="startTime"></param>
/// <param name="endTime"></param>
/// <param name="name"></param>
/// <param name="gender"></param>
/// <param name="auditStatus"></param>
/// <param name="aczlType"></param>
/// <param name="age1"></param>
/// <param name="age2"></param>
/// <param name="bcRyType"></param>
/// <param name="bcLyType"></param>
/// <returns></returns>
public TableModel<ApoplexyPatientsModel> 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);
}
/// <summary>
/// 根据病人编号获取所有记录节点时间
/// </summary>
/// <param name="patientGuid">病人编号</param>
/// <param name="isDisplayTimeAxis">是否显示到时间轴0是1否</param>
/// <returns></returns>
public string GetPatientDetailTime(string patientID, int isDisplayTimeAxis)
{
return IService.GetPatientDetailTime(patientID, isDisplayTimeAxis);
}
/// <summary>
/// 根据病人编号+时间节点标识 获取记录时间
/// </summary>
/// <param name="patientGuid">病人编号</param>
/// <param name="timeAxisID">时间节点编号:-1查询该病人的全部节点</param>
/// <returns></returns>
public TableModel<T_Service_Apoplexy_PatientsTimeAxis> GetRecordingTime(string patientGuid, long timeAxisID)
{
return IService.GetRecordingTime(patientGuid, timeAxisID);
}
/// <summary>
/// 根据病人编号和时间节点编号更改记录时间
/// 用于快速扫码记录
/// </summary>
/// <param name="patientGuid">病人编号</param>
/// <param name="timeAxisID">时间节点编号</param>
/// <param name="recordingTime">操作时间</param>
/// <returns></returns>
public MessageModel<T_Service_Apoplexy_PatientsTimeAxis> UpdateRecordingTimeByPatientIDAndTimeAxisID(T_Service_Apoplexy_PatientsTimeAxis PatientsTimeAxis)
{
if (IService.UpdateRecordingTimeByPatientIDAndTimeAxisID(PatientsTimeAxis))
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = false, Msg = "操作失败" };
}
}
/// <summary>
/// 根据病人编号和时间节点编号更改参考正常时间
/// </summary>
/// <param name="patientGuid"></param>
/// <param name="timeAxisID"></param>
/// <param name="normalTime"></param>
/// <returns></returns>
public MessageModel<T_Service_Apoplexy_PatientsTimeAxis> UpdateNormalTime(T_Service_Apoplexy_PatientsTimeAxis PatientsTimeAxis)
{
if (IService.UpdateNormalTime(PatientsTimeAxis))
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<T_Service_Apoplexy_PatientsTimeAxis> { Success = false, Msg = "操作失败" };
}
}
/// <summary>
/// 根据条件查询数据
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public TableModel<T_Service_Apoplexy_PatientsTimeAxis> GetModelByReport(string where)
{
return IService.GetModelByReport(where);
}
/// <summary>
/// 获取患者列表--动态时间节点列
/// </summary>
/// <param name="pageIndex">起始页</param>
/// <param name="pageSize">每页大小</param>
/// <param name="hospitalGuid">所属院区GUID</param>
/// <param name="systemModuleID">所属模块ID</param>
/// <param name="startTime">开始时间(创建)</param>
/// <param name="endTime">结束时间(创建)</param>
/// <param name="emergencyState">急救状态:-1全部 0未结束(对应急救中0+住院中1) 1已结束(对应已转归2)</param>
/// <param name="keyWord">关键词</param>
/// <returns></returns>
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);
}
/// <summary>
/// 根据卒中患者GUID查询时间轴
/// </summary>
/// <param name="patientGuid"></param>
/// <returns></returns>
public List<ApoplexyKeyValueNum> GetApoplexyPatientTimeAixs(string patientGuid)
{
return IService.GetApoplexyPatientTimeAixs(patientGuid);
}
/// <summary>
/// 审核病例
/// </summary>
/// <param name="patient"></param>
/// <returns></returns>
public MessageModel<bool> AuditCase(AuditCaseModel model)
{
T_Service_Patient patient = new T_Service_Patient();
patient = IPatient.Get(model.GUID);
if (patient == null)
{
return new MessageModel<bool> { 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<bool> { Success = true, Msg = "审核完成" };
}
else
{
return new MessageModel<bool> { Success = false, Msg = "审核失败" };
}
}
}
///GetQualityList
public List<ApoplexyQualityListModel> GetQualityList(string starttime, string endtime, string name, string sqltext, string hospitalGuid)
{
return IService.GetQualityList(starttime, endtime, name, sqltext, hospitalGuid);
}
public MessageModel<bool> UpdateApoplexyPatientTimeAixs(UpdateApoplexyTimes model)
{
if (IService.UpdateApoplexyPatientTimeAixs(model))
{
return new MessageModel<bool> { Success = true, Msg = "更新完成" };
}
else
{
return new MessageModel<bool> { Success = false, Msg = "更新失败" };
}
}
}
}