|
@@ -14,6 +14,7 @@ import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.BehospitalInfoServiceImpl;
|
|
|
+import com.diagbot.service.impl.MedClickInfoServiceImpl;
|
|
|
import com.diagbot.service.impl.StrInformedConsentServiceImpl;
|
|
|
import com.diagbot.util.*;
|
|
|
import com.diagbot.vo.*;
|
|
@@ -29,7 +30,6 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -145,9 +145,10 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
QcCasesRelevanceEntryFacade qcCasesRelevanceEntryFacade;
|
|
|
@Autowired
|
|
|
StrInformedConsentServiceImpl strInformedConsentServiceImpl;
|
|
|
-
|
|
|
@Autowired
|
|
|
SysUserRoleFacade sysUserRoleFacade;
|
|
|
+ @Autowired
|
|
|
+ MedClickInfoServiceImpl medClickInfoService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -238,8 +239,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历已删除!");
|
|
|
}
|
|
|
BeanUtil.copyProperties(behospitalInfo, behosDTO);
|
|
|
- if(null != homePage && StringUtils.isNotEmpty(homePage.getAge()) && StringUtils.isNotEmpty(homePage.getAgeUnit())){
|
|
|
- behosDTO.setAge(homePage.getAge()+homePage.getAgeUnit());
|
|
|
+ if (null != homePage && StringUtils.isNotEmpty(homePage.getAge()) && StringUtils.isNotEmpty(homePage.getAgeUnit())) {
|
|
|
+ behosDTO.setAge(homePage.getAge() + homePage.getAgeUnit());
|
|
|
}
|
|
|
res.put("beHospital", behosDTO);
|
|
|
}
|
|
@@ -2286,38 +2287,38 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
//保存
|
|
|
Map<String, Object> pageMap = outputInfo.getPageData();
|
|
|
//保存解析过后的手术知情同意书
|
|
|
- List<String> recIds = new ArrayList<>();
|
|
|
- if(pageMap.containsKey("手术知情同意书")){
|
|
|
- Object informObject = pageMap.get("手术知情同意书");
|
|
|
- List<Map<String,Object>> informList= (List<Map<String,Object>>) informObject;
|
|
|
- List<StrInformedConsent> strInformedConsents = new ArrayList<>();
|
|
|
- if(ListUtil.isNotEmpty(informList)) {
|
|
|
- informList.forEach(obj ->
|
|
|
- {
|
|
|
- Map<String, String> strMap = new HashMap<>();
|
|
|
- strMap.put("使用植入性材料", String.valueOf(obj.get("使用植入性材料")));
|
|
|
- StrInformedConsent strInformedConsent = new StrInformedConsent();
|
|
|
- strInformedConsent.setHospitalId(analyzeVO.getHospitalId());
|
|
|
- strInformedConsent.setBehospitalCode(analyzeVO.getBehospitalCode());
|
|
|
- strInformedConsent.setRecId(String.valueOf(obj.get("记录编号")));
|
|
|
- strInformedConsent.setRecTitle(String.valueOf(obj.get("病历标题")));
|
|
|
- strInformedConsent.setRecType("知情同意书");
|
|
|
- strInformedConsent.setContent(JSONObject.toJSONString(strMap));
|
|
|
- strInformedConsent.setGmtCreate(new Date());
|
|
|
- strInformedConsents.add(strInformedConsent);
|
|
|
- recIds.add(String.valueOf(obj.get("记录编号")));
|
|
|
- }
|
|
|
- );
|
|
|
- //删除手术知情同意书历史ric_id
|
|
|
- strInformedConsentServiceImpl.remove( new QueryWrapper<StrInformedConsent>()
|
|
|
- .eq("hospital_id",analyzeVO.getHospitalId())
|
|
|
- .eq("is_deleted",IsDeleteEnum.N.getKey())
|
|
|
- .eq("behospital_code",analyzeVO.getBehospitalCode())
|
|
|
- .in("rec_id",recIds));
|
|
|
- //新增
|
|
|
- strInformedConsentServiceImpl.saveBatch(strInformedConsents);
|
|
|
- }
|
|
|
+ List<String> recIds = new ArrayList<>();
|
|
|
+ if (pageMap.containsKey("手术知情同意书")) {
|
|
|
+ Object informObject = pageMap.get("手术知情同意书");
|
|
|
+ List<Map<String, Object>> informList = (List<Map<String, Object>>) informObject;
|
|
|
+ List<StrInformedConsent> strInformedConsents = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(informList)) {
|
|
|
+ informList.forEach(obj ->
|
|
|
+ {
|
|
|
+ Map<String, String> strMap = new HashMap<>();
|
|
|
+ strMap.put("使用植入性材料", String.valueOf(obj.get("使用植入性材料")));
|
|
|
+ StrInformedConsent strInformedConsent = new StrInformedConsent();
|
|
|
+ strInformedConsent.setHospitalId(analyzeVO.getHospitalId());
|
|
|
+ strInformedConsent.setBehospitalCode(analyzeVO.getBehospitalCode());
|
|
|
+ strInformedConsent.setRecId(String.valueOf(obj.get("记录编号")));
|
|
|
+ strInformedConsent.setRecTitle(String.valueOf(obj.get("病历标题")));
|
|
|
+ strInformedConsent.setRecType("知情同意书");
|
|
|
+ strInformedConsent.setContent(JSONObject.toJSONString(strMap));
|
|
|
+ strInformedConsent.setGmtCreate(new Date());
|
|
|
+ strInformedConsents.add(strInformedConsent);
|
|
|
+ recIds.add(String.valueOf(obj.get("记录编号")));
|
|
|
+ }
|
|
|
+ );
|
|
|
+ //删除手术知情同意书历史ric_id
|
|
|
+ strInformedConsentServiceImpl.remove(new QueryWrapper<StrInformedConsent>()
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
+ .in("rec_id", recIds));
|
|
|
+ //新增
|
|
|
+ strInformedConsentServiceImpl.saveBatch(strInformedConsents);
|
|
|
}
|
|
|
+ }
|
|
|
// 手动拼接数据【知情同意书】【谈话告知书】
|
|
|
List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -2465,6 +2466,22 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
return baseMapper.malignancy(filterVO);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @Description:医生质控信息次数
|
|
|
+ * @Param: [medClickInfoVO]
|
|
|
+ * @return: void
|
|
|
+ * @Author: cy
|
|
|
+ * @Date: 2021/11/10
|
|
|
+ */
|
|
|
+ public Boolean addMedClickInfo(MedClickInfoVO medClickInfoVO) {
|
|
|
+ MedClickInfo medClickInfo = new MedClickInfo();
|
|
|
+ medClickInfo.setHospitalId(Integer.valueOf(SysUserUtils.getCurrentHospitalID()));
|
|
|
+ medClickInfo.setCreator(SysUserUtils.getCurrentPrincipleID());
|
|
|
+ BeanUtil.copyProperties(medClickInfoVO, medClickInfo);
|
|
|
+ medClickInfo.setGmtCreate(new Date());
|
|
|
+ return medClickInfoService.save(medClickInfo);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取患者年龄信息(通过出生日期和入院日期重新计算)
|
|
|
*
|