This commit is contained in:
LiJianZhao 2025-05-19 12:12:07 +08:00
parent d7906160d2
commit 9858ed6ca3
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ public class PatientInfoService extends BaseService {
public void create(PatientInfo patientInfo) {
patientInfo.setCreateDatetime(LocalDateTime.now());
Integer exp = patientInfo.getExp();
if (patientInfo.getBirthday() != null) {
if (patientInfo.getAge() == null &&patientInfo.getBirthday() != null) {
int currentYear = LocalDate.now().getYear();
int birthYear = patientInfo.getBirthday().getYear();
patientInfo.setAge(currentYear - birthYear);