Browse Source

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

yeshijie 7 years ago
parent
commit
f87f55c2c9

+ 32 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -21,7 +21,6 @@ import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.team.DrHealthTeamService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.system.SystemDictService;
import com.yihu.wlyy.task.FollowupUploadTask;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
@ -451,7 +450,7 @@ public class FollowUpService extends BaseService {
    /**
     * 新增临时随访记录(返回ID)
     */
    public String addFollowup(String doctorCode, String patientCode, String date, String followupType, String followupClass, String followupManagerStatus) throws Exception {
    public String addFollowup(String doctorCode, String patientCode, String date, String followupType, String followupClass, String followupManagerStatus,String plandate) throws Exception {
        String re = "";
        //获取医生信息
@ -495,6 +494,37 @@ public class FollowUpService extends BaseService {
        //保存质询code
        followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
        //计划下次随访时间--ysj.2017.10.26
        if(StringUtils.isNoneBlank(plandate)){
            followup.setFollowupNextDate(DateUtil.strToDate(plandate));
            Followup nextFollowup = new Followup();
            nextFollowup.setDataFrom(followup.getDataFrom());
            nextFollowup.setStatus("2");
            nextFollowup.setFollowupType(followupType);
            nextFollowup.setFollowupNo(followup.getFollowupNo());
            nextFollowup.setFollowupDate(DateUtil.strToDate(plandate));
            nextFollowup.setFollowupPlanDate(DateUtil.strToDate(plandate));
            nextFollowup.setJwdoctorCode(followup.getJwdoctorCode());
            nextFollowup.setJworgCode(followup.getJworgCode());
            nextFollowup.setOrgCode(followup.getOrgCode());
            nextFollowup.setOrgName(followup.getOrgName());
            nextFollowup.setCreater(followup.getCreater());
            nextFollowup.setSignCode(followup.getSignCode());
            nextFollowup.setAdminTeamCode(followup.getAdminTeamCode());
            nextFollowup.setFollowupClass(followupClass);
            nextFollowup.setFollowupManagerStatus(followupManagerStatus);
            nextFollowup.setPatientName(followup.getPatientName());
            nextFollowup.setPatientCode(followup.getPatientCode());
            nextFollowup.setCreateTime(new Date());
            nextFollowup.setUpdateTime(new Date());
            nextFollowup.setDoctorCode(followup.getDoctorCode());
            nextFollowup.setDoctorName(followup.getDoctorName());
            nextFollowup.setIdcard(followup.getIdcard());
            nextFollowup.setSignType(followup.getSignType());
            followupDao.save(nextFollowup);
        }
        followupDao.save(followup);
        re = String.valueOf(followup.getId());
        return re;

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

@ -192,9 +192,11 @@ public class DoctorFollowUpController extends BaseController {
                              @ApiParam(name = "followupClass", value = "随访类别【1.高血压 2.糖尿病】", defaultValue = "1")
                              @RequestParam(value = "followupClass", required = true) String followupClass,
                              @ApiParam(name = "followupManagerStatus", value = "随访管理状态【字典FOLLOWUP_MANAGER_STATUS】", defaultValue = "1")
                              @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus) {
                              @RequestParam(value = "followupManagerStatus", required = false) String followupManagerStatus,
                              @ApiParam(name = "plandate", value = "下次随访时间", defaultValue = "2016-12-14 20:00:00")
                              @RequestParam(value = "plandate", required = false) String plandate) {
        try {
            String response = followUpService.addFollowup(getUID(), patient, date, followupType, followupClass, followupManagerStatus);
            String response = followUpService.addFollowup(getUID(), patient, date, followupType, followupClass, followupManagerStatus,plandate);
            return write(200, "新增临时随访记录成功!", "data", response);
        } catch (Exception e) {