|
|
@ -205,9 +205,19 @@ public class AppController extends BaseController
|
|
|
|
logger.info("add patient param is {} ", appPatientReq);
|
|
|
|
logger.info("add patient param is {} ", appPatientReq);
|
|
|
|
TPatient tPatient = new TPatient();
|
|
|
|
TPatient tPatient = new TPatient();
|
|
|
|
BeanUtils.copyProperties(appPatientReq, tPatient);
|
|
|
|
BeanUtils.copyProperties(appPatientReq, tPatient);
|
|
|
|
if (UserConstants.NOT_UNIQUE.equals(tPatientService.checkPhoneUnique(tPatient.getPhone())))
|
|
|
|
// 查询患者信息
|
|
|
|
|
|
|
|
TPatient currentPatient = tPatientService.queryTPatient(tPatient);
|
|
|
|
|
|
|
|
if (Objects.nonNull(currentPatient))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return AjaxResult.error("手机号已注册");
|
|
|
|
//患者信息已存在 新增诊断记录
|
|
|
|
|
|
|
|
TRecord tRecord = new TRecord();
|
|
|
|
|
|
|
|
tRecord.setHospitalId(appPatientReq.getHospitalId());
|
|
|
|
|
|
|
|
tRecord.setPatientId(currentPatient.getId());
|
|
|
|
|
|
|
|
tRecord.setDoctorId(appPatientReq.getDoctorId());
|
|
|
|
|
|
|
|
tRecord.setStatus("0");
|
|
|
|
|
|
|
|
tRecord.setCreateBy(getUsername());
|
|
|
|
|
|
|
|
tRecordService.insertTRecord(tRecord);
|
|
|
|
|
|
|
|
return AjaxResult.success("手机号已注册");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tPatientService.insertTPatient(tPatient);
|
|
|
|
tPatientService.insertTPatient(tPatient);
|
|
|
|
Long identifier = 10000000L + tPatient.getId();
|
|
|
|
Long identifier = 10000000L + tPatient.getId();
|
|
|
|