167 住院管理-》住院护士站-》入出转管理:护士登录的科室能接收查看到其他科室的入科患者

This commit is contained in:
Ranyunqiao
2026-03-11 10:26:00 +08:00
parent 6179a89b6c
commit d1aa91f727
3 changed files with 18 additions and 5 deletions

View File

@@ -136,6 +136,9 @@ public class ATDManageAppServiceImpl implements IATDManageAppService {
@Override
public R<?> getAdmissionPatientPage(AdmissionPageParam admissionPageParam, Integer pageNo, Integer pageSize,
String searchKey, HttpServletRequest request) {
// 获取当前登录用户的科室 ID
Long currentUserOrgId = SecurityUtils.getLoginUser().getOrgId();
// 构建查询条件
QueryWrapper<AdmissionPageParam> queryWrapper = HisQueryUtils.buildQueryWrapper(admissionPageParam, searchKey,
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientWbStr, CommonConstants.FieldName.PatientPyStr,
@@ -145,7 +148,8 @@ public class ATDManageAppServiceImpl implements IATDManageAppService {
Page<AdmissionPatientPageDto> admissionPatientPage = atdManageAppMapper.selectAdmissionPatientPage(
new Page<>(pageNo, pageSize), queryWrapper, EncounterClass.IMP.getValue(),
EncounterZyStatus.TO_BE_REGISTERED.getValue(), EncounterActivityStatus.ACTIVE.getValue(),
LocationForm.WARD.getValue(), LocationForm.HOUSE.getValue(), LocationForm.BED.getValue());
LocationForm.WARD.getValue(), LocationForm.HOUSE.getValue(), LocationForm.BED.getValue(),
currentUserOrgId);
admissionPatientPage.getRecords().forEach(e -> {
// 性别枚举
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
@@ -171,6 +175,9 @@ public class ATDManageAppServiceImpl implements IATDManageAppService {
*/
@Override
public R<?> getAdmissionBedPage(AdmissionPageParam admissionPageParam, Integer pageNo, Integer pageSize) {
// 获取当前登录用户的科室 ID
Long currentUserOrgId = SecurityUtils.getLoginUser().getOrgId();
// 构建查询条件
QueryWrapper<AdmissionPageParam> queryWrapper
= HisQueryUtils.buildQueryWrapper(admissionPageParam, null, null, null);
@@ -180,7 +187,8 @@ public class ATDManageAppServiceImpl implements IATDManageAppService {
EncounterActivityStatus.ACTIVE.getValue(), LocationForm.WARD.getValue(), LocationForm.HOUSE.getValue(),
LocationForm.BED.getValue(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
LocationStatus.INACTIVE.getValue(), ChargeItemStatus.BILLABLE.getValue(),
ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDED.getValue());
ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDED.getValue(),
currentUserOrgId);
admissionBedPage.getRecords().forEach(e -> {
// 性别枚举
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));

View File

@@ -33,12 +33,13 @@ public interface ATDManageAppMapper {
* @param ward 位置类型:病区
* @param house 位置类型:病房
* @param bed 位置类型:病床
* @param currentUserOrgId 当前登录用户科室 ID
* @return 入院患者分页列表
*/
Page<AdmissionPatientPageDto> selectAdmissionPatientPage(@Param("page") Page<AdmissionPatientPageDto> page,
@Param(Constants.WRAPPER) QueryWrapper<AdmissionPageParam> queryWrapper, @Param("imp") Integer imp,
@Param("toBeRegistered") Integer toBeRegistered, @Param("active") Integer active, @Param("ward") Integer ward,
@Param("house") Integer house, @Param("bed") Integer bed);
@Param("house") Integer house, @Param("bed") Integer bed, @Param("currentUserOrgId") Long currentUserOrgId);
/**
* 入院患者床位信息分页列表
@@ -54,13 +55,15 @@ public interface ATDManageAppMapper {
* @param billable 收费状态:待结算
* @param billed 收费状态:已结算
* @param refunded 收费状态:已退费
* @param currentUserOrgId 当前登录用户科室 ID
* @return 患者床位信息分页列表
*/
Page<AdmissionBedPageDto> selectAdmissionBadPage(@Param("page") Page<AdmissionBedPageDto> page,
@Param(Constants.WRAPPER) QueryWrapper<AdmissionPageParam> queryWrapper, @Param("active") Integer active,
@Param("ward") Integer ward, @Param("house") Integer house, @Param("bed") Integer bed,
@Param("personalCashAccount") String personalCashAccount, @Param("inactive") Integer inactive,
@Param("billable") Integer billable, @Param("billed") Integer billed, @Param("refunded") Integer refunded);
@Param("billable") Integer billable, @Param("billed") Integer billed, @Param("refunded") Integer refunded,
@Param("currentUserOrgId") Long currentUserOrgId);
/**
* 查询住院患者详细信息

View File

@@ -90,6 +90,7 @@
WHERE ae.delete_flag = '0'
AND ae.class_enum = #{imp}
AND ae.status_enum != #{toBeRegistered}
AND ae.organization_id = #{currentUserOrgId}
GROUP BY ae.tenant_id,
ae.id,
ae.bus_no,
@@ -198,6 +199,7 @@
WHERE bed.form_enum = #{bed}
AND bed.delete_flag = '0'
AND bed.status_enum != #{inactive}
AND (ae.organization_id = #{currentUserOrgId} OR ae.id IS NULL)
GROUP BY bed.id,
bed.bus_no,
bed.tenant_id,