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(); /// /// 新增CGS评分 /// /// /// public MessageModel 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 { Success = true, Msg = "操作成功" }; } else { return new MessageModel { Success = true, Msg = "操作失败" }; } } /// /// 查看评分详情 /// /// /// public PatientMEWSModel Get(string guid) { return service.Get(guid); } /// /// 根据患者GUID,Flag 查看评分详情 /// /// /// public PatientMEWSModel GetMEWSByPatientGuid(string patientGuid, int flag) { return service.GetMEWSByPatientGuid(patientGuid,flag); } /// /// 查看所有评分列表 /// /// /// public TableModel GetList(string patientGuid) { return service.GetList(patientGuid); } /// /// 查看所有评分列表 /// /// /// public TableModel GetPatientMEWSList(string patientGuid) { return service.GetPatientMEWSList(patientGuid); } } }