|
@ -25,6 +25,7 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
|
|
|
import com.yihu.jw.hospital.task.PushMsgTask;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.patient.service.BasePatientService;
|
|
|
import com.yihu.jw.rehabilitation.ServiceItemPlanDao;
|
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
|
import com.yihu.jw.util.idcard.IdCardUtil;
|
|
@ -83,24 +84,16 @@ public class FollowUpService {
|
|
|
|
|
|
@Autowired
|
|
|
private WlyyHospitalSysDictDao hospitalSysDictDao;
|
|
|
|
|
|
// @Autowired
|
|
|
// private DrHealthTeamService drHealthTeamService;
|
|
|
|
|
|
@Autowired
|
|
|
private SystemMessageDao messageDao;
|
|
|
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
@Autowired
|
|
|
private BasePatientService patientService;
|
|
|
@Autowired
|
|
|
private PushMsgTask pushMsgTask;
|
|
|
@Autowired
|
|
|
private RehabilitationManageService rehabilitationManageService;
|
|
|
@Autowired
|
|
|
private FollowupDrugsDao followupDrugsDao;
|
|
|
private ServiceItemPlanDao serviceItemPlanDao;
|
|
|
|
|
|
@Autowired
|
|
|
private HttpClientUtil httpClientUtil;
|
|
@ -658,40 +651,18 @@ public class FollowUpService {
|
|
|
if (followup.getStatus().compareTo("2") == 0) {
|
|
|
followup.setFollowupNo(followupNo);
|
|
|
followup.setFollowupDate(DateUtil.strToDate(date));
|
|
|
|
|
|
//计划下次随访时间--huangwenjie.2017.10.19
|
|
|
if (StringUtils.isNoneBlank(plandate)) {
|
|
|
ServiceItemPlanDO itemPlanDO = serviceItemPlanDao.findByRelationCode(id);
|
|
|
ServiceItemPlanDO serviceItemPlanDO = serviceItemPlanDao.findByPlanIdAndPlanDetailIdAndPlanTime(itemPlanDO.getPlanId(), itemPlanDO.getPlanDetailId(), followup.getFollowupNextDate());
|
|
|
followup.setFollowupNextDate(DateUtil.strToDate(plandate));
|
|
|
Followup nextFollowup = new Followup();
|
|
|
nextFollowup.setDataFrom(followup.getDataFrom());
|
|
|
nextFollowup.setStatus("2");
|
|
|
nextFollowup.setFollowupType(followupType);
|
|
|
nextFollowup.setFollowupNo(followup.getFollowupNo());
|
|
|
Followup nextFollowup = followupDao.findById(Long.valueOf(serviceItemPlanDO.getRelationCode())).orElse(null);
|
|
|
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());
|
|
|
nextFollowup.setType(1);
|
|
|
//获取随访医生角色类型
|
|
|
// List<DoctorMapping> doctorMapping = doctorMappingDao.findListByDoctorCode(followup.getDoctorCode());
|
|
|
// if (doctorMapping.size() == 1 && StringUtils.isNotBlank(doctorMapping.get(0).getJwDoctorWorkType())) {
|
|
|
// nextFollowup.setJwDoctorWorkType(doctorMapping.get(0).getJwDoctorWorkType());
|
|
|
// }
|
|
|
serviceItemPlanDO.setPlanTime(plandate);
|
|
|
followupDao.save(nextFollowup);
|
|
|
serviceItemPlanDao.save(serviceItemPlanDO);
|
|
|
|
|
|
}
|
|
|
followup.setFollowupType(followupType);
|
|
@ -699,17 +670,6 @@ public class FollowUpService {
|
|
|
followup.setFollowupManagerStatus(followupManagerStatus);
|
|
|
followup.setStatus("3"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup.setPrescriptionCode(prescriptioncode);
|
|
|
|
|
|
// if (StringUtils.isNoneBlank(prescriptioncode)) {
|
|
|
// try {
|
|
|
// Prescription prescription = prescriptionDao.findByCode(prescriptioncode);
|
|
|
//// prescription.setViewSuifang(1);
|
|
|
// prescriptionDao.save(prescription);
|
|
|
// } catch (Exception e) {
|
|
|
// logger.info(e.getMessage());
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
Followup f = followupDao.save(followup);
|
|
|
System.out.println("随访状态status" + f.getStatus());
|
|
|
return f;
|