|
@ -6,11 +6,13 @@ import com.yihu.wlyy.entity.dict.SystemDict;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.followup.Followup;
|
|
|
import com.yihu.wlyy.entity.followup.FollowupContent;
|
|
|
import com.yihu.wlyy.entity.followup.FollowupMapping;
|
|
|
import com.yihu.wlyy.entity.message.Message;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.followup.FollowUpDao;
|
|
|
import com.yihu.wlyy.repository.followup.FollowUpMappingDao;
|
|
|
import com.yihu.wlyy.repository.followup.FollowupContentDao;
|
|
|
import com.yihu.wlyy.repository.message.MessageDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
@ -82,6 +84,8 @@ public class FollowUpService extends BaseService {
|
|
|
private PatientService patientService;
|
|
|
@Autowired
|
|
|
private PushMsgTask pushMsgTask;
|
|
|
@Autowired
|
|
|
private FollowUpMappingDao followUpMappingDao;
|
|
|
|
|
|
|
|
|
/**
|
|
@ -267,7 +271,7 @@ public class FollowUpService extends BaseService {
|
|
|
}else{
|
|
|
if(objArr[4].toString().equals("1")){
|
|
|
followup.put("followupClassName", "高血压");
|
|
|
}else if(objArr[4].toString().equals("1")){
|
|
|
}else if(objArr[4].toString().equals("2")){
|
|
|
followup.put("followupClassName", "糖尿病");
|
|
|
}else if(objArr[4].toString().equals("1,2")){
|
|
|
followup.put("followupClassName", "高血压,糖尿病");
|
|
@ -406,6 +410,32 @@ public class FollowUpService extends BaseService {
|
|
|
//计划下次随访时间--huangwenjie.2017.10.19
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
followup.setFollowupType(followupType);
|
|
|
followup.setFollowupClass(followupClass);
|
|
@ -490,10 +520,24 @@ public class FollowUpService extends BaseService {
|
|
|
Followup followup = followupDao.findOne(Long.valueOf(id));
|
|
|
if (followup != null) {
|
|
|
followup.setStatus("1"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followupDao.save(followup);
|
|
|
|
|
|
//上传随访计划
|
|
|
new Thread(new FollowupUploadTask(String.valueOf(followup.getId()))).start();
|
|
|
followup = followupDao.save(followup);
|
|
|
|
|
|
//上传随访计划映射表记录
|
|
|
FollowupMapping followupMapping = followUpMappingDao.findByFollowupId(Integer.parseInt(String.valueOf(followup.getId())));
|
|
|
|
|
|
if(followupMapping == null){
|
|
|
followupMapping = new FollowupMapping();
|
|
|
}
|
|
|
|
|
|
followupMapping.setFollowupId(Integer.parseInt(String.valueOf(followup.getId())));
|
|
|
followupMapping.setCode(UUID.randomUUID().toString());
|
|
|
followupMapping.setCreateTime(DateUtil.getNowTimestamp());
|
|
|
followupMapping.setUpdateTime(DateUtil.getNowTimestamp());
|
|
|
followupMapping.setNeedUpload(1);
|
|
|
|
|
|
followUpMappingDao.save(followupMapping);
|
|
|
|
|
|
// new Thread(new FollowupUploadTask(String.valueOf(followup.getId()))).start();
|
|
|
} else {
|
|
|
throw new Exception("not exit follow:" + id + ".\r\n");
|
|
|
}
|