|
@@ -9,7 +9,6 @@ import com.diagbot.aggregate.ResultStatisticsAggregate;
|
|
|
import com.diagbot.dto.*;
|
|
|
import com.diagbot.entity.QcCasesEntry;
|
|
|
import com.diagbot.entity.SysHospitalSet;
|
|
|
-import com.diagbot.enums.MedicalCheckEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.util.*;
|
|
@@ -1290,159 +1289,49 @@ public class ConsoleFacade {
|
|
|
return behospitalInfoFacade.qcCheckMRPage(qcResultShortPageVO);
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- */
|
|
|
-/**
|
|
|
- * 运行病历稽查表导出(首页)
|
|
|
+ /*
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 病历稽查表导出(首页)
|
|
|
*
|
|
|
* @param filterVO
|
|
|
* @return
|
|
|
*/
|
|
|
|
|
|
|
|
|
-public List<MedicalCheckExportDTO> medicalCheckExport(@Param("filterVO") FilterMedicalCheckVO filterVO) {
|
|
|
- filterFacade.getMedicalCheckVOSet(filterVO);
|
|
|
- //colums
|
|
|
- QueryWrapper<SysHospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
|
|
|
- hospitalSetQueryWrapper.eq("is_deleted", 'N')
|
|
|
- .eq("hospital_id", filterVO.getHospitalId())
|
|
|
- .eq("code", "medical_check_form");
|
|
|
- SysHospitalSet hospitalSet = sysHospitalSetFacade.getOne(hospitalSetQueryWrapper);
|
|
|
-
|
|
|
- //表头生成
|
|
|
- List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
|
|
|
-
|
|
|
- //目标条目
|
|
|
- List<Long> casesEntryIds = Lists.newArrayList();
|
|
|
- //遍历第一个条目
|
|
|
- for (String valueStr : columnSet) {
|
|
|
- if (StringUtil.isBlank(valueStr)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- String[] keyValue = valueStr.split("--");
|
|
|
- if (keyValue != null || keyValue.length > 1) {
|
|
|
- casesEntryIds.add(Long.valueOf(keyValue[0]));
|
|
|
- }
|
|
|
- }
|
|
|
+ public List<MedicalCheckExportDTO> medicalCheckExport(@Param("filterVO") FilterMedicalCheckVO filterVO) {
|
|
|
+ filterFacade.getMedicalCheckVOSet(filterVO);
|
|
|
+ //colums
|
|
|
+ QueryWrapper<SysHospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
|
|
|
+ hospitalSetQueryWrapper.eq("is_deleted", 'N')
|
|
|
+ .eq("hospital_id", filterVO.getHospitalId())
|
|
|
+ .eq("code", "medical_check_form");
|
|
|
+ SysHospitalSet hospitalSet = sysHospitalSetFacade.getOne(hospitalSetQueryWrapper);
|
|
|
|
|
|
- List<MedicalCheckExportDTO> medicalCheck = behospitalInfoFacade.getMedicalCheckExport(filterVO,casesEntryIds);
|
|
|
- List<MedicalCheckExportDTO> medicalExportDTOS = new ArrayList<MedicalCheckExportDTO>();
|
|
|
- //获取的数据一对多:一个科室对应医生/多个条目title
|
|
|
- //目标id集取出
|
|
|
-
|
|
|
- //遍历结果集中的每一条数据
|
|
|
- for (MedicalCheckExportDTO record : medicalCheck) {
|
|
|
- //创建稽查条目数据实体类
|
|
|
- MedicalCheckExportDTO medicalCheckExportDTO = new MedicalCheckExportDTO();
|
|
|
- //设置科室名称
|
|
|
- medicalCheckExportDTO.setDeptName(record.getDeptName());
|
|
|
- //实体类中的子集合
|
|
|
- List<MedicalCheckTitleDTO> medicalTitles= new ArrayList<MedicalCheckTitleDTO>();
|
|
|
-
|
|
|
-// 每条数据的目标id集,和面来判断统计次数
|
|
|
- String casesEntryId = null;
|
|
|
- //获取医生名称/目标条目集合在循环里面
|
|
|
- List<MedicalCheckTitleDTO> medicalCheckTitleDTOS = record.getMedicalCheckTitleDTOS();
|
|
|
- for (MedicalCheckTitleDTO medicalCheckTitleDTO : medicalCheckTitleDTOS) {
|
|
|
- //map集合来对查询出来的条目id进行统计出现的次数来确定统计的数量
|
|
|
- Map<String, Object> targetMap = new HashMap<String, Object>();
|
|
|
- //子集合的实体类
|
|
|
- MedicalCheckTitleDTO medicalTitleDTOS = new MedicalCheckTitleDTO();
|
|
|
- medicalTitleDTOS.setDoctorName(medicalCheckTitleDTO.getDoctorName());
|
|
|
-// 获取目标数据子集合的n条数据
|
|
|
- casesEntryId = medicalCheckTitleDTO.getCasesEntryId();
|
|
|
- String[] split = casesEntryId.split(",");
|
|
|
- for (String num : split) {
|
|
|
- if (!targetMap.containsKey(num)) {
|
|
|
- targetMap.put(num, 1);
|
|
|
- } else {
|
|
|
- targetMap.put(num, (Object) ((Integer) targetMap.get(num) + 1));
|
|
|
- }
|
|
|
+ //表头生成
|
|
|
+ List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
|
|
|
+
|
|
|
+ //目标条目
|
|
|
+ List<Long> casesEntryIds = Lists.newArrayList();
|
|
|
+ //遍历第一个条目
|
|
|
+ for (String valueStr : columnSet) {
|
|
|
+ if (StringUtil.isBlank(valueStr)) {
|
|
|
+ continue;
|
|
|
}
|
|
|
- Set<Map.Entry<String, Object>> entries = targetMap.entrySet();
|
|
|
- for (Map.Entry<String, Object> entry : entries) {
|
|
|
- String key = entry.getKey();
|
|
|
- if(key.equals(MedicalCheckEnum.RYJLW_24.getStatus())){
|
|
|
- medicalTitleDTOS.setRyjlw_24((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SCBCJLW_8H.getStatus())){
|
|
|
- medicalTitleDTOS.setScbcjlw_8h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZRSCCFW_72H.getStatus())){
|
|
|
- medicalTitleDTOS.setZrcfw_2w((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.RYHLJBCW_3D.getStatus())){
|
|
|
- medicalTitleDTOS.setRyhljbcw_3d((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZRCFW_2W.getStatus())){
|
|
|
- medicalTitleDTOS.setZrcfw_2w((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZZCFW_3W.getStatus())){
|
|
|
- medicalTitleDTOS.setZzcfw_3w((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.QJJLW_6H.getStatus())){
|
|
|
- medicalTitleDTOS.setQjjlw_6h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.HZJLW_24H.getStatus())){
|
|
|
- medicalTitleDTOS.setHzjlw_24h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SQTLXJW.getStatus())){
|
|
|
- medicalTitleDTOS.setSqtlxjw((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SXJLSW_24H.getStatus())){
|
|
|
- medicalTitleDTOS.setSxjlsw_24h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.XHSCW_30M.getStatus())){
|
|
|
- medicalTitleDTOS.setXhscw_30m((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SHZDCFW_24H.getStatus())){
|
|
|
- medicalTitleDTOS.setShzdcfw_24h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SHJBCW_3D.getStatus())){
|
|
|
- medicalTitleDTOS.setShjbcw_3d((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZKJBCW_3D.getStatus())){
|
|
|
- medicalTitleDTOS.setZkjbcw_3d((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZKJLW_24.getStatus())){
|
|
|
- medicalTitleDTOS.setZkjlw_24((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.BWZHJLBCW_MD.getStatus())){
|
|
|
- medicalTitleDTOS.setBwzhjlbcw_md((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SXHWJL.getStatus())){
|
|
|
- medicalTitleDTOS.setSxhwjl((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SXPJW_24.getStatus())){
|
|
|
- medicalTitleDTOS.setSxpjw_24((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.WJZWJL.getStatus())){
|
|
|
- medicalTitleDTOS.setWjzwjl((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.WYWWCXJ.getStatus())){
|
|
|
- medicalTitleDTOS.setWywwcxj((Integer)entry.getValue());
|
|
|
- }
|
|
|
+ String[] keyValue = valueStr.split("--");
|
|
|
+ if (keyValue != null || keyValue.length > 1) {
|
|
|
+ casesEntryIds.add(Long.valueOf(keyValue[0]));
|
|
|
}
|
|
|
- // 实体类子集合中添加tile数据,在循环中完成
|
|
|
- medicalTitles.add(medicalTitleDTOS);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- //子集合数据填充完毕,在实体类中赋值
|
|
|
- medicalCheckExportDTO.setMedicalCheckTitleDTOS(medicalTitles);
|
|
|
- //循环一条添加一条数据
|
|
|
- medicalExportDTOS.add(medicalCheckExportDTO); //正确的
|
|
|
+ List<MedicalCheckExportDTO> medicalCheck = behospitalInfoFacade.getMedicalCheckExport(filterVO, casesEntryIds);
|
|
|
+ return medicalCheck;
|
|
|
}
|
|
|
|
|
|
- return medicalExportDTOS;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
- * 运行病历稽查表(首页)
|
|
|
+ * 病历稽查表(首页)
|
|
|
*
|
|
|
* @param filterVO
|
|
|
* @return
|
|
@@ -1472,104 +1361,19 @@ public List<MedicalCheckExportDTO> medicalCheckExport(@Param("filterVO") FilterM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO,casesEntryIds);
|
|
|
- List<MedicalCheckDTO> records = medicalCheck.getRecords();
|
|
|
- List<MedicalCheckDTO> targetList = Lists.newArrayList();
|
|
|
- for (MedicalCheckDTO record : records) {
|
|
|
- MedicalCheckDTO medicalCheckDTO = new MedicalCheckDTO();
|
|
|
- medicalCheckDTO.setDeptId(record.getDeptId());
|
|
|
- medicalCheckDTO.setDeptName(record.getDeptName());
|
|
|
- medicalCheckDTO.setDoctorName(record.getDoctorName());
|
|
|
- Map<String, Object> targetMap = new HashMap<String, Object>();
|
|
|
- String casesEntryId = record.getCasesEntryId();
|
|
|
- String[] split = casesEntryId.split(",");
|
|
|
- for (String num : split) {
|
|
|
- if (!targetMap.containsKey(num)) {
|
|
|
- targetMap.put(num, 1);
|
|
|
- } else {
|
|
|
- targetMap.put(num, (Object) ((Integer) targetMap.get(num) + 1));
|
|
|
- }
|
|
|
- }
|
|
|
- Set<Map.Entry<String, Object>> entries = targetMap.entrySet();
|
|
|
- for (Map.Entry<String, Object> entry : entries) {
|
|
|
- String key = entry.getKey();
|
|
|
- medicalCheckDTO.setNumId(key);
|
|
|
- if(key.equals(MedicalCheckEnum.RYJLW_24.getStatus())){
|
|
|
- medicalCheckDTO.setRyjlw_24((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SCBCJLW_8H.getStatus())){
|
|
|
- medicalCheckDTO.setScbcjlw_8h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZRSCCFW_72H.getStatus())){
|
|
|
- medicalCheckDTO.setZrcfw_2w((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.RYHLJBCW_3D.getStatus())){
|
|
|
- medicalCheckDTO.setRyhljbcw_3d((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZRCFW_2W.getStatus())){
|
|
|
- medicalCheckDTO.setZrcfw_2w((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZZCFW_3W.getStatus())){
|
|
|
- medicalCheckDTO.setZzcfw_3w((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.QJJLW_6H.getStatus())){
|
|
|
- medicalCheckDTO.setQjjlw_6h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.HZJLW_24H.getStatus())){
|
|
|
- medicalCheckDTO.setHzjlw_24h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SQTLXJW.getStatus())){
|
|
|
- medicalCheckDTO.setSqtlxjw((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SXJLSW_24H.getStatus())){
|
|
|
- medicalCheckDTO.setSxjlsw_24h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.XHSCW_30M.getStatus())){
|
|
|
- medicalCheckDTO.setXhscw_30m((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SHZDCFW_24H.getStatus())){
|
|
|
- medicalCheckDTO.setShzdcfw_24h((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SHJBCW_3D.getStatus())){
|
|
|
- medicalCheckDTO.setShjbcw_3d((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZKJBCW_3D.getStatus())){
|
|
|
- medicalCheckDTO.setZkjbcw_3d((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.ZKJLW_24.getStatus())){
|
|
|
- medicalCheckDTO.setZkjlw_24((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.BWZHJLBCW_MD.getStatus())){
|
|
|
- medicalCheckDTO.setBwzhjlbcw_md((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SXHWJL.getStatus())){
|
|
|
- medicalCheckDTO.setSxhwjl((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.SXPJW_24.getStatus())){
|
|
|
- medicalCheckDTO.setSxpjw_24((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.WJZWJL.getStatus())){
|
|
|
- medicalCheckDTO.setWjzwjl((Integer)entry.getValue());
|
|
|
- }
|
|
|
- if(key.equals(MedicalCheckEnum.WYWWCXJ.getStatus())){
|
|
|
- medicalCheckDTO.setWywwcxj((Integer)entry.getValue());
|
|
|
- }
|
|
|
- }
|
|
|
- targetList.add(medicalCheckDTO);
|
|
|
- }
|
|
|
- IPage<MedicalCheckDTO> medicalCheckDTOIPage = medicalCheck.setRecords(targetList);
|
|
|
- return medicalCheckDTOIPage;
|
|
|
+ IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO, casesEntryIds);
|
|
|
+ return medicalCheck;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 运行病历稽查表(title)
|
|
|
+ * 病历稽查表(title)
|
|
|
*
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
|
public List<ColumnDTO> getMedicalCheckTitle() {
|
|
|
- //运行病历稽查入参拼接
|
|
|
- String hospitalId = SysUserUtils.getCurrentHospitalID();
|
|
|
+ //病历稽查入参拼接
|
|
|
+ String hospitalId = SysUserUtils.getCurrentHospitalID();
|
|
|
//colums
|
|
|
QueryWrapper<SysHospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
|
|
|
hospitalSetQueryWrapper.eq("is_deleted", 'N')
|