From 3394aa54d78dbdd702ba17a593ad5e25d9cbc787 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Wed, 20 May 2026 09:45:33 +0800 Subject: [PATCH] =?UTF-8?q?549=E3=80=90=E4=BD=8F=E9=99=A2=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E4=B8=B4=E5=BA=8A=E5=8C=BB=E5=98=B1-?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E3=80=91=E6=89=93=E5=BC=80=E2=80=9C=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E7=94=B3=E8=AF=B7=E5=8D=95=E2=80=9D=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E6=9E=81=E5=85=B6=E7=BC=93=E6=85=A2=20546=20=E3=80=90?= =?UTF-8?q?=E6=82=A3=E8=80=85=E7=AE=A1=E7=90=86=E3=80=91-=E3=80=90?= =?UTF-8?q?=E6=82=A3=E8=80=85=E5=88=97=E8=A1=A8=E3=80=91-=E3=80=90?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=82=A3=E8=80=85=E3=80=91=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=82=A3=E8=80=85=EF=BC=8C=E4=BF=9D=E5=AD=98=E6=88=90?= =?UTF-8?q?=E5=8A=9F=EF=BC=8C=E4=BD=86=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20536=20[=E9=97=A8=E8=AF=8A=E6=89=8B=E6=9C=AF=E5=AE=89?= =?UTF-8?q?=E6=8E=92]=E2=80=9C=E6=89=8B=E6=9C=AF=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E2=80=9D=E5=BC=B9=E7=AA=97=E5=BA=95=E9=83=A8?= =?UTF-8?q?=EF=BC=8C=E5=88=86=E9=A1=B5=E7=BB=84=E4=BB=B6=E4=B8=8E=E7=95=8C?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E5=85=83=E7=B4=A0=E9=87=8D=E5=8F=A0=EF=BC=8C?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E6=93=8D=E4=BD=9C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IDoctorStationAdviceAppService.java | 2 +- .../DoctorStationAdviceAppServiceImpl.java | 5 +- .../DoctorStationAdviceController.java | 5 +- .../mapper/DoctorStationAdviceAppMapper.java | 3 +- .../impl/PatientInformationServiceImpl.java | 36 +--- .../DoctorStationAdviceAppMapper.xml | 4 +- openhis-ui-vue3/src/utils/medicalConstants.js | 15 ++ .../order/applicationForm/laboratoryTests.vue | 109 ++++++------ .../applicationForm/medicalExaminations.vue | 2 + .../src/views/surgicalschedule/index.vue | 161 +++++++++++------- 10 files changed, 180 insertions(+), 162 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java index 641ad4db..f9f0b95e 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java @@ -147,6 +147,6 @@ public interface IDoctorStationAdviceAppService { */ IPage getSurgeryPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey); - IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey); + IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey, String categoryCode); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 40bd312e..4a17e6d7 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -2571,12 +2571,13 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp } @Override - public IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey) { + public IPage getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey, String categoryCode) { IPage result = doctorStationAdviceAppMapper.getExaminationPage( new Page<>(pageNo, pageSize), PublicationStatus.ACTIVE.getValue(), organizationId, - searchKey); + searchKey, + categoryCode); return result; } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java index 84b83334..2e64d725 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java @@ -226,8 +226,9 @@ public class DoctorStationAdviceController { @RequestParam(value = "organizationId", required = false) Long organizationId, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "500") Integer pageSize, - @RequestParam(value = "searchKey", defaultValue = "") String searchKey) { - return R.ok(iDoctorStationAdviceAppService.getExaminationPage(organizationId, pageNo, pageSize, searchKey)); + @RequestParam(value = "searchKey", defaultValue = "") String searchKey, + @RequestParam(value = "categoryCode", defaultValue = "23") String categoryCode) { + return R.ok(iDoctorStationAdviceAppService.getExaminationPage(organizationId, pageNo, pageSize, searchKey, categoryCode)); } } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java index 67a16f4b..36b12109 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java @@ -203,6 +203,7 @@ public interface DoctorStationAdviceAppMapper { IPage getExaminationPage(@Param("page") Page page, @Param("statusEnum") Integer statusEnum, @Param("organizationId") Long organizationId, - @Param("searchKey") String searchKey); + @Param("searchKey") String searchKey, + @Param("categoryCode") String categoryCode); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java index 54909bb8..abe838ee 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/PatientInformationServiceImpl.java @@ -133,47 +133,13 @@ public class PatientInformationServiceImpl implements IPatientInformationService @Override public IPage getPatientInfo(PatientBaseInfoDto patientBaseInfoDto, String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request) { - // 获取登录者信息 + // 构建基础查询条件 LoginUser loginUser = SecurityUtils.getLoginUser(); - Long userId = loginUser.getUserId(); - Integer tenantId = loginUser.getTenantId().intValue(); - - // 先构建基础查询条件 QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper( patientBaseInfoDto, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name, CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)), request); - // 检查是否是精确ID查询(从门诊挂号页面跳转时使用) - boolean hasExactIdQuery = (patientBaseInfoDto.getId() != null); - - // 只有非精确ID查询时,才添加医生患者过滤条件 - if (!hasExactIdQuery) { - // 查询当前用户对应的医生信息 - LambdaQueryWrapper practitionerQuery = new LambdaQueryWrapper<>(); - practitionerQuery.eq(com.openhis.administration.domain.Practitioner::getUserId, userId); - // 使用list()避免TooManyResultsException异常,然后取第一个记录 - List practitionerList = practitionerService.list(practitionerQuery); - com.openhis.administration.domain.Practitioner practitioner = practitionerList != null && !practitionerList.isEmpty() ? practitionerList.get(0) : null; - - // 如果当前用户是医生,添加医生患者过滤条件 - if (practitioner != null) { - // 查询该医生作为接诊医生(ADMITTER, code="1")和挂号医生(REGISTRATION_DOCTOR, code="12")的所有就诊记录的患者ID - List doctorPatientIds = patientManageMapper.getPatientIdsByPractitionerId( - practitioner.getId(), - Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()), - tenantId); - - if (doctorPatientIds != null && !doctorPatientIds.isEmpty()) { - // 添加患者ID过滤条件 - 注意:这里使用列名而不是表别名 - queryWrapper.in("id", doctorPatientIds); - } else { - // 如果没有相关患者,返回空结果 - queryWrapper.eq("id", -1); // 设置一个不存在的ID - } - } - // 如果不是医生,查询所有患者 - } IPage patientInformationPage = patientManageMapper.getPatientPage(new Page<>(pageNo, pageSize), queryWrapper); diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index c3067563..a53da429 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -895,7 +895,7 @@ ORDER BY t1.ID, t1.name ASC, t2.ID ASC - +