|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.es.entity.FollowupContentESDO;
|
|
|
import com.yihu.wlyy.config.es.ElasticFactory;
|
|
|
import com.yihu.wlyy.config.es.ElastricSearchSave;
|
|
|
import com.yihu.wlyy.entity.concern.ConcernDO;
|
|
|
import com.yihu.wlyy.entity.dict.SystemDict;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.followup.Followup;
|
|
@ -24,6 +25,7 @@ import com.yihu.wlyy.repository.message.MessageDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.service.BaseService;
|
|
|
import com.yihu.wlyy.service.app.concern.ConcernService;
|
|
|
import com.yihu.wlyy.service.app.message.MessageService;
|
|
|
import com.yihu.wlyy.service.app.team.DrHealthTeamService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
@ -125,6 +127,8 @@ public class FollowUpService extends BaseService {
|
|
|
private ElastricSearchSave elastricSearchSave;
|
|
|
@Autowired
|
|
|
private MessageService messageService;
|
|
|
@Autowired
|
|
|
private ConcernService concernService;
|
|
|
|
|
|
/**
|
|
|
* 转译随访信息
|
|
@ -378,13 +382,7 @@ public class FollowUpService extends BaseService {
|
|
|
if (patient == null) {
|
|
|
throw new Exception("not exit patient:" + patientCode + ".\r\n");
|
|
|
}
|
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
|
|
|
if (signFamily == null) {
|
|
|
signFamily = signFamilyDao.findBySanshiPatient(patientCode);
|
|
|
if (signFamily == null) {
|
|
|
throw new Exception("can not find patient's family sign info");
|
|
|
}
|
|
|
}
|
|
|
ConcernDO concern = concernService.getByDoctorAndPatient(doctorCode,patientCode);
|
|
|
|
|
|
List<Followup> followupPlan = new ArrayList<>();
|
|
|
for (Map<String, String> map : list) {
|
|
@ -410,7 +408,7 @@ public class FollowUpService extends BaseService {
|
|
|
followup.setStatus("2"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup.setCreateTime(new Date());
|
|
|
followup.setCreater(doctorCode);
|
|
|
followup.setAdminTeamCode(signFamily.getAdminTeamId());
|
|
|
followup.setAdminTeamCode(concern.getTeamCode());
|
|
|
followup.setSignType(2);
|
|
|
|
|
|
//新增签约保存CODE
|
|
@ -509,12 +507,8 @@ public class FollowUpService extends BaseService {
|
|
|
if (patient == null) {
|
|
|
throw new Exception("not exit patient:" + patientCode + ".\r\n");
|
|
|
}
|
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
|
|
|
if (signFamily == null) {
|
|
|
signFamily = signFamilyDao.findBySanshiPatient(patientCode);
|
|
|
if (signFamily == null)
|
|
|
throw new Exception("can not find patient's family sign info");
|
|
|
}
|
|
|
ConcernDO concern = concernService.getByDoctorAndPatient(doctorCode,patientCode);
|
|
|
|
|
|
|
|
|
Followup followup = new Followup();
|
|
|
Date followDate = DateUtil.strToDate(date);
|
|
@ -534,7 +528,7 @@ public class FollowUpService extends BaseService {
|
|
|
followup.setStatus("2"); //状态 0取消 1已完成 2未开始 3进行中
|
|
|
followup.setCreateTime(new Date());
|
|
|
followup.setCreater(doctorCode);
|
|
|
followup.setAdminTeamCode(signFamily.getAdminTeamId());
|
|
|
followup.setAdminTeamCode(concern.getTeamCode());
|
|
|
followup.setSignType(2);
|
|
|
//保存质询code
|
|
|
followup.setSignCode(patientService.getSignCodeByPatient(patientCode));
|