From 94f57c59da8840e6c0e7f040bd0d9553f9c51602 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 13:44:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E6=B6=B2=E8=AE=B0=E5=BD=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datadictionary/dto/DiagnosisTreatmentUpDto.java | 2 +- .../appservice/IOutpatientInfusionRecordService.java | 3 ++- .../impl/OutpatientInfusionRecordServiceImpl.java | 12 ++++++++---- .../OutpatientInfusionRecordController.java | 7 ++++--- .../dto/OutpatientInfusionPatientDto.java | 1 + 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java index 5425e648..3eafc386 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java @@ -28,7 +28,7 @@ public class DiagnosisTreatmentUpDto { private Long id; /** 目录类别 */ - @NotNull(message = "目录类别不能为空") + @NotBlank(message = "目录类别不能为空") private String categoryCode; /** 编码 */ diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java index 11f5850e..3c15dcb1 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java @@ -55,9 +55,10 @@ public interface IOutpatientInfusionRecordService { /** * 门诊输液执行历史记录查询 * + * @param patientId 患者ID * @param historyFlag 查询的是否为执行履历 * @return 门诊输液记录列表 */ - List getPatientInfusionPerformRecord(HttpServletRequest request, boolean historyFlag); + List getPatientInfusionPerformRecord(Long patientId,HttpServletRequest request, boolean historyFlag); } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java index 29e71f4f..184d4691 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java @@ -114,7 +114,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 构建查询条件 QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), null, null, request); + HisQueryUtils.buildQueryWrapper(null, null, null, request); queryWrapper.eq(CommonConstants.FieldName.PatientId, outpatientInfusionPatientDto.getPatientId()); // based_on_id 是为空的 @@ -239,7 +239,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR public List checkServiceRequestIsCompleted() { //获取全部执行输液记录 - List patientInfusionList =getPatientInfusionPerformRecord(null,false); + List patientInfusionList =getPatientInfusionPerformRecord(null,null,false); // 按 serviceId 分组 Map> servicePatientInfusionList = patientInfusionList.stream() .collect(Collectors.groupingBy(OutpatientInfusionRecordDto::getServiceId)); @@ -334,16 +334,17 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR /** * 显示门诊输液执行记录查询 * + * @param patientId 患者输液信息 * @param historyFlag 查询的是否为执行履历 * @return 返回门诊输液执行记录查询 */ @Override - public List getPatientInfusionPerformRecord(HttpServletRequest request, + public List getPatientInfusionPerformRecord(Long patientId,HttpServletRequest request, boolean historyFlag) { // 构建查询条件 QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(new OutpatientInfusionRecordDto(), null, null, request); + HisQueryUtils.buildQueryWrapper(null, null, null, request); // 执行历史查询的条件 if (historyFlag) { @@ -351,6 +352,8 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR queryWrapper.isNotNull(CommonConstants.FieldName.BasedOnId); // 状态是已完成 queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.COMPLETED.getValue()); + //筛选当前ID的患者历史执行记录 + queryWrapper.eq(CommonConstants.FieldName.PatientId,patientId); List infusionPerformList = editRecords(queryWrapper); List medicationIds = checkServiceRequestIsCompleted(infusionPerformList); @@ -365,6 +368,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 门诊输液待执行记录查询 } else { + // based_on_id 为空,此条件筛选控制不显示执行履历 queryWrapper.isNull(CommonConstants.FieldName.BasedOnId); // 状态是进行中 diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java index 9f7f3e7d..99c45ea5 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java @@ -103,18 +103,19 @@ public class OutpatientInfusionRecordController { @GetMapping(value = "/infusion-wait-perform-record") public R getPatientInfusionRecords(HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(request, false)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(null,request, false)); } /** * 门诊输液执行历史记录查询 * + * @param patientId 患者ID * @return 门诊输液执行历史记录列表 */ @GetMapping(value = "/infusion-perform-record") - public R getPatientInfusionPerformRecord(HttpServletRequest request) { + public R getPatientInfusionPerformRecord(@RequestParam Long patientId,HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(request, true)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId,request, true)); } } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java index 4fc0a2aa..a1e917e6 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import lombok.experimental.Accessors; +import javax.validation.constraints.NotNull; import java.util.Date; /**