198 lines
7.7 KiB
C#
198 lines
7.7 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// 急诊分诊
|
|
/// </summary>
|
|
[Route("api/service/[controller]")]
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "JZFZ")]
|
|
[HiddenApiFilter.HiddenApi]
|
|
public class T_Service_EmergencyTriageController : Controller
|
|
{
|
|
T_Service_EmergencyTriageBLL BLL = new T_Service_EmergencyTriageBLL();
|
|
|
|
/// <summary>
|
|
/// 患者列表-急诊分诊
|
|
/// </summary>
|
|
/// <param name="name"></param>
|
|
/// <param name="startTime"></param>
|
|
/// <param name="endTime"></param>
|
|
/// <param name="killip">等级</param>
|
|
/// <param name="signArea">分区</param>
|
|
/// <param name="comeHospital">来院方式</param>
|
|
/// <param name="triageDepartment">分诊科室</param>
|
|
/// <param name="isGreenWay">0 非绿道患者 1 绿道患者</param>
|
|
/// <param name="category">-1 全部 0 正常 1 三无</param>
|
|
/// <param name="eventName">事件名称</param>
|
|
/// <param name="eventId">重大事故/群伤事件ID</param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <returns></returns>
|
|
[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));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 急诊分诊台账
|
|
/// </summary>
|
|
/// <param name="name"></param>
|
|
/// <param name="startTime"></param>
|
|
/// <param name="endTime"></param>
|
|
/// <param name="killip"></param>
|
|
/// <param name="signArea"></param>
|
|
/// <param name="GreenChannel"></param>
|
|
/// <param name="triageDepartment"></param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <returns></returns>
|
|
[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));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 患者分诊信息保存
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[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));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 患者疼痛评估信息保存
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[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));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取患者分诊信息
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetTriagePatientInfo")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetTriagePatientInfo(string patientGuid)
|
|
{
|
|
if (string.IsNullOrEmpty(patientGuid))
|
|
return Json("患者GUID不能为空");
|
|
return Json(BLL.GetTriagePatientInfo(patientGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取患者分诊时间轴信息
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetTimeByPatientGUID")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetTimeByPatientGUID(string patientGuid)
|
|
{
|
|
if (string.IsNullOrEmpty(patientGuid))
|
|
return Json("患者GUID不能为空");
|
|
return Json(BLL.GetTimeByPatientGUID(patientGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 患者评分列表
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetPatientTriageScoreList")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetPatientTriageScoreList(string patientGuid)
|
|
{
|
|
if (string.IsNullOrEmpty(patientGuid))
|
|
return Json("患者GUID不能为空");
|
|
return Json(BLL.GetPatientTriageScoreList(patientGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据患者GUID获取疼痛评分
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetPainAssessmentByPatientGuid")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetPainAssessmentByPatientGuid(string patientGuid)
|
|
{
|
|
if (string.IsNullOrEmpty(patientGuid))
|
|
return Json("患者GUID不能为空");
|
|
return Json(BLL.GetPainAssessmentByPatientGuid(patientGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据患者唯一标识删除患者
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[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));
|
|
}
|
|
}
|
|
}
|