|
@@ -3,25 +3,21 @@ package com.diagbot.facade;
|
|
|
import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.biz.push.entity.Lis;
|
|
|
import com.diagbot.biz.push.entity.Pacs;
|
|
|
-import com.diagbot.dto.*;
|
|
|
-import com.diagbot.enums.NeoEnum;
|
|
|
+import com.diagbot.dto.BillNeoDTO;
|
|
|
+import com.diagbot.dto.IndicationDTO;
|
|
|
+import com.diagbot.dto.WordCrfDTO;
|
|
|
import com.diagbot.process.BillProcess;
|
|
|
-import com.diagbot.rule.AgeRule;
|
|
|
-import com.diagbot.rule.CommonRule;
|
|
|
+import com.diagbot.rule.OtherRule;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.BillNeoVO;
|
|
|
import com.diagbot.vo.Drug;
|
|
|
import com.diagbot.vo.IndicationPushVO;
|
|
|
import com.diagbot.vo.ItemExt;
|
|
|
-import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Description: 开单合理性facade
|
|
@@ -38,9 +34,7 @@ public class BillFacade {
|
|
|
@Autowired
|
|
|
CommonFacade commonFacade;
|
|
|
@Autowired
|
|
|
- CommonRule commonRule;
|
|
|
- @Autowired
|
|
|
- AgeRule ageRule;
|
|
|
+ OtherRule otherRule;
|
|
|
|
|
|
/**
|
|
|
* 开单合理性业务
|
|
@@ -55,75 +49,24 @@ public class BillFacade {
|
|
|
// 规则处理
|
|
|
billProcess.process(billNeoDTOList, wordCrfDTO, res);
|
|
|
|
|
|
- lisDiseaseRule(wordCrfDTO, res);
|
|
|
- lisAgeRule(wordCrfDTO, res);
|
|
|
+ // 特殊规则
|
|
|
+ // otherRule.ecgRule(wordCrfDTO, res);
|
|
|
+ otherRule.qjssxsRule(wordCrfDTO, res);
|
|
|
+ otherRule.pttRule(wordCrfDTO, res);
|
|
|
+ otherRule.lisDiseaseRule(wordCrfDTO, res);
|
|
|
+ otherRule.lisAgeRule(wordCrfDTO, res);
|
|
|
|
|
|
- // 结果去重处理
|
|
|
- commonFacade.dealMsg(res.getBillMsgList());
|
|
|
- }
|
|
|
+ otherRule.lisDiseaseRule2(wordCrfDTO, res);
|
|
|
+ otherRule.lisDiseaseRule3(wordCrfDTO, res);
|
|
|
+ otherRule.lisResRule4(wordCrfDTO, res);
|
|
|
+ otherRule.lisResRule5(wordCrfDTO, res);
|
|
|
|
|
|
- /**
|
|
|
- * 检验开单:【血常规】
|
|
|
- * 1、禁忌疾病:血友病
|
|
|
- *
|
|
|
- * @param wordCrfDTO
|
|
|
- * @param res
|
|
|
- */
|
|
|
- public void lisDiseaseRule(WordCrfDTO wordCrfDTO, IndicationDTO res) {
|
|
|
- // 特殊值处理
|
|
|
- // List<String> drugNameList = CoreUtil.getPropertyList(wordCrfDTO.getDrugOrder(), "uniqueName");
|
|
|
- List<Lis> lisOrderList = wordCrfDTO.getLisOrder();
|
|
|
- for (Lis lis : lisOrderList) {
|
|
|
- String lisOrderName = "血常规";
|
|
|
- if (lisOrderName.equals(lis.getUniqueName())) {
|
|
|
- // 开单项信息
|
|
|
- BillNeoMaxDTO billNeoMaxDTO = new BillNeoMaxDTO();
|
|
|
- billNeoMaxDTO.setOrderName(lis.getName());
|
|
|
- billNeoMaxDTO.setOrderStandName(lisOrderName);
|
|
|
-
|
|
|
- // 禁忌疾病
|
|
|
- List<NodeNeoDTO> diseaseNode = new ArrayList<>();
|
|
|
- List<String> diseaseList = Lists.newArrayList("血友病");
|
|
|
- for (String str : diseaseList) {
|
|
|
- NodeNeoDTO nodeNeoDTO = new NodeNeoDTO();
|
|
|
- nodeNeoDTO.setName(str);
|
|
|
- nodeNeoDTO.setTermtype(NeoEnum.disease.getName());
|
|
|
- diseaseNode.add(nodeNeoDTO);
|
|
|
- }
|
|
|
- billNeoMaxDTO.setDisease(diseaseNode);
|
|
|
- commonRule.compareItemWithBill(diseaseNode, wordCrfDTO.getDiagSource(), billNeoMaxDTO, res.getBillMsgList(), NeoEnum.disease.getName());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ otherRule.transfusionVitalRule(wordCrfDTO, res);
|
|
|
+ otherRule.transfusionVitalRule1(wordCrfDTO, res);
|
|
|
|
|
|
- /**
|
|
|
- * 检验开单:【孕酮测定】
|
|
|
- * 1、禁忌年龄:1岁2个月
|
|
|
- *
|
|
|
- * @param wordCrfDTO
|
|
|
- * @param res
|
|
|
- */
|
|
|
- public void lisAgeRule(WordCrfDTO wordCrfDTO, IndicationDTO res) {
|
|
|
- // 特殊值处理
|
|
|
- // List<String> drugNameList = CoreUtil.getPropertyList(wordCrfDTO.getDrugOrder(), "uniqueName");
|
|
|
- List<Lis> lisOrderList = wordCrfDTO.getLisOrder();
|
|
|
- for (Lis lis : lisOrderList) {
|
|
|
- String lisOrderName = "孕酮测定";
|
|
|
- if (lisOrderName.equals(lis.getUniqueName())) {
|
|
|
- // 开单项信息
|
|
|
- BillNeoMaxDTO billNeoMaxDTO = new BillNeoMaxDTO();
|
|
|
- billNeoMaxDTO.setOrderName(lis.getName());
|
|
|
- billNeoMaxDTO.setOrderStandName(lisOrderName);
|
|
|
-
|
|
|
- // 禁忌年龄
|
|
|
- NodeNeoDTO nodeNeoDTO = new NodeNeoDTO();
|
|
|
- nodeNeoDTO.setMax(new BigDecimal(10));
|
|
|
- nodeNeoDTO.setTermtype(NeoEnum.ageNeoDTO.getName());
|
|
|
-
|
|
|
- billNeoMaxDTO.setAgeNeoDTO(nodeNeoDTO);
|
|
|
- ageRule.bill(wordCrfDTO, billNeoMaxDTO, res.getBillMsgList(), NeoEnum.ageNeoDTO.getName());
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ // 结果去重处理
|
|
|
+ commonFacade.dealMsg(res.getBillMsgList());
|
|
|
}
|
|
|
|
|
|
public BillNeoVO fillBillNeo(WordCrfDTO wordCrfDTO) {
|