|
@@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.diagbot.dto.*;
|
|
import com.diagbot.dto.*;
|
|
import com.diagbot.entity.QcCasesEntry;
|
|
import com.diagbot.entity.QcCasesEntry;
|
|
import com.diagbot.entity.SysHospitalSet;
|
|
import com.diagbot.entity.SysHospitalSet;
|
|
|
|
+import com.diagbot.exception.CommonErrorCode;
|
|
|
|
+import com.diagbot.exception.CommonException;
|
|
import com.diagbot.util.*;
|
|
import com.diagbot.util.*;
|
|
import com.diagbot.vo.*;
|
|
import com.diagbot.vo.*;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -415,7 +418,7 @@ public class ConsoleByDeptFacade {
|
|
* @param filterPageByDeptVO
|
|
* @param filterPageByDeptVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public IPage<DeptEntryNumDTO> entryCountGroupByEntryAndDeptPage(FilterPageByDeptVO filterPageByDeptVO) {
|
|
|
|
|
|
+ public IPage<EntryNumGroupDTO> entryCountGroupByEntryAndDeptPage(FilterPageByDeptVO filterPageByDeptVO) {
|
|
if (StringUtil.isBlank(filterPageByDeptVO.getDeptName())) {
|
|
if (StringUtil.isBlank(filterPageByDeptVO.getDeptName())) {
|
|
List<DeptBaseDTO> deptList = this.getDept();
|
|
List<DeptBaseDTO> deptList = this.getDept();
|
|
//默认取第一个科室
|
|
//默认取第一个科室
|
|
@@ -427,7 +430,7 @@ public class ConsoleByDeptFacade {
|
|
filterPageByDeptVO.setDoctorName("");
|
|
filterPageByDeptVO.setDoctorName("");
|
|
}
|
|
}
|
|
filterFacade.filterPageByDeptVOSet(filterPageByDeptVO);
|
|
filterFacade.filterPageByDeptVOSet(filterPageByDeptVO);
|
|
- IPage<DeptEntryNumDTO> page = qcresultInfoFacade.entryCountGroupByEntryAndDeptPage(filterPageByDeptVO);
|
|
|
|
|
|
+ IPage<EntryNumGroupDTO> page = qcresultInfoFacade.entryCountGroupByEntryAndDeptPage(filterPageByDeptVO);
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -485,9 +488,119 @@ public class ConsoleByDeptFacade {
|
|
}
|
|
}
|
|
filterFacade.filterOrderVOSame(filterOrderVO);
|
|
filterFacade.filterOrderVOSame(filterOrderVO);
|
|
List<LevelStsByDeptDTO> records = behospitalInfoFacade.levelStatisticsByDept(filterOrderVO);
|
|
List<LevelStsByDeptDTO> records = behospitalInfoFacade.levelStatisticsByDept(filterOrderVO);
|
|
|
|
+ if(ListUtil.isNotEmpty(records)){
|
|
|
|
+ for (LevelStsByDeptDTO record : records) {
|
|
|
|
+ BigDecimalMethod(record);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return records;
|
|
return records;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void BigDecimalMethod(LevelStsByDeptDTO record){
|
|
|
|
+ BigDecimal entrySameBigDecimal = getSubtract(new BigDecimal(record.getEntryNum()), new BigDecimal(record.getSameNum() == null? 0:record.getSameNum()));
|
|
|
|
+
|
|
|
|
+ if(entrySameBigDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setEntrySameNum(1);
|
|
|
|
+ }else if(entrySameBigDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setEntrySameNum(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setEntrySameNum(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal sameMrNumBigDecimal = getSubtract(new BigDecimal(record.getMrNum()), new BigDecimal(record.getSameMrNum() == null? 0:record.getSameMrNum()));
|
|
|
|
+ if(sameMrNumBigDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setMrSameNum(1);
|
|
|
|
+ }else if(sameMrNumBigDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setMrSameNum(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setMrSameNum(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal sameAvgValueDecimal = getSubtract(new BigDecimal(record.getAverageValue()), new BigDecimal(record.getSameAvgValue() == null? 0:record.getSameAvgValue()));
|
|
|
|
+ if(sameAvgValueDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setAvSameValue(1);
|
|
|
|
+ }else if(sameAvgValueDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setAvSameValue(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setAvSameValue(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal SameFirstLevelBigDecimal = getSubtract(new BigDecimal(record.getFirstLevelNum()), new BigDecimal(record.getSameFirstLevelNum() == null? 0:record.getSameFirstLevelNum()));
|
|
|
|
+ if(SameFirstLevelBigDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setFirSameLevelNum(1);
|
|
|
|
+ }else if(SameFirstLevelBigDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setFirSameLevelNum(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setFirSameLevelNum(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal SameSecondLevelBigDecimal = getSubtract(new BigDecimal(record.getSecondLevelNum()), new BigDecimal(record.getSameSecondLevelNum() == null? 0:record.getSameSecondLevelNum()));
|
|
|
|
+ if(SameSecondLevelBigDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setSecSameLevelNum(1);
|
|
|
|
+ }else if(SameSecondLevelBigDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setSecSameLevelNum(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setSecSameLevelNum(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal SameThirdLevelBigDecimal = getSubtract(new BigDecimal(record.getThirdLevelNum()), new BigDecimal(record.getSameThirdLevelNum() == null? 0:record.getSameThirdLevelNum()));
|
|
|
|
+ if(SameThirdLevelBigDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setThiSameLevelNum(1);
|
|
|
|
+ }else if(SameThirdLevelBigDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setThiSameLevelNum(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setThiSameLevelNum(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal SameFirstLevelPeDecimal = getSubtract(new BigDecimal(record.getFirstLevelPercent()), new BigDecimal(record.getSameFirstLevelPercent() == null? 0:record.getSameFirstLevelPercent()));
|
|
|
|
+ if(SameFirstLevelPeDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setFirSameLevelPercent(1);
|
|
|
|
+ }else if(SameFirstLevelPeDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setFirSameLevelPercent(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setFirSameLevelPercent(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal SameSecondLevelPeDecimal = getSubtract(new BigDecimal(record.getSecondLevelPercent()), new BigDecimal(record.getSameSecondLevelPercent() == null? 0:record.getSameSecondLevelPercent()));
|
|
|
|
+ if(SameSecondLevelPeDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setSecSameLevelPercent(1);
|
|
|
|
+ }else if(SameSecondLevelPeDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setSecSameLevelPercent(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setSecSameLevelPercent(-1);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ BigDecimal SameThirdLevelPeDecimal = getSubtract(new BigDecimal(record.getThirdLevelPercent()), new BigDecimal(record.getSameThirdLevelPercent() == null? 0:record.getSameThirdLevelPercent()));
|
|
|
|
+ if(SameThirdLevelPeDecimal.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
+ record.setThiSameLevelPercent(1);
|
|
|
|
+ }else if(SameThirdLevelPeDecimal.compareTo(BigDecimal.ZERO) == 0){
|
|
|
|
+ record.setThiSameLevelPercent(0);
|
|
|
|
+ }else{
|
|
|
|
+ record.setThiSameLevelPercent(-1);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 差值计算
|
|
|
|
+ *
|
|
|
|
+ * @param bigDecimalOne
|
|
|
|
+ * @param bigDecimalTwo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private BigDecimal getSubtract(BigDecimal bigDecimalOne, BigDecimal bigDecimalTwo) {
|
|
|
|
+ BigDecimal newBigDecimal = new BigDecimal(0);
|
|
|
|
+ if (null == bigDecimalOne && null != bigDecimalTwo) {
|
|
|
|
+ newBigDecimal = newBigDecimal.subtract(bigDecimalTwo);
|
|
|
|
+ } else if (null != bigDecimalOne && null == bigDecimalTwo) {
|
|
|
|
+ newBigDecimal = bigDecimalOne.subtract(newBigDecimal);
|
|
|
|
+ } else if (null != bigDecimalOne && null != bigDecimalTwo) {
|
|
|
|
+ newBigDecimal = bigDecimalOne.subtract(bigDecimalTwo);
|
|
|
|
+ }
|
|
|
|
+ return newBigDecimal;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 病案首页合格率占比
|
|
* 病案首页合格率占比
|
|
*
|
|
*
|
|
@@ -803,7 +916,8 @@ public class ConsoleByDeptFacade {
|
|
ReBeHosDetailByDeptDTO lastDetailRecord = new ReBeHosDetailByDeptDTO();
|
|
ReBeHosDetailByDeptDTO lastDetailRecord = new ReBeHosDetailByDeptDTO();
|
|
lastDetailRecord.setName(record.getName());
|
|
lastDetailRecord.setName(record.getName());
|
|
lastDetailRecord.setBehDeptId(record.getLastBehDeptId());
|
|
lastDetailRecord.setBehDeptId(record.getLastBehDeptId());
|
|
- lastDetailRecord.setDoctorName(record.getDoctorName());
|
|
|
|
|
|
+ lastDetailRecord.setBehDeptName(record.getLastBehDeptName());
|
|
|
|
+ lastDetailRecord.setDoctorName(record.getLastDoctorName());
|
|
lastDetailRecord.setBehospitalCode(record.getLastBehospitalCode());
|
|
lastDetailRecord.setBehospitalCode(record.getLastBehospitalCode());
|
|
lastDetailRecord.setBehospitalDate(record.getLastBehospitalDate());
|
|
lastDetailRecord.setBehospitalDate(record.getLastBehospitalDate());
|
|
lastDetailRecord.setLeaveHospitalDate(record.getLastLeaveHospitalDate());
|
|
lastDetailRecord.setLeaveHospitalDate(record.getLastLeaveHospitalDate());
|
|
@@ -937,10 +1051,55 @@ public class ConsoleByDeptFacade {
|
|
casesEntryIds.add(Long.valueOf(keyValue[0]));
|
|
casesEntryIds.add(Long.valueOf(keyValue[0]));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO,casesEntryIds);
|
|
|
|
|
|
+ IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getMedicalChecks(filterVO,casesEntryIds);
|
|
return medicalCheck;
|
|
return medicalCheck;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 病历质控报表-科室
|
|
|
|
+ *
|
|
|
|
+ * @param behospitalPageVO
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public IPage<QualityControlDeptDTO> qualityControlByDept(@Param("filterVO") BehospitalPageVO behospitalPageVO) {
|
|
|
|
+ behospitalPageSet(behospitalPageVO);
|
|
|
|
+ IPage<QualityControlDeptDTO> records = behospitalInfoFacade.qualityControlByDept(behospitalPageVO);
|
|
|
|
+ List<QualityControlDeptDTO> qualityControlDTOs = records.getRecords();
|
|
|
|
+ CaseScoreVO caseScoreVO = new CaseScoreVO();
|
|
|
|
+ BeanUtil.copyProperties(behospitalPageVO,caseScoreVO);
|
|
|
|
+ List<CaseScoreDTO>caseScoreDTOS= behospitalInfoFacade.getQualityCaseSorce(caseScoreVO);
|
|
|
|
+ if(ListUtil.isNotEmpty(qualityControlDTOs)){
|
|
|
|
+ qualityControlDTOs.forEach(qualityControlDTO->{
|
|
|
|
+ if(ListUtil.isNotEmpty(caseScoreDTOS)){
|
|
|
|
+ AlgorithmVO algorithmVO = new AlgorithmVO();
|
|
|
|
+ BeanUtil.copyProperties(behospitalPageVO,algorithmVO);
|
|
|
|
+ algorithmVO.setType(0);
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<QcResultAlgVO>();
|
|
|
|
+ for (CaseScoreDTO caseScoreDTO : caseScoreDTOS) {
|
|
|
|
+ if (StringUtils.isNotEmpty(qualityControlDTO.getBehospitalCode())&&
|
|
|
|
+ StringUtils.isNotEmpty(caseScoreDTO.getBehospitalCode())&&
|
|
|
|
+ qualityControlDTO.getBehospitalCode().equals(caseScoreDTO.getBehospitalCode())) {
|
|
|
|
+ QcResultAlgVO qcResultAlgVO = new QcResultAlgVO();
|
|
|
|
+ BeanUtil.copyProperties(caseScoreDTO,qcResultAlgVO);
|
|
|
|
+ qcResultAlgVO.setIsReject(Integer.valueOf(caseScoreDTO.getIsReject()));
|
|
|
|
+ qcResultAlgVO.setScore(new BigDecimal(caseScoreDTO.getScore()));
|
|
|
|
+ qcResultAlgVO.setCasesScore(new BigDecimal(caseScoreDTO.getCasesScore()));
|
|
|
|
+ qcResultAlgVOList.add(qcResultAlgVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ algorithmVO.setType(0);
|
|
|
|
+ algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
|
+ getScoreForCx(algorithmVO,qualityControlDTO);
|
|
|
|
+ }
|
|
|
|
+ if(qualityControlDTO.getLevel().equals("未评分")){
|
|
|
|
+ QualityControlNullDTO qualityControlNullDTO = new QualityControlNullDTO();
|
|
|
|
+ BeanUtil.copyProperties(qualityControlNullDTO,qualityControlDTO);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+ return records;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 未整改病历统计-科室
|
|
* 未整改病历统计-科室
|
|
@@ -1171,6 +1330,345 @@ public class ConsoleByDeptFacade {
|
|
return unModifyMRDTO;
|
|
return unModifyMRDTO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void behospitalPageSet(BehospitalPageVO behospitalPageVO) {
|
|
|
|
+ //入参验证
|
|
|
|
+ //入院时间
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
|
|
|
|
+ behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
|
|
|
|
+ behospitalPageVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getBehosDateEnd(), 1)));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
|
|
|
|
+ if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "入院时间的开始时间必须小于结束时间!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //出院时间
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
|
|
|
|
+ behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
|
|
|
|
+ behospitalPageVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getLeaveHosDateEnd(), 1)));
|
|
|
|
+ }
|
|
|
|
+ if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
|
|
|
|
+ if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ behospitalPageVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
|
|
|
|
+ behospitalPageVO.setUserId(Long.valueOf(SysUserUtils.getCurrentPrincipleID()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 评结果分数(长兴)
|
|
|
|
+ *
|
|
|
|
+ * @param algorithmVO 操作条目的所有信息
|
|
|
|
+ * @return 评结果分数
|
|
|
|
+ */
|
|
|
|
+ private void getScoreForCx(AlgorithmVO algorithmVO,QualityControlDeptDTO qualityControlDTO) {
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgHomePage = new ArrayList<>();
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgHomePageExt = new ArrayList<>();
|
|
|
|
+ for (QcResultAlgVO qcResultAlgVO : algorithmVO.getQcResultAlgVOList()) {
|
|
|
|
+ //首页的情况
|
|
|
|
+ if (qcResultAlgVO.getCasesId().equals(243L)) {
|
|
|
|
+ qcResultAlgHomePage.add(qcResultAlgVO);
|
|
|
|
+ } else {
|
|
|
|
+ //非首页
|
|
|
|
+ qcResultAlgHomePageExt.add(qcResultAlgVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //病案首页
|
|
|
|
+ AlgorithmVO homePage = new AlgorithmVO();
|
|
|
|
+ BeanUtil.copyProperties(algorithmVO, homePage);
|
|
|
|
+ homePage.setQcResultAlgVOList(qcResultAlgHomePage);
|
|
|
|
+ homePage.setIsHomePage(true);
|
|
|
|
+ cal(homePage, qualityControlDTO);
|
|
|
|
+
|
|
|
|
+ //病案首页以外
|
|
|
|
+ AlgorithmVO homePageExt = new AlgorithmVO();
|
|
|
|
+ BeanUtil.copyProperties(algorithmVO, homePageExt);
|
|
|
|
+ homePageExt.setQcResultAlgVOList(qcResultAlgHomePageExt);
|
|
|
|
+ cal(homePageExt,qualityControlDTO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 计算分数
|
|
|
|
+ *
|
|
|
|
+ * @param algorithmVO 操作条目的所有信息
|
|
|
|
+ * @return 评分分数
|
|
|
|
+ */
|
|
|
|
+ private void cal(AlgorithmVO algorithmVO ,QualityControlDeptDTO qualityControlDTO) {
|
|
|
|
+
|
|
|
|
+ //模块总分
|
|
|
|
+ Map<Long, BigDecimal> casesMap = new HashMap<>();
|
|
|
|
+ //单票否决计分
|
|
|
|
+ Map<Long, BigDecimal> rejectScoreMap = new HashMap<>();
|
|
|
|
+ //模块计分
|
|
|
|
+ Map<Long, BigDecimal> casesScoreMap = new HashMap<>();
|
|
|
|
+ //模块缺陷统计
|
|
|
|
+ Map<Long, String> casesNameMap = new HashMap<>();
|
|
|
|
+ //扣分统计
|
|
|
|
+ Map<Long, BigDecimal> scoreMap = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ List<QcResultAlgVO> qcResultAlgVOList = algorithmVO.getQcResultAlgVOList();
|
|
|
|
+ if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
|
|
|
|
+ for (QcResultAlgVO qcResultAlgVO : qcResultAlgVOList) {
|
|
|
|
+ if (!casesMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ //模块总分
|
|
|
|
+ casesMap.put(qcResultAlgVO.getCasesId(), qcResultAlgVO.getCasesScore());
|
|
|
|
+ }
|
|
|
|
+ if (!casesScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ casesScoreMap.put(qcResultAlgVO.getCasesId(), BigDecimal.ZERO);
|
|
|
|
+ rejectScoreMap.put(qcResultAlgVO.getCasesId(), BigDecimal.ZERO);
|
|
|
|
+ casesNameMap.put(qcResultAlgVO.getCasesId(),"");
|
|
|
|
+ }
|
|
|
|
+ //单票否决计分
|
|
|
|
+ if (qcResultAlgVO.getIsReject().equals(1)) {
|
|
|
|
+ if (rejectScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ BigDecimal casesScore = rejectScoreMap.get(qcResultAlgVO.getCasesId());
|
|
|
|
+ casesScore = casesScore.add(qcResultAlgVO.getScore());
|
|
|
|
+ rejectScoreMap.put(qcResultAlgVO.getCasesId(), casesScore);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ //非单票否决计分
|
|
|
|
+ if (casesScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
|
+ BigDecimal casesScore = casesScoreMap.get(qcResultAlgVO.getCasesId());
|
|
|
|
+ casesScore = casesScore.add(qcResultAlgVO.getScore());
|
|
|
|
+ casesScoreMap.put(qcResultAlgVO.getCasesId(), casesScore);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ String casesName = casesNameMap.get(qcResultAlgVO.getCasesId());
|
|
|
|
+ if(StringUtils.isEmpty(casesName)){
|
|
|
|
+ casesName = casesName + qcResultAlgVO.getMsg();
|
|
|
|
+ }else{
|
|
|
|
+ casesName = casesName + ";" + qcResultAlgVO.getMsg();
|
|
|
|
+ }
|
|
|
|
+ casesNameMap.put(qcResultAlgVO.getCasesId(),casesName);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //模块计分
|
|
|
|
+ for (Map.Entry<Long, BigDecimal> casesScore : casesScoreMap.entrySet()) {
|
|
|
|
+ BigDecimal allSccore = casesMap.get(casesScore.getKey());
|
|
|
|
+ if (BigDecimalUtil.le(allSccore, casesScore.getValue())) {
|
|
|
|
+ //模块标准分小于等于模块减分总和就用模块标准分
|
|
|
|
+ allSccore = allSccore.add(rejectScoreMap.get(casesScore.getKey()));
|
|
|
|
+ } else {
|
|
|
|
+ //模块标准分大于模块减分总和就用模块减分总和
|
|
|
|
+ allSccore =casesScore.getValue().add(rejectScoreMap.get(casesScore.getKey()));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (BigDecimalUtil.lt(allSccore, BigDecimal.ZERO)) {
|
|
|
|
+ allSccore = BigDecimal.ZERO;
|
|
|
|
+ }
|
|
|
|
+ scoreMap.put(casesScore.getKey(),allSccore);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ DecimalFormat df=new DecimalFormat("0.0");
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(237L))){
|
|
|
|
+ qualityControlDTO.setAdmissionNote(casesNameMap.get(237L));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(237L) != null){
|
|
|
|
+ qualityControlDTO.setAdmissionNoteScore( Double.valueOf(df.format(scoreMap.get(237L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(238L))){
|
|
|
|
+ qualityControlDTO.setFirstCourseNote(casesNameMap.get(238L));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(238L) != null){
|
|
|
|
+ qualityControlDTO.setFirstCourseNoteScore( Double.valueOf(df.format(scoreMap.get(238L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(242L))){
|
|
|
|
+ qualityControlDTO.setDischargeNote(casesNameMap.get(242L));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(242L) != null){
|
|
|
|
+ qualityControlDTO.setDischargeNoteScore( Double.valueOf(df.format(scoreMap.get(242L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(243L))){
|
|
|
|
+ qualityControlDTO.setMedHomePage(casesNameMap.get(243L));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(243L) != null){
|
|
|
|
+ qualityControlDTO.setMedHomePageScore( Double.valueOf(df.format(scoreMap.get(243L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(280L))){
|
|
|
|
+ qualityControlDTO.setDocAdviceNote(casesNameMap.get(280L));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(280L) != null){
|
|
|
|
+ qualityControlDTO.setDocAdviceNoteScore( Double.valueOf(df.format(scoreMap.get(280L))));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String operationInfo = "";
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(248L))){
|
|
|
|
+ operationInfo = "围手术期病历讨论:"+casesNameMap.get(248L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(249L))){
|
|
|
|
+ operationInfo = operationInfo+";"+"术前讨论制度:"+casesNameMap.get(249L);
|
|
|
|
+ }
|
|
|
|
+ if(operationInfo.contains(";")){
|
|
|
|
+ String[] split = operationInfo.split(";");
|
|
|
|
+ if(StringUtils.isEmpty(split[0])){
|
|
|
|
+ operationInfo = split[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ qualityControlDTO.setOperationInfo(StringUtils.isEmpty(operationInfo)==true?"无缺陷":operationInfo);
|
|
|
|
+
|
|
|
|
+ Double score_248 = 0d;
|
|
|
|
+ Double score_11 = 0d;
|
|
|
|
+ Double score_249 = 0d;
|
|
|
|
+ if( scoreMap.get(248L) != null){
|
|
|
|
+ score_248 = Double.valueOf(df.format(scoreMap.get(248L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(11L) != null){
|
|
|
|
+ score_11 = Double.valueOf(df.format(scoreMap.get(11L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(249L) != null){
|
|
|
|
+ score_249 = Double.valueOf(df.format(scoreMap.get(249L)));
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setOperationInfoScore(score_248+score_11+score_249);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String courseRecord = "";
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(239L))){
|
|
|
|
+ courseRecord = "死亡病例讨论制度:"+casesNameMap.get(239L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(240L))){
|
|
|
|
+ courseRecord = courseRecord+";"+"疑难病例讨论制度:"+casesNameMap.get(240L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(241L))){
|
|
|
|
+ courseRecord =courseRecord+";"+ "三级查房制度:"+casesNameMap.get(241L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(244L))){
|
|
|
|
+ courseRecord =courseRecord+";"+ "会诊制度:"+casesNameMap.get(244L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(245L))){
|
|
|
|
+ courseRecord =courseRecord+";"+ "分级护理制度:"+casesNameMap.get(245L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(246L))){
|
|
|
|
+ courseRecord = courseRecord+";"+"值班及交接班制度:"+casesNameMap.get(246L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(247L))){
|
|
|
|
+ courseRecord = courseRecord+";"+"临床用血审核制度:"+casesNameMap.get(247L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(250L))){
|
|
|
|
+ courseRecord =courseRecord+";"+ "死亡记录:"+casesNameMap.get(250L);
|
|
|
|
+ }
|
|
|
|
+ if(courseRecord.contains(";")) {
|
|
|
|
+ String[] courseRecordSplit = courseRecord.split(";");
|
|
|
|
+ if (StringUtils.isEmpty(courseRecordSplit[0])) {
|
|
|
|
+ courseRecord = courseRecordSplit[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setCourseRecord(StringUtils.isEmpty(courseRecord)==true?"无缺陷":courseRecord);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Double score_239 = 0d;
|
|
|
|
+ Double score_240 = 0d;
|
|
|
|
+ Double score_241 = 0d;
|
|
|
|
+ Double score_244 = 0d;
|
|
|
|
+ Double score_245 = 0d;
|
|
|
|
+ Double score_246 = 0d;
|
|
|
|
+ Double score_247 = 0d;
|
|
|
|
+ Double score_250 = 0d;
|
|
|
|
+ DecimalFormat df=new DecimalFormat("0.0");
|
|
|
|
+ if( scoreMap.get(239L) != null){
|
|
|
|
+ score_239 = Double.valueOf(df.format(scoreMap.get(239L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(240L) != null){
|
|
|
|
+ score_240 = Double.valueOf(df.format(scoreMap.get(240L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(241L) != null){
|
|
|
|
+ score_241 = Double.valueOf(df.format(scoreMap.get(241L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(244L) != null){
|
|
|
|
+ score_244 = Double.valueOf(df.format(scoreMap.get(244L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(245L) != null){
|
|
|
|
+ score_245 = Double.valueOf(df.format(scoreMap.get(245L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(246L) != null){
|
|
|
|
+ score_246 = Double.valueOf(df.format(scoreMap.get(246L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(247L) != null){
|
|
|
|
+ score_247 = Double.valueOf(df.format(scoreMap.get(247L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(250L) != null){
|
|
|
|
+ score_250 = Double.valueOf(df.format(scoreMap.get(250L)));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setCourseRecordScore(score_239+score_240+score_241+score_244+score_245+score_246+score_247+score_250);
|
|
|
|
+ /* qualityControlDTO.setCourseRecord(name_239+";"+name_240
|
|
|
|
+ +";"+name_241+";"+name_244+";"+name_245
|
|
|
|
+ +";"+name_246+";"+name_247+";"+name_250);
|
|
|
|
+ qualityControlDTO.setCourseRecordScore(score_239+score_240+score_241+score_244+score_245+score_246
|
|
|
|
+ +score_247+score_250);*/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Double score_262 = 0d;
|
|
|
|
+ Double score_281 = 0d;
|
|
|
|
+ Double score_282 = 0d;
|
|
|
|
+ Double score_283 = 0d;
|
|
|
|
+ Double score_284 = 0d;
|
|
|
|
+ if( scoreMap.get(262L) != null){
|
|
|
|
+ score_262 = Double.valueOf(df.format(scoreMap.get(262L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(281L) != null){
|
|
|
|
+ score_281 = Double.valueOf(df.format(scoreMap.get(281L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(282L) != null){
|
|
|
|
+ score_282 = Double.valueOf(df.format(scoreMap.get(282L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(283L) != null){
|
|
|
|
+ score_283 = Double.valueOf(df.format(scoreMap.get(283L)));
|
|
|
|
+ }
|
|
|
|
+ if( scoreMap.get(284L) != null){
|
|
|
|
+ score_284 = Double.valueOf(df.format(scoreMap.get(284L)));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String otherCase = "";
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(262L))){
|
|
|
|
+ otherCase = "危急值报告制度:"+casesNameMap.get(262L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(281L))){
|
|
|
|
+ otherCase = otherCase +";"+"危急值报告制度:"+casesNameMap.get(281L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(282L))){
|
|
|
|
+ otherCase = otherCase +";"+ "危急值报告制度:"+casesNameMap.get(282L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(283L))){
|
|
|
|
+ otherCase = otherCase +";"+ "危急值报告制度:"+casesNameMap.get(283L);
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(casesNameMap.get(284L))){
|
|
|
|
+ otherCase = otherCase +";"+ "危急值报告制度:"+casesNameMap.get(284L);
|
|
|
|
+ }
|
|
|
|
+ if(otherCase.contains(";")) {
|
|
|
|
+ String[] otherCaseSplit = otherCase.split(";");
|
|
|
|
+ if(StringUtils.isEmpty(otherCaseSplit[0])){
|
|
|
|
+ otherCase = otherCaseSplit[1];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ qualityControlDTO.setOtherCase(StringUtils.isEmpty(otherCase)==true?"无缺陷":otherCase);
|
|
|
|
+ qualityControlDTO.setOtherCaseScore(score_262+score_281+score_282+score_283+score_284);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|