hzp 8 anni fa
parent
commit
e366c22390

+ 10 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/Patient.java

@ -45,6 +45,8 @@ public class Patient extends IdEntity implements Serializable {
	private Integer sex;
	// 手機號
	private String mobile;
	// (基卫)手機號
	private String mobileRemarks;
	// 聯繫電話
	private String phone;
	// 社保卡號
@ -334,4 +336,12 @@ public class Patient extends IdEntity implements Serializable {
	public void setLabelInfos(List<SignPatientLabelInfo> labelInfos) {
		this.labelInfos = labelInfos;
	}
	public String getMobileRemarks() {
		return mobileRemarks;
	}
	public void setMobileRemarks(String mobileRemarks) {
		this.mobileRemarks = mobileRemarks;
	}
}

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

@ -16,6 +16,7 @@ import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.service.system.SystemDictService;
import com.yihu.wlyy.task.FollowupUploadTask;
import com.yihu.wlyy.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
@ -67,6 +68,12 @@ public class FollowUpService extends BaseService {
			re.put("patientCode",patientCode);
			re.put("patientName",patient.getName());
			re.put("idcard",patient.getIdcard());
			String mobile = patient.getMobile();
			if(StringUtils.isEmpty(mobile))
			{
				mobile = patient.getMobileRemarks();
			}
			re.put("mobile", mobile);
			re.put("sex",String.valueOf(patient.getSex()));
			re.put("birthday",DateUtil.dateToStrLong(patient.getBirthday()));
			re.put("photo",patient.getPhoto());
@ -209,6 +216,25 @@ public class FollowUpService extends BaseService {
		}
	}
	/**
	 *编辑随访计划
	 */
	public void editFollowupPlan(String doctorCode,String id,String date,String followupType) throws Exception {
		Followup followup = followupDao.findOne(Long.valueOf(id));
		if(followup!=null)
		{
			followup.setFollowupDate(DateUtil.strToDate(date));
			followup.setFollowupType(followupType);
			followup.setCreater(doctorCode);
			followupDao.save(followup);
		}
		else{
			throw new Exception("not exit follow:"+id+".\r\n");
		}
	}
	/**
	 *开始随访记录
	 */

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

@ -95,6 +95,23 @@ public class DoctorFollowUpController extends BaseController {
		}
	}
	@ApiOperation("编辑随访计划")
	@RequestMapping(value = "/editFollowupPlan", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
	@ResponseBody
	public String editFollowupPlan(@ApiParam(name="id",value="随访记录ID",defaultValue = "")
								@RequestParam(value="id",required = true) String id,
								@ApiParam(name="date",value="随访时间",defaultValue = "2016-12-14 20:00:00")
								@RequestParam(value="date",required = true) String date,
								@ApiParam(name="followupType",value="随访方式【字典FOLLOWUP_WAY_DICT】",defaultValue = "12")
								@RequestParam(value="followupType",required = true) String followupType) {
		try {
			followUpService.editFollowupPlan(getUID(),id,date,followupType);
			return write(200, "编辑随访计划成功!");
		} catch (Exception e) {
			return invalidUserException(e, -1, "编辑随访计划失败!"+e.getMessage());
		}
	}
	@ApiOperation("开始随访记录")
	@RequestMapping(value = "/startFollowup", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)