|
@ -2,13 +2,11 @@ package com.yihu.wlyy.web.doctor.followup;
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
import com.yihu.wlyy.service.app.followup.FollowUpService;
|
|
|
import com.yihu.wlyy.entity.followup.Followup;
|
|
|
import com.yihu.wlyy.service.app.followup.FollowupService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@ -17,10 +15,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.service.common.account.DoctorService;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
|
|
|
/**
|
|
@ -32,10 +26,10 @@ import com.yihu.wlyy.web.BaseController;
|
|
|
@Controller
|
|
|
@RequestMapping(value = "/doctor/followup", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
@Api(description = "医生端-随访接口")
|
|
|
public class DoctorFollowUpController extends BaseController {
|
|
|
public class DoctorFollowupController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private FollowUpService followUpService;
|
|
|
private FollowupService followUpService;
|
|
|
|
|
|
/*************************************** 随访计划 ****************************************************************************/
|
|
|
@ApiOperation("获取随访列表")
|
|
@ -50,7 +44,7 @@ public class DoctorFollowUpController extends BaseController {
|
|
|
@ApiParam(name="pageSize",value="每页几行",defaultValue = "10")
|
|
|
@RequestParam(value="pageSize",required = true) String pageSize) {
|
|
|
try {
|
|
|
List<Map<String,String>> result = followUpService.getListByDoctor(getUID(),startTime,endTime,page,pageSize);
|
|
|
List<Followup> result = followUpService.getListByDoctor(getUID(),startTime,endTime,page,pageSize);
|
|
|
|
|
|
return write(200, "获取随访列表成功!", "data", result);
|
|
|
} catch (Exception e) {
|
|
@ -61,7 +55,7 @@ public class DoctorFollowUpController extends BaseController {
|
|
|
@ApiOperation("新增随访计划(简单)")
|
|
|
@RequestMapping(value = "/addFollowupPlan", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String addFollowupPlan(@ApiParam(name="patient",value="患者代码",defaultValue = "")
|
|
|
public String addFollowupPlan(@ApiParam(name="patient",value="患者代码",defaultValue = "443a196ef8744536a531260eb26c05d7")
|
|
|
@RequestParam(value="patient",required = true) String patient,
|
|
|
@ApiParam(name="date",value="下次随访时间",defaultValue = "2016-12-14 20:00:00")
|
|
|
@RequestParam(value="date",required = true) String date) {
|
|
@ -80,36 +74,35 @@ public class DoctorFollowUpController extends BaseController {
|
|
|
@ResponseBody
|
|
|
public String startFollowup(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
@RequestParam(value="id",required = true) String id,
|
|
|
@ApiParam(name="date",value="下次随访时间",defaultValue = "2016-12-14 20:00:00")
|
|
|
@ApiParam(name="date",value="随访时间",defaultValue = "2016-12-14 20:00:00")
|
|
|
@RequestParam(value="date",required = true) String date,
|
|
|
@ApiParam(name="followupType",value="随访方式【字典VISIT_WAY_CODE】",defaultValue = "")
|
|
|
@ApiParam(name="followupType",value="随访方式【字典FOLLOWUP_WAY_DICT】",defaultValue = "12")
|
|
|
@RequestParam(value="followupType",required = true) String followupType,
|
|
|
@ApiParam(name="followupClass",value="随访方式【字典VISIT_WAY_CODE】",defaultValue = "")
|
|
|
@ApiParam(name="followupClass",value="随访类别【1.高血压 2.糖尿病】",defaultValue = "1")
|
|
|
@RequestParam(value="followupClass",required = true) String followupClass,
|
|
|
@ApiParam(name="followupManagerStatus",value="随访管理状态【字典MANAGER_STATUS】",defaultValue = "")
|
|
|
@ApiParam(name="followupManagerStatus",value="随访管理状态【字典FOLLOWUP_MANAGER_STATUS】",defaultValue = "1")
|
|
|
@RequestParam(value="followupManagerStatus",required = false) String followupManagerStatus) {
|
|
|
try {
|
|
|
followUpService.startFollowup(id,date,followupType,followupClass,followupManagerStatus);
|
|
|
|
|
|
return write(200, "新增随访计划成功!");
|
|
|
return write(200, "开始随访记录成功!");
|
|
|
} catch (Exception e) {
|
|
|
return invalidUserException(e, -1, "新增随访计划失败!");
|
|
|
return invalidUserException(e, -1, "开始随访记录失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@ApiOperation("新增临时随访记录(返回ID)")
|
|
|
@RequestMapping(value = "/addFollowup", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String addFollowup(
|
|
|
@ApiParam(name="patient",value="患者代码",defaultValue = "")
|
|
|
public String addFollowup(@ApiParam(name="patient",value="患者代码",defaultValue = "443a196ef8744536a531260eb26c05d7")
|
|
|
@RequestParam(value="patient",required = true) String patient,
|
|
|
@ApiParam(name="date",value="下次随访时间",defaultValue = "2016-12-14 20:00:00")
|
|
|
@ApiParam(name="date",value="下次随访时间",defaultValue = "2016-12-15 20:00:00")
|
|
|
@RequestParam(value="date",required = true) String date,
|
|
|
@ApiParam(name="followupType",value="随访方式【字典VISIT_WAY_CODE】",defaultValue = "")
|
|
|
@ApiParam(name="followupType",value="随访方式【字典FOLLOWUP_WAY_DICT】",defaultValue = "12")
|
|
|
@RequestParam(value="followupType",required = true) String followupType,
|
|
|
@ApiParam(name="followupClass",value="随访类别【1.高血压 2.糖尿病】",defaultValue = "")
|
|
|
@ApiParam(name="followupClass",value="随访类别【1.高血压 2.糖尿病】",defaultValue = "1")
|
|
|
@RequestParam(value="followupClass",required = true) String followupClass,
|
|
|
@ApiParam(name="followupManagerStatus",value="随访管理状态【字典MANAGER_STATUS】",defaultValue = "")
|
|
|
@ApiParam(name="followupManagerStatus",value="随访管理状态【字典FOLLOWUP_MANAGER_STATUS】",defaultValue = "1")
|
|
|
@RequestParam(value="followupManagerStatus",required = false) String followupManagerStatus) {
|
|
|
try {
|
|
|
String response = followUpService.addFollowup(getUID(),patient,date,followupType,followupClass,followupManagerStatus);
|
|
@ -139,7 +132,7 @@ public class DoctorFollowUpController extends BaseController {
|
|
|
@ApiOperation("获取面访项目列表")
|
|
|
@RequestMapping(value = "/getFollowupProject", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public String getFollowupProject(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
public String getFollowupProject(@ApiParam(name="id",value="随访记录ID",defaultValue = "4")
|
|
|
@RequestParam(value="id",required = true) String id)
|
|
|
{
|
|
|
try {
|
|
@ -154,43 +147,29 @@ public class DoctorFollowUpController extends BaseController {
|
|
|
@ApiOperation("获取面访项目数据")
|
|
|
@RequestMapping(value = "/getFollowupProjectData", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public String getFollowupProjectData(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
public String getFollowupProjectData(@ApiParam(name="id",value="随访记录ID",defaultValue = "4")
|
|
|
@RequestParam(value="id",required = true) String id,
|
|
|
@ApiParam(name="followupProject",value="面访项目",defaultValue = "")
|
|
|
@ApiParam(name="followupProject",value="面访项目",defaultValue = "2")
|
|
|
@RequestParam(value="followupProject",required = true) String followupProject)
|
|
|
{
|
|
|
try {
|
|
|
List<Map<String,String>> list = followUpService.getFollowupProjectData(id,followupProject);
|
|
|
Map<String,String> response = followUpService.getFollowupProjectData(id,followupProject);
|
|
|
|
|
|
return write(200, "获取面访项目数据成功!","data",list);
|
|
|
return write(200, "获取面访项目数据成功!","data",response);
|
|
|
} catch (Exception e) {
|
|
|
return invalidUserException(e, -1, "获取面访项目数据失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@ApiOperation("获取面访用药数据")
|
|
|
@RequestMapping(value = "/getFollowupDrugs", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public String getFollowupDrugs(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
@RequestParam(value="id",required = true) String id)
|
|
|
{
|
|
|
try {
|
|
|
List<Map<String,String>> list = followUpService.getFollowupDrugs(id);
|
|
|
|
|
|
return write(200, "获取面访用药数据成功!","data",list);
|
|
|
} catch (Exception e) {
|
|
|
return invalidUserException(e, -1, "获取面访用药数据失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@ApiOperation("保存面访项目数据")
|
|
|
@RequestMapping(value = "/saveFollowupProjectData", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String saveFollowupProjectData(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
public String saveFollowupProjectData(@ApiParam(name="id",value="随访记录ID",defaultValue = "4")
|
|
|
@RequestParam(value="id",required = true) String id,
|
|
|
@ApiParam(name="followupProject",value="面访项目",defaultValue = "")
|
|
|
@ApiParam(name="followupProject",value="面访项目",defaultValue = "2")
|
|
|
@RequestParam(value="followupProject",required = true) String followupProject,
|
|
|
@ApiParam(name="followupProjectData",value="面访项目数据",defaultValue = "")
|
|
|
@ApiParam(name="followupProjectData",value="面访项目数据",defaultValue = "{\"WEIGHT\":\"76\",\"WEIGHT_EXP\":\"60\",\"BMI\":\"11\"}")
|
|
|
@RequestParam(value="followupProjectData",required = true) String followupProjectData)
|
|
|
{
|
|
|
try {
|
|
@ -202,30 +181,12 @@ public class DoctorFollowUpController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@ApiOperation("保存面访用药数据")
|
|
|
@RequestMapping(value = "/saveFollowupDrugs", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String saveFollowupDrugs(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
@RequestParam(value="id",required = true) String id,
|
|
|
@ApiParam(name="followupProjectData",value="面访项目数据",defaultValue = "")
|
|
|
@RequestParam(value="followupProjectData",required = true) String followupProjectData,
|
|
|
@ApiParam(name="drugsData",value="面访项目数据",defaultValue = "")
|
|
|
@RequestParam(value="drugsData",required = true) String drugsData)
|
|
|
{
|
|
|
try {
|
|
|
followUpService.saveFollowupDrugs(id,followupProjectData,drugsData);
|
|
|
|
|
|
return write(200, "保存面访用药数据成功!");
|
|
|
} catch (Exception e) {
|
|
|
return invalidUserException(e, -1, "保存面访用药数据失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*********************************** 电话随访 *****************************************************************/
|
|
|
@ApiOperation("获取电话随访内容")
|
|
|
@RequestMapping(value = "/saveFollowupPhone", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
@RequestMapping(value = "/getFollowupPhone", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
public String saveFollowupPhone(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
public String getFollowupPhone(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
|
|
|
@RequestParam(value="id",required = true) String id) {
|
|
|
try {
|
|
|
String response = followUpService.getFollowupPhone(id);
|