|
@ -646,7 +646,6 @@ public class DoctorInfoService extends BaseService {
|
|
|
public void updateTeamHealthDoctor(String newDoctorCode, String oldDoctorCode, String patient) throws Exception {
|
|
|
//得到患者的签约信息
|
|
|
SignFamily signFamily = signFamilyDao.findByPatient(patient);
|
|
|
String groupCode = "";
|
|
|
if (StringUtils.isNoneBlank(oldDoctorCode)) {
|
|
|
ConsultTeam consultTeam = consultTeamDao.findByParientCodeAndSignTypeAndDoctor(patient, oldDoctorCode, 2);
|
|
|
if (consultTeam != null) {
|
|
@ -654,19 +653,10 @@ public class DoctorInfoService extends BaseService {
|
|
|
}
|
|
|
//修改医生服务团队 删除旧的健康管理师
|
|
|
DoctorTeamMember doctorTeamMember = doctorTeamDoctor.findMemberByTeamAndCode(signFamily.getTeamCode(), oldDoctorCode);
|
|
|
doctorTeamMember.setDel("0");
|
|
|
//把患者移除旧的健康管理师的患者表
|
|
|
List<DoctorPatientGroupInfo> oldDoctorPatientGroupInfos = doctorPatientGroupInfoDao.findByPatientAndDoctor(patient, oldDoctorCode);
|
|
|
for (DoctorPatientGroupInfo doctorPatientGroupInfo : oldDoctorPatientGroupInfos) {
|
|
|
doctorPatientGroupInfo.setCzrq(new Date());
|
|
|
doctorPatientGroupInfo.setStatus(0);//设置为无效
|
|
|
//保存原来旧的分组
|
|
|
if (Integer.valueOf(doctorPatientGroupInfo.getGroup()) < 4) {
|
|
|
groupCode = doctorPatientGroupInfo.getGroup() + "";
|
|
|
}
|
|
|
if (doctorTeamMember != null) {
|
|
|
doctorTeamMember.setDel("0");
|
|
|
}
|
|
|
}
|
|
|
Patient patientObj = patientDao.findByCode(patient);
|
|
|
Doctor newD = doctorDao.findByCode(newDoctorCode);
|
|
|
//修改签约中的健康管理师
|
|
|
signFamily.setDoctorHealth(newD.getCode());
|
|
@ -683,19 +673,6 @@ public class DoctorInfoService extends BaseService {
|
|
|
newDoctorTeamMember.setDel("1");
|
|
|
newDoctorTeamMember.setCode(UUID.randomUUID().toString().replace("-", ""));
|
|
|
doctorTeamDoctor.save(newDoctorTeamMember);
|
|
|
|
|
|
//把患者加到新的健康管理师的患者表
|
|
|
DoctorPatientGroupInfo doctorPatientGroupInfo = new DoctorPatientGroupInfo();
|
|
|
doctorPatientGroupInfo.setCzrq(new Date());
|
|
|
doctorPatientGroupInfo.setDoctor(newDoctorCode);
|
|
|
doctorPatientGroupInfo.setStatus(1);
|
|
|
doctorPatientGroupInfo.setPatient(patientObj.getCode());
|
|
|
doctorPatientGroupInfo.setPname(patientObj.getName());
|
|
|
doctorPatientGroupInfo.setPartAmount(0);
|
|
|
doctorPatientGroupInfo.setGroup(groupCode);//默认健康分组
|
|
|
doctorPatientGroupInfo.setQyrq(new Date());
|
|
|
doctorPatientGroupInfo.setSignType("2");//家庭签约
|
|
|
doctorPatientGroupInfoDao.save(doctorPatientGroupInfo);
|
|
|
}
|
|
|
|
|
|
public void updateTeamHealthDoctors(String newDoctorCode, String oldDoctorCode, String patients) throws Exception {
|