|
@ -240,6 +240,7 @@ public class ConsultTeamService extends ConsultService {
|
|
|
*/
|
|
|
public boolean exist(String patient, Integer type) throws Exception {
|
|
|
DoctorTeamMember member = null;
|
|
|
String memberCode=null;
|
|
|
// 咨询三师
|
|
|
if (type == 1) {
|
|
|
// 查询三师签约信息
|
|
@ -256,26 +257,33 @@ public class ConsultTeamService extends ConsultService {
|
|
|
if (member == null) {
|
|
|
member = doctorTeamDoctor.findDoctorSanshi2ByTeam(doctorTeam.getCode(), 2);
|
|
|
}
|
|
|
memberCode= member.getCode();
|
|
|
} else if (type == 2) {
|
|
|
// 咨询家庭医生
|
|
|
SignFamily sf = signFamilyDao.findByjiatingPatient(patient);
|
|
|
if (sf == null) {
|
|
|
throw new Exception("不存在家庭签约");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(sf.getDoctorHealth())){
|
|
|
memberCode = sf.getDoctor();
|
|
|
}else {
|
|
|
memberCode = sf.getDoctorHealth();
|
|
|
}
|
|
|
|
|
|
// 设置健康管理师,家庭医生咨询默认给健康管理师处理
|
|
|
//查找病人所在的团队
|
|
|
DoctorTeam doctorTeam = doctorTeamDao.findByParientCode(patient);
|
|
|
//得到团队的健康管理师
|
|
|
member = doctorTeamDoctor.findDoctorJiating2ByTeam(doctorTeam.getCode(), 3);
|
|
|
|
|
|
if (member == null) {
|
|
|
member = doctorTeamDoctor.findDoctorJiating2ByTeam(doctorTeam.getCode(), 2);
|
|
|
}
|
|
|
// DoctorTeam doctorTeam = doctorTeamDao.findByParientCode(patient);
|
|
|
// //得到团队的健康管理师
|
|
|
// member = doctorTeamDoctor.findDoctorJiating2ByTeam(doctorTeam.getCode(), 3);
|
|
|
//
|
|
|
// if (member == null) {
|
|
|
// member = doctorTeamDoctor.findDoctorJiating2ByTeam(doctorTeam.getCode(), 2);
|
|
|
// }
|
|
|
}
|
|
|
if (member == null) {
|
|
|
throw new Exception("找不到签约服务团队医生");
|
|
|
}
|
|
|
int count = consultTeamDao.countByPatient(patient, member.getMemberCode());
|
|
|
int count = consultTeamDao.countByPatient(patient, memberCode);
|
|
|
return count > 0;
|
|
|
}
|
|
|
|