78 lines
2.6 KiB
C#
78 lines
2.6 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;
|
|
|
|
namespace HL_FristAidPlatform_Service.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 胸痛单元
|
|
/// </summary>
|
|
[Route("api/service/[controller]")]
|
|
[ApiController]
|
|
[ApiExplorerSettings(GroupName = "Public")]
|
|
[HiddenApiFilter.HiddenApi]
|
|
public class T_Service_DownwardReferralController : Controller
|
|
{
|
|
private T_Service_DownwardReferralBLL bll = new T_Service_DownwardReferralBLL();
|
|
|
|
/// <summary>
|
|
/// 胸痛患者转诊信息
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
[HttpGet]
|
|
[Route("GetPatientReferralOfChest")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetPatientReferralOfChest(string patientGuid = "")
|
|
{
|
|
if (string.IsNullOrEmpty(patientGuid))
|
|
{
|
|
return Json("参数错误");
|
|
}
|
|
return Json(bll.GetPatientReferralOfChest(patientGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 创伤患者转诊信息
|
|
/// </summary>
|
|
/// <param name="patientGuid"></param>
|
|
[HttpGet]
|
|
[Route("GetPatientReferralOfTrauma")]
|
|
[Authorize(Roles = "GET")]
|
|
public JsonResult GetPatientReferralOfTrauma(string patientGuid)
|
|
{
|
|
if (string.IsNullOrEmpty(patientGuid))
|
|
{
|
|
return Json("参数错误");
|
|
}
|
|
return Json(bll.GetPatientReferralOfTrauma(patientGuid));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存下转转诊信息
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("SavePatientReferralInfo")]
|
|
[Authorize(Roles = "ADD")]
|
|
public JsonResult SavePatientReferralInfo(ChestPatientReferralModel model)
|
|
{
|
|
if (model == null)
|
|
return Json("参数错误");
|
|
if (string.IsNullOrEmpty(model.PatientGuid) || string.IsNullOrEmpty(model.LeaveHospital) || string.IsNullOrEmpty(model.LeaveTime) || (string.IsNullOrEmpty(model.DesignatedHospital) && string.IsNullOrEmpty(model.SendHospital)))
|
|
{
|
|
return Json("参数错误");
|
|
}
|
|
if (!string.IsNullOrEmpty(model.DesignatedHospital) && !string.IsNullOrEmpty(model.SendHospital))
|
|
{
|
|
return Json("只能指定一个下转医院");
|
|
}
|
|
return Json(bll.SavePatientReferralInfo(model));
|
|
}
|
|
}
|
|
}
|