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
{
///
/// 卒中高危筛查
///
[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();
///
/// 新增高危人群筛查
///
///
///
[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));
}
///
/// 高危筛查患者列表
///
/// 患者信息;姓名,电话,身份证
/// 来源:-1 全部 ,0 院内,1 院外
/// 筛查数据填报来源:-1 全部, 0 筛查系统,1 app,2 扫码
/// 复筛开始时间
/// 复筛结束时间
/// 就诊类型:1 门诊,2住院,3体检,4其他
/// 心电图: 空字符 未做心电图,1 已经心电图
/// TCD:空字符 未做TCD,1已做TD
/// 实验室检查:空字符 未做检查,1已做检查
/// 颈部血管超声:空字符 未做血管超声,1已做血管超声
/// 初筛科室
/// 初筛医生
/// 初筛评级:-1 全部 0 低危,1 高危,2 中危, 3 正常
/// 初筛高危因素:8+2问题(逗号分隔)
/// 复筛状态:1 未复筛, 2 进行中, 3 已完成
///
///
///
[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));
}
///
/// 保存基本信息
///
///
///
[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));
}
///
/// 获取基本信息
///
///
///
[HttpGet]
[Route("GetScreenInfo")]
[Authorize(Roles = "GET")]
public JsonResult GetScreenInfo(string guid)
{
if (string.IsNullOrEmpty(guid))
return Json("guid不能为空");
return Json(InfoBLL.GetScreenInfo(guid));
}
///
/// 保存生活方式
///
///
///
[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));
}
///
/// 获取生活方式
///
///
/// 1 筛查 2 干预
///
[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));
}
///
/// 保存家族史
///
///
///
[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));
}
///
/// 获取家族史
///
///
/// 1 筛查 2 干预
///
[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));
}
///
/// 保存体格检查
///
///
///
[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));
}
///
/// 获取体格检查
///
///
/// 1 筛查 2 干预
///
[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));
}
///
/// 保存实验室检查
///
///
///
[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));
}
///
/// 获取实验室检查
///
///
/// 1 筛查 2 干预
///
[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));
}
///
/// 保存颈部血管超声
///
///
///
[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));
}
///
/// 获取颈部血管超声
///
///
/// 1 筛查 2 干预
///
[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));
}
///
/// 保存血管病变的外科手术或介入治疗情况
///
///
///
[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));
}
///
/// 获取血管病变的外科手术或介入治疗情况
///
///
/// 1 筛查 2 干预
///
[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));
}
///
/// 保存筛查既往病史及控制情况
///
///
///
[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));
}
///
/// 获取筛查既往病史及控制情况
///
///
///
[HttpGet]
[Route("GetScreenPastHistory")]
[Authorize(Roles = "GET")]
public JsonResult GetScreenPastHistory(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("patientGuid不能为空");
return Json(PastHistoryBLL.GetScreenPastHistory(patientGuid));
}
///
/// 保存干预既往病史及控制情况
///
///
///
[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));
}
///
/// 获取干预既往病史及控制情况
///
///
///
[HttpGet]
[Route("GetIntervenePastHistory")]
[Authorize(Roles = "GET")]
public JsonResult GetIntervenePastHistory(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("patientGuid不能为空");
return Json(IntervenePastHistoryBLL.GetIntervenePastHistory(patientGuid));
}
///
/// 保存指导治疗及建议
///
///
///
[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));
}
///
/// 获取指导治疗及建议
///
///
///
[HttpGet]
[Route("GetScreenProposal")]
[Authorize(Roles = "GET")]
public JsonResult GetScreenProposal(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("patientGuid不能为空");
return Json(proposalBLL.GetScreenProposal(patientGuid));
}
///
/// 保存TCD经颅多普勒超声
///
///
///
[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));
}
///
/// 获取TCD经颅多普勒增声
///
///
///
[HttpGet]
[Route("GetScreenTCD")]
[Authorize(Roles = "GET")]
public JsonResult GetScreenTCD(string patientGuid)
{
if (string.IsNullOrEmpty(patientGuid))
return Json("patientGuid不能为空");
return Json(TCDBLL.GetScreenTCD(patientGuid));
}
///
/// 获取已经筛查了的部门集合
///
///
[HttpGet]
[Route("GetScreenDepartment")]
[Authorize(Roles = "GET")]
public JsonResult GetScreenDepartment()
{
return Json(InfoBLL.GetScreenDepartment());
}
///
/// 根据患者GUID获取筛查表中内容填报完成度
///
///
///
[HttpGet]
[Route("GetSceenIntegrity")]
[Authorize(Roles = "GET")]
public JsonResult GetSceenIntegrity(string guid)
{
if (string.IsNullOrEmpty(guid))
return Json("患者GUID参数不能为空");
return Json(InfoBLL.GetSceenIntegrity(guid));
}
}
}