|
@@ -180,7 +180,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if (hospitalSet == null || StringUtil.isBlank(hospitalSet.getValue())) {
|
|
|
return columns;
|
|
|
}
|
|
|
- List<String> strings = new ArrayList<>();
|
|
|
+ List<String> strings = new ArrayList<>();
|
|
|
|
|
|
//表头生成
|
|
|
List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
|
|
@@ -192,7 +192,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
for (String str : strings) {
|
|
|
- if(str.contains(basDeptInfoVO.getInputStr())){
|
|
|
+ if (str.contains(basDeptInfoVO.getInputStr())) {
|
|
|
ColumnDTO columnNum = new ColumnDTO();
|
|
|
columnNum.setOrderNo(orderNo);
|
|
|
columnNum.setColumnName(str);
|
|
@@ -293,7 +293,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
//2.1获取核查类型,判断当前用户有没有对应核查类型的角色
|
|
|
int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("behospital_code", getDetailVO.getBehospitalCode())
|
|
|
+ .eq("behospital_code", getDetailVO.getBehospitalCode())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("check_id", SysUserUtils.getCurrentPrincipleID())).get(0).getJobType();
|
|
|
//2.2获取用户角色
|
|
@@ -301,18 +301,27 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("user_id", SysUserUtils.getCurrentPrincipleID())
|
|
|
).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
|
- switch (jobType){
|
|
|
+ switch (jobType) {
|
|
|
case 0:
|
|
|
- if(roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey()*1l)){res.put("checkShow", 1);}
|
|
|
- else {res.put("checkShow", 0);}
|
|
|
+ if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
|
|
|
+ res.put("checkShow", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
break;
|
|
|
case 1:
|
|
|
- if(roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey()*1l)){res.put("checkShow", 1);}
|
|
|
- else {res.put("checkShow", 0);}
|
|
|
+ if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
|
|
|
+ res.put("checkShow", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
break;
|
|
|
case 2:
|
|
|
- if(roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey()*1l)){res.put("checkShow", 1);}
|
|
|
- else {res.put("checkShow", 0);}
|
|
|
+ if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
|
|
|
+ res.put("checkShow", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
break;
|
|
|
default:
|
|
|
res.put("checkShow", 0);
|
|
@@ -362,7 +371,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @param analyzeVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public QueryVo dealCommonData(Long hospitalId, AnalyzeVO analyzeVO) {
|
|
|
+ public QueryVo dealCommonData(Long hospitalId, AnalyzeVO analyzeVO) {
|
|
|
// 获取质控条目
|
|
|
List<QcCasesEntryDTO> qcCasesEntryDTOList = qcCasesEntryFacade.getQcCasesEntry(analyzeVO);
|
|
|
if (ListUtil.isEmpty(qcCasesEntryDTOList)) {
|
|
@@ -382,11 +391,11 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
EncrypDES encrypDES = new EncrypDES();
|
|
|
for (RecordContentDTO recordContentDTO : recordContentDTOList) {
|
|
|
recTitle = recordContentDTO.getRecTitle();
|
|
|
- if(StringUtils.isNotEmpty(recordContentDTO.getXmlText())){
|
|
|
+ if (StringUtils.isNotEmpty(recordContentDTO.getXmlText())) {
|
|
|
recordContentDTO.setXmlText(encrypDES.decryptor(recordContentDTO.getXmlText()));
|
|
|
}
|
|
|
try {
|
|
|
- if(StringUtils.isNotEmpty(recordContentDTO.getHtmlText())){
|
|
|
+ if (StringUtils.isNotEmpty(recordContentDTO.getHtmlText())) {
|
|
|
recordContentDTO.setHtmlText(encrypDES.decryptor(recordContentDTO.getHtmlText()));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
@@ -443,7 +452,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
.select("whole_data", "rec_id", "hospital_id")
|
|
|
- .orderByDesc("behospital_date","rec_id")
|
|
|
+ .orderByDesc("behospital_date", "rec_id")
|
|
|
.last("limit 1")
|
|
|
);
|
|
|
|
|
@@ -592,14 +601,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
.orderByDesc("id"));
|
|
|
- if(ListUtil.isNotEmpty(medTransferRecordList)){
|
|
|
+ if (ListUtil.isNotEmpty(medTransferRecordList)) {
|
|
|
medTransferRecordList.forEach(medTransferRecord -> {
|
|
|
transferOutDate.add(medTransferRecord.getTransferOutDate());
|
|
|
transferInDate.add(medTransferRecord.getTransferInDate());
|
|
|
});
|
|
|
}
|
|
|
- transferMap.put("转出时间",transferOutDate);
|
|
|
- transferMap.put("转入时间",transferInDate);
|
|
|
+ transferMap.put("转出时间", transferOutDate);
|
|
|
+ transferMap.put("转入时间", transferInDate);
|
|
|
|
|
|
// 转入记录
|
|
|
List<StrTransferInNote> strTransferInNoteList = strTransferInNoteFacade.list(new QueryWrapper<StrTransferInNote>()
|
|
@@ -663,7 +672,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
- .in("mode_id", Arrays.asList(53,16))
|
|
|
+ .in("mode_id", Arrays.asList(53, 16))
|
|
|
.orderByAsc("rec_date")
|
|
|
);
|
|
|
List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
|
|
@@ -672,47 +681,46 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
List<HomeOperationInfo> homeOperationInfoList = new ArrayList<>();
|
|
|
if (homePage != null) {
|
|
|
String ageData = homePage.getAge();
|
|
|
- try {
|
|
|
- if(StringUtils.isNotEmpty(homePage.getAge())&&"-".equals(homePage.getAge())==false&&"—".equals(homePage.getAge())==false){
|
|
|
- //兼容数据库出现 .03岁数据 作后期判断处理
|
|
|
- String ageUnitString = homePage.getAgeUnit() == null ? "" : homePage.getAgeUnit();
|
|
|
- if(homePage.getAge().contains(".")&&"岁".equals(ageUnitString)){
|
|
|
- String ageString = homePage.getAge().split("\\.")[0];
|
|
|
- //该年龄作为判断使用
|
|
|
- homePage.setAge(StringUtils.isEmpty(ageString)==true? "0"+homePage.getAge():homePage.getAge());
|
|
|
- }
|
|
|
- //根据时间单位对模版年龄进行区分
|
|
|
- if(Double.parseDouble(homePage.getAge())<=1&& "岁".equals(ageUnitString)){
|
|
|
- homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth())==true ? "0":homePage.getNewbornMonth());
|
|
|
- homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay())==true ? "0":homePage.getNewbornDay());
|
|
|
- }else if("月".equals(ageUnitString)){
|
|
|
- if(StringUtils.isEmpty(homePage.getNewbornDay())==true){
|
|
|
- homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth())==true ? homePage.getAge() : homePage.getNewbornMonth());
|
|
|
- }else if(StringUtils.isEmpty(homePage.getNewbornMonth())==true&&StringUtils.isEmpty(homePage.getNewbornDay())==false){
|
|
|
- homePage.setNewbornMonth("0");
|
|
|
+ try {
|
|
|
+ if (StringUtils.isNotEmpty(homePage.getAge()) && "-".equals(homePage.getAge()) == false && "—".equals(homePage.getAge()) == false) {
|
|
|
+ //兼容数据库出现 .03岁数据 作后期判断处理
|
|
|
+ String ageUnitString = homePage.getAgeUnit() == null ? "" : homePage.getAgeUnit();
|
|
|
+ if (homePage.getAge().contains(".") && "岁".equals(ageUnitString)) {
|
|
|
+ String ageString = homePage.getAge().split("\\.")[0];
|
|
|
+ //该年龄作为判断使用
|
|
|
+ homePage.setAge(StringUtils.isEmpty(ageString) == true ? "0" + homePage.getAge() : homePage.getAge());
|
|
|
}
|
|
|
- homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay())==true ? "0":homePage.getNewbornDay());
|
|
|
- }else if("天".equals(ageUnitString)||"日".equals(ageUnitString)){
|
|
|
- if(StringUtils.isEmpty(homePage.getNewbornMonth())&&StringUtils.isEmpty(homePage.getNewbornDay())){
|
|
|
- homePage.setNewbornDay(homePage.getAge());
|
|
|
- homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth())==true ? "0":homePage.getNewbornMonth());
|
|
|
- }else{
|
|
|
- homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth())==true ? "0":homePage.getNewbornMonth());
|
|
|
- homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay())==true ? "0" : homePage.getNewbornDay());
|
|
|
+ //根据时间单位对模版年龄进行区分
|
|
|
+ if (Double.parseDouble(homePage.getAge()) <= 1 && "岁".equals(ageUnitString)) {
|
|
|
+ homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth()) == true ? "0" : homePage.getNewbornMonth());
|
|
|
+ homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay()) == true ? "0" : homePage.getNewbornDay());
|
|
|
+ } else if ("月".equals(ageUnitString)) {
|
|
|
+ if (StringUtils.isEmpty(homePage.getNewbornDay()) == true) {
|
|
|
+ homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth()) == true ? homePage.getAge() : homePage.getNewbornMonth());
|
|
|
+ } else if (StringUtils.isEmpty(homePage.getNewbornMonth()) == true && StringUtils.isEmpty(homePage.getNewbornDay()) == false) {
|
|
|
+ homePage.setNewbornMonth("0");
|
|
|
+ }
|
|
|
+ homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay()) == true ? "0" : homePage.getNewbornDay());
|
|
|
+ } else if ("天".equals(ageUnitString) || "日".equals(ageUnitString)) {
|
|
|
+ if (StringUtils.isEmpty(homePage.getNewbornMonth()) && StringUtils.isEmpty(homePage.getNewbornDay())) {
|
|
|
+ homePage.setNewbornDay(homePage.getAge());
|
|
|
+ homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth()) == true ? "0" : homePage.getNewbornMonth());
|
|
|
+ } else {
|
|
|
+ homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth()) == true ? "0" : homePage.getNewbornMonth());
|
|
|
+ homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay()) == true ? "0" : homePage.getNewbornDay());
|
|
|
+ }
|
|
|
+ } else if ("时".equals(ageUnitString)) {
|
|
|
+ homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth()) == true ? "0" : homePage.getNewbornMonth());
|
|
|
+ homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay()) == true ? "0" : homePage.getNewbornDay());
|
|
|
+ } else if (Double.parseDouble(homePage.getAge()) > 1 && "岁".equals(ageUnitString)) {
|
|
|
+ homePage.setNewbornMonth("-");
|
|
|
+ homePage.setNewbornDay("-");
|
|
|
}
|
|
|
}
|
|
|
- else if("时".equals(ageUnitString)){
|
|
|
- homePage.setNewbornMonth(StringUtils.isEmpty(homePage.getNewbornMonth())==true ? "0":homePage.getNewbornMonth());
|
|
|
- homePage.setNewbornDay(StringUtils.isEmpty(homePage.getNewbornDay())==true ? "0":homePage.getNewbornDay());
|
|
|
- }else if(Double.parseDouble(homePage.getAge())>1&& "岁".equals(ageUnitString)){
|
|
|
- homePage.setNewbornMonth("-");
|
|
|
- homePage.setNewbornDay("-");
|
|
|
- }
|
|
|
+ } catch (Exception e) {
|
|
|
+ System.out.println("年龄解析出错" + e);
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- System.out.println("年龄解析出错" + e);
|
|
|
- }
|
|
|
- homePage.setAge(ageData+(StringUtils.isEmpty(homePage.getAgeUnit())==true ? "":homePage.getAgeUnit()));
|
|
|
+ homePage.setAge(ageData + (StringUtils.isEmpty(homePage.getAgeUnit()) == true ? "" : homePage.getAgeUnit()));
|
|
|
//去掉年龄单位
|
|
|
homePage.setAgeUnit("");
|
|
|
|
|
@@ -783,30 +791,30 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
// 会诊记录
|
|
|
if (ListUtil.isNotEmpty(strConsultationRecordList)) {
|
|
|
- specialData("会诊", strConsultationRecordList, recMap, medrecVoList, "会诊记录",null);
|
|
|
+ specialData("会诊", strConsultationRecordList, recMap, medrecVoList, "会诊记录", null);
|
|
|
} else {
|
|
|
specialDataWithKey("会诊", recMap, medrecVoList, "会诊记录",
|
|
|
- Arrays.asList("会诊记录"),null);
|
|
|
+ Arrays.asList("会诊记录"), null);
|
|
|
}
|
|
|
|
|
|
//会诊申请单
|
|
|
if (ListUtil.isNotEmpty(strConsultationApplyList)) {
|
|
|
- specialData("会诊", strConsultationApplyList, recMap, medrecVoList, "会诊申请单",null);
|
|
|
+ specialData("会诊", strConsultationApplyList, recMap, medrecVoList, "会诊申请单", null);
|
|
|
} else {
|
|
|
specialDataWithKey("会诊", recMap, medrecVoList, "会诊申请单",
|
|
|
- Arrays.asList("会诊申请单"),null);
|
|
|
+ Arrays.asList("会诊申请单"), null);
|
|
|
}
|
|
|
//会诊结果单
|
|
|
if (ListUtil.isNotEmpty(strConsultationResultList)) {
|
|
|
- specialData("会诊", strConsultationResultList, recMap, medrecVoList, "会诊结果单",null);
|
|
|
+ specialData("会诊", strConsultationResultList, recMap, medrecVoList, "会诊结果单", null);
|
|
|
} else {
|
|
|
specialDataWithKey("会诊", recMap, medrecVoList, "会诊结果单",
|
|
|
- Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"),null);
|
|
|
+ Arrays.asList("会诊记录", "会诊结果单", "会诊申请单"), null);
|
|
|
}
|
|
|
|
|
|
//会诊单(申请和结果)
|
|
|
if (ListUtil.isNotEmpty(strConsultationNoteList)) {
|
|
|
- specialData("会诊", strConsultationNoteList, recMap, medrecVoList, "会诊单(申请和结果)",null);
|
|
|
+ specialData("会诊", strConsultationNoteList, recMap, medrecVoList, "会诊单(申请和结果)", null);
|
|
|
}
|
|
|
//入院记录
|
|
|
if (ListUtil.isNotEmpty(strAdmissionNoteList)) {
|
|
@@ -888,18 +896,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
//术后首程
|
|
|
if (ListUtil.isNotEmpty(strOperativeFirstRecordList)) {
|
|
|
- specialData("手术", strOperativeFirstRecordList, recMap, medrecVoList, "术后首次病程及谈话记录",null);
|
|
|
+ specialData("手术", strOperativeFirstRecordList, recMap, medrecVoList, "术后首次病程及谈话记录", null);
|
|
|
} else {
|
|
|
specialDataWithKey("手术", recMap, medrecVoList, "术后首次病程及谈话记录",
|
|
|
- null,null);
|
|
|
+ null, null);
|
|
|
}
|
|
|
|
|
|
//手术记录
|
|
|
if (ListUtil.isNotEmpty(strOperativeNoteList)) {
|
|
|
- specialData("手术", strOperativeNoteList, recMap, medrecVoList, "手术记录",null);
|
|
|
+ specialData("手术", strOperativeNoteList, recMap, medrecVoList, "手术记录", null);
|
|
|
} else {
|
|
|
specialDataWithKey("手术", recMap, medrecVoList, "手术记录",
|
|
|
- null,null);
|
|
|
+ null, null);
|
|
|
}
|
|
|
|
|
|
//阶段小结
|
|
@@ -911,10 +919,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
//术前讨论小结
|
|
|
if (ListUtil.isNotEmpty(strPreoperativeDiscussionList)) {
|
|
|
- specialData("手术", strPreoperativeDiscussionList, recMap, medrecVoList, "术前讨论、术前小结",null);
|
|
|
+ specialData("手术", strPreoperativeDiscussionList, recMap, medrecVoList, "术前讨论、术前小结", null);
|
|
|
} else {
|
|
|
specialDataWithKey("手术", recMap, medrecVoList, "术前讨论、术前小结",
|
|
|
- null,null);
|
|
|
+ null, null);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -927,18 +935,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
//转入记录
|
|
|
if (ListUtil.isNotEmpty(strTransferInNoteList)) {
|
|
|
- specialData("转科", strTransferInNoteList, recMap, medrecVoList, "转入记录",transferMap);
|
|
|
+ specialData("转科", strTransferInNoteList, recMap, medrecVoList, "转入记录", transferMap);
|
|
|
} else {
|
|
|
specialDataWithKey("转科", recMap, medrecVoList, "转入记录",
|
|
|
- null,transferMap);
|
|
|
+ null, transferMap);
|
|
|
}
|
|
|
|
|
|
//转出记录
|
|
|
if (ListUtil.isNotEmpty(strTransferOutNoteList)) {
|
|
|
- specialData("转科", strTransferOutNoteList, recMap, medrecVoList, "转出记录",transferMap);
|
|
|
+ specialData("转科", strTransferOutNoteList, recMap, medrecVoList, "转出记录", transferMap);
|
|
|
} else {
|
|
|
specialDataWithKey("转科", recMap, medrecVoList, "转出记录",
|
|
|
- null,transferMap);
|
|
|
+ null, transferMap);
|
|
|
}
|
|
|
|
|
|
//查房记录
|
|
@@ -950,10 +958,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
//==============非结构化表拥有,文书单独查出来====================
|
|
|
specialDataWithKey("手术", recMap, medrecVoList, "手术知情同意书",
|
|
|
- null,null);
|
|
|
+ null, null);
|
|
|
|
|
|
specialDataWithKey("手术", recMap, medrecVoList, "手术安全核查表",
|
|
|
- null,null);
|
|
|
+ null, null);
|
|
|
|
|
|
|
|
|
//=========================================
|
|
@@ -1016,10 +1024,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
// if(analyzeVO.getHospitalId()==5 && ListUtil.isNotEmpty(recMap.get("病案首页"))){
|
|
|
// addDataWithInnerKey("病案首页", recMap, medrecVoList);
|
|
|
// }else {
|
|
|
- if(homePage != null){
|
|
|
+ if (homePage != null) {
|
|
|
addDataWithFirstPage("病案首页", homePage, medrecVoList, dicMap,
|
|
|
homePageList, homeOperationInfoList);
|
|
|
- }
|
|
|
+ }
|
|
|
// }
|
|
|
|
|
|
queryVo.setMedrec(medrecVoList);
|
|
@@ -1041,14 +1049,15 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
analyzeVO.setHospitalId(hospitalId);
|
|
|
|
|
|
// 处理公共数据
|
|
|
- QueryVo queryVo = dealCommonData(hospitalId, analyzeVO);
|
|
|
+ QueryVo queryVo = dealCommonData(hospitalId, analyzeVO);
|
|
|
queryVo.setUseCrfCache(analyzeVO.isUseCrfCache());
|
|
|
//已核查抛出以评分
|
|
|
List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode()));
|
|
|
- if (medCheckInfos.size() == 1 && medCheckInfos.get(0).getStatus()==CheckStatusEnum.Enable.getKey() && analyzeVO.getCheckFlag()) {
|
|
|
+ Set<Integer> status = medCheckInfos.stream().map(MedCheckInfo::getStatus).collect(Collectors.toSet());
|
|
|
+ if (medCheckInfos.size() >= 1 && status.contains(CheckStatusEnum.Enable.getKey()) && analyzeVO.getCheckFlag()) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病例已经核查无需评分!");
|
|
|
}
|
|
|
// 调用质控接口
|
|
@@ -1098,9 +1107,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @param recMap
|
|
|
* @param medrecVoList
|
|
|
*/
|
|
|
- public void addData(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList) {
|
|
|
+ public void addData(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList) {
|
|
|
List<RecordContentDTO> list = recMap.get(key);
|
|
|
- if(ListUtil.isNotEmpty(list)){
|
|
|
+ if (ListUtil.isNotEmpty(list)) {
|
|
|
for (RecordContentDTO recordContentDTO : list) {
|
|
|
recordContentDTO.setIsParsed(0);
|
|
|
}
|
|
@@ -1123,7 +1132,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @param medrecVoList
|
|
|
*/
|
|
|
public void specialDataWithKey(String key, Map<String, List<RecordContentDTO>> recMap, List<MedrecVo> medrecVoList,
|
|
|
- String keyTagert, List<String> keyList,Map<String, List<LocalDateTime>> transferMap) {
|
|
|
+ String keyTagert, List<String> keyList, Map<String, List<LocalDateTime>> transferMap) {
|
|
|
MedrecVo medrecVo = new MedrecVo();
|
|
|
Map<String, List<RecordContentDTO>> specialContent = new HashMap<String, List<RecordContentDTO>>();
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
@@ -1139,9 +1148,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
}
|
|
|
//设置特殊属性
|
|
|
List<RecordContentDTO> recordContentDTOS = recMap.get(keyTagert);
|
|
|
- if(ListUtil.isNotEmpty(recordContentDTOS)){
|
|
|
+ if (ListUtil.isNotEmpty(recordContentDTOS)) {
|
|
|
for (RecordContentDTO recordContentDTO : recordContentDTOS) {
|
|
|
- if(null != transferMap){
|
|
|
+ if (null != transferMap) {
|
|
|
recordContentDTO.setTransferOutDate(transferMap.get("转出时间"));
|
|
|
recordContentDTO.setTransferInDate(transferMap.get("转入时间"));
|
|
|
}
|
|
@@ -1151,9 +1160,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
//用来复制申请单
|
|
|
List<RecordContentDTO> recordContentList = recMap.get("会诊申请单");
|
|
|
- if(ListUtil.isNotEmpty(recordContentList)){
|
|
|
+ if (ListUtil.isNotEmpty(recordContentList)) {
|
|
|
for (RecordContentDTO recordContentDTO : recordContentList) {
|
|
|
- if(null != transferMap){
|
|
|
+ if (null != transferMap) {
|
|
|
recordContentDTO.setTransferOutDate(transferMap.get("转出时间"));
|
|
|
recordContentDTO.setTransferInDate(transferMap.get("转入时间"));
|
|
|
}
|
|
@@ -1276,14 +1285,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Set<String> keyList = keyMap.keySet();
|
|
|
for (String k : keyList) {
|
|
|
List<RecordContentDTO> recordContentDTOS = keyMap.get(k);
|
|
|
- if(ListUtil.isNotEmpty(recordContentDTOS)){
|
|
|
+ if (ListUtil.isNotEmpty(recordContentDTOS)) {
|
|
|
for (RecordContentDTO recordContentDTO : recordContentDTOS) {
|
|
|
recordContentDTO.setIsParsed(0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (ListUtil.isNotEmpty(recordContentDTOS)) {
|
|
|
- listMap.put(k,recordContentDTOS);
|
|
|
+ listMap.put(k, recordContentDTOS);
|
|
|
}
|
|
|
}
|
|
|
content.put("content", listMap);
|
|
@@ -1309,14 +1318,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Set<String> keyList = keyMap.keySet();
|
|
|
for (String k : keyList) {
|
|
|
List<MedicalRecordDTO> recordContentDTOS = keyMap.get(k);
|
|
|
- if(ListUtil.isNotEmpty(recordContentDTOS)){
|
|
|
+ if (ListUtil.isNotEmpty(recordContentDTOS)) {
|
|
|
for (MedicalRecordDTO recordContentDTO : recordContentDTOS) {
|
|
|
recordContentDTO.setIsParsed(0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (ListUtil.isNotEmpty(recordContentDTOS)) {
|
|
|
- listMap.put(k,recordContentDTOS);
|
|
|
+ listMap.put(k, recordContentDTOS);
|
|
|
}
|
|
|
}
|
|
|
medrecVo.setContent(listMap);
|
|
@@ -1387,7 +1396,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Map<String, List<LocalDateTime>> transferMap) {
|
|
|
MedrecVo medrecVo = new MedrecVo();
|
|
|
Map<String, Object> content = new HashMap<String, Object>();
|
|
|
- Map<String, List<RecordContentDTO>> specialContent = new HashMap<>();
|
|
|
+ Map<String, List<RecordContentDTO>> specialContent = new HashMap<>();
|
|
|
List<RePlaceData> contents = new ArrayList<>();
|
|
|
|
|
|
//从结构化表中取出应用数据
|
|
@@ -1412,7 +1421,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Boolean flag = true;
|
|
|
List<RecordContentDTO> recordContentDTOS = recMap.get(keyTagert);
|
|
|
for (RecordContentDTO recordContentDTO : recordContentDTOS) {
|
|
|
- if(null != transferMap){
|
|
|
+ if (null != transferMap) {
|
|
|
recordContentDTO.setTransferOutDate(transferMap.get("转出时间"));
|
|
|
recordContentDTO.setTransferInDate(transferMap.get("转入时间"));
|
|
|
}
|
|
@@ -1534,7 +1543,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Map<String, Object> content = new HashMap<>();
|
|
|
try {
|
|
|
Map<String, Object> objectMap = MapUtil.objectToMap(homePage);
|
|
|
- List<String> firstPageDate = Arrays.asList("birthday", "behospitalDate", "leaveHospitalDate", "qcDate","gmtCreate");
|
|
|
+ List<String> firstPageDate = Arrays.asList("birthday", "behospitalDate", "leaveHospitalDate", "qcDate", "gmtCreate");
|
|
|
for (String objKey : objectMap.keySet()) {
|
|
|
if (map.containsKey(objKey)) {
|
|
|
if (firstPageDate.contains(objKey)) {
|
|
@@ -1713,7 +1722,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if ("0".equals(analyzeRunVO.getIsPlacefile())) {
|
|
|
Map<String, Object> resMap = calScoreAndSave(outputInfo, codeList, codeToInfoMap, analyzeVO, queryVo.getBehospitalInfo().getIsPlacefile());
|
|
|
algorithmDTO = (AlgorithmDTO) resMap.get("algorithmDTO");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//终末质控不保存数据
|
|
|
Map<String, Object> resMap = calScore(outputInfo, codeList, codeToInfoMap, analyzeVO, queryVo.getBehospitalInfo().getIsPlacefile());
|
|
|
algorithmDTO = (AlgorithmDTO) resMap.get("algorithmDTO");
|
|
@@ -1721,15 +1730,15 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
List<MsgDTO> msgDTOList = getMsg(analyzeVO);
|
|
|
if (ListUtil.isNotEmpty(msgDTOList)) {
|
|
|
- msgDTOList.forEach(msgDTO ->{
|
|
|
- if(StringUtils.isNotEmpty(msgDTO.getInfo()) && StringUtils.isNotEmpty(msgDTO.getInfo().trim()) &&
|
|
|
- StringUtils.isNotEmpty(msgDTO.getMsg())){
|
|
|
- msgDTO.setMsg(msgDTO.getMsg()+"("+msgDTO.getInfo().trim()+")");
|
|
|
+ msgDTOList.forEach(msgDTO -> {
|
|
|
+ if (StringUtils.isNotEmpty(msgDTO.getInfo()) && StringUtils.isNotEmpty(msgDTO.getInfo().trim()) &&
|
|
|
+ StringUtils.isNotEmpty(msgDTO.getMsg())) {
|
|
|
+ msgDTO.setMsg(msgDTO.getMsg() + "(" + msgDTO.getInfo().trim() + ")");
|
|
|
}
|
|
|
});
|
|
|
// 从qc_question_info的cases_entry_ids获取
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
- paramMap.put("hospitalId", analyzeRunVO.getHospitalId());
|
|
|
+ paramMap.put("hospitalId", analyzeRunVO.getHospitalId());
|
|
|
paramMap.put("casesEntryIds", msgDTOList.stream().map(r -> r.getCasesEntryId()).collect(Collectors.toList()));
|
|
|
Map<Long, List<QuestionEntryDTO>> quesEntryMap = qcQuestionFacade.getByCaseEntryIdsFac(paramMap);
|
|
|
for (MsgDTO msgDTO : msgDTOList) {
|
|
@@ -1756,19 +1765,19 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
reNum = "1";
|
|
|
}
|
|
|
QcResultApiDTO qcResultApiDTO = new QcResultApiDTO();
|
|
|
- if(StringUtils.isNotEmpty(algorithmDTO.getLevel()) && algorithmDTO.getScore()!=null && msgDTOList != null){
|
|
|
- if("1".equals(reNum)) {
|
|
|
+ if (StringUtils.isNotEmpty(algorithmDTO.getLevel()) && algorithmDTO.getScore() != null && msgDTOList != null) {
|
|
|
+ if ("1".equals(reNum)) {
|
|
|
bigDecimal = resPr.subtract(algorithmDTO.getScore());
|
|
|
- }else if("0".equals(reNum)){
|
|
|
+ } else if ("0".equals(reNum)) {
|
|
|
bigDecimal = res.subtract(algorithmDTO.getScore().multiply(new BigDecimal(120))
|
|
|
.divide(new BigDecimal(100), 1, RoundingMode.HALF_UP));
|
|
|
}
|
|
|
|
|
|
- //缺陷总数
|
|
|
- Long num = msgDTOList
|
|
|
- .stream()
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .count();
|
|
|
+ //缺陷总数
|
|
|
+ Long num = msgDTOList
|
|
|
+ .stream()
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .count();
|
|
|
qcResultApiDTO.setScoreRes(algorithmDTO.getScore());
|
|
|
qcResultApiDTO.setLevel(algorithmDTO.getLevel());
|
|
|
qcResultApiDTO.setNum(num);
|
|
@@ -1781,13 +1790,12 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Map<String, List<MsgApiDTO>> msgMap = EntityUtil.makeEntityListMap(msgApiDTOList, "modelName");
|
|
|
resMapData.put("details", msgMap);
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+ ;
|
|
|
return resMapData;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 获取明细api
|
|
|
*
|
|
@@ -1880,7 +1888,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
Long hospitalId = analyzeVO.getHospitalId();
|
|
|
|
|
|
// 处理公共数据
|
|
|
- QueryVo queryVo = dealCommonData(hospitalId, analyzeVO);
|
|
|
+ QueryVo queryVo = dealCommonData(hospitalId, analyzeVO);
|
|
|
// 调用质控接口
|
|
|
Response<OutputInfo> response = qcServiceClient.extract(queryVo);
|
|
|
if (response == null || response.getData() == null) {
|
|
@@ -1990,38 +1998,39 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresult(exportQcresultVO);
|
|
|
List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
resWide = transList(res, resWide);
|
|
|
}
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if("1".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
}
|
|
|
- public List<ExportWideExcelDTO> transList(List<ExportExcelDTO>res, List<ExportWideExcelDTO>resWide){
|
|
|
- if(ListUtil.isNotEmpty(res)){
|
|
|
- res.forEach(exportExcelDTO->{
|
|
|
+
|
|
|
+ public List<ExportWideExcelDTO> transList(List<ExportExcelDTO> res, List<ExportWideExcelDTO> resWide) {
|
|
|
+ if (ListUtil.isNotEmpty(res)) {
|
|
|
+ res.forEach(exportExcelDTO -> {
|
|
|
ExportWideExcelDTO exportWideExcelDTO = new ExportWideExcelDTO();
|
|
|
- exportWideExcelDTO.setAvgScore(exportExcelDTO.getAvgScore());
|
|
|
- exportWideExcelDTO.setBehDeptName(exportExcelDTO.getBehDeptName());
|
|
|
- List<ExportExcelBehospitalDTO> excelBehospitalDTOS = exportExcelDTO.getExcelBehospitalDTOS();
|
|
|
- List<ExportExcelWideBehospitalDTO> exportExcelWideBehospitalDTOs = new ArrayList<>();
|
|
|
- excelBehospitalDTOS.forEach(exportExcelBehospitalDTO->{
|
|
|
- ExportExcelWideBehospitalDTO exportExcelWideBehospitalDTO = new ExportExcelWideBehospitalDTO();
|
|
|
- exportExcelWideBehospitalDTO.setDoctorName(exportExcelBehospitalDTO.getDoctorName());
|
|
|
- exportExcelWideBehospitalDTO.setBehospitalCode(exportExcelBehospitalDTO.getBehospitalCode());
|
|
|
- exportExcelWideBehospitalDTO.setBehospitalDate(exportExcelBehospitalDTO.getBehospitalDate());
|
|
|
- exportExcelWideBehospitalDTO.setLeaveHospitalDate(exportExcelBehospitalDTO.getLeaveHospitalDate());
|
|
|
- exportExcelWideBehospitalDTO.setPatName(exportExcelBehospitalDTO.getPatName());
|
|
|
- exportExcelWideBehospitalDTO.setScore(exportExcelBehospitalDTO.getScore());
|
|
|
- exportExcelWideBehospitalDTO.setScoreBn(exportExcelBehospitalDTO.getScoreBn());
|
|
|
- exportExcelWideBehospitalDTOs.add(exportExcelWideBehospitalDTO);
|
|
|
- });
|
|
|
- exportWideExcelDTO.setExcelBehospitalDTOS(exportExcelWideBehospitalDTOs);
|
|
|
+ exportWideExcelDTO.setAvgScore(exportExcelDTO.getAvgScore());
|
|
|
+ exportWideExcelDTO.setBehDeptName(exportExcelDTO.getBehDeptName());
|
|
|
+ List<ExportExcelBehospitalDTO> excelBehospitalDTOS = exportExcelDTO.getExcelBehospitalDTOS();
|
|
|
+ List<ExportExcelWideBehospitalDTO> exportExcelWideBehospitalDTOs = new ArrayList<>();
|
|
|
+ excelBehospitalDTOS.forEach(exportExcelBehospitalDTO -> {
|
|
|
+ ExportExcelWideBehospitalDTO exportExcelWideBehospitalDTO = new ExportExcelWideBehospitalDTO();
|
|
|
+ exportExcelWideBehospitalDTO.setDoctorName(exportExcelBehospitalDTO.getDoctorName());
|
|
|
+ exportExcelWideBehospitalDTO.setBehospitalCode(exportExcelBehospitalDTO.getBehospitalCode());
|
|
|
+ exportExcelWideBehospitalDTO.setBehospitalDate(exportExcelBehospitalDTO.getBehospitalDate());
|
|
|
+ exportExcelWideBehospitalDTO.setLeaveHospitalDate(exportExcelBehospitalDTO.getLeaveHospitalDate());
|
|
|
+ exportExcelWideBehospitalDTO.setPatName(exportExcelBehospitalDTO.getPatName());
|
|
|
+ exportExcelWideBehospitalDTO.setScore(exportExcelBehospitalDTO.getScore());
|
|
|
+ exportExcelWideBehospitalDTO.setScoreBn(exportExcelBehospitalDTO.getScoreBn());
|
|
|
+ exportExcelWideBehospitalDTOs.add(exportExcelWideBehospitalDTO);
|
|
|
+ });
|
|
|
+ exportWideExcelDTO.setExcelBehospitalDTOS(exportExcelWideBehospitalDTOs);
|
|
|
resWide.add(exportWideExcelDTO);
|
|
|
});
|
|
|
}
|
|
@@ -2043,15 +2052,15 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresultByPerson(exportQcresultVO);
|
|
|
List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
resWide = transList(res, resWide);
|
|
|
}
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if("1".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
}
|
|
@@ -2071,15 +2080,15 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresultByDept(exportQcresultVO);
|
|
|
List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
resWide = transList(res, resWide);
|
|
|
}
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if("1".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
}
|
|
@@ -2099,17 +2108,18 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
exportQcresultVOSet(exportQcresultVO);
|
|
|
List<ExportExcelDTO> res = this.exportQcresultByGroup(exportQcresultVO);
|
|
|
List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
resWide = transList(res, resWide);
|
|
|
}
|
|
|
String fileName = "抽查住院病历质量情况.xls";
|
|
|
response.setContentType("text/html;charset=UTF-8");
|
|
|
- if("1".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
|
|
|
}
|
|
|
- if("2".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("2".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
|
|
|
- } }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
private void exportQcresultVOSet(ExportQcresultVO exportQcresultVO) {
|
|
|
//入参验证
|
|
@@ -2119,7 +2129,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if (null != exportQcresultVO && null != exportQcresultVO.getBehosDateStart() && null != exportQcresultVO.getBehosDateEnd()) {
|
|
|
Date startDate = exportQcresultVO.getBehosDateStart();
|
|
|
Date endDate = exportQcresultVO.getBehosDateEnd();
|
|
|
- if("1".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
//时间间隔7天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
@@ -2127,7 +2137,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if (endDate.getTime() - startDate.getTime() > interval_7) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//时间间隔90天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
@@ -2143,7 +2153,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if (null != exportQcresultVO && null != exportQcresultVO.getLeaveHosDateStart() && null != exportQcresultVO.getLeaveHosDateEnd()) {
|
|
|
Date startDate = exportQcresultVO.getLeaveHosDateStart();
|
|
|
Date endDate = exportQcresultVO.getLeaveHosDateEnd();
|
|
|
- if("1".equals(exportQcresultVO.getRadioCheck())){
|
|
|
+ if ("1".equals(exportQcresultVO.getRadioCheck())) {
|
|
|
//时间间隔7天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
@@ -2151,7 +2161,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
if (endDate.getTime() - startDate.getTime() > interval_7) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//时间间隔90天
|
|
|
if (endDate.getTime() < startDate.getTime()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
|
|
@@ -2193,8 +2203,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String, Object> calScore(OutputInfo outputInfo, List<String> codeList,
|
|
|
- Map<String, String> codeToInfoMap, AnalyzeVO analyzeVO,
|
|
|
- String isPlacefile) {
|
|
|
+ Map<String, String> codeToInfoMap, AnalyzeVO analyzeVO,
|
|
|
+ String isPlacefile) {
|
|
|
Long hospitalId = analyzeVO.getHospitalId();
|
|
|
List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
|
|
|
if (ListUtil.isNotEmpty(codeList)) {
|
|
@@ -2416,40 +2426,47 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
/**
|
|
|
* 手术费,抗菌药物,手术和病理费等含有人数
|
|
|
+ *
|
|
|
* @param filterVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<Map<String, String>> selectOperationNum( FilterVO filterVO){
|
|
|
- return baseMapper.selectOperationNum(filterVO);
|
|
|
+ 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);
|
|
|
+ public Map<String, Long> triggeringRules(FilterVO filterVO) {
|
|
|
+ return baseMapper.triggeringRules(filterVO);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 病案首页关联的出院病历
|
|
|
+ *
|
|
|
* @param filterVO
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<Map<String,String>> getMedicalRecords(@Param("filterVO") FilterVO filterVO){
|
|
|
+ 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);
|
|
|
+ public List<Map<String, String>> malignancy(@Param("filterVO") FilterVO filterVO) {
|
|
|
+ return baseMapper.malignancy(filterVO);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取患者年龄信息(通过出生日期和入院日期重新计算)
|
|
|
+ *
|
|
|
* @param hospitalId
|
|
|
* @param behospitalCodes
|
|
|
* @return
|