|
@ -0,0 +1,116 @@
|
|
|
|
package com.yihu.wlyy.web.doctor.scheme;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.scheme.vo.DoctorSchemeBloodPressureVO;
|
|
|
|
import com.yihu.wlyy.entity.doctor.scheme.vo.DoctorSchemeBloodSuggerVO;
|
|
|
|
import com.yihu.wlyy.service.app.scheme.DoctorSchemeService;
|
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 医生端-监测方案相关接口
|
|
|
|
* @author huangwenjie
|
|
|
|
* @date 2017/9/13 15:39
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RequestMapping(value = "/doctor/scheme/")
|
|
|
|
@Api(description = "医生端-监测方案相关接口")
|
|
|
|
public class DoctroSchemeController extends BaseController {
|
|
|
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(DoctroSchemeController.class);
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private DoctorSchemeService doctorSchemeService;
|
|
|
|
|
|
|
|
@RequestMapping(value="/get/disease/patientcodes",method = RequestMethod.GET)
|
|
|
|
@ApiOperation("医生端-根据居民标签/病情/设备绑定状态查询团队居民CODE列表")
|
|
|
|
public String getDiseasePatientCodes (
|
|
|
|
@ApiParam(name="teamCode", value="团队CODE") @RequestParam(value = "teamCode",required = true) String teamCode,
|
|
|
|
@ApiParam(name="disease", value="疾病类型,-1全部,0健康,1高血压,2糖尿病,3高血压+糖尿病") @RequestParam(value = "disease",required = true) Integer disease,
|
|
|
|
@ApiParam(name="diseaseCondition", value="居民标签:-1全部,0绿标,1黄标,2红标") @RequestParam(value = "diseaseCondition",required = true) Integer diseaseCondition,
|
|
|
|
@ApiParam(name="deviceType", value="设备类型:-1全部,0未绑定,1已绑定") @RequestParam(value = "deviceType",required = true) Integer deviceType
|
|
|
|
){
|
|
|
|
try {
|
|
|
|
|
|
|
|
List<String> result = doctorSchemeService.getPatientsByDiseaseConditionDiseaseDeviceType(teamCode,disease,diseaseCondition,deviceType);
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
}catch (Exception e){
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "查询失败,"+e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/get/bloodsugger/list",method = RequestMethod.GET)
|
|
|
|
@ApiOperation("医生获取自己的血糖监测方案列表")
|
|
|
|
public String getDoctorSchemeBloodSuggerList(
|
|
|
|
@ApiParam(name="doctorcode", value="医生CODE") @RequestParam(value = "doctorcode",required = true) String doctorcode){
|
|
|
|
try {
|
|
|
|
|
|
|
|
List<DoctorSchemeBloodSuggerVO> result = doctorSchemeService.getDoctorScheBloodSuggerList(doctorcode);
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
}catch (Exception e){
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "查询失败,"+e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/get/bloodpressure/list",method = RequestMethod.GET)
|
|
|
|
@ApiOperation("医生获取自己的血压监测方案列表")
|
|
|
|
public String getDoctorSchemeBloodPressureList(
|
|
|
|
@ApiParam(name="doctorcode", value="医生CODE") @RequestParam(value = "doctorcode",required = true) String doctorcode){
|
|
|
|
try {
|
|
|
|
|
|
|
|
List<DoctorSchemeBloodPressureVO> result = doctorSchemeService.getDoctorSchemeBloodPressureList(doctorcode);
|
|
|
|
|
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
|
}catch (Exception e){
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "查询失败,"+e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/post/save/patient/bloodpressure",method = RequestMethod.POST)
|
|
|
|
@ApiOperation("医生保存居民的血压监测方案")
|
|
|
|
public String saveDoctorSchemeBloodPressure(
|
|
|
|
@ApiParam(name="data", value="JSON数据") @RequestParam(value = "data",required = true) String data){
|
|
|
|
try {
|
|
|
|
doctorSchemeService.saveDoctorSchemeBloodPressure(data);
|
|
|
|
return write(200, "操作成功");
|
|
|
|
}catch (Exception e){
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "操作失败,"+e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value="/post/save/patient/bloodsugger",method = RequestMethod.POST)
|
|
|
|
@ApiOperation("医生保存居民的血糖监测方案")
|
|
|
|
public String saveDoctorSchemeBloodSugger(
|
|
|
|
@ApiParam(name="data", value="JSON数据") @RequestParam(value = "data",required = true) String data){
|
|
|
|
try {
|
|
|
|
doctorSchemeService.saveDoctorSchemeBloodSugger(data);
|
|
|
|
return write(200, "操作成功");
|
|
|
|
}catch (Exception e){
|
|
|
|
//日志文件中记录异常信息
|
|
|
|
error(e);
|
|
|
|
//返回接口异常信息处理结果
|
|
|
|
return error(-1, "操作失败,"+e.getMessage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|