StableVersion4.3/HL_FristAidPlatform_Bussiness/Service/T_Service_FirstAid_PatientM...

95 lines
3.1 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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_PatientMEWSBLL
{
IT_Service_FirstAid_PatientMEWS service = new T_Service_FirstAid_PatientMEWSDB();
/// <summary>
/// 新增CGS评分
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public MessageModel<bool> Add(FirstAid_PatientMEWSModel model)
{
T_Service_FirstAid_PatientMEWS wems = new T_Service_FirstAid_PatientMEWS();
wems.PatientGUID = model.PatientGUID;
wems.HeartRateScore = model.HeartRateScore;
wems.SystolicPressureScore = model.SystolicPressureScore;
wems.BreathingScore = model.BreathingScore;
wems.TemperatureScore = model.TemperatureScore;
wems.SonsciousScore = model.SonsciousScore;
wems.CreateUser = model.CreateUser;
wems.TotalScore =model.TotalScore;
wems.Flag = model.Flag;
if (wems.MEWSLevel <= 0)
{
if (wems.TotalScore >= 4) { wems.MEWSLevel = 1; }
if (wems.TotalScore == 5) { wems.MEWSLevel = 2; }
if (wems.TotalScore < 5) { wems.MEWSLevel = 3; }
if (wems.TotalScore >= 5) { wems.MEWSLevel = 4; }
if (wems.TotalScore > 9) { wems.MEWSLevel = 5; }
}
else {
wems.MEWSLevel = model.MEWSLevel;
}
if (service.Add(wems))
{
return new MessageModel<bool> { Success = true, Msg = "操作成功" };
}
else
{
return new MessageModel<bool> { Success = true, Msg = "操作失败" };
}
}
/// <summary>
/// 查看评分详情
/// </summary>
/// <param name="patientGuid"></param>
/// <returns></returns>
public PatientMEWSModel Get(string guid)
{
return service.Get(guid);
}
/// <summary>
/// 根据患者GUIDFlag 查看评分详情
/// </summary>
/// <param name="patientGuid"></param>
/// <returns></returns>
public PatientMEWSModel GetMEWSByPatientGuid(string patientGuid, int flag)
{
return service.GetMEWSByPatientGuid(patientGuid,flag);
}
/// <summary>
/// 查看所有评分列表
/// </summary>
/// <param name="patientGuid"></param>
/// <returns></returns>
public TableModel<PatientScoreModel> GetList(string patientGuid)
{
return service.GetList(patientGuid);
}
/// <summary>
/// 查看所有评分列表
/// </summary>
/// <param name="patientGuid"></param>
/// <returns></returns>
public TableModel<PatientMEWSListModel> GetPatientMEWSList(string patientGuid)
{
return service.GetPatientMEWSList(patientGuid);
}
}
}