版本更新

This commit is contained in:
Zhang.WH
2025-10-16 17:17:24 +08:00
parent d23a594a4b
commit f515bb8fbb
600 changed files with 7881 additions and 35954 deletions

View File

@@ -166,22 +166,13 @@ public class PatientInformationServiceImpl implements IPatientInformationService
public R<?> editPatient(PatientInformationDto patientInformationDto) {
// 如果患者没有输入身份证号则根据年龄自动生成
String idCard = patientInformationDto.getIdCard();
Date birthday = null;
// if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
// Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
// }
if (idCard != null && !idCard.isEmpty()) {
birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
if (patientInformationDto.getAge() != null) {
idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
}
}
// if(idCard==null&&patientInformationDto.getAge() != null)
// {
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
// birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
// }
Patient patient = new Patient();
BeanUtils.copyProperties(patientInformationDto, patient);
@@ -232,22 +223,13 @@ public class PatientInformationServiceImpl implements IPatientInformationService
public R<?> addPatient(PatientInformationDto patientInformationDto) {
// 如果患者没有输入身份证号则根据年龄自动生成
String idCard = patientInformationDto.getIdCard();
Date birthday = null;
// if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
// Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
// }
if (idCard != null && !idCard.isEmpty()) {
birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
if (patientInformationDto.getAge() != null) {
idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
Date birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
}
}
// if(idCard==null&&patientInformationDto.getAge() != null)
// {
// idCard = IdCardUtil.generateIdByAge(patientInformationDto.getAge());
// birthday = IdCardUtil.extractBirthdayFromIdCard(idCard);
// patientInformationDto.setIdCard(idCard).setBirthDate(birthday);
// }
Patient patient = new Patient();
BeanUtils.copyProperties(patientInformationDto, patient);
patient.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.PATIENT_NUM.getPrefix(), 10));
@@ -269,9 +251,8 @@ public class PatientInformationServiceImpl implements IPatientInformationService
.setIdentifierNo(patientInformationDto.getIdentifierNo())
// 标识状态默认:常规
.setStateEnum(IdentifierStatusEnum.USUAL.getValue());
boolean resPatId = patientIdentifierService.save(patientIdentifier);
return resPatient && resPatId
boolean result = patientIdentifierService.save(patientIdentifier);
return result
? R.ok(patient, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"病人信息"}))
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"病人信息"}));
}