|
@@ -11,35 +11,12 @@ import com.diagbot.enums.IsDeleteEnum;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.exception.CommonException;
|
|
import com.diagbot.service.impl.BehospitalInfoServiceImpl;
|
|
import com.diagbot.service.impl.BehospitalInfoServiceImpl;
|
|
-import com.diagbot.util.BeanUtil;
|
|
|
|
-import com.diagbot.util.DateUtil;
|
|
|
|
-import com.diagbot.util.EncrypDES;
|
|
|
|
-import com.diagbot.util.EntityUtil;
|
|
|
|
-import com.diagbot.util.ExcelUtils;
|
|
|
|
-import com.diagbot.util.ListUtil;
|
|
|
|
-import com.diagbot.util.MapUtil;
|
|
|
|
-import com.diagbot.util.StringUtil;
|
|
|
|
-import com.diagbot.util.SysUserUtils;
|
|
|
|
-import com.diagbot.vo.AlgorithmVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeApiVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeCdsVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeCodeVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeRunVO;
|
|
|
|
-import com.diagbot.vo.AnalyzeVO;
|
|
|
|
-import com.diagbot.vo.BehospitalPageVO;
|
|
|
|
-import com.diagbot.vo.ExportQcresultVO;
|
|
|
|
-import com.diagbot.vo.GetDetailVO;
|
|
|
|
-import com.diagbot.vo.MedrecVo;
|
|
|
|
-import com.diagbot.vo.QcResultAlgQueryVO;
|
|
|
|
-import com.diagbot.vo.QcResultAlgVO;
|
|
|
|
-import com.diagbot.vo.QueryVo;
|
|
|
|
-import com.diagbot.vo.RecordContentVO;
|
|
|
|
-import com.diagbot.vo.TaskVO;
|
|
|
|
|
|
+import com.diagbot.util.*;
|
|
|
|
+import com.diagbot.vo.*;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
-
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -48,6 +25,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.math.RoundingMode;
|
|
import java.math.RoundingMode;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -159,6 +137,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
MedNurseFacade medNurseFacade;
|
|
MedNurseFacade medNurseFacade;
|
|
@Autowired
|
|
@Autowired
|
|
SysHospitalSetFacade sysHospitalSetFacade;
|
|
SysHospitalSetFacade sysHospitalSetFacade;
|
|
|
|
+ @Autowired
|
|
|
|
+ QcCasesRelevanceEntryFacade qcCasesRelevanceEntryFacade;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -174,6 +154,50 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 分页
|
|
|
|
+ *
|
|
|
|
+ * @param
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<ColumnDTO> getMedQualityControl(BasDeptInfoVO basDeptInfoVO) {
|
|
|
|
+ long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
|
+ //colums
|
|
|
|
+ QueryWrapper<SysHospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ hospitalSetQueryWrapper.eq("is_deleted", 'N')
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("code", "med_quality_control");
|
|
|
|
+ List<ColumnDTO> columns = Lists.newLinkedList();
|
|
|
|
+ SysHospitalSet hospitalSet = sysHospitalSetFacade.getOne(hospitalSetQueryWrapper);
|
|
|
|
+ if (hospitalSet == null || StringUtil.isBlank(hospitalSet.getValue())) {
|
|
|
|
+ return columns;
|
|
|
|
+ }
|
|
|
|
+ List<String> strings = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ //表头生成
|
|
|
|
+ List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
|
|
|
|
+ Integer orderNo = 1;
|
|
|
|
+ for (String valueStr : columnSet) {
|
|
|
|
+ String[] keyValue = valueStr.split("--");
|
|
|
|
+ if (keyValue != null || keyValue.length > 1) {
|
|
|
|
+ strings.add(keyValue[1]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (String str : strings) {
|
|
|
|
+ if(str.contains(basDeptInfoVO.getInputStr())){
|
|
|
|
+ ColumnDTO columnNum = new ColumnDTO();
|
|
|
|
+ columnNum.setOrderNo(orderNo);
|
|
|
|
+ columnNum.setColumnName(str);
|
|
|
|
+ columnNum.setFieldName("entry_" + str + "_name");
|
|
|
|
+ columnNum.setIsShow(1);
|
|
|
|
+ columns.add(columnNum);
|
|
|
|
+ orderNo++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return columns;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取明细
|
|
* 获取明细
|
|
*
|
|
*
|
|
@@ -577,6 +601,16 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode()), false
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode()), false
|
|
);
|
|
);
|
|
|
|
|
|
|
|
+ //知情同意书
|
|
|
|
+ List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .in("mode_id", Arrays.asList(53,16))
|
|
|
|
+ .orderByAsc("rec_date")
|
|
|
|
+ );
|
|
|
|
+ List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
|
|
|
|
+
|
|
List<HomeDiagnoseInfo> homePageList = new ArrayList<>();
|
|
List<HomeDiagnoseInfo> homePageList = new ArrayList<>();
|
|
List<HomeOperationInfo> homeOperationInfoList = new ArrayList<>();
|
|
List<HomeOperationInfo> homeOperationInfoList = new ArrayList<>();
|
|
if (homePage != null) {
|
|
if (homePage != null) {
|
|
@@ -686,7 +720,6 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
//使用sql进行关联优化数据查询
|
|
//使用sql进行关联优化数据查询
|
|
List<MedPacsResultDTO> medPacsResultList = medPacsResultFacade.getMedPacsResultList(behospitalInfoList.get(0));
|
|
List<MedPacsResultDTO> medPacsResultList = medPacsResultFacade.getMedPacsResultList(behospitalInfoList.get(0));
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 结构化/文书数据兼容处理
|
|
* 结构化/文书数据兼容处理
|
|
*/
|
|
*/
|
|
@@ -887,7 +920,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
addData("日常病程录", recMap, medrecVoList);
|
|
addData("日常病程录", recMap, medrecVoList);
|
|
|
|
|
|
- addDataWithInnerKey("知情同意书", recMap, medrecVoList);
|
|
|
|
|
|
+ DataWithKey("知情同意书", medicalRecordDTOList, medrecVoList);
|
|
|
|
+ //addDataWithInnerKey("知情同意书", recMap, medrecVoList);
|
|
addDataWithInnerKey("谈话告知书", recMap, medrecVoList);
|
|
addDataWithInnerKey("谈话告知书", recMap, medrecVoList);
|
|
|
|
|
|
//==============文书====================
|
|
//==============文书====================
|
|
@@ -1193,6 +1227,38 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 知情同意书 单独传
|
|
|
|
+ *
|
|
|
|
+ * @param key
|
|
|
|
+ * @param recordList
|
|
|
|
+ * @param medrecVoList
|
|
|
|
+ */
|
|
|
|
+ public void DataWithKey(String key, List<MedicalRecordDTO> recordList, List<MedrecVo> medrecVoList) {
|
|
|
|
+ MedrecVo medrecVo = new MedrecVo();
|
|
|
|
+ medrecVo.setTitle(key);
|
|
|
|
+ Map<String, Object> listMap = new HashMap<>();
|
|
|
|
+ if (ListUtil.isNotEmpty(recordList)) {
|
|
|
|
+ Map<String, List<MedicalRecordDTO>> keyMap =
|
|
|
|
+ EntityUtil.makeEntityListMap(recordList, "recTitle");
|
|
|
|
+ Set<String> keyList = keyMap.keySet();
|
|
|
|
+ for (String k : keyList) {
|
|
|
|
+ List<MedicalRecordDTO> recordContentDTOS = keyMap.get(k);
|
|
|
|
+ if(ListUtil.isNotEmpty(recordContentDTOS)){
|
|
|
|
+ for (MedicalRecordDTO recordContentDTO : recordContentDTOS) {
|
|
|
|
+ recordContentDTO.setIsParsed(0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (ListUtil.isNotEmpty(recordContentDTOS)) {
|
|
|
|
+ listMap.put(k,recordContentDTOS);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ medrecVo.setContent(listMap);
|
|
|
|
+ medrecVoList.add(medrecVo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 1.5.0拼接数据
|
|
* 1.5.0拼接数据
|
|
*
|
|
*
|
|
@@ -1403,7 +1469,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
Map<String, Object> content = new HashMap<>();
|
|
Map<String, Object> content = new HashMap<>();
|
|
try {
|
|
try {
|
|
Map<String, Object> objectMap = MapUtil.objectToMap(homePage);
|
|
Map<String, Object> objectMap = MapUtil.objectToMap(homePage);
|
|
- List<String> firstPageDate = Arrays.asList("birthday", "behospitalDate", "leaveHospitalDate", "qcDate");
|
|
|
|
|
|
+ List<String> firstPageDate = Arrays.asList("birthday", "behospitalDate", "leaveHospitalDate", "qcDate","gmtCreate");
|
|
for (String objKey : objectMap.keySet()) {
|
|
for (String objKey : objectMap.keySet()) {
|
|
if (map.containsKey(objKey)) {
|
|
if (map.containsKey(objKey)) {
|
|
if (firstPageDate.contains(objKey)) {
|
|
if (firstPageDate.contains(objKey)) {
|
|
@@ -2243,4 +2309,38 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 手术费,抗菌药物,手术和病理费等含有人数
|
|
|
|
+ * @param filterVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<Map<String, String>> selectOperationNum( FilterVO filterVO){
|
|
|
|
+ return baseMapper.selectOperationNum(filterVO);
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * 触发规则人数
|
|
|
|
+ * @param filterVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Map<String,Long> triggeringRules( FilterVO filterVO){
|
|
|
|
+ return baseMapper.triggeringRules(filterVO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 病案首页关联的出院病历
|
|
|
|
+ * @param filterVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<Map<String,String>> getMedicalRecords(@Param("filterVO") FilterVO filterVO){
|
|
|
|
+ return baseMapper.getMedicalRecords(filterVO);
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * 首页恶性肿瘤人数
|
|
|
|
+ * @param filterVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public List<Map<String,String>> malignancy(@Param("filterVO") FilterVO filterVO){
|
|
|
|
+ return baseMapper.malignancy(filterVO);
|
|
|
|
+ }
|
|
}
|
|
}
|