| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- using CallCenter.Utility;
- using CallCenterApi.DB;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- namespace CallCenterApi.Interface.Controllers.MedicalFollowup
- {
- public class FollowUpController : Controller
- {
- // GET: FollowUp
- public ActionResult Index()
- {
- return View();
- }
- /// <summary>
- /// 获取随访列表
- /// </summary>
- /// <returns></returns>
- public ActionResult GetListAll()
- {
- string sql = " and F_IsDel=0 ";
- DataTable dt = new DataTable();
- string dischargedept = HttpUtility.UrlDecode(RequestString.GetQueryString("dischargedept"));//出院科室
- string strstate = HttpUtility.UrlDecode(RequestString.GetQueryString("state"));//状态
- string strcode = HttpUtility.UrlDecode(RequestString.GetQueryString("code"));//病案号
- string stropename = HttpUtility.UrlDecode(RequestString.GetQueryString("opename"));//手术名称
- //来电号码
- string strtel = HttpUtility.UrlDecode(RequestString.GetQueryString("phone"));//联系人电话
- string strname = HttpUtility.UrlDecode(RequestString.GetQueryString("name"));//姓名
- string strdoctor = HttpUtility.UrlDecode(RequestString.GetQueryString("tubedoctor"));//管床医生
- //诊断名称
- string strzdmc = HttpUtility.UrlDecode(RequestString.GetQueryString("zdmc"));//诊断名称
- //出院日期
- string strstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));//查询起始时间
- string strendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));//查询截止时间
- //总费用
- string strcosts = HttpUtility.UrlDecode(RequestString.GetQueryString("costs"));
- string strcoste = HttpUtility.UrlDecode(RequestString.GetQueryString("coste"));
- //随访日期
- string strtime = HttpUtility.UrlDecode(RequestString.GetQueryString("sftime"));
- //仅包含随访结束的
- string strsfend = HttpUtility.UrlDecode(RequestString.GetQueryString("sfend"));
- //仅二级随访未完成
- string strejwwc = HttpUtility.UrlDecode(RequestString.GetQueryString("secondlevel"));
- string strpageindex = RequestString.GetQueryString("page");
- int pageindex = 1;
- string strpagesize = RequestString.GetQueryString("pagesize");
- int pagesize = 10;
- if (dischargedept.Trim() != "" && dischargedept != "undefined")
- {
- sql += " and F_DischargeDept like '%" + dischargedept.Trim() + "%' ";
- }
- if (strstate.Trim() != "" && strstate != "undefined")
- {
- sql += " and F_State = '" + strstate.Trim() + "' ";
- }
- if (strcode.Trim() != "" && strcode != "undefined")
- {
- sql += " and F_Code = '" + strcode.Trim() + "' ";
- }
- if (stropename.Trim() != "" && stropename != "undefined")
- {
- sql += " and F_OpeName like '%" + stropename.Trim() + "%' ";
- }
- if (strname.Trim() != "" && strname != "undefined")
- {
- sql += " and F_Name = '" + strname.Trim() + "' ";
- }
- if (strdoctor.Trim() != "" && strdoctor != "undefined")
- {
- sql += " and F_TubeDoctor like '%" + strdoctor.Trim() + "%' ";
- }
- if (strtel.Trim() != "" && strtel != "undefined")
- {
- sql += " and F_Phone like '%" + strtel + "%' ";
- }
- if (strstarttime.Trim() != "" && strstarttime != "undefined")
- {
- sql += " and datediff(day,F_OutDate,'" + strstarttime + "')<=0 ";
- }
- if (strendtime.Trim() != "" && strendtime != "undefined")
- {
- sql += " and datediff(day,F_OutDate,'" + strendtime + "')>=0 ";
- }
- if (strzdmc.Trim() != "" && strzdmc != "undefined")
- {
- sql += " and F_ZDMC = '" + strzdmc.Trim() + "' ";
- }
- if (strcosts.Trim() != "" && strcosts != "undefined")
- {
- sql += " and F_TotalCosts >= '" + strzdmc.Trim() + "' ";
- }
- if (strcoste.Trim() != "" && strcoste != "undefined")
- {
- sql += " and F_TotalCosts <= '" + strzdmc.Trim() + "' ";
- }
- if (strtime.Trim() != "" && strtime != "undefined")
- {
- sql += " and datediff(day,F_SFDate,'" + strtime + "')=0 ";
- }
- if (strsfend.Trim() != "" && strsfend != "undefined")
- {
- sql += " and F_State = 3 ";//随访完成状态
- }
- if (strejwwc.Trim() != "" && strejwwc != "undefined")
- {
- sql += " and F_State = 2 ";//随访完成状态
- }
- if (strpageindex.Trim() != "")
- {
- pageindex = Convert.ToInt32(strpageindex);
- }
- if (strpagesize.Trim() != "")
- {
- pagesize = Convert.ToInt32(strpagesize);
- }
- int recordCount = 0;
- dt = BLL.PagerBLL.GetListPager(
- "T_Med_FollowUp",
- "T_Med_FollowUp.F_Id",
- "*",
- sql,
- "ORDER BY T_Med_FollowUp.F_Id desc",
- pagesize,
- pageindex,
- true,
- out recordCount);
-
- var obj = new
- {
- state = "success",
- message = "成功",
- rows = dt,
- total = recordCount
- };
- return Content(obj.ToJson());
- }
- }
- }
|