Pārlūkot izejas kodu

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

wangzhinan 7 gadi atpakaļ
vecāks
revīzija
5021c2237e

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyDao.java

@ -441,4 +441,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
    //根据居民和医生找出居民签约团队
    @Query("select f from SignFamily f where f.status > 0 and f.patient = ?1 and ( f.doctor = ?2 or doctorHealth = ?2  )")
    SignFamily findSignFamilyByPatientAndDoctor(String patient, String doctor);
    //根据居民获取有效的签约
    List<SignFamily> findByPatientAndExpensesStatusAndStatus(String patient,String expensesStatus,Integer status);
}

+ 294 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -0,0 +1,294 @@
package com.yihu.wlyy.service.specialist.rehabilitation;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.http.HttpResponse;
import com.yihu.wlyy.util.http.HttpUtils;
import org.apache.commons.collections.map.HashedMap;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
 * Created by 刘文彬 on 2018/8/29.
 */
@Service
@Transactional
public class RehabilitationManageService extends BaseService {
    @Value("${specialist.url}")
    private String specialistUrl;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private SignFamilyDao signFamilyDao;
    /************************************************************* start ************************************************************************/
    private String findRehabilitationPlanList = "/svr-specialist/findRehabilitationPlanList";//康复管理-康复计划列表
    private String findRehabilitationPlanDetailList = "/svr-specialist/findRehabilitationPlanDetailList";//康复管理-康复计划详情列表
    private String calendarPlanDetail = "/svr-specialist/calendarPlanDetail";//康复管理-康复计划按日历展示
    private String calendarPlanDetailList = "/svr-specialist/calendarPlanDetailList";//康复管理-康复计划按列表展示
    private String serviceItemList = "/svr-specialist/serviceItemList";//康复管理-服务项目内容列表
    private String serviceItem = "/svr-specialist/serviceItem";//康复管理-服务项目-完成项目内容信息
    private String saveGuidanceMessage = "/svr-specialist/saveGuidanceMessage";//康复管理-保存指导留言
    private String updateStatusRehabilitationOperate = "/svr-specialist/updateStatusRehabilitationOperate";//康复管理-服务项目-完成项目内容信息
    private String patientRehabilitationDetail = "/svr-specialist/patientRehabilitationDetail";//康复管理-居民详情页
    private String recentPlanDetailRecord = "/svr-specialist/recentPlanDetailRecord";//居民康复计划详情页-近期康复相关记录
    /************************************************************* end ************************************************************************/
    /**
     * 康复管理-康复计划列表
     * @param doctorCode
     * @param patientCondition
     * @param diseaseCode
     * @param planType
     * @param todaybacklog
     * @param page
     * @param pageSize
     * @return
     * @throws Exception
     */
    public JSONObject findRehabilitationPlanList(String doctorCode,String patientCondition,
                                                 String diseaseCode,Integer planType,Integer todaybacklog,Integer page,Integer pageSize) throws Exception{
        Integer doctorType = null;
        Doctor doctor = doctorDao.findByCode(doctorCode);
        if(doctor.getLevel()==1){
            doctorType = 1;
        }else{
            doctorType = 2;
        }
        Map<String, Object> param = new HashedMap();
        param.put("doctorType", doctorType);//医生类型(1、专科医生,2、家庭医生)
        param.put("doctorCode", doctorCode);//医生code
        param.put("patientCondition", patientCondition);//居民条件,可以按身份证或者居民名称模糊匹配
        param.put("diseaseCode", diseaseCode);//疾病类型code
        param.put("planType", planType);//安排类型(1康复计划,2转社区医院,3转家庭病床)
        param.put("todaybacklog", todaybacklog);//今日待办(1、今日待办,2、全部)
        param.put("page", page);//第几页,从1开始
        param.put("pageSize", pageSize);//每页分页大小
        HttpResponse response = HttpUtils.doGet(specialistUrl + findRehabilitationPlanList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result;
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 康复管理-康复计划详情列表
     * @param doctorCode
     * @param patientCode
     * @return
     * @throws Exception
     */
    public JSONObject findRehabilitationPlanDetailList(String doctorCode,String patientCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("doctorCode", doctorCode);
        param.put("patientCode", patientCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + findRehabilitationPlanDetailList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 康复管理-康复计划按日历展示
     * @param executeStartTime
     * @param executeEndTime
     * @param planId
     * @param searchTask
     * @param status
     * @param doctorCode
     * @return
     * @throws Exception
     */
    public JSONObject calendarPlanDetail(String executeStartTime,String executeEndTime,String planId,Integer searchTask,Integer status,String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("executeStartTime", executeStartTime);
        param.put("executeEndTime", executeEndTime);
        param.put("planId", planId);
        param.put("searchTask", searchTask);
        param.put("status", status);
        param.put("doctorCode", doctorCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + calendarPlanDetail, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 康复管理-康复计划按列表展示
     * @param executeStartTime
     * @param executeEndTime
     * @param planId
     * @param searchTask
     * @param status
     * @param doctorCode
     * @return
     * @throws Exception
     */
    public JSONArray calendarPlanDetailList(String executeStartTime, String executeEndTime, String planId, Integer searchTask, Integer status, String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("executeStartTime", executeStartTime);
        param.put("executeEndTime", executeEndTime);
        param.put("planId", planId);
        param.put("searchTask", searchTask);
        param.put("status", status);
        param.put("doctorCode", doctorCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + calendarPlanDetailList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONArray("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 康复管理-多个康复计划服务项目内容列表
     * @param planDetailIds
     * @return
     * @throws Exception
     */
    public JSONArray serviceItemList(String planDetailIds) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailIds", planDetailIds);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceItemList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONArray("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 康复管理-康复计划服务项目确认详情页
     * @param planDetailId
     * @return
     * @throws Exception
     */
    public JSONObject serviceItem(String planDetailId) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailIds", planDetailId);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceItem, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 康复管理-保存指导留言
     * @param messageId
     * @param patientCode
     * @param doctorCode
     * @param doctorType
     * @param content
     * @param planDetailId
     * @return
     * @throws Exception
     */
    public void saveGuidanceMessage(String messageId,String patientCode,String doctorCode,String content,String planDetailId) throws Exception{
        Doctor doctor = doctorDao.findByCode(doctorCode);
        Integer doctorType = doctor.getLevel();
        Map<String, Object> param = new HashedMap();
        param.put("messageId", messageId);
        param.put("patientCode", patientCode);
        param.put("doctorCode", doctorCode);
        param.put("doctorType", doctorType);
        param.put("content", content);
        param.put("planDetailIds", planDetailId);
        HttpResponse response = HttpUtils.doPost(specialistUrl + saveGuidanceMessage, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")!=200){
            throw new Exception("请求微服务失败!");
        }
    }
    /**
     * 康复管理-更新康复计划操作完成日志状态
     * @param planDetailId
     * @param status
     * @throws Exception
     */
    public void updateStatusRehabilitationOperate(String planDetailId,Integer status) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailId", planDetailId);
        param.put("status", status);
        HttpResponse response = HttpUtils.doPost(specialistUrl + updateStatusRehabilitationOperate, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")!=200){
            throw new Exception("请求微服务失败!");
        }
    }
    /**
     * 康复管理-居民详情页
     * @param patientCode
     * @return
     * @throws Exception
     */
    public JSONObject patientRehabilitationDetail(String patientCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        List<SignFamily> list = signFamilyDao.findByPatientAndExpensesStatusAndStatus(patientCode,"1",1);
        String healthDoctor = null;
        String healthDoctorName =null;
        String generalDoctor = null;
        String generalDoctorName = null;
        if(list.size()>0){
            SignFamily signFamily = list.get(0);
            healthDoctor = signFamily.getDoctorHealth();
            healthDoctorName = signFamily.getDoctorHealthName();
            generalDoctor = signFamily.getDoctor();
            generalDoctorName = signFamily.getDoctorName();
        }
        param.put("patientCode", patientCode);
        param.put("healthDoctor", healthDoctor);
        param.put("healthDoctorName", healthDoctorName);
        param.put("generalDoctor", generalDoctor);
        param.put("generalDoctorName", generalDoctorName);
        HttpResponse response = HttpUtils.doGet(specialistUrl + patientRehabilitationDetail, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
    /**
     * 居民康复计划详情页-近期康复相关记录
     * @param patientCode
     * @param startTime
     * @param endTime
     * @return
     * @throws Exception
     */
    public JSONObject recentPlanDetailRecord(String patientCode,String startTime,String endTime) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("patientCode", patientCode);
        param.put("startTime", startTime);
        param.put("endTime", endTime);
        HttpResponse response = HttpUtils.doGet(specialistUrl + recentPlanDetailRecord, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONObject("obj");
        }
        throw new Exception("请求微服务失败!");
    }
}

+ 243 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/RehabilitationManageController.java

@ -0,0 +1,243 @@
package com.yihu.wlyy.web.doctor.specialist.rehabilitation;
import org.json.JSONArray;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import com.yihu.wlyy.service.specialist.rehabilitation.RehabilitationManageService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * Created by 刘文彬 on 2018/8/30.
 */
@RestController
@RequestMapping(value = "/doctor/specialist/rehabilitation", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-康复管理")
public class RehabilitationManageController extends BaseController {
    @Autowired
    private RehabilitationManageService rehabilitationManageService;
    @RequestMapping(value = "findRehabilitationPlanList", method = RequestMethod.GET)
    @ApiOperation("康复管理-康复计划列表")
    @ObserverRequired
    public String findRehabilitationPlanList(@ApiParam(name = "doctorCode", value = "医生code", required = true)
                                             @RequestParam(value = "doctorCode", required = false)String doctorCode,
//                                             @ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true)
//                                             @RequestParam(value = "doctorType", required = true)Integer doctorType,
                                             @ApiParam(name = "patientCondition", value = "居民条件,可以按身份证或者居民名称模糊匹配", required = false)
                                             @RequestParam(value = "patientCondition", required = false)String patientCondition,
                                             @ApiParam(name = "diseaseCode", value = "疾病类型code", required = false)
                                             @RequestParam(value = "diseaseCode", required = false)String diseaseCode,
                                             @ApiParam(name = "planType", value = "安排类型(1康复计划,2转社区医院,3转家庭病床)", required = false)
                                             @RequestParam(value = "planType", required = false)Integer planType,
                                             @ApiParam(name = "todaybacklog", value = "今日待办(1、今日待办,2、全部)", required = false)
                                             @RequestParam(value = "todaybacklog", required = false,defaultValue = "1")Integer todaybacklog,
                                             @ApiParam(name = "page", value = "第几页,从1开始", required = true)
                                             @RequestParam(value = "page", required = false,defaultValue = "1")Integer page,
                                             @ApiParam(name = "pageSize", value = "每页分页大小", required = true)
                                             @RequestParam(value = "pageSize", required = false,defaultValue = "10")Integer pageSize) {
        try {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.findRehabilitationPlanList(doctorCode,patientCondition,diseaseCode,planType,todaybacklog,page,pageSize);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "findRehabilitationPlanDetailList", method = RequestMethod.GET)
    @ApiOperation("康复管理-康复计划详情列表")
    @ObserverRequired
    public String findRehabilitationPlanDetailList(@ApiParam(name = "doctorCode", value = "医生code", required = false)
                                                   @RequestParam(value = "doctorCode", required = false)String doctorCode,
                                                   @ApiParam(name = "patientCode", value = "居民code", required = true)
                                                   @RequestParam(value = "patientCode", required = true)String patientCode){
        try {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.findRehabilitationPlanDetailList(doctorCode,patientCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "calendarPlanDetail", method = RequestMethod.GET)
    @ApiOperation("康复管理-康复计划按日历展示")
    @ObserverRequired
    public String calendarPlanDetail(@ApiParam(name = "executeStartTime", value = "日历开始时间(格式:yyyy-MM-dd HH:mm:ss)", required = true)
                                     @RequestParam(value = "executeStartTime", required = true)String executeStartTime,
                                     @ApiParam(name = "executeEndTime", value = "日历结束时间(格式:yyyy-MM-dd HH:mm:ss)", required = true)
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                     @RequestParam(value = "doctorCode", required = false)String doctorCode,
                                     @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                     @RequestParam(value = "status", required = false)Integer status){
        try {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.calendarPlanDetail(executeStartTime,executeEndTime,planId,searchTask,status,doctorCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "calendarPlanDetailList", method = RequestMethod.GET)
    @ApiOperation("康复管理-康复计划按列表展示")
    @ObserverRequired
    public String calendarPlanDetailList(@ApiParam(name = "executeStartTime", value = "日历开始时间(格式:yyyy-MM-dd HH:mm:ss)", required = true)
                                     @RequestParam(value = "executeStartTime", required = true)String executeStartTime,
                                     @ApiParam(name = "executeEndTime", value = "日历结束时间(格式:yyyy-MM-dd HH:mm:ss)", required = true)
                                     @RequestParam(value = "executeEndTime", required = true)String executeEndTime,
                                     @ApiParam(name = "planId", value = "计划id", required = true)
                                     @RequestParam(value = "planId", required = true)String planId,
                                     @ApiParam(name = "searchTask", value = "快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)", required = false)
                                     @RequestParam(value = "searchTask", required = false)Integer searchTask,
                                     @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                     @RequestParam(value = "doctorCode", required = false)String doctorCode,
                                     @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                     @RequestParam(value = "status", required = false)Integer status){
        try {
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONArray result = rehabilitationManageService.calendarPlanDetailList(executeStartTime,executeEndTime,planId,searchTask,status,doctorCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "serviceItemList", method = RequestMethod.GET)
    @ApiOperation("康复管理-多个康复计划服务项目内容列表")
    @ObserverRequired
    public String serviceItemList(@ApiParam(name = "planDetailIds", value = "康复计划多个服务项目id(多个‘,’分隔)", required = true)
                                                   @RequestParam(value = "planDetailIds", required = true)String planDetailIds){
        try {
            JSONArray result = rehabilitationManageService.serviceItemList(planDetailIds);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "planDetailId", method = RequestMethod.GET)
    @ApiOperation("康复管理-康复计划服务项目确认详情页")
    @ObserverRequired
    public String serviceItem(@ApiParam(name = "planDetailId", value = "康复计划服务项目id", required = true)
                                  @RequestParam(value = "planDetailId", required = true)String planDetailId){
        try {
            JSONObject result = rehabilitationManageService.serviceItem(planDetailId);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "saveGuidanceMessage", method = RequestMethod.POST)
    @ApiOperation("康复管理-保存指导留言")
    @ObserverRequired
    public String saveGuidanceMessage(@ApiParam(name = "messageId", value = "消息id", required = true)
                                      @RequestParam(value = "messageId", required = true)String messageId,
                                      @ApiParam(name = "patientCode", value = "居民code", required = true)
                                      @RequestParam(value = "patientCode", required = true)String patientCode,
//                                      @ApiParam(name = "doctorCode", value = "医生code", required = true)
//                                      @RequestParam(value = "doctorCode", required = true)String doctorCode,
//                                      @ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true)
//                                      @RequestParam(value = "doctorType", required = true)Integer doctorType,
                                      @ApiParam(name = "content", value = "聊天内容", required = true)
                                      @RequestParam(value = "content", required = true)String content,
                                      @ApiParam(name = "planDetailId", value = "服务项目id", required = true)
                                      @RequestParam(value = "planDetailId", required = true)String planDetailId){
        try {
            rehabilitationManageService.saveGuidanceMessage(messageId,patientCode,getRepUID(),content,planDetailId);
            return write(200, "保存成功!");
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "updateStatusRehabilitationOperate", method = RequestMethod.POST)
    @ApiOperation("康复管理-更新康复计划操作完成日志状态")
    @ObserverRequired
    public String updateStatusRehabilitationOperate(@ApiParam(name = "planDetailId", value = "服务项目id", required = true)
                                                    @RequestParam(value = "planDetailId", required = true)String planDetailId,
                                                    @ApiParam(name = "status", value = "状态", required = true)
                                                    @RequestParam(value = "status", required = true)Integer status){
        try {
            rehabilitationManageService.updateStatusRehabilitationOperate(planDetailId,status);
            return write(200, "更新成功!");
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "patientRehabilitationDetail", method = RequestMethod.GET)
    @ApiOperation("康复管理-居民详情页")
    @ObserverRequired
    public String patientRehabilitationDetail(@ApiParam(name = "patientCode", value = "居民code", required = true)
                                              @RequestParam(value = "patientCode", required = true)String patientCode){
        try {
            JSONObject result = rehabilitationManageService.patientRehabilitationDetail(patientCode);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "recentPlanDetailRecord", method = RequestMethod.GET)
    @ApiOperation("康复管理-居民详情页")
    @ObserverRequired
    public String recentPlanDetailRecord(@ApiParam(name = "patientCode", value = "居民code", required = true)
                                         @RequestParam(value = "patientCode", required = true)String patientCode,
                                         @ApiParam(name = "startTime", value = "开始时间(格式:yyyy-MM-dd HH:mm:ss)", required = true)
                                         @RequestParam(value = "startTime", required = true)String startTime,
                                         @ApiParam(name = "endTime", value = "结束时间(格式:yyyy-MM-dd HH:mm:ss)", required = true)
                                         @RequestParam(value = "endTime", required = true)String endTime){
        try {
            JSONObject result = rehabilitationManageService.recentPlanDetailRecord(patientCode,startTime,endTime);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}