修复了在新建患者信息时就诊卡号无法录入的问题,并且修改了前端页面添加中医诊断表单宽度过大的问题。

This commit is contained in:
April
2026-01-09 11:47:39 +08:00
parent 58936c957d
commit fbd7f0be78
5 changed files with 22 additions and 17 deletions

View File

@@ -45,9 +45,9 @@ public interface IPatientInformationService {
/**
* 添加病人信息
*
* @param patientInfoDto 病人信息
* @param patientBaseInfoDto 病人信息
*/
R<?> addPatient(PatientBaseInfoDto patientInfoDto);
R<?> addPatient(PatientBaseInfoDto patientBaseInfoDto);
/**
* 更新患者手机号

View File

@@ -254,31 +254,32 @@ public class PatientInformationServiceImpl implements IPatientInformationService
/**
* 添加病人信息
*
* @param patientInfoDto 病人信息
* @param patientBaseInfoDto 病人信息
*/
@Override
public R<?> addPatient(PatientBaseInfoDto patientInfoDto) {
public R<?> addPatient(PatientBaseInfoDto patientBaseInfoDto) {
// log.debug("添加病人信息,patientInfoDto:{}", patientBaseInfoDto);
// 如果患者没有输入身份证号则根据年龄自动生成
String idCard = patientInfoDto.getIdCard();
String idCard = patientBaseInfoDto.getIdCard();
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
if (patientInfoDto.getAge() != null) {
idCard = IdCardUtil.generateIdByAge(patientInfoDto.getAge());
patientInfoDto.setIdCard(idCard);
if (patientBaseInfoDto.getAge() != null) {
idCard = IdCardUtil.generateIdByAge(patientBaseInfoDto.getAge());
patientBaseInfoDto.setIdCard(idCard);
}
}
// 身份证号是否存在
List<Patient> idCardList
= patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientInfoDto.getIdCard()));
= patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientBaseInfoDto.getIdCard()));
if (!idCardList.isEmpty()) {
throw new ServiceException("身份证号:" + patientInfoDto.getIdCard() + "已经存在");
throw new ServiceException("身份证号:" + patientBaseInfoDto.getIdCard() + "已经存在");
}
// 处理患者信息
Patient patient = this.handlePatientInfo(patientInfoDto);
Patient patient = this.handlePatientInfo(patientBaseInfoDto);
// 新增患者身份子表信息
if (patientInfoDto.getPatientIdInfoList() != null) {
List<PatientIdInfoDto> patientIdInfoList = patientInfoDto.getPatientIdInfoList();
if (patientBaseInfoDto.getPatientIdInfoList() != null) {
List<PatientIdInfoDto> patientIdInfoList = patientBaseInfoDto.getPatientIdInfoList();
PatientIdentifier patientIdentifier;
for (PatientIdInfoDto patientIdInfoDto : patientIdInfoList) {
patientIdentifier = new PatientIdentifier();

View File

@@ -38,11 +38,12 @@ public class PatientInformationController {
/**
* 添加病人信息
*
* @param patientInfoDto 病人信息
* @param patientBaseInfoDto 病人信息
*/
@PostMapping("/patient-information")
public R<?> addPatient(@RequestBody PatientBaseInfoDto patientInfoDto) {
return patientInformationService.addPatient(patientInfoDto);
public R<?> addPatient(@RequestBody PatientBaseInfoDto patientBaseInfoDto) {
// log.debug("添加病人信息,patientInfoDto:{}", patientBaseInfoDto);
return patientInformationService.addPatient(patientBaseInfoDto);
}
/**