From 7c905f710c84b6d63ece440087c52d3adff503d4 Mon Sep 17 00:00:00 2001 From: lichuanyang <1176537920@qq.com> Date: Tue, 17 Dec 2024 16:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B1=E6=80=A5=E5=80=BC=E3=80=81=E9=98=B3?= =?UTF-8?q?=E6=80=A7=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/warning/WarningController.java | 7 ++++ .../admin/warning/vo/WarningPatientReqVO.java | 19 +++++++++++ .../dal/dataobject/warning/WarningDO.java | 16 ++++++---- .../dal/mysql/warning/WarningMapper.java | 7 ++++ .../service/warning/WarningService.java | 4 +++ .../service/warning/WarningServiceImpl.java | 4 +++ .../PatientexamlistController.java | 7 ++++ .../vo/WarningStatisticsReportReqVO.java | 32 +++++++++++++++++++ .../EcganalysisparasMapper.java | 2 +- .../PatientexamlistMapper.java | 12 +++++++ .../PatientexamlistService.java | 7 ++++ .../PatientexamlistServiceImpl.java | 9 ++++++ 12 files changed, 118 insertions(+), 8 deletions(-) create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/vo/WarningPatientReqVO.java create mode 100644 yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/WarningStatisticsReportReqVO.java diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java index 385db6eec..ea17082e1 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/WarningController.java @@ -163,6 +163,13 @@ public class WarningController { return success(BeanUtils.toBean(pageResult, WarningRespVO.class)); } + @GetMapping("/warningListbyPatient") + @Operation(summary = "获得危急值记录") + public CommonResult> getWarningListbyPatient(@Valid WarningPatientReqVO reqVO) { + List warnings = warningService.getWarningListbyPatient(reqVO); + return success(warnings); + } + @GetMapping("/export-excel") @Operation(summary = "导出危急值记录 Excel") @PreAuthorize("@ss.hasPermission('system:warning:export')") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/vo/WarningPatientReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/vo/WarningPatientReqVO.java new file mode 100644 index 000000000..98a99e267 --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/warning/vo/WarningPatientReqVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.system.controller.admin.warning.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.ToString; + +@Schema(description = "管理后台 - WarningPatientReqVO") +@Data +@ToString(callSuper = true) +public class WarningPatientReqVO { + @Schema(description = "机构ID", example = "29289") + private String orgId; + + @Schema(description = "登记单号") + private String regId; + + @Schema(description = "检查ID:体检编号、住院号、门诊号等", example = "26467") + private String examId; +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/warning/WarningDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/warning/WarningDO.java index 9299fd809..804b19e54 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/warning/WarningDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/warning/WarningDO.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.system.dal.dataobject.warning; import lombok.*; + import java.util.*; import java.time.LocalDateTime; import java.time.LocalDateTime; + import com.baomidou.mybatisplus.annotation.*; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @@ -19,12 +21,12 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @Builder @NoArgsConstructor @AllArgsConstructor -public class WarningDO { +public class WarningDO { /** * 主键 */ - @TableId(type = IdType.INPUT) + @TableId(value = "ID", type = IdType.INPUT) private String id; /** * 机构ID @@ -37,19 +39,19 @@ public class WarningDO { @TableField("examId") private String examId; /** - * 登记ID :patientid + * 登记ID :patientid */ @TableField("regId") private String regId; /** * 上报机构id */ - @TableField(value ="reportOrgId") + @TableField(value = "reportOrgId") private String reportOrgId; /** * 上报机构名称 */ - @TableField(value ="reportorgName") + @TableField(value = "reportorgName") private String reportorgName; /** * 上报医生 @@ -102,8 +104,8 @@ public class WarningDO { @TableField("receiptDateTime") private LocalDateTime receiptDateTime; /* - * 检查端确认备注 - * */ + * 检查端确认备注 + * */ @TableField("readremark") private String readremark; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/warning/WarningMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/warning/WarningMapper.java index 6f0ccd580..41e2de1d5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/warning/WarningMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/warning/WarningMapper.java @@ -37,4 +37,11 @@ public interface WarningMapper extends BaseMapperX { .orderByDesc(WarningDO::getId)); } + //WarningPatientReqVO列表 + default List selectList(WarningPatientReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(WarningDO::getOrgId, reqVO.getOrgId()) + .likeIfPresent(WarningDO::getRegId, reqVO.getRegId()) + .likeIfPresent(WarningDO::getExamId, reqVO.getExamId())); + } } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningService.java index 82f33cba3..4ef094fdd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningService.java @@ -55,6 +55,10 @@ public interface WarningService { * 通过检查ID和机构ID查询患者信息 * */ WarningDO getexmidororgiddata(String examid,String orgid); + /** + * 查询WarningDO + */ + List getWarningListbyPatient(WarningPatientReqVO reqVO); /** * 获得危急值记录分页 * diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningServiceImpl.java index 7c42588bb..c71c5a2db 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/warning/WarningServiceImpl.java @@ -89,4 +89,8 @@ public class WarningServiceImpl implements WarningService { return warningMapper.selectPage(pageReqVO); } + @Override + public List getWarningListbyPatient(WarningPatientReqVO reqVO) { + return warningMapper.selectList(reqVO); + } } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java index 3e0302666..81ec8f520 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java @@ -229,6 +229,13 @@ public class PatientexamlistController { return success(result); } + @GetMapping("/warningStatisticsReport") + @Operation(summary = "危急报告统计") + @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')") + public CommonResult> getWarningStatisticsReport(@Valid WarningStatisticsReportReqVO reqVO) { + PageResult pageResult = patientexamlistService.getWarningStatisticsReport(reqVO); + return success(pageResult); + } @GetMapping("/dicomDataSync") @Operation(summary = "dicom数据同步") diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/WarningStatisticsReportReqVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/WarningStatisticsReportReqVO.java new file mode 100644 index 000000000..b08a614ec --- /dev/null +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/WarningStatisticsReportReqVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - WarningStatisticsReportReqVO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class WarningStatisticsReportReqVO extends PageParam { + @Schema(description = "机构ID", example = "29289") + private String orgId; + + @Schema(description = "登记单号") + private String regId; + + @Schema(description = "下诊断开始日期:年月日时分秒") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime diagDate_ge; + + @Schema(description = "下诊断结束日期:年月日时分秒") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime diagDate_le; +} diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/ecganalysisparas/EcganalysisparasMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/ecganalysisparas/EcganalysisparasMapper.java index 9e3fa4964..80bed4950 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/ecganalysisparas/EcganalysisparasMapper.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/ecganalysisparas/EcganalysisparasMapper.java @@ -65,7 +65,7 @@ public interface EcganalysisparasMapper extends BaseMapperX StringBuilder sql = new StringBuilder(); sql.append(" SELECT t1.doctorDiagResult,t2.* ").append(System.lineSeparator()); sql.append(" FROM tb_ecganalysisparas t1 ").append(System.lineSeparator()); - sql.append(" LEFT JOIN tb_patientexamlist t2 ON t1.regId=t2.regId AND t1.examId=t2.examId ").append(System.lineSeparator()); + sql.append(" inner JOIN tb_patientexamlist t2 ON t1.regId=t2.regId AND t1.examId=t2.examId ").append(System.lineSeparator()); sql.append(" WHERE 1=1 ").append(System.lineSeparator()); sql.append(" AND t1.orgId='" + orgId.trim() + "' ").append(System.lineSeparator()); if (doctorDiagTimeStart != null) diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java index 243909754..dfc5e0752 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java @@ -57,6 +57,18 @@ public interface PatientexamlistMapper extends BaseMapperX { .orderByDesc(PatientexamlistDO::getExamDate)); } + //WarningStatisticsReportReqVO分页 + default PageResult selectPage(WarningStatisticsReportReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getOrgId()) + .likeIfPresent(PatientexamlistDO::getRegId, reqVO.getRegId()) + .geIfPresent(PatientexamlistDO::getDiagDate, reqVO.getDiagDate_ge()) + .leIfPresent(PatientexamlistDO::getDiagDate, reqVO.getDiagDate_le()) + .isNotNull(PatientexamlistDO::getDiagDate) + .eq(PatientexamlistDO::getWarning, "1") + .orderByDesc(PatientexamlistDO::getExamDate)); + } + //PatientexamlistPageReqVO分页 default PageResult selectPage(PatientexamlistPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java index cde0c3ea4..cc32c042a 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java @@ -91,6 +91,13 @@ public interface PatientexamlistService extends IService { */ List> getPositiveStatistics(PositiveStatisticsReqVO reqVO); + /** + * 危急报告统计 + * + * @param pageReqVO 分页查询 + * @return PACS检查列表分页 + */ + PageResult getWarningStatisticsReport(WarningStatisticsReportReqVO pageReqVO); /** * 同步dicom数据至tb_patientexamlist diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java index 4f6eaa957..0b4c2875e 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java @@ -164,6 +164,15 @@ public class PatientexamlistServiceImpl extends ServiceImpl getWarningStatisticsReport(WarningStatisticsReportReqVO pageReqVO) { + if (pageReqVO != null) { + pageReqVO.setOrgId(null); + if (pageReqVO.getDiagDate_le() != null) + pageReqVO.setDiagDate_le(pageReqVO.getDiagDate_le().plusDays(1)); + } + return patientexamlistMapper.selectPage(pageReqVO); + } @Override public List dicomDataSync() {