|
@@ -1,6 +1,5 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -10,6 +9,7 @@ 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.*;
|
|
@@ -1296,7 +1296,7 @@ public class ConsoleFacade {
|
|
|
* @param filterVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public IPage<Map<String, Object>> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
|
|
|
+ public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
|
|
|
//filterFacade.getMedicalCheckVOSet(filterVO);
|
|
|
filterVO.setHospitalId("2");
|
|
|
//colums
|
|
@@ -1321,22 +1321,19 @@ public class ConsoleFacade {
|
|
|
casesEntryIds.add(Long.valueOf(keyValue[0]));
|
|
|
}
|
|
|
}
|
|
|
- filterVO.setCasesEntryIds(casesEntryIds);
|
|
|
- IPage<Map<String, Object>> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO);
|
|
|
- List<Map<String, Object>> records = medicalCheck.getRecords();
|
|
|
- List<Map<String, Object>> targetRecords = new ArrayList<>();
|
|
|
|
|
|
- for (Map<String, Object> record : records) {
|
|
|
+ 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>();
|
|
|
- Map<String, Object> targetMedicalCheck = new HashMap<>();
|
|
|
- String deptId = String.valueOf(record.get("deptId"));
|
|
|
- String deptName = String.valueOf(record.get("deptName"));
|
|
|
- String doctorName = String.valueOf(record.get("doctorName"));
|
|
|
- String casesEntryId = String.valueOf(record.get("casesEntryId"));
|
|
|
-
|
|
|
+ String casesEntryId = record.getCasesEntryId();
|
|
|
String[] split = casesEntryId.split(",");
|
|
|
-
|
|
|
for (String num : split) {
|
|
|
if (!targetMap.containsKey(num)) {
|
|
|
targetMap.put(num, 1);
|
|
@@ -1344,24 +1341,75 @@ public class ConsoleFacade {
|
|
|
targetMap.put(num, (Object) ((Integer) targetMap.get(num) + 1));
|
|
|
}
|
|
|
}
|
|
|
- medicalCheckDTO.setDoctorName(doctorName);
|
|
|
- medicalCheckDTO.setDeptId(deptId);
|
|
|
- medicalCheckDTO.setColumndeptNames(deptName);
|
|
|
Set<Map.Entry<String, Object>> entries = targetMap.entrySet();
|
|
|
for (Map.Entry<String, Object> entry : entries) {
|
|
|
- medicalCheckDTO.setNumId(entry.getKey());
|
|
|
- medicalCheckDTO.setJzCount(String.valueOf(entry.getValue()));
|
|
|
- targetMedicalCheck.put(medicalCheckDTO.getNumId(), medicalCheckDTO);
|
|
|
-
|
|
|
+ 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());
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- targetRecords.add(targetMedicalCheck);
|
|
|
+ targetList.add(medicalCheckDTO);
|
|
|
}
|
|
|
- medicalCheck.setRecords(targetRecords);
|
|
|
-
|
|
|
-
|
|
|
- return medicalCheck;
|
|
|
+ IPage<MedicalCheckDTO> medicalCheckDTOIPage = medicalCheck.setRecords(targetList);
|
|
|
+ return medicalCheckDTOIPage;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1370,8 +1418,6 @@ public class ConsoleFacade {
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
|
-
|
|
|
-
|
|
|
public List<ColumnDTO> getMedicalCheckTitle() {
|
|
|
//运行病历稽查入参拼接
|
|
|
// String hospitalId = SysUserUtils.getCurrentHospitalID();
|
|
@@ -1405,16 +1451,13 @@ public class ConsoleFacade {
|
|
|
columns.add(columnDeptName);
|
|
|
orderNo++;
|
|
|
ColumnDTO columnMedicalName = new ColumnDTO();
|
|
|
- columnDeptName.setOrderNo(orderNo);
|
|
|
- columnDeptName.setFieldName("medicalName");
|
|
|
- columnDeptName.setColumnName("医疗组");
|
|
|
- columnDeptName.setIsShow(1);
|
|
|
+ columnMedicalName.setOrderNo(orderNo);
|
|
|
+ columnMedicalName.setFieldName("medicalName");
|
|
|
+ columnMedicalName.setColumnName("医疗组");
|
|
|
+ columnMedicalName.setIsShow(1);
|
|
|
columns.add(columnMedicalName);
|
|
|
orderNo++;
|
|
|
for (String valueStr : columnSet) {
|
|
|
- if (StringUtil.isBlank(valueStr)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
String[] keyValue = valueStr.split("--");
|
|
|
if (keyValue != null || keyValue.length > 1) {
|
|
|
ColumnDTO columnNum = new ColumnDTO();
|