|
@@ -16,10 +16,6 @@ import com.diagbot.facade.CommonFacade;
|
|
|
import com.diagbot.facade.NeoFacade;
|
|
|
import com.diagbot.model.entity.Clinical;
|
|
|
import com.diagbot.model.entity.Operation;
|
|
|
-import com.diagbot.model.label.ChiefLabel;
|
|
|
-import com.diagbot.model.label.PacsLabel;
|
|
|
-import com.diagbot.model.label.PastLabel;
|
|
|
-import com.diagbot.model.label.PresentLabel;
|
|
|
import com.diagbot.rule.AgeRule;
|
|
|
import com.diagbot.rule.CommonRule;
|
|
|
import com.diagbot.rule.DrugRule;
|
|
@@ -30,12 +26,10 @@ import com.diagbot.rule.PacsRule;
|
|
|
import com.diagbot.rule.SexRule;
|
|
|
import com.diagbot.rule.VitalRule;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
-import com.diagbot.util.CoreUtil;
|
|
|
import com.diagbot.vo.RuleVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.LinkedHashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
@@ -75,6 +69,25 @@ public class BillProcess {
|
|
|
public void processRule(List<RuleVO> ruleVOList, WordCrfDTO wordCrfDTO, IndicationDTO indicationDTO) {
|
|
|
List<BillMsg> billMsgList = indicationDTO.getBillMsgList();
|
|
|
Set<String> set = new LinkedHashSet<>(); // A与B不宜同时进行, B与A不宜同时进行 只能提示一个
|
|
|
+ /**---------------------------数据统一处理开始--------------------------------- */
|
|
|
+ // 【过敏药品数据来源】
|
|
|
+ List<Item> allergyMedicines = commonFacade.getDrugAllergySource(wordCrfDTO);
|
|
|
+
|
|
|
+ // 【药品数据来源】(主诉、现病史、既往史、结构化药品)
|
|
|
+ List<Item> medicineAll = wordCrfDTO.getDrugSource();
|
|
|
+
|
|
|
+ // 【诊断数据来源】
|
|
|
+ List<Item> diags = wordCrfDTO.getDiagSource();
|
|
|
+
|
|
|
+ // 【辅检结果数据来源】
|
|
|
+ List<Item> pacsDescList = wordCrfDTO.getPacsLabel().getRes();
|
|
|
+
|
|
|
+ // 【手术数据来源】
|
|
|
+ List<Operation> operationsSource = commonFacade.getOperationSource(wordCrfDTO);
|
|
|
+
|
|
|
+ // 【临床表现数据来源】(主诉、现病史)
|
|
|
+ List<Clinical> clinicals = commonFacade.getClinicalSource(wordCrfDTO);
|
|
|
+ /**---------------------------数据统一处理结束--------------------------------- */
|
|
|
for (RuleVO ruleVO : ruleVOList) {
|
|
|
/** 1、获取开单项相关数据 */
|
|
|
RuleExtDTO ruleExtDTO = commonFacade.getRuleData(ruleVO);
|
|
@@ -86,46 +99,7 @@ public class BillProcess {
|
|
|
RuleSimpleDTO ruleSimpleDTO = new RuleSimpleDTO();
|
|
|
BeanUtil.copyProperties(ruleExtDTO, ruleSimpleDTO);
|
|
|
|
|
|
- /**---------------------------3、数据统一处理开始--------------------------------- */
|
|
|
- ChiefLabel chiefLabel = wordCrfDTO.getChiefLabel();
|
|
|
- PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
|
|
|
- PastLabel pastLabel = wordCrfDTO.getPastLabel();
|
|
|
-
|
|
|
- // 【过敏药品数据来源】
|
|
|
- List<Item> allergyMedicines = commonRule.getDrugAllergySource(wordCrfDTO);
|
|
|
-
|
|
|
- // 【药品数据来源】(主诉、现病史、既往史、结构化药品)
|
|
|
- List<Item> medicineAll = wordCrfDTO.getDrugSource();
|
|
|
-
|
|
|
- // 【诊断数据来源】
|
|
|
- List<Item> diags = wordCrfDTO.getDiagSource();
|
|
|
-
|
|
|
- // 【辅检结果数据来源】
|
|
|
- PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
|
- List<Item> pacsDescList = pacsLabel.getRes();
|
|
|
-
|
|
|
- // 【手术数据来源】
|
|
|
- List<Operation> operations_all = new ArrayList<>();
|
|
|
- List<Item> operation = wordCrfDTO.getOperation();
|
|
|
- List<Operation> operationsItem = new ArrayList<>();
|
|
|
- for (Item item : operation) {
|
|
|
- Operation operaData = new Operation();
|
|
|
- operaData.setName(item.getName());
|
|
|
- operaData.setStandName(item.getUniqueName());
|
|
|
- operationsItem.add(operaData);
|
|
|
- }
|
|
|
- CoreUtil.addList(operations_all, chiefLabel.getOperations()); // 主诉手术
|
|
|
- CoreUtil.addList(operations_all, presentLabel.getOperations()); // 现病史手术
|
|
|
- CoreUtil.addList(operations_all, pastLabel.getOperations()); // 既往史手术
|
|
|
- CoreUtil.addList(operations_all, operationsItem); // 结构化手术
|
|
|
-
|
|
|
- // 【临床表现数据来源】(主诉、现病史)
|
|
|
- List<Clinical> clinicals = new ArrayList<>();
|
|
|
- CoreUtil.addList(clinicals, chiefLabel.getClinicals()); // 主诉临床表现
|
|
|
- CoreUtil.addList(clinicals, presentLabel.getClinicals()); // 现病史临床表现
|
|
|
- /**---------------------------数据统一处理结束--------------------------------- */
|
|
|
-
|
|
|
- /** 4、规则处理 */
|
|
|
+ /** 3、规则处理 */
|
|
|
List<RuleConditionDTO> ruleConditionDTOList = ruleExtDTO.getRuleConditionDTOList();
|
|
|
for (RuleConditionDTO ruleConditionDTO : ruleConditionDTOList) {
|
|
|
List<RuleBaseDTO> ruleBaseDTOList = ruleConditionDTO.getRuleBaseDTOList();
|
|
@@ -162,7 +136,7 @@ public class BillProcess {
|
|
|
commonRule.compareNameWithBill(clinicals, ruleBaseDTO, billMsgList, ConEnum.clinicfindings.getName(), ruleSimpleDTO);
|
|
|
break;
|
|
|
case Operation: // 手术(既往史、现病史、医嘱手术)
|
|
|
- commonRule.compareNameWithBill(operations_all, ruleBaseDTO, billMsgList, ConEnum.operations.getName(), ruleSimpleDTO);
|
|
|
+ commonRule.compareNameWithBill(operationsSource, ruleBaseDTO, billMsgList, ConEnum.operations.getName(), ruleSimpleDTO);
|
|
|
break;
|
|
|
case Medicine:
|
|
|
case MedChemClass:
|