新增心电图各项数据统计查询
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run

This commit is contained in:
Euni4U 2024-12-17 13:31:33 +08:00
parent 0e2a385d1b
commit b382634173
2 changed files with 69 additions and 0 deletions

View File

@ -61,6 +61,8 @@ import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@Tag(name = "管理后台 - PACS检查列表")
@RestController
@RequestMapping("/tblist/patientexamlist")
@ -525,4 +527,45 @@ public class PatientexamlistController {
}
@GetMapping("/getECGStatistics")
@Operation(summary = "获取心电图统计数据")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
public CommonResult<ECGStatisticsRespVO> getECGStatistics() {
ECGStatisticsRespVO statistics = new ECGStatisticsRespVO();
// 构建基础查询条件
QueryWrapper<PatientexamlistDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("deviceType", "ECG");
// 获取总数
int totalCount = patientexamlistMapper.selectCount(queryWrapper).intValue();
statistics.setTotalCount(totalCount);
// 获取已分析数量(reviewDate不为空)
QueryWrapper<PatientexamlistDO> analyzedWrapper = new QueryWrapper<>();
analyzedWrapper.eq("deviceType", "ECG")
.isNotNull("reviewDate");
int analyzedCount = patientexamlistMapper.selectCount(analyzedWrapper).intValue();
statistics.setAnalyzedCount(analyzedCount);
// 获取未分析数量
statistics.setUnanalyzedCount(totalCount - analyzedCount);
// 获取阳性数量
QueryWrapper<PatientexamlistDO> positiveWrapper = new QueryWrapper<>();
positiveWrapper.eq("deviceType", "ECG")
.eq("wholeDiagFlag", "1"); // 假设 wholeDiagFlag=1 表示阳性
int positiveCount = patientexamlistMapper.selectCount(positiveWrapper).intValue();
statistics.setPositiveCount(positiveCount);
// 获取上级申请数量(applicationDate不为空)
QueryWrapper<PatientexamlistDO> appliedWrapper = new QueryWrapper<>();
appliedWrapper.eq("deviceType", "ECG")
.isNotNull("applicationDate");
int appliedCount = patientexamlistMapper.selectCount(appliedWrapper).intValue();
statistics.setAppliedCount(appliedCount);
return success(statistics);
}
}

View File

@ -0,0 +1,26 @@
package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "心电图统计数据 Response VO")
@Data
@ToString(callSuper = true)
public class ECGStatisticsRespVO {
@Schema(description = "心电图数据总数")
private Integer totalCount;
@Schema(description = "已分析数量")
private Integer analyzedCount;
@Schema(description = "未分析数量")
private Integer unanalyzedCount;
@Schema(description = "阳性数量")
private Integer positiveCount;
@Schema(description = "上级申请数量")
private Integer appliedCount;
}