|
@ -451,7 +451,11 @@ public class ScreeningServiceImpl implements IScreeningService { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
PmsPatientExample pmsPatientExample = new PmsPatientExample(); |
|
|
PmsPatientExample pmsPatientExample = new PmsPatientExample(); |
|
|
|
|
|
if (StrUtil.isEmpty(param.getName()) && StrUtil.isEmpty(param.getPhone())) { |
|
|
pmsPatientExample.createCriteria().andNameEqualTo(scrScreeningDetail.getAnswer()).andPhoneEqualTo(scrScreeningDetail1.getAnswer()); |
|
|
pmsPatientExample.createCriteria().andNameEqualTo(scrScreeningDetail.getAnswer()).andPhoneEqualTo(scrScreeningDetail1.getAnswer()); |
|
|
|
|
|
}else { |
|
|
|
|
|
pmsPatientExample.createCriteria().andNameEqualTo(param.getName()).andPhoneEqualTo(param.getPhone()); |
|
|
|
|
|
} |
|
|
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample); |
|
|
List<PmsPatient> pmsPatients = pmsPatientMapper.selectByExample(pmsPatientExample); |
|
|
if (CollectionUtil.isEmpty(pmsPatients)) { |
|
|
if (CollectionUtil.isEmpty(pmsPatients)) { |
|
|
PmsPatient pmsPatient = new PmsPatient(); |
|
|
PmsPatient pmsPatient = new PmsPatient(); |
|
@ -477,6 +481,28 @@ public class ScreeningServiceImpl implements IScreeningService { |
|
|
pmsPatient.setDelFlag((byte) 0); |
|
|
pmsPatient.setDelFlag((byte) 0); |
|
|
pmsPatient.setCreateTime(new Date()); |
|
|
pmsPatient.setCreateTime(new Date()); |
|
|
pmsPatientMapper.insertSelective(pmsPatient); |
|
|
pmsPatientMapper.insertSelective(pmsPatient); |
|
|
|
|
|
}else { |
|
|
|
|
|
PmsPatient pmsPatient = pmsPatients.get(0); |
|
|
|
|
|
pmsPatient.setPhone(scrScreeningDetail1.getAnswer()); |
|
|
|
|
|
pmsPatient.setName(scrScreeningDetail.getAnswer()); |
|
|
|
|
|
if (ObjectUtil.isNotNull(map.get("SCWJ-BIRTH"))) { |
|
|
|
|
|
pmsPatient.setBirthDate(DateUtil.parse(map.get("SCWJ-BIRTH").getAnswer())); |
|
|
|
|
|
} |
|
|
|
|
|
if (ObjectUtil.isNotNull(map.get("SCWJ-SEX"))) { |
|
|
|
|
|
pmsPatient.setGender(map.get("SCWJ-SEX").getAnswer().equals("男") ? (byte) 0 : (byte) 1); |
|
|
|
|
|
} |
|
|
|
|
|
pmsPatient.setTenantId(detail.getTenantId()); |
|
|
|
|
|
pmsPatient.setPinyinSimple(PinyinUtil.getFirstLetter(pmsPatient.getName(), "")); |
|
|
|
|
|
pmsPatient.setPinyinFull(PinyinUtil.getPinyin(pmsPatient.getName())); |
|
|
|
|
|
if (ObjectUtil.isNotNull(map.get("SCWJ-XBS"))) { |
|
|
|
|
|
pmsPatient.setCurrentIllnessHistory(map.get("SCWJ-XBS").getAnswer()); |
|
|
|
|
|
} |
|
|
|
|
|
if (ObjectUtil.isNotNull(map.get("SCWJ-XBS-QT"))) { |
|
|
|
|
|
pmsPatient.setCurrentIllnessHistory(map.get("SCWJ-XBS-QT").getAnswer()); |
|
|
|
|
|
} |
|
|
|
|
|
pmsPatient.setSource((byte) 0); |
|
|
|
|
|
pmsPatient.setUpdateTime(new Date()); |
|
|
|
|
|
pmsPatientMapper.updateByPrimaryKeySelective(pmsPatient); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|