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 4a32fd057..a2f5d11c9 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 @@ -352,6 +352,16 @@ public class PatientexamlistController { return success(patientexamlistCountVO); } + @GetMapping("/EcgWholeDiagFlagCount") + @Operation(summary = "心电首页饼状图统计") + public CommonResult GetEcgWholeDiagFlagCount() { + //获取当前登陆用户 + AdminUserDO user = userService.getUser(getLoginUserId()); + PatientexamlistCountVO patientexamlistCountVO = patientexamlistService.GetEcgAnalysisData(user.getOrgId()); + return success(patientexamlistCountVO); + } + + @GetMapping("/GetDateYYZDYXCount") @Operation(summary = "首页折线图统计") @@ -363,6 +373,16 @@ public class PatientexamlistController { } + @GetMapping("/GetEcgDateYYZDYXCount") + @Operation(summary = "心电首页折线图统计") + public CommonResult> GetEcgDateYYZDYXCount() { + //获取当前登陆用户 + AdminUserDO user = userService.getUser(getLoginUserId()); + List patientexamlistCountVO = patientexamlistService.GetEcgDateWholeDiagFlagCount(user.getOrgId()); + return success(patientexamlistCountVO); + + } + @GetMapping("/CollectAndCancellation") @Operation(summary = "收藏以及取消") public CommonResult CollectAndCancellation(@RequestParam("id") String id, @RequestParam("type") String type) { diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java index 04e2b9912..79fca97cf 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistCountVO.java @@ -27,4 +27,9 @@ public class PatientexamlistCountVO { @Schema(description = "日期") private String date; + @Schema(description = "危急值") + private String wjz; + + @Schema(description = "申请") + private String sq; } 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 3620f46de..243909754 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 @@ -103,6 +103,20 @@ public interface PatientexamlistMapper extends BaseMapperX { @Select(" SELECT COUNT(*) AS totalcount, SUM(CASE WHEN diagFlag = '0' THEN 1 ELSE 0 END) AS yx, SUM(CASE WHEN diagFlag = '1' THEN 1 ELSE 0 END) AS y, SUM(CASE WHEN diagFlag = '2' THEN 1 ELSE 0 END) AS zdyx " + " ,SUM( CASE WHEN gender = '男' THEN 1 ELSE 0 END ) AS F,SUM( CASE WHEN gender = '女' THEN 1 ELSE 0 END ) AS M FROM tb_patientexamlist WHERE examDate IS NOT NULL and orgId=#{orgId}") PatientexamlistCountVO GetWholeDiagFlagCount(@Param("orgId") String orgId); + //查询心电的已分析数据的男女是否申请危急值统计 + @Select("SELECT\n" + + " COUNT(*) AS totalcount,\n" + + " SUM( CASE WHEN gender = '男' THEN 1 ELSE 0 END ) AS F,\n" + + " SUM( CASE WHEN gender = '女' THEN 1 ELSE 0 END ) AS M ,\n" + + " SUM( CASE WHEN warning = '1' THEN 1 ELSE 0 END ) AS wjz ,\n" + + " SUM( CASE WHEN applicationDate is not null THEN 1 ELSE 0 END ) AS sq \n" + + "FROM\n" + + " tb_patientexamlist \n" + + "WHERE\n" + + " examDate IS NOT NULL and deviceType='ECG'\n" + + " AND orgId = #{orgId}") + PatientexamlistCountVO GetEcgPatientAnalysisData(@Param("orgId") String orgId); + //统计一周内的数据已检查数据的阴性阳性重大阳性 @Select("SELECT " @@ -119,6 +133,27 @@ public interface PatientexamlistMapper extends BaseMapperX { + " ORDER BY date") List GetDateYYZDCount(@Param("orgId") String orgId); + //统计一周内的心电上级申请和危急值统计 + @Select("SELECT\n" + + " DATE_FORMAT( examDate, '%Y-%m-%d' ) AS DATE,\n" + + " COUNT(*) AS totalcount,\n" + + " SUM( CASE WHEN warning = '1' THEN 1 ELSE 0 END ) AS wjz,\n" + + " SUM( CASE WHEN applicationDate IS NOT NULL THEN 1 ELSE 0 END ) AS sq \n" + + "FROM\n" + + " tb_patientexamlist \n" + + "WHERE\n" + + " examDate IS NOT NULL \n" + + " AND deviceType = 'ECG' \n" + + " AND examDate >= CURDATE() - INTERVAL 7 DAY \n" + + " AND orgId = #{orgId}\n" + + "GROUP BY\n" + + "DATE \n" + + "ORDER BY\n" + + "DATE") + List GetEcgDateYYZDCount(@Param("orgId") String orgId); + + + //云胶片功能 @Select(" SELECT\n" + " t1.ID as id, \n" + 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 a6f85016b..cde0c3ea4 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 @@ -126,9 +126,13 @@ public interface PatientexamlistService extends IService { //获取已检查的阴性阳性重大阳性统计 PatientexamlistCountVO GetWholeDiagFlagCount(String orgId); + PatientexamlistCountVO GetEcgAnalysisData(String orgId); + //获取一周已检查的阴性阳性重大阳性统计 List GetDateWholeDiagFlagCount(String orgId); + //获取一周心电的上级申请和危急值统计 + List GetEcgDateWholeDiagFlagCount(String orgId); /** * 云胶片功能 * getCheckRecord 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 20609ea0f..4f6eaa957 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 @@ -347,12 +347,22 @@ public class PatientexamlistServiceImpl extends ServiceImpl GetDateWholeDiagFlagCount(String orgId) { return patientexamlistMapper.GetDateYYZDCount(orgId); } + @Override + public List GetEcgDateWholeDiagFlagCount(String orgId) { + return patientexamlistMapper.GetEcgDateYYZDCount(orgId); + + } @Override public Map getCheckRecord(String regId, String orgId) { Map _out = new HashMap<>();