using HL_FristAidPlatform_Bussiness;
using HL_FristAidPlatform_Help;
using HL_FristAidPlatform_Help.Model;
using HL_FristAidPlatform_Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
namespace HL_FristAidPlatform_Service.Controllers
{
///
/// 急诊分诊
///
[Route("api/service/[controller]")]
[ApiController]
[ApiExplorerSettings(GroupName = "JZFZ")]
[HiddenApiFilter.HiddenApi]
public class T_Service_EmergencyTriageController : Controller
{
T_Service_EmergencyTriageBLL BLL = new T_Service_EmergencyTriageBLL();
///
/// 患者列表-急诊分诊
///
///
///
///
/// 等级
/// 分区
/// 来院方式
/// 分诊科室
/// 0 非绿道患者 1 绿道患者
/// -1 全部 0 正常 1 三无
/// 事件名称
/// 重大事故/群伤事件ID
///
///
///
[HttpGet]
[Route("GetPatientListOfTriage")]
[Authorize(Roles = "GET")]
public JsonResult GetPatientListOfTriage(string name, string startTime, string endTime, string killip, string signArea, string comeHospital, string triageDepartment, string isGreenWay, int category = -1, string eventName = "", int eventId = 0, int pageIndex = 1, int pageSize = 50)
{
return Json(BLL.GetPatientListOfTriage(name, startTime, endTime, killip, signArea, comeHospital, triageDepartment, isGreenWay, category, eventName, eventId, pageIndex, pageSize));
}
///
/// 急诊分诊台账
///
///
///
///
///
///
///
///
///
///
///
[HttpGet]
[Route("GetEmergencyLedger")]
[Authorize(Roles = "GET")]
public JsonResult GetEmergencyLedger(string name, string startTime, string endTime, string killip, string signArea, string GreenChannel, string triageDepartment, int pageIndex = 1, int pageSize = 50)
{
return Json(BLL.GetEmergencyLedger(name, startTime, endTime, killip, signArea, GreenChannel, triageDepartment, pageIndex, pageSize));
}
///
/// 患者分诊信息保存
///
///
///
[HttpPost]
[Route("SavePatientTriage")]
[Authorize(Roles = "UPDATE")]
public JsonResult SavePatientTriage(PatientTriageModel model)
{
if (model == null)
return Json("参数不能为空");
if (string.IsNullOrEmpty(model.PatientGUID))
return Json("患者GUID不能为空");
if (string.IsNullOrEmpty(model.Killip))
return Json("Killip等级不能为空");
if (string.IsNullOrEmpty(model.SignArea))
return Json("颜色分区不能为空");
if (string.IsNullOrEmpty(model.TriageDepartment))
return Json("分诊科室不能为空");
if (model.Attack_Time == null)
return Json("发病时间不能为空");
if (string.IsNullOrEmpty(model.TriageTime))
return Json("分诊时间不能为空");
if (string.IsNullOrEmpty(model.FMCTime))
return Json("首次医疗接触时间不能为空");
if (model.ArrivalDoorTime == null)
return Json("入院时间不能为空");
if (string.IsNullOrEmpty(model.ChiefComplaint))
return Json("主诉不能为空");
return Json(BLL.SavePatientTriage(model));
}
///
/// 患者疼痛评估信息保存
///
///
///
[HttpPost]
[Route("UpdatePainAssessment")]
[Authorize(Roles = "UPDATE")]
public JsonResult UpdatePainAssessment(T_Service_FirstAid_PatientInfo model)
{
if (model == null)
return Json("参数不能为空");
if (string.IsNullOrEmpty(model.PatientGUID))
return Json("患者GUID不能为空");
return Json(BLL.UpdatePainAssessment(model));
}
///
/// 获取患者分诊信息
///
///
///
[HttpGet]
[Route("GetTriagePatientInfo")]
[Authorize(Roles = "GET")]
public JsonResult GetTriagePatientInfo(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("患者GUID不能为空");
return Json(BLL.GetTriagePatientInfo(patientGuid));
}
///
/// 获取患者分诊时间轴信息
///
///
///
[HttpGet]
[Route("GetTimeByPatientGUID")]
[Authorize(Roles = "GET")]
public JsonResult GetTimeByPatientGUID(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("患者GUID不能为空");
return Json(BLL.GetTimeByPatientGUID(patientGuid));
}
///
/// 患者评分列表
///
///
///
[HttpGet]
[Route("GetPatientTriageScoreList")]
[Authorize(Roles = "GET")]
public JsonResult GetPatientTriageScoreList(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("患者GUID不能为空");
return Json(BLL.GetPatientTriageScoreList(patientGuid));
}
///
/// 根据患者GUID获取疼痛评分
///
///
///
///
[HttpGet]
[Route("GetPainAssessmentByPatientGuid")]
[Authorize(Roles = "GET")]
public JsonResult GetPainAssessmentByPatientGuid(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("患者GUID不能为空");
return Json(BLL.GetPainAssessmentByPatientGuid(patientGuid));
}
///
/// 根据患者唯一标识删除患者
///
///
///
[HttpPost]
[Route("UpdateDeletFlagByPatientGuid")]
[Authorize(Roles = "UPDATE")]
public JsonResult UpdateDeletFlagByPatientGuid(GUIDModel model)
{
if (model == null)
return Json("对象不能为空");
if (string.IsNullOrEmpty(model.GUID))
return Json("患者GUID不能为空");
return Json(BLL.UpdateDeletFlagByPatientGuid(model));
}
}
}