Browse Source

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 7 years ago
parent
commit
b1c7a0db11

+ 6 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/family/DoctorFamilyController.java

@ -4,6 +4,7 @@ import com.yihu.wlyy.service.app.family.FamilyMemberService;
import com.yihu.wlyy.service.app.family.FamilyService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -20,7 +21,7 @@ import java.util.Map;
 * Created by Administrator on 2016.08.20.
 */
@Controller
@RequestMapping(value = "/doctor/family", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/doctor/family", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-家庭查询")
public class DoctorFamilyController extends WeixinBaseController {
    @Autowired
@ -29,7 +30,8 @@ public class DoctorFamilyController extends WeixinBaseController {
    FamilyMemberService familyMemberService;
    //通過患者身份證查找患者家庭成员
    @RequestMapping(value = "/getfamilyMember")
    @ApiOperation("通過患者身份證查找患者家庭成员")
    @RequestMapping(value = "/getfamilyMember",method = RequestMethod.POST)
    @ResponseBody
    public String getfamilyMember(
            String patientCode,//患者code
@ -63,7 +65,8 @@ public class DoctorFamilyController extends WeixinBaseController {
    }
    //邀请家庭成员签约
    @RequestMapping(value = "/inviteFamilyMember")
    @ApiOperation("邀请家庭成员签约")
    @RequestMapping(value = "/inviteFamilyMember",method = RequestMethod.POST)
    @ResponseBody
    public String inviteFamilyMember(
            String patient,//邀请的患者code

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java

@ -28,7 +28,7 @@ import java.util.Map;
 * @author hzp add 2016-12-07
 */
@Controller
@RequestMapping(value = "/doctor/followup", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/doctor/followup", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-随访接口")
public class DoctorFollowUpController extends BaseController {
@ -61,7 +61,7 @@ public class DoctorFollowUpController extends BaseController {
     * @param pagesize
     * @return
     */
    @RequestMapping(value = "/list_by_team")
    @RequestMapping(value = "/list_by_team", method = {RequestMethod.GET,RequestMethod.POST})
    @ResponseBody
    @ApiOperation(value = "查询居民随访列表")
    public String getListByPatientAndTeam(@RequestParam @ApiParam(value = "居民Code") String patient,

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthController.java

@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
@Controller
@RequestMapping(value = "/doctor/health_index", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/doctor/health_index", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-患者指标")
public class DoctorHealthController extends BaseController {

+ 21 - 12
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -45,7 +45,7 @@ import java.util.*;
 * @author George
 */
@Controller
@RequestMapping(value = "/doctor/health/edu", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/doctor/health/edu", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "健康教育")
public class DoctorHealthEduArticleController extends WeixinBaseController {
@ -88,7 +88,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
     * @param wheaType 文章类型
     * @return 列表
     */
    @RequestMapping(value = "list")
    @ApiOperation("查询健康教育")
    @RequestMapping(value = "list",method = {RequestMethod.GET,RequestMethod.POST})
    @ResponseBody
    public String list(@RequestParam(value = "page", required = true) int page,
                       @RequestParam(value = "pagesize", required = true) int pagesize,
@ -200,7 +201,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
     * @param pagesize 分页大小
     * @return 列表
     */
    @RequestMapping(value = "listDoctor")
    @RequestMapping(value = "listDoctor",method = RequestMethod.POST)
    @ApiOperation("查询医生收藏列表")
    @ResponseBody
    public String listDoctor(@RequestParam(value = "page", required = true) int page, @RequestParam(value = "pagesize", required = true) int pagesize, @RequestParam(value = "filter", required = false) String filter, @RequestParam(value = "patient", required = false) String patient, @RequestParam(value = "wheaType", required = false) Integer wheaType) {
        try {
@ -249,7 +251,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
     * @param pagesize 分页大小
     * @return 列表
     */
    @RequestMapping(value = "listLabel")
    @RequestMapping(value = "listLabel",method = RequestMethod.POST)
    @ApiOperation("查询标签列表")
    @ResponseBody
    public String listLabel(@RequestParam(value = "page", required = true) int page, @RequestParam(value = "pagesize", required = true) int pagesize, @RequestParam(value = "type", required = false, defaultValue = "0") int type) {
        try {
@ -267,8 +270,9 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
     * @param code 数据文章唯一标示code
     * @return 列表
     */
    @RequestMapping(value = "article")
    @RequestMapping(value = "article",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("查询文章列表")
    public String article(@RequestParam(value = "code", required = true) String code) {
        try {
            //获取单条文章记录
@ -316,7 +320,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
     * @param  attachedContent 附加内容
     * @return
     */
    @RequestMapping(value = "send")
    @RequestMapping(value = "send",method = RequestMethod.POST)
    @ApiOperation("发送文章给患者")
    @ResponseBody
    @ObserverRequired
    public String send(@RequestParam(value = "code") String code,
@ -522,7 +527,9 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
     * @param article 文章CODE
     * @return
     */
    @RequestMapping(value = "collectionArticle")
    @RequestMapping(value = "collectionArticle",method = RequestMethod.POST)
    @ApiOperation("文章收藏")
    @ResponseBody
    @ObserverRequired
    public String collectionArticle(@RequestParam(value = "article", required = true) String article) {
@ -547,12 +554,13 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
    }
    /**
     * 文章收藏
     * 文章取消收藏
     *
     * @param article 文章CODE
     * @return
     */
    @RequestMapping(value = "uncollectionArticle")
    @RequestMapping(value = "uncollectionArticle",method = RequestMethod.POST)
    @ApiOperation("文章取消收藏")
    @ResponseBody
    @ObserverRequired
    public String uncollectionArticle(@RequestParam(value = "article", required = true) String article) {
@ -567,7 +575,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
    }
    @RequestMapping(value = "/logs")
    @RequestMapping(value = "logs",method = RequestMethod.POST)
    @ApiOperation("查询多个患者文章 ")
    @ResponseBody
    public String getPatientHealthLogs(@RequestParam(value = "page", required = true) int page, @RequestParam(value = "pagesize", required = true) int pagesize){
       try{
@ -577,8 +586,8 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
           return write(-1,"查询失败!");
       }
    }
    @RequestMapping(value = "/log")
    @RequestMapping(value = "log",method = RequestMethod.POST)
    @ApiOperation("查询单个患者文章")
    @ResponseBody
    public String getPatientHealthLog(@RequestParam(value = "article", required = true) String article, @RequestParam(value = "batchNo", required = false) String batchNo){
        try{

+ 214 - 208
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthGuidanceController.java

@ -28,55 +28,57 @@ import org.springframework.web.bind.annotation.ResponseBody;
/**
 * 医生端:健康指导控制类
 * @author George
 *
 * @author George
 */
@Controller
@RequestMapping(value = "/doctor/health/guidance", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/doctor/health/guidance", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "健康指导")
public class DoctorHealthGuidanceController extends WeixinBaseController {
	@Autowired
	private PatientHealthGuidanceService patientHealthGuidanceService;
    @Autowired
    private PatientHealthGuidanceService patientHealthGuidanceService;
	@Autowired
	private DoctorService doctorService;
    @Autowired
    private DoctorService doctorService;
	@Autowired
	private PatientService patientService;
    @Autowired
    private PatientService patientService;
	@Autowired
	private ConsultService consultService;
	@Autowired
	private CommonUtil CommonUtil;
//======================
	@Autowired
	DoctorGuidanceTempService doctorGuidanceTempService;
    @Autowired
    private ConsultService consultService;
    @Autowired
    private CommonUtil CommonUtil;
    //======================
    @Autowired
    DoctorGuidanceTempService doctorGuidanceTempService;
//	=======================
	/**
	 * 获取某个健康指导
	 *
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/id")
	@ResponseBody
	public String getHealthGuidance(@RequestParam String id){
		Long idl = Long.parseLong(id);
		try{
			if(idl == null || idl < 1){
				return error(-1,"参数错误");
			}
			JSONObject guidance = patientHealthGuidanceService.findById(idl);
			return write(200,"查询成功","data",guidance);
		}catch (Exception e){
			return error(-1,"查询失败");
		}
	}
    /**
     * 获取某个健康指导
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/id", method = RequestMethod.POST)
    @ApiOperation("获取某个健康指导")
    @ResponseBody
    public String getHealthGuidance(@RequestParam String id) {
        Long idl = Long.parseLong(id);
        try {
            if (idl == null || idl < 1) {
                return error(-1, "参数错误");
            }
            JSONObject guidance = patientHealthGuidanceService.findById(idl);
            return write(200, "查询成功", "data", guidance);
        } catch (Exception e) {
            return error(-1, "查询失败");
        }
    }
	/*/**
	 * 添加患者健康指导
     * 添加患者健康指导
	 * @param patient 患者标识
	 * @param content 指导内容
	 * @return
@ -114,192 +116,196 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
			return error(-1, "保存失败!");
		}
	}*/
	//  ====================修改代码========================
    //  ====================修改代码========================
	/**
	 * 添加患者健康指导(modelCode不为空判断为使用模板)
	 * @param patient 患者标识
	 * @param content 指导内容
	 * @param modelCode 指导模板编码
	 * @param images   指导图片
	 * @param voice   指导语音
	 * @return
	 */
	@RequestMapping(value = "add")
	@ResponseBody
	@ObserverRequired
	public String add(@RequestParam String patient,
					  @RequestParam String content,
					  @RequestParam(required = false) String modelCode,
					  @RequestParam(required = false) String images,
					  @RequestParam(required = false) String voice) {
    /**
     * 添加患者健康指导(modelCode不为空判断为使用模板)
     *
     * @param patient   患者标识
     * @param content   指导内容
     * @param modelCode 指导模板编码
     * @param images    指导图片
     * @param voice     指导语音
     * @return
     */
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ApiOperation("添加患者健康指导")
    @ResponseBody
    @ObserverRequired
    public String add(@RequestParam String patient,
                      @RequestParam String content,
                      @RequestParam(required = false) String modelCode,
                      @RequestParam(required = false) String images,
                      @RequestParam(required = false) String voice) {
		String imageUrls = "";
		String imageRow = "";
        String imageUrls = "";
        String imageRow = "";
		if(StringUtils.isBlank(modelCode)) {
        if (StringUtils.isBlank(modelCode)) {
//			不使用模板指导,旧版手工指导
			try {
				PatientHealthGuidance guidance = new PatientHealthGuidance();
				guidance.setContent(content);
				guidance.setDoctor(getUID());
				guidance.setPatient(patient);
            try {
                PatientHealthGuidance guidance = new PatientHealthGuidance();
                guidance.setContent(content);
                guidance.setDoctor(getUID());
                guidance.setPatient(patient);
//				找到当前医生
				Doctor doctor = doctorService.findDoctorByCode(getUID());
				if (images==null||"".equals(images)) {
					images=null;
				}else {
					String[] imgs = images.split(",");
					for (String image : imgs) {
						if (image.contains("http://")) {
							imageUrls += image + ",";
						} else {
							try {
								imageRow += CommonUtil.copyTempImage(image)+",";
							} catch (Exception e) {
								e.printStackTrace();
							}
						}
					}
                Doctor doctor = doctorService.findDoctorByCode(getUID());
                if (images == null || "".equals(images)) {
                    images = null;
                } else {
                    String[] imgs = images.split(",");
                    for (String image : imgs) {
                        if (image.contains("http://")) {
                            imageUrls += image + ",";
                        } else {
                            try {
                                imageRow += CommonUtil.copyTempImage(image) + ",";
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                        }
                    }
					images = imageUrls + imageRow;
					images =  images.substring(0,images.length()-1);
				}
                    images = imageUrls + imageRow;
                    images = images.substring(0, images.length() - 1);
                }
				/*if (StringUtils.isNotEmpty(images)) {
					images = CommonUtil.copyTempImage(images);
				}*/
				guidance.setImages(images);
                guidance.setImages(images);
				// 保存到居民端健康指导
				if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
					Patient p = patientService.findByCode(patient);
					String imcotent  = "{\"title\":\"健康指导\",\"type\":2,\"id\":\"" + guidance.getId() + "\",\"img\":\"" + guidance.getImages() + "\",\"content\":\""+CommonUtil.getSubString(guidance.getContent(),0,30)+"\"}";
					consultService.sendMucMessageBySingnType(getUID(), doctor.getName(), patient, imcotent, "4", p.getName());
					BusinessLogs.info(BusinessLogs.BusinessType.guidance, getUID(), patient, new JSONObject(guidance));
					return success("保存成功!");
				} else {
					return error(-1, "保存失败!");
				}
			} catch (Exception e) {
				error(e);
				return error(-1, "保存失败!");
			}
		}else{
			try{
				PatientHealthGuidance guidance = new PatientHealthGuidance();
				guidance.setContent(content);
				guidance.setDoctor(getUID());
				guidance.setPatient(patient);
				Doctor doctor = doctorService.findDoctorByCode(getUID());
				if (images==null||"".equals(images)) {
					images = null;
				}else {
					String[] imgs = images.split(",");
					for (String image : imgs) {
						if (image.contains("http://")) {
							imageUrls += image + ",";
						} else {
							try {
								imageRow += CommonUtil.copyTempImage(image)+",";
							} catch (Exception e) {
								e.printStackTrace();
							}
						}
					}
                // 保存到居民端健康指导
                if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
                    Patient p = patientService.findByCode(patient);
                    String imcotent = "{\"title\":\"健康指导\",\"type\":2,\"id\":\"" + guidance.getId() + "\",\"img\":\"" + guidance.getImages() + "\",\"content\":\"" + CommonUtil.getSubString(guidance.getContent(), 0, 30) + "\"}";
                    consultService.sendMucMessageBySingnType(getUID(), doctor.getName(), patient, imcotent, "4", p.getName());
                    BusinessLogs.info(BusinessLogs.BusinessType.guidance, getUID(), patient, new JSONObject(guidance));
                    return success("保存成功!");
                } else {
                    return error(-1, "保存失败!");
                }
            } catch (Exception e) {
                error(e);
                return error(-1, "保存失败!");
            }
        } else {
            try {
                PatientHealthGuidance guidance = new PatientHealthGuidance();
                guidance.setContent(content);
                guidance.setDoctor(getUID());
                guidance.setPatient(patient);
                Doctor doctor = doctorService.findDoctorByCode(getUID());
                if (images == null || "".equals(images)) {
                    images = null;
                } else {
                    String[] imgs = images.split(",");
                    for (String image : imgs) {
                        if (image.contains("http://")) {
                            imageUrls += image + ",";
                        } else {
                            try {
                                imageRow += CommonUtil.copyTempImage(image) + ",";
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                        }
                    }
					images = imageUrls + imageRow;
					images =  images.substring(0,images.length()-1);
				}
				guidance.setImages(images);
                    images = imageUrls + imageRow;
                    images = images.substring(0, images.length() - 1);
                }
                guidance.setImages(images);
				// 保存
				if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
					String sendImgs = "";
					if(StringUtils.isNotBlank(images)){
						sendImgs = images;
					}
					Patient p = patientService.findByCode(patient);
					String imcotent  = "{\"title\":\"健康指导\",\"type\":2,\"id\":\"" + guidance.getId() + "\",\"img\":\"" + sendImgs + "\",\"content\":\""+CommonUtil.getSubString(guidance.getContent(),0,30)+"\"}";
					consultService.sendMucMessageBySingnType(getUID(), doctor.getName(), patient, imcotent, "4", p.getName());
					BusinessLogs.info(BusinessLogs.BusinessType.guidance, getUID(), patient, new JSONObject(guidance));
					//发送成功记录模板发送次数
					doctorGuidanceTempService.countSend(modelCode);
					return success("保存成功!");
				} else {
					return error(-1, "保存失败!");
				}
			}catch (Exception e){
				error(e);
				return error(-1, "保存失败!");
			}
		}
	}
	//  ============================================
                // 保存
                if (patientHealthGuidanceService.add(guidance, getAccessToken()) != null) {
                    String sendImgs = "";
                    if (StringUtils.isNotBlank(images)) {
                        sendImgs = images;
                    }
                    Patient p = patientService.findByCode(patient);
                    String imcotent = "{\"title\":\"健康指导\",\"type\":2,\"id\":\"" + guidance.getId() + "\",\"img\":\"" + sendImgs + "\",\"content\":\"" + CommonUtil.getSubString(guidance.getContent(), 0, 30) + "\"}";
                    consultService.sendMucMessageBySingnType(getUID(), doctor.getName(), patient, imcotent, "4", p.getName());
                    BusinessLogs.info(BusinessLogs.BusinessType.guidance, getUID(), patient, new JSONObject(guidance));
                    //发送成功记录模板发送次数
                    doctorGuidanceTempService.countSend(modelCode);
                    return success("保存成功!");
                } else {
                    return error(-1, "保存失败!");
                }
            } catch (Exception e) {
                error(e);
                return error(-1, "保存失败!");
            }
        }
    }
    //  ============================================
	/**
	 * 查询患者的健康指导
	 * @param patient 患者标识
	 * @param begin   开始时间
	 * @param end     结束时间
	 * @param id	  指导编码
	 * @param pagesize 展示页数
	 * @return
	 */
	@RequestMapping(value = "list")
	@ResponseBody
	public String list(@RequestParam(required = false) String patient,
					   @RequestParam(required = false) String begin,
					   @RequestParam(required = false) String end,
					   @RequestParam String id,
					   @RequestParam String pagesize) {
		try {
			Long idl = Long.parseLong(id);
			int  page = Integer.parseInt(pagesize);
			if (StringUtils.isNotEmpty(begin)) {
				begin = begin + " 00:00:00";
			}
			if (StringUtils.isNotEmpty(end)) {
				end = end + " 23:59:59";
			}
			JSONArray array = patientHealthGuidanceService.findPatientGuidanceByDoctor(getUID(), patient, begin, end, idl, page);
			return write(200, "查询成功!", "list", array);
		} catch (Exception e) {
			error(e);
			return error(-1, "查询失败!");
		}
	}
    /**
     * 查询患者的健康指导
     *
     * @param patient  患者标识
     * @param begin    开始时间
     * @param end      结束时间
     * @param id       指导编码
     * @param pagesize 展示页数
     * @return
     */
    @RequestMapping(value = "/list", method = {RequestMethod.POST,RequestMethod.GET})
    @ApiOperation("添加患者健康指导")
    @ResponseBody
    public String list(@RequestParam(required = false) String patient,
                       @RequestParam(required = false) String begin,
                       @RequestParam(required = false) String end,
                       @RequestParam String id,
                       @RequestParam String pagesize) {
        try {
            Long idl = Long.parseLong(id);
            int page = Integer.parseInt(pagesize);
            if (StringUtils.isNotEmpty(begin)) {
                begin = begin + " 00:00:00";
            }
            if (StringUtils.isNotEmpty(end)) {
                end = end + " 23:59:59";
            }
            JSONArray array = patientHealthGuidanceService.findPatientGuidanceByDoctor(getUID(), patient, begin, end, idl, page);
            return write(200, "查询成功!", "list", array);
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
	/**
	 * 查询患者的健康指导
	 *
	 * @param patient
	 * @param teamCode
	 * @param page
	 * @param pagesize
	 * @return
	 */
	@RequestMapping(value = "list_by_team", method = {RequestMethod.GET, RequestMethod.POST})
	@ResponseBody
	@ApiOperation(value = "查询居民健康指导记录")
	public String list(@RequestParam @ApiParam(value = "居民code") String patient,
					   @RequestParam @ApiParam(value = "团队Code") Long teamCode,
					   @RequestParam @ApiParam(value = "第几页") int page,
					   @RequestParam @ApiParam(value = "页大小") int pagesize) {
		try {
			if (StringUtils.isEmpty(patient)) {
				return error(-1, "请输入需查询的居民");
			}
			if (teamCode == null || teamCode < 1) {
				return error(-1, "请输入需查询的居民的团队");
			}
			page = page > 0 ? page - 1 : 0;
			JSONArray result = patientHealthGuidanceService.findByPatientAndGuidanceAndTeam(patient,teamCode,page,pagesize);
			return write(200, "查询成功!", "data", result);
		} catch (Exception e) {
			error(e);
			return error(-1, "查询失败!");
		}
	}
    /**
     * 查询患者的健康指导
     *
     * @param patient
     * @param teamCode
     * @param page
     * @param pagesize
     * @return
     */
    @RequestMapping(value = "list_by_team", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    @ApiOperation(value = "查询居民健康指导记录")
    public String list(@RequestParam @ApiParam(value = "居民code") String patient,
                       @RequestParam @ApiParam(value = "团队Code") Long teamCode,
                       @RequestParam @ApiParam(value = "第几页") int page,
                       @RequestParam @ApiParam(value = "页大小") int pagesize) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray result = patientHealthGuidanceService.findByPatientAndGuidanceAndTeam(patient, teamCode, page, pagesize);
            return write(200, "查询成功!", "data", result);
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}

+ 7 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthRecordController.java

@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 *
 */
@Controller
@RequestMapping(value = "/doctor/health_record", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,method = {RequestMethod.GET,RequestMethod.POST})
@RequestMapping(value = "/doctor/health_record", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "健康记录")
public class DoctorHealthRecordController extends BaseController {
@ -46,9 +46,9 @@ public class DoctorHealthRecordController extends BaseController {
	 * @param patient 患者标识
	 * @return
	 */
	@RequestMapping(value = "recent")
	@ResponseBody
	@RequestMapping(value = "recent",method = RequestMethod.GET)
	@ApiOperation("根据患者标志获取最近的保健记录")
	@ResponseBody
	public String recent(@ApiParam(name="patient",value="患者代码",defaultValue = "P20160901001")
									 @RequestParam(value="patient",required = true) String patient) {
		try {
@ -70,7 +70,7 @@ public class DoctorHealthRecordController extends BaseController {
	 * @param pagesize 分页大小
	 * @return
	 */
	@RequestMapping(value = "list_sports")
	@RequestMapping(value = "list_sports",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("获取患者运动记录")
	public String sports(@ApiParam(name="patient",value="患者代码",defaultValue = "P20160901001")
@ -123,7 +123,7 @@ public class DoctorHealthRecordController extends BaseController {
	 * @param pagesize 分页大小
	 * @return
	 */
	@RequestMapping(value = "list_medication")
	@RequestMapping(value = "list_medication",method = {RequestMethod.POST,RequestMethod.GET})
	@ResponseBody
	@ApiOperation("获取患者用药记录")
	public String medication(@ApiParam(name="patient",value="患者代码",defaultValue = "P20160901001")
@ -180,7 +180,8 @@ public class DoctorHealthRecordController extends BaseController {
	 * @param pagesize 分页大小
	 * @return
	 */
	@RequestMapping(value = "list_diet")
	@RequestMapping(value = "list_diet",method = RequestMethod.POST)
	@ApiOperation("饮食记录查询接口")
	@ResponseBody
	public String diet(@ApiParam(name = "patient", value = "患者代码", defaultValue = "P20160901001")
						   @RequestParam(value="patient",required = true)String patient,

+ 7 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/intervene/DoctorInterveneController.java

@ -7,6 +7,7 @@ import java.util.List;
import com.yihu.wlyy.aop.ObserverRequired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -57,6 +58,7 @@ public class DoctorInterveneController extends BaseController {
	 */
	@RequestMapping(value = "devices")
	@ResponseBody
	@ApiOperation("患者可用设备查询接口")
	public String devices(String patient) {
		try {
			JSONArray array = new JSONArray();
@ -91,6 +93,7 @@ public class DoctorInterveneController extends BaseController {
	@RequestMapping(value = "self_exam")
	@ResponseBody
	@ObserverRequired
	@ApiOperation("添加患者自查接口")
	public String selfExam(@RequestParam(required = false) Integer type, @RequestParam(required = false) String consult, String patient, String devices) {
		try {
			Doctor doctor = doctorService.findDoctorByCode(getUID());
@ -166,6 +169,7 @@ public class DoctorInterveneController extends BaseController {
	@RequestMapping(value = "inspection")
	@ResponseBody
	@ObserverRequired
	@ApiOperation("添加检查建议接口")
	public String inspection(int type, String consult, String patient, String suggest) {
		try {
			// 查询医生信息
@ -205,6 +209,7 @@ public class DoctorInterveneController extends BaseController {
	 */
	@RequestMapping(value = "inspection_list")
	@ResponseBody
	@ApiOperation("患者检查建议查询接口")
	public String inspection(String patient, long id, int pagesize) {
		try {
			Page<PatientInspectionSuggest> list = patientInspectionService.findPatientSuggestByDoctor(getUID(), patient, id, pagesize);
@ -237,6 +242,7 @@ public class DoctorInterveneController extends BaseController {
	 */
	@RequestMapping(value = "self_exam_list")
	@ResponseBody
	@ApiOperation("查询指定患者的体测提醒")
	public String selfExamList(String patient, long id, int pagesize) {
		try {
			Page<PatientSelfInspection> list = patientInspectionService.findPatientByDoctor(getUID(), patient, id, pagesize);
@ -269,6 +275,7 @@ public class DoctorInterveneController extends BaseController {
	 */
	@RequestMapping(value = "self_exam_info")
	@ResponseBody
	@ApiOperation("查询体检提醒信息")
	public String selfExamInfo(String inspection) {
		try {
			List<PatientSelfInspectionItem> list = patientInspectionService.findSelfExamInfo(inspection);