|
@@ -1290,6 +1290,158 @@ public class ConsoleFacade {
|
|
return behospitalInfoFacade.qcCheckMRPage(qcResultShortPageVO);
|
|
return behospitalInfoFacade.qcCheckMRPage(qcResultShortPageVO);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ */
|
|
|
|
+/**
|
|
|
|
+ * 运行病历稽查表导出(首页)
|
|
|
|
+ *
|
|
|
|
+ * @param filterVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+public List<MedicalCheckExportDTO> medicalCheckExport(@Param("filterVO") FilterMedicalCheckVO filterVO) {
|
|
|
|
+ //filterFacade.getMedicalCheckVOSet(filterVO);
|
|
|
|
+ filterVO.setHospitalId("2");
|
|
|
|
+ //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]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 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>();
|
|
|
|
+
|
|
|
|
+ //map集合来对查询出来的条目id进行统计出现的次数来确定统计的数量
|
|
|
|
+ Map<String, Object> targetMap = new HashMap<String, Object>();
|
|
|
|
+// 每条数据的目标id集,和面来判断统计次数
|
|
|
|
+ String casesEntryId = null;
|
|
|
|
+ //获取医生名称/目标条目集合在循环里面
|
|
|
|
+ List<MedicalCheckTitleDTO> medicalCheckTitleDTOS = record.getMedicalCheckTitleDTOS();
|
|
|
|
+ for (MedicalCheckTitleDTO medicalCheckTitleDTO : medicalCheckTitleDTOS) {
|
|
|
|
+ //子集合的实体类
|
|
|
|
+ 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));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ 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());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 实体类子集合中添加tile数据,在循环中完成
|
|
|
|
+ medicalTitles.add(medicalTitleDTOS);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //子集合数据填充完毕,在实体类中赋值
|
|
|
|
+ medicalCheckExportDTO.setMedicalCheckTitleDTOS(medicalTitles);
|
|
|
|
+ //循环一条添加一条数据
|
|
|
|
+ medicalExportDTOS.add(medicalCheckExportDTO); //正确的
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return medicalExportDTOS;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 运行病历稽查表(首页)
|
|
* 运行病历稽查表(首页)
|
|
*
|
|
*
|