491 lines
20 KiB
C#
491 lines
20 KiB
C#
using HL_FristAidPlatform_Bussiness;
|
||
using HL_FristAidPlatform_Help;
|
||
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 = "ZCGWSC")]
|
||
[HiddenApiFilter.HiddenApi]
|
||
public class T_Service_ApoplexyScreenController : Controller
|
||
{
|
||
T_Service_ApoplexyScreenInfoBLL InfoBLL = new T_Service_ApoplexyScreenInfoBLL();
|
||
T_Service_ApoplexyScreenLifeStyleBLL LifeStyleBLL = new T_Service_ApoplexyScreenLifeStyleBLL();
|
||
T_Service_ApoplexyScreenFamilyHistoryBLL FamilyHistoryBLL = new T_Service_ApoplexyScreenFamilyHistoryBLL();
|
||
T_Service_ApoplexyScreenCervicalBLL CervicalBLL = new T_Service_ApoplexyScreenCervicalBLL();
|
||
T_Service_ApoplexyScreenPhysicalFitnessBLL PhysicalFitnessBLL = new T_Service_ApoplexyScreenPhysicalFitnessBLL();
|
||
T_Service_ApoplexyScreenLaboratoryBLL LaboratoryBLL = new T_Service_ApoplexyScreenLaboratoryBLL();
|
||
T_Service_ApoplexyScreenAngiopathyBLL AngiopathyBLL = new T_Service_ApoplexyScreenAngiopathyBLL();
|
||
T_Service_ApoplexyPastHistoryBLL PastHistoryBLL = new T_Service_ApoplexyPastHistoryBLL();
|
||
T_Service_ApoplexyIntervenePastHistoryBLL IntervenePastHistoryBLL = new T_Service_ApoplexyIntervenePastHistoryBLL();
|
||
T_Service_ApoplexyProposalBLL proposalBLL = new T_Service_ApoplexyProposalBLL();
|
||
T_Service_ApoplexyTCDBLL TCDBLL = new T_Service_ApoplexyTCDBLL();
|
||
|
||
/// <summary>
|
||
/// 新增高危人群筛查
|
||
/// </summary>
|
||
/// <param name="model"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenPatient")]
|
||
//[Authorize(Roles = "ADD")]
|
||
public JsonResult SaveScreenPatient(ApoplexyHighRiskScreeningModel model)
|
||
{
|
||
if (model == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(model.HospitalGUID))
|
||
return Json("院区GUID不能为空");
|
||
if (string.IsNullOrEmpty(model.ShareUserDepartment)||model.ShareUserDepartment== "undefined")
|
||
return Json("参数错误!");
|
||
return Json(InfoBLL.SaveScreenPatient(model));
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 高危筛查患者列表
|
||
/// </summary>
|
||
/// <param name="info">患者信息;姓名,电话,身份证</param>
|
||
/// <param name="source">来源:-1 全部 ,0 院内,1 院外 </param>
|
||
/// <param name="category">筛查数据填报来源:-1 全部, 0 筛查系统,1 app,2 扫码</param>
|
||
/// <param name="startTime">复筛开始时间</param>
|
||
/// <param name="endTime">复筛结束时间</param>
|
||
/// <param name="visitType">就诊类型:1 门诊,2住院,3体检,4其他</param>
|
||
/// <param name="ecg">心电图: 空字符 未做心电图,1 已经心电图</param>
|
||
/// <param name="tcd">TCD:空字符 未做TCD,1已做TD</param>
|
||
/// <param name="laboratory">实验室检查:空字符 未做检查,1已做检查</param>
|
||
/// <param name="cervical">颈部血管超声:空字符 未做血管超声,1已做血管超声</param>
|
||
/// <param name="cDepartment">初筛科室</param>
|
||
/// <param name="cDoctor">初筛医生</param>
|
||
/// <param name="highRisk">初筛评级:-1 全部 0 低危,1 高危,2 中危, 3 正常</param>
|
||
/// <param name="cHighRisk">初筛高危因素:8+2问题(逗号分隔)</param>
|
||
/// <param name="rescreeningStatus">复筛状态:1 未复筛, 2 进行中, 3 已完成</param>
|
||
/// <param name="pageIndex"></param>
|
||
/// <param name="pageSize"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreeninListModel")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreeninListModel(string info="", int source=-1, int category=-1, string startTime = "", string endTime = "", string visitType = "", string ecg = "", string tcd = "", string laboratory = "", string cervical = "", string cDepartment = "", string cDoctor = "", int highRisk=-1, string cHighRisk = "", string rescreeningStatus = "", int pageIndex=1, int pageSize=50)
|
||
{
|
||
return Json(InfoBLL.GetScreeninListModel(info, source, category, startTime, endTime, visitType, ecg, tcd, laboratory, cervical, cDepartment, cDoctor, highRisk, cHighRisk, rescreeningStatus, pageIndex, pageSize));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存基本信息
|
||
/// </summary>
|
||
/// <param name="model"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenInfo")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenInfo(ApoplexyScreenInfoModel model)
|
||
{
|
||
if (model == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(model.Flag))
|
||
return Json("Flag字段不能为空");
|
||
if (string.IsNullOrEmpty(model.GUID))
|
||
return Json("GUID字段不能为空");
|
||
return Json(InfoBLL.SaveScreenInfo(model));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取基本信息
|
||
/// </summary>
|
||
/// <param name="guid"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenInfo")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenInfo(string guid)
|
||
{
|
||
if (string.IsNullOrEmpty(guid))
|
||
return Json("guid不能为空");
|
||
return Json(InfoBLL.GetScreenInfo(guid));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存生活方式
|
||
/// </summary>
|
||
/// <param name="lifeStyle"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenLifeStyle")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenLifeStyle(T_Service_ApoplexyScreenLifeStyle lifeStyle)
|
||
{
|
||
if (lifeStyle == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(lifeStyle.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
if (string.IsNullOrEmpty(lifeStyle.Flag))
|
||
return Json("类型不能为空");
|
||
return Json(LifeStyleBLL.SaveScreenLifeStyle(lifeStyle));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取生活方式
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <param name="flag">1 筛查 2 干预</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenLifeStyle")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenLifeStyle(string patientGuid, string flag)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
if (string.IsNullOrEmpty(flag))
|
||
return Json("类型不能为空");
|
||
return Json(LifeStyleBLL.GetScreenLifeStyle(patientGuid, flag));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存家族史
|
||
/// </summary>
|
||
/// <param name="familyHistory"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenFamilyHistory")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenFamilyHistory(T_Service_ApoplexyScreenFamilyHistory familyHistory)
|
||
{
|
||
if (familyHistory == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(familyHistory.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
if (string.IsNullOrEmpty(familyHistory.Flag))
|
||
return Json("类型不能为空");
|
||
return Json(FamilyHistoryBLL.SaveScreenFamilyHistory(familyHistory));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取家族史
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <param name="flag">1 筛查 2 干预</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenFamilyHistory")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenFamilyHistory(string patientGuid, string flag)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
if (string.IsNullOrEmpty(flag))
|
||
return Json("类型不能为空");
|
||
return Json(FamilyHistoryBLL.GetScreenFamilyHistory(patientGuid, flag));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存体格检查
|
||
/// </summary>
|
||
/// <param name="physicalFitness"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenPhysicalFitness")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenPhysicalFitness(T_Service_ApoplexyScreenPhysicalFitness physicalFitness)
|
||
{
|
||
if (physicalFitness == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(physicalFitness.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
if (string.IsNullOrEmpty(physicalFitness.Flag))
|
||
return Json("类型不能为空");
|
||
return Json(PhysicalFitnessBLL.SaveScreenPhysicalFitness(physicalFitness));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取体格检查
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <param name="flag">1 筛查 2 干预</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenPhysicalFitness")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenPhysicalFitness(string patientGuid, string flag)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
if (string.IsNullOrEmpty(flag))
|
||
return Json("类型不能为空");
|
||
return Json(PhysicalFitnessBLL.GetScreenPhysicalFitness(patientGuid, flag));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存实验室检查
|
||
/// </summary>
|
||
/// <param name="laboratory"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenLaboratory")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenLaboratory(T_Service_ApoplexyScreenLaboratory laboratory)
|
||
{
|
||
if (laboratory == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(laboratory.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
if (string.IsNullOrEmpty(laboratory.Flag))
|
||
return Json("类型不能为空");
|
||
return Json(LaboratoryBLL.SaveScreenLaboratory(laboratory));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取实验室检查
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <param name="flag">1 筛查 2 干预</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenLaboratory")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenLaboratory(string patientGuid, string flag)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
if (string.IsNullOrEmpty(flag))
|
||
return Json("类型不能为空");
|
||
return Json(LaboratoryBLL.GetScreenLaboratory(patientGuid, flag));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存颈部血管超声
|
||
/// </summary>
|
||
/// <param name="cervical"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenCervical")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenCervical(T_Service_ApoplexyScreenCervical cervical)
|
||
{
|
||
if (cervical == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(cervical.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
if (string.IsNullOrEmpty(cervical.Flag))
|
||
return Json("类型不能为空");
|
||
return Json(CervicalBLL.SaveScreenCervical(cervical));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取颈部血管超声
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <param name="flag">1 筛查 2 干预</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenCervical")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenCervical(string patientGuid, string flag)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
if (string.IsNullOrEmpty(flag))
|
||
return Json("类型不能为空");
|
||
return Json(CervicalBLL.GetScreenCervical(patientGuid, flag));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存血管病变的外科手术或介入治疗情况
|
||
/// </summary>
|
||
/// <param name="cervical"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenAngiopathy")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenAngiopathy(T_Service_ApoplexyScreenAngiopathy cervical)
|
||
{
|
||
if (cervical == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(cervical.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
if (string.IsNullOrEmpty(cervical.Flag))
|
||
return Json("类型不能为空");
|
||
return Json(AngiopathyBLL.SaveScreenAngiopathy(cervical));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取血管病变的外科手术或介入治疗情况
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <param name="flag">1 筛查 2 干预</param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenAngiopathy")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenAngiopathy(string patientGuid, string flag)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
if (string.IsNullOrEmpty(flag))
|
||
return Json("类型不能为空");
|
||
return Json(AngiopathyBLL.GetScreenAngiopathy(patientGuid, flag));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存筛查既往病史及控制情况
|
||
/// </summary>
|
||
/// <param name="pastHistory"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenPastHistory")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenPastHistory(T_Service_ApoplexyPastHistory pastHistory)
|
||
{
|
||
if (pastHistory == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(pastHistory.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
return Json(PastHistoryBLL.SaveScreenPastHistory(pastHistory));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取筛查既往病史及控制情况
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenPastHistory")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenPastHistory(string patientGuid)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
return Json(PastHistoryBLL.GetScreenPastHistory(patientGuid));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存干预既往病史及控制情况
|
||
/// </summary>
|
||
/// <param name="pastHistory"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveIntervenePastHistory")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveIntervenePastHistory(T_Service_ApoplexyIntervenePastHistory pastHistory)
|
||
{
|
||
if (pastHistory == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(pastHistory.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
return Json(IntervenePastHistoryBLL.SaveIntervenePastHistory(pastHistory));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取干预既往病史及控制情况
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetIntervenePastHistory")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetIntervenePastHistory(string patientGuid)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
return Json(IntervenePastHistoryBLL.GetIntervenePastHistory(patientGuid));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存指导治疗及建议
|
||
/// </summary>
|
||
/// <param name="proposal"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenProposal")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenProposal(T_Service_ApoplexyProposal proposal)
|
||
{
|
||
if (proposal == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(proposal.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
return Json(proposalBLL.SaveScreenProposal(proposal));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取指导治疗及建议
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenProposal")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenProposal(string patientGuid)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
return Json(proposalBLL.GetScreenProposal(patientGuid));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 保存TCD经颅多普勒超声
|
||
/// </summary>
|
||
/// <param name="tcd"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[Route("SaveScreenTCD")]
|
||
[Authorize(Roles = "UPDATE")]
|
||
public JsonResult SaveScreenTCD(T_Service_ApoplexyTCD tcd)
|
||
{
|
||
if (tcd == null)
|
||
return Json("实体对象不能为空");
|
||
if (string.IsNullOrEmpty(tcd.PatientGUID))
|
||
return Json("患者GUID不能为空");
|
||
return Json(TCDBLL.SaveScreenTCD(tcd));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取TCD经颅多普勒增声
|
||
/// </summary>
|
||
/// <param name="patientGuid"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenTCD")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenTCD(string patientGuid)
|
||
{
|
||
if (string.IsNullOrEmpty(patientGuid))
|
||
return Json("patientGuid不能为空");
|
||
return Json(TCDBLL.GetScreenTCD(patientGuid));
|
||
}
|
||
/// <summary>
|
||
/// 获取已经筛查了的部门集合
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetScreenDepartment")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetScreenDepartment()
|
||
{
|
||
return Json(InfoBLL.GetScreenDepartment());
|
||
}
|
||
|
||
/// <summary>
|
||
/// 根据患者GUID获取筛查表中内容填报完成度
|
||
/// </summary>
|
||
/// <param name="guid"></param>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
[Route("GetSceenIntegrity")]
|
||
[Authorize(Roles = "GET")]
|
||
public JsonResult GetSceenIntegrity(string guid)
|
||
{
|
||
if (string.IsNullOrEmpty(guid))
|
||
return Json("患者GUID参数不能为空");
|
||
return Json(InfoBLL.GetSceenIntegrity(guid));
|
||
}
|
||
}
|
||
}
|