提交merge1.3

This commit is contained in:
2025-12-27 15:31:06 +08:00
parent cbd3e7f981
commit 79ea4ed4f7
148 changed files with 6722 additions and 10861 deletions

View File

@@ -32,7 +32,7 @@ public interface IPatientInformationService {
* @return 分页查询
*/
IPage<PatientBaseInfoDto> getPatientInfo(PatientBaseInfoDto patientBaseInfoDto, String searchKey, Integer pageNo,
Integer pageSize, HttpServletRequest request);
Integer pageSize, HttpServletRequest request);
/**
* 修改病人信息
@@ -50,20 +50,9 @@ public interface IPatientInformationService {
R<?> addPatient(PatientBaseInfoDto patientInfoDto);
/**
<<<<<<< HEAD
* 检查患者是否存在
*
* @param name 患者姓名
* @param idCardNo 身份证号
* @return 是否存在
*/
boolean checkPatientExists(String name, String idCardNo);
=======
* 更新患者手机号
*
*
* @param patientBaseInfoDto 患者信息
*/
R<?> updatePatientPhone(PatientBaseInfoDto patientBaseInfoDto);
>>>>>>> v1.3
}

View File

@@ -71,48 +71,48 @@ public class PatientInformationServiceImpl implements IPatientInformationService
PatientInfoInitDto initDto = new PatientInfoInitDto();
// 获取婚姻状态列表
List<PatientInfoInitDto.statusEnumOption> maritalStatusOptions = Stream.of(MaritalStatus.values())
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
initDto.setMaritalStatus(maritalStatusOptions);
// 获取职业编码列表
List<PatientInfoInitDto.statusEnumOption> occupationTypeOptions = Stream.of(OccupationType.values())
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
initDto.setOccupationType(occupationTypeOptions);
// 获取性别列表
List<PatientInfoInitDto.statusEnumOption> sexOptions = new ArrayList<>();
sexOptions.add(new PatientInfoInitDto.statusEnumOption(AdministrativeGender.MALE.getValue(),
AdministrativeGender.MALE.getInfo()));
AdministrativeGender.MALE.getInfo()));
sexOptions.add(new PatientInfoInitDto.statusEnumOption(AdministrativeGender.FEMALE.getValue(),
AdministrativeGender.FEMALE.getInfo()));
AdministrativeGender.FEMALE.getInfo()));
initDto.setSex(sexOptions);
// 获取ABO血型列表
List<PatientInfoInitDto.statusEnumOption> bloodTypeABOOptions = Stream.of(BloodTypeABO.values())
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
initDto.setBloodTypeABO(bloodTypeABOOptions);
// 获取RH血型列表
List<PatientInfoInitDto.statusEnumOption> bloodTypeRHOptions = Stream.of(BloodTypeRH.values())
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
initDto.setBloodTypeRH(bloodTypeRHOptions);
// 获取家庭关系列表
List<PatientInfoInitDto.statusEnumOption> familyRelationshipType = Stream.of(FamilyRelationshipType.values())
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
.map(status -> new PatientInfoInitDto.statusEnumOption(status.getValue(), status.getInfo()))
.collect(Collectors.toList());
initDto.setFamilyRelationshipType(familyRelationshipType);
// 获取是/否状态
List<PatientInfoInitDto.statusEnumOption> whetherOptions = new ArrayList<>();
whetherOptions.add(new PatientInfoInitDto.statusEnumOption(PublicationStatus.ACTIVE.getValue(),
PublicationStatus.ACTIVE.getInfo()));
PublicationStatus.ACTIVE.getInfo()));
whetherOptions.add(new PatientInfoInitDto.statusEnumOption(PublicationStatus.RETIRED.getValue(),
PublicationStatus.RETIRED.getInfo()));
PublicationStatus.RETIRED.getInfo()));
initDto.setWhetherStatus(whetherOptions);
return initDto;
@@ -129,26 +129,17 @@ public class PatientInformationServiceImpl implements IPatientInformationService
*/
@Override
public IPage<PatientBaseInfoDto> getPatientInfo(PatientBaseInfoDto patientBaseInfoDto, String searchKey,
Integer pageNo, Integer pageSize, HttpServletRequest request) {
<<<<<<< HEAD
// 构建查询条件 - 添加phone字段到搜索条件中
QueryWrapper<PatientInformationDto> queryWrapper = HisQueryUtils.buildQueryWrapper(
patientInfoSearchParam, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name,
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr,
CommonConstants.FieldName.Phone)), // 添加phone字段支持手机号搜索
=======
Integer pageNo, Integer pageSize, HttpServletRequest request) {
// 构建查询条件
QueryWrapper<PatientBaseInfoDto> queryWrapper = HisQueryUtils.buildQueryWrapper(
patientBaseInfoDto, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name,
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)),
>>>>>>> v1.3
request);
IPage<PatientBaseInfoDto> patientInformationPage =
patientManageMapper.getPatientPage(new Page<>(pageNo, pageSize), queryWrapper);
patientBaseInfoDto, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name,
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)),
request);
IPage<PatientBaseInfoDto> patientInformationPage
= patientManageMapper.getPatientPage(new Page<>(pageNo, pageSize), queryWrapper);
// 患者id集合
List<Long> patientIdList =
patientInformationPage.getRecords().stream().map(PatientBaseInfoDto::getId).collect(Collectors.toList());
List<Long> patientIdList
= patientInformationPage.getRecords().stream().map(PatientBaseInfoDto::getId).collect(Collectors.toList());
// 患者身份信息
List<PatientIdInfoDto> patientIdInfo = patientManageMapper.getPatientIdInfo(patientIdList);
// 获取登录者信息
@@ -166,10 +157,10 @@ public class PatientInformationServiceImpl implements IPatientInformationService
e.setBloodRh_enumText(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh()));
// 家庭关系枚举类回显赋值
e.setLinkRelationCode_enumText(
EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode()));
EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode()));
// 患者身份子表信息
List<PatientIdInfoDto> idInfo = patientIdInfo.stream()
.filter(idInfoDto -> idInfoDto.getPatientId().equals(e.getId())).collect(Collectors.toList());
.filter(idInfoDto -> idInfoDto.getPatientId().equals(e.getId())).collect(Collectors.toList());
e.setPatientIdInfoList(idInfo);
// 登记医院
e.setOrganizationId(loginUser.getOrgId());
@@ -194,13 +185,13 @@ public class PatientInformationServiceImpl implements IPatientInformationService
}
}
// 身份证号是否存在
List<Patient> idCardList =
patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientInfoDto.getIdCard())
.ne(patientInfoDto.getId() != null, Patient::getId, patientInfoDto.getId()));
List<Patient> idCardList
= patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientInfoDto.getIdCard())
.ne(patientInfoDto.getId() != null, Patient::getId, patientInfoDto.getId()));
if (!idCardList.isEmpty()) {
Patient patient = idCardList.get(0);
if (patientInfoDto.getIdCard().equals(patient.getIdCard())
&& !patientInfoDto.getId().equals(patientInfoDto.getId())) {
&& !patientInfoDto.getId().equals(patientInfoDto.getId())) {
throw new ServiceException("身份证号:" + patientInfoDto.getIdCard() + "已经存在");
}
}
@@ -209,7 +200,7 @@ public class PatientInformationServiceImpl implements IPatientInformationService
Patient patient = this.handlePatientInfo(patientInfoDto);
// 患者身份子表信息,先删除再新增
patientIdentifierService
.remove(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, patient.getId()));
.remove(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, patient.getId()));
if (patientInfoDto.getPatientIdInfoList() != null) {
// 新增患者身份子表信息
List<PatientIdInfoDto> patientIdInfoList = patientInfoDto.getPatientIdInfoList();
@@ -226,7 +217,7 @@ public class PatientInformationServiceImpl implements IPatientInformationService
}
}
return R.ok(patient.getIdCard(),
MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"病人信息"}));
MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"病人信息"}));
}
/**
@@ -245,8 +236,8 @@ public class PatientInformationServiceImpl implements IPatientInformationService
}
}
// 身份证号是否存在
List<Patient> idCardList =
patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientInfoDto.getIdCard()));
List<Patient> idCardList
= patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientInfoDto.getIdCard()));
if (!idCardList.isEmpty()) {
throw new ServiceException("身份证号:" + patientInfoDto.getIdCard() + "已经存在");
}
@@ -269,21 +260,9 @@ public class PatientInformationServiceImpl implements IPatientInformationService
}
}
return R.ok(patient, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"患者信息"}));
return R.ok(patient, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"患者信息"}));
}
<<<<<<< HEAD
@Override
public boolean checkPatientExists(String name, String idCardNo) {
QueryWrapper<Patient> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("name", name)
.eq("id_card", idCardNo)
.eq("delete_flag", "0");
return patientService.count(queryWrapper) > 0;
}
=======
/**
* 处理患者信息
*
@@ -327,7 +306,7 @@ public class PatientInformationServiceImpl implements IPatientInformationService
/**
* 更新患者手机号
*
*
* @param patientBaseInfoDto 患者信息
*/
@Override
@@ -345,5 +324,4 @@ public class PatientInformationServiceImpl implements IPatientInformationService
}
return R.fail("更新患者手机号失败");
}
>>>>>>> v1.3
}

View File

@@ -45,7 +45,9 @@ public class PatientBaseInfoDto {
private Integer genderEnum;
private String genderEnum_enumText;
/** 活动标记 */
/**
* 活动标记
*/
private Integer activeFlag;
private Integer activeFlag_enumText;
@@ -68,18 +70,7 @@ public class PatientBaseInfoDto {
/**
* 联系方式
*/
<<<<<<< HEAD:openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/PatientInformationDto.java
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
private Date deceasedDate;
/**
* 婚姻状态
*/
private Integer maritalStatusEnum;
private String maritalStatusEnum_enumText;
=======
private String phone;
>>>>>>> v1.3:openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/PatientBaseInfoDto.java
/**
* 职业编码