using HL_FristAidPlatform_DataBase;
using HL_FristAidPlatform_Help;
using HL_FristAidPlatform_IDataBase;
using HL_FristAidPlatform_Models;
namespace HL_FristAidPlatform_Bussiness
{
public class T_Service_FirstAid_PatientPHIBLL
{
IT_Service_FirstAid_PatientPHI service = new T_Service_FirstAid_PatientPHIDB();
///
/// 新增PHI评分
///
///
///
public MessageModel Add(FirstAid_PatientPHIModel model)
{
T_Service_FirstAid_PatientPHI phi = new T_Service_FirstAid_PatientPHI();
phi.PatientGUID = model.PatientGUID;
phi.SystolicPressureScore = model.SystolicPressureScore;
phi.BreathingScore = model.BreathingScore;
phi.PulseScore = model.PulseScore;
phi.SonsciousScore = model.SonsciousScore;
phi.InjuryScore = model.InjuryScore;
phi.CreateUser = model.CreateUser;
phi.TotalScore =model.TotalScore;
phi.Flag = model.Flag;
if (model.PHILevel <= 0)
{
if (phi.TotalScore <= 3)
{
phi.PHILevel = 1;
}
else if (phi.TotalScore >= 4 && phi.TotalScore <= 6)
{
phi.PHILevel = 2;
}
else if (phi.TotalScore > 6) { phi.PHILevel = 3; }
}
else {
phi.PHILevel = model.PHILevel;
}
if (service.Add(phi))
{
return new MessageModel { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel { Success = true, Msg = "失败" };
}
}
///
/// 查看详情
///
///
///
public PatientPHIModel Get(string guid)
{
return service.Get(guid);
}
///
/// 查看详情
///
///
///
public PatientPHIModel GetPHIByPatientGuid(string patientGuid,int flag)
{
return service.GetPHIByPatientGuid(patientGuid,flag);
}
///
/// 查看所有评分列表
///
///
///
public TableModel GetList(string patientGuid)
{
return service.GetList(patientGuid);
}
///
/// 查看所有评分列表
///
///
///
public TableModel GetPatientPHIList(string patientGuid)
{
return service.GetPatientPHIList(patientGuid);
}
}
}