123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491 |
- package com.diagbot.web;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import com.diagbot.annotation.SysLogger;
- import com.diagbot.dto.AverageStatisticsDTO;
- import com.diagbot.dto.DeptNumDTO;
- import com.diagbot.dto.EntryNumDTO;
- import com.diagbot.dto.EntryStatisticsDTO;
- import com.diagbot.dto.HomePageNumDTO;
- import com.diagbot.dto.LevelStatisticsDTO;
- import com.diagbot.dto.LevelStatisticsTZDTO;
- import com.diagbot.dto.NumDTO;
- import com.diagbot.dto.QcResultShortDTO;
- import com.diagbot.dto.RespDTO;
- import com.diagbot.facade.ConsoleFacade;
- import com.diagbot.vo.EntryStatisticsVO;
- import com.diagbot.vo.FilterOrderVO;
- import com.diagbot.vo.FilterPageByAverageVO;
- import com.diagbot.vo.FilterPageVO;
- import com.diagbot.vo.FilterVO;
- import com.diagbot.vo.QcResultShortPageVO;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import springfox.documentation.annotations.ApiIgnore;
- import javax.validation.Valid;
- import java.util.List;
- import java.util.Map;
- /**
- * @Description:
- * @Author:zhaops
- * @time: 2020/4/13 16:45
- */
- @RequestMapping("/console")
- @RestController
- @Api(value = "控制台统计相关API", tags = { "控制台统计相关API" })
- @SuppressWarnings("unchecked")
- public class ConsoleController {
- @Autowired
- private ConsoleFacade consoleFacade;
- //region-----------------------聚合接口开始-------------------------------
- @ApiOperation(value = "病历相关统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/mrStatistics")
- @SysLogger("mrStatistics")
- @ApiIgnore
- public RespDTO<Map<String, Object>> mrStatistics(@RequestBody @Valid FilterVO filterVO) {
- Map<String, Object> data = consoleFacade.mrStatistics(filterVO);
- return RespDTO.onSuc(data);
- }
- @ApiOperation(value = "缺陷相关统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/resultStatistics")
- @SysLogger("resultStatistics")
- @ApiIgnore
- public RespDTO<Map<String, Object>> resultStatistics(@RequestBody @Valid FilterVO filterVO) {
- Map<String, Object> data = consoleFacade.resultStatistics(filterVO);
- return RespDTO.onSuc(data);
- }
- @ApiOperation(value = "平均值相关统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/averageStatistics")
- @SysLogger("averageStatistics")
- @ApiIgnore
- public RespDTO<Map<String, Object>> averageStatistics(@RequestBody @Valid FilterVO filterVO) {
- Map<String, Object> data = consoleFacade.averageStatistics(filterVO);
- return RespDTO.onSuc(data);
- }
- //endregion-----------------------聚合接口结束-------------------------------
- //region-----------------------单独接口开始-------------------------------
- /**
- * 平均住院天数
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "平均住院天数[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/getAverageDayNum")
- @SysLogger("getAverageDayNum")
- public RespDTO<Map<String, Object>> getAverageDayNum(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.getAverageDayNum(filterVO));
- }
- /**
- * 平均住院费用
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "平均住院费用[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/getAverageFee")
- @SysLogger("getAverageFee")
- public RespDTO<Map<String, Object>> getAverageFee(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.getAverageFee(filterVO));
- }
- /**
- * 质控平均分按科室统计
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "质控平均分按科室统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/getAverageScore")
- @SysLogger("getAverageScore")
- public RespDTO<Map<String, Object>> getAverageScore(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.getAverageScore(filterVO));
- }
- /**
- * 各科室质控平均分(首页)-根据内外科系统统计
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "各科室质控平均分(首页)-根据内外科系统统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "deptClass: 科室分类:内科/外科,全部不传 <br>")
- @PostMapping("/getAverageScoreByDeptClass")
- @SysLogger("getAverageScoreByDeptClass")
- public RespDTO<Map<String, Object>> getAverageScoreByDeptClass(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.getAverageScoreByDeptClass(filterVO));
- }
- /**
- * 各科室甲级病历占比
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "各科室甲级病历占比[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/getLevelResultDept")
- @SysLogger("getLevelResultDept")
- public RespDTO<Map<String, Object>> getLevelResultDept(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.getLevelResultDept(filterVO));
- }
- /**
- * 出院人数统计
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "出院人数统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/leaveHosCount")
- @SysLogger("leaveHosCount")
- public RespDTO<Map<String, Object>> leaveHosCount(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.leaveHosCount(filterVO));
- }
- /**
- * 质控病历统计
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "质控病历统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/mrCount")
- @SysLogger("mrCount")
- public RespDTO<Map<String, Object>> mrCount(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.mrCount(filterVO));
- }
- /**
- * 各模块缺陷占比排行
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "各模块缺陷占比排行(首页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/entryCountGroupByCase")
- @SysLogger("entryCountGroupByCase")
- public RespDTO<Map<String, Object>> entryCountGroupByCase(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.entryCountGroupByCase(filterVO));
- }
- /**
- * 条目缺陷占比
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "条目缺陷占比(首页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "isReject: 单项否决 1-否决,0-非<br>" +
- "casesName: 模块名称<br>")
- @PostMapping("/entryCountGroupByEntry")
- @SysLogger("entryCountGroupByEntry")
- public RespDTO<Map<String, Object>> entryCountGroupByEntry(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.entryCountGroupByEntry(filterVO));
- }
- /**
- * 单项否决缺陷占比
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "单项否决缺陷占比(首页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/entryRejectPercent")
- @SysLogger("entryRejectPercent")
- public RespDTO<List<EntryNumDTO>> entryRejectPercent(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.entryRejectPercent(filterVO));
- }
- /**
- * 单项否决缺陷占比
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "各科室甲/乙/丙级病历占比(首页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "level: 病历等级 甲、乙、丙(必填)<br>")
- @PostMapping("/qcResultLevelPercent")
- @SysLogger("qcResultLevelPercent")
- public RespDTO<List<DeptNumDTO>> qcResultLevelPercent(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.qcResultLevelPercent(filterVO));
- }
- /**
- * 各科室缺陷占比
- *
- * @param filterVO
- * @return
- */
- @ApiOperation(value = "各科室缺陷占比[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/entryByDept")
- @SysLogger("entryByDept")
- public RespDTO<Map<String, Object>> entryByDept(@RequestBody @Valid FilterVO filterVO) {
- return RespDTO.onSuc(consoleFacade.entryByDept(filterVO));
- }
- //endregion-----------------------单独接口结束-------------------------------
- //region-----------------------分页接口开始-------------------------------
- /**
- * 各模块缺陷占比(分页)
- *
- * @param filterPageVO
- * @return
- */
- @ApiOperation(value = "各模块缺陷占比(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/entryCountGroupByCasePage")
- @SysLogger("entryCountGroupByCasePage")
- public RespDTO<IPage<NumDTO>> entryCountGroupByCasePage(@RequestBody @Valid FilterPageVO filterPageVO) {
- return RespDTO.onSuc(consoleFacade.entryCountGroupByCasePage(filterPageVO));
- }
- /**
- * 条目缺陷占比(分页)
- *
- * @param filterPageVO
- * @return
- */
- @ApiOperation(value = "缺陷详情(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "deptName: 科室名称 <br>" +
- "casesId: 模块id:243=病案首页 <br>" +
- "casesName: 模块名称 <br>" +
- "isReject: 单项否决 1-否决,0-非<br>" +
- "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
- @PostMapping("/entryCountGroupByEntryPage")
- @SysLogger("entryCountGroupByEntryPage")
- public RespDTO<IPage<EntryNumDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
- return RespDTO.onSuc(consoleFacade.entryCountGroupByEntryPage(filterPageVO));
- }
- /**
- * 按科室统计平均住院天数(分页)
- *
- * @param filterPageByAverageVO
- * @return
- */
- @ApiOperation(value = "按科室统计平均住院天数(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年<br>" +
- "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
- @PostMapping("/getAverageDayNumPage")
- @SysLogger("getAverageDayNumPage")
- public RespDTO<IPage<AverageStatisticsDTO>> getAverageDayNumPage(@RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
- return RespDTO.onSuc(consoleFacade.getAverageDayNumPage(filterPageByAverageVO));
- }
- /**
- * 按科室统计平均住院费用(分页)
- *
- * @param filterPageByAverageVO
- * @return
- */
- @ApiOperation(value = "按科室统计平均住院费用(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年<br>" +
- "dateType: 时间类型 1-本月/本年,2-上月/去年,3-去年本月/去年<br>")
- @PostMapping("/getAverageFeePage")
- @SysLogger("getAverageFeePage")
- public RespDTO<IPage<AverageStatisticsDTO>> getAverageFeePage(@RequestBody @Valid FilterPageByAverageVO filterPageByAverageVO) {
- return RespDTO.onSuc(consoleFacade.getAverageFeePage(filterPageByAverageVO));
- }
- /**
- * 各科室质控平均分(分页)
- *
- * @param filterPageVO
- * @return
- */
- @ApiOperation(value = "各科室质控平均分(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/getAverageScoreByDeptPage")
- @SysLogger("getAverageScoreByDeptPage")
- public RespDTO<IPage<AverageStatisticsDTO>> getAverageScoreByDeptPage(@RequestBody @Valid FilterPageVO filterPageVO) {
- return RespDTO.onSuc(consoleFacade.getAverageScoreByDeptPage(filterPageVO));
- }
- /**
- * 各科室缺陷占比排行(分页)
- *
- * @param filterPageVO
- * @return
- */
- @ApiOperation(value = "各科室缺陷占比排行(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/resultStatisticsByDeptPage")
- @SysLogger("resultStatisticsByDeptPage")
- public RespDTO<IPage<NumDTO>> resultStatisticsByDeptPage(@RequestBody @Valid FilterPageVO filterPageVO) {
- return RespDTO.onSuc(consoleFacade.resultStatisticsByDeptPage(filterPageVO));
- }
- /**
- * 各科室甲级病历占比排行(分页)
- *
- * @param filterPageVO
- * @return
- */
- @ApiOperation(value = "各科室甲级病历占比排行(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/levelPercentGroupByDeptPage")
- @SysLogger("levelPercentGroupByDeptPage")
- public RespDTO<IPage<NumDTO>> levelPercentGroupByDeptPage(@RequestBody @Valid FilterPageVO filterPageVO) {
- return RespDTO.onSuc(consoleFacade.levelPercentGroupByDeptPage(filterPageVO));
- }
- /**
- * 条目缺陷占比(内页)
- *
- * @param filterPageVO
- * @return
- */
- @ApiOperation(value = "条目缺陷占比(分页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>")
- @PostMapping("/entryGroupByEntryInnerPage")
- @SysLogger("entryGroupByEntryInnerPage")
- public RespDTO<IPage<EntryNumDTO>> entryGroupByEntryInnerPage(@RequestBody @Valid FilterPageVO filterPageVO) {
- return RespDTO.onSuc(consoleFacade.entryGroupByEntryInnerPage(filterPageVO));
- }
- //endregion-----------------------分页接口结束-------------------------------
- /**
- * 各科室缺陷占比(组合)
- *
- * @param filterOrderVO
- * @return
- */
- @ApiOperation(value = "各科室缺陷占比(组合)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "level: 病历等级 <br>" +
- "name: 科室名称 <br>" +
- "asc: 排序(升序) <br>" +
- "desc: 排序(降序) <br>")
- @PostMapping("/levelStatistics")
- @SysLogger("levelStatistics")
- public RespDTO<List<LevelStatisticsDTO>> levelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
- return RespDTO.onSuc(consoleFacade.levelStatistics(filterOrderVO));
- }
- /**
- * 各科室缺陷占比(组合)-全院-根据内外科系统统计
- *
- * @param filterOrderVO
- * @return
- */
- @ApiOperation(value = "各科室缺陷占比(组合)-全院-根据内外科系统统计[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "level: 病历等级 <br>" +
- "name: 科室名称 <br>" +
- "deptClass: 科室分类:内科/外科,全部不传 <br>" +
- "asc: 排序(升序) <br>" +
- "desc: 排序(降序) <br>")
- @PostMapping("/levelStatisticsByDeptClass")
- @SysLogger("levelStatisticsByDeptClass")
- public RespDTO<List<LevelStatisticsTZDTO>> levelStatisticsByDeptClass(@RequestBody @Valid FilterOrderVO filterOrderVO) {
- return RespDTO.onSuc(consoleFacade.levelStatisticsByDeptClass_TZ(filterOrderVO));
- }
- /**
- * 病案首页合格率占比
- *
- * @param filterOrderVO
- * @return
- */
- @ApiOperation(value = "病案首页合格率占比[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "level: 病历等级 <br>" +
- "name: 科室名称 <br>" +
- "asc: 排序(升序) <br>" +
- "desc: 排序(降序) <br>")
- @PostMapping("/homePageLevelStatistics")
- @SysLogger("homePageLevelStatistics")
- public RespDTO<List<HomePageNumDTO>> homePageLevelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
- return RespDTO.onSuc(consoleFacade.homePageLevelStatistics(filterOrderVO));
- }
- /**
- * 病案首页合格率占比(首页)
- *
- * @param filterOrderVO
- * @return
- */
- @ApiOperation(value = "病案首页合格率占比(首页)[by:zhaops]",
- notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
- "level: 病历等级 <br>" +
- "name: 科室名称 <br>" +
- "asc: 排序(升序) <br>" +
- "desc: 排序(降序) <br>")
- @PostMapping("/homePageLevelLimit")
- @SysLogger("homePageLevelLimit")
- public RespDTO<List<HomePageNumDTO>> homePageLevelLimit(@RequestBody @Valid FilterOrderVO filterOrderVO) {
- return RespDTO.onSuc(consoleFacade.homePageLevelLimit(filterOrderVO));
- }
- /**
- * 条目缺陷质控评分页(内页)
- *
- * @param qcResultShortPageVO
- * @return
- */
- @ApiOperation(value = "条目缺陷质控评分页(内页)[by:zhaops]",
- notes = "behospitalCode: 病历号<br>" +
- "patName: 病人姓名 <br>" +
- "casesEntryName: 条目名称 <br>" +
- "casesEntryId: 条目id <br>" +
- "behDeptName:科室名称 <br>" +
- "level: 病历等级 <br>" +
- "isReject: 单项否决 1-否决,0-非<br>" +
- "ruleType: 规则类型 0:无,1:空项,2:错误<br>" +
- "startDate: 起始时间 <br>" +
- "endDate: 截止时间 <br>")
- @PostMapping("/qcResultShortPage")
- @SysLogger("qcResultShortPage")
- public RespDTO<IPage<QcResultShortDTO>> qcResultShortPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
- return RespDTO.onSuc(consoleFacade.qcResultShortPage(qcResultShortPageVO));
- }
- /**
- * 关键条目缺陷占比统计
- *
- * @param entryStatisticsVO
- * @return
- */
- @ApiOperation(value = "关键条目缺陷占比统计[by:zhaops]",
- notes = "deptName:科室名称 <br>" +
- "asc: 排序(升序) <br>" +
- "desc:排序(降序) <br>" +
- "startDate: 起始时间 <br>" +
- "endDate: 截止时间 <br>")
- @PostMapping("/entryStatistics")
- @SysLogger("entryStatistics")
- public RespDTO<List<EntryStatisticsDTO>> entryStatistics(@RequestBody @Valid EntryStatisticsVO entryStatisticsVO) {
- return RespDTO.onSuc(consoleFacade.entryStatistics(entryStatisticsVO));
- }
- }
|