|
@@ -10,7 +10,6 @@ import com.diagbot.enums.NeoEnum;
|
|
|
import com.diagbot.enums.TypeEnum;
|
|
|
import com.diagbot.facade.NeoFacade;
|
|
|
import com.diagbot.model.entity.Clinical;
|
|
|
-import com.diagbot.model.entity.Medicine;
|
|
|
import com.diagbot.model.entity.Operation;
|
|
|
import com.diagbot.model.label.ChiefLabel;
|
|
|
import com.diagbot.model.label.PacsLabel;
|
|
@@ -28,7 +27,6 @@ import com.diagbot.rule.VitalRule;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
-import com.diagbot.vo.Drug;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -170,27 +168,14 @@ public class BillProcess {
|
|
|
PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
|
|
|
PastLabel pastLabel = wordCrfDTO.getPastLabel();
|
|
|
|
|
|
+ // 【过敏药品数据来源】
|
|
|
+ List<Item> allergyMedicines = commonRule.getDrugAllergySource(wordCrfDTO);
|
|
|
+
|
|
|
// 【药品数据来源】(主诉、现病史、既往史、结构化药品)
|
|
|
- List<Medicine> allergyAll = new ArrayList<>();
|
|
|
- List<Medicine> allergyDrug = new ArrayList<>();
|
|
|
- List<Drug> drug = wordCrfDTO.getDrug();
|
|
|
- for (Item item : drug) {
|
|
|
- Medicine operaData = new Medicine();
|
|
|
- operaData.setName(item.getName());
|
|
|
- operaData.setStandName(item.getUniqueName());
|
|
|
- allergyDrug.add(operaData);
|
|
|
- }
|
|
|
- CoreUtil.addList(allergyAll, chiefLabel.getMedicines()); // 主诉药品
|
|
|
- CoreUtil.addList(allergyAll, presentLabel.getMedicines()); // 现病史药品
|
|
|
- CoreUtil.addList(allergyAll, pastLabel.getMedicines()); // 既往史药品
|
|
|
- CoreUtil.addList(allergyAll, allergyDrug); // 结构化药品
|
|
|
+ List<Item> medicineAll = commonRule.getDrugSource(wordCrfDTO);
|
|
|
|
|
|
// 【诊断数据来源】
|
|
|
- List<Item> diags = new ArrayList<>();
|
|
|
- CoreUtil.addList(diags, wordCrfDTO.getDiag()); // 结构化诊断
|
|
|
- CoreUtil.addAllDiag(diags, wordCrfDTO.getChiefLabel().getDiags());// 主诉诊断
|
|
|
- CoreUtil.addAllDiag(diags, wordCrfDTO.getPresentLabel().getDiags()); // 现病史诊断
|
|
|
- CoreUtil.addAllDiag(diags, wordCrfDTO.getPastLabel().getDiags()); // 既往史诊断
|
|
|
+ List<Item> diags = commonRule.getDiseaseSource(wordCrfDTO);
|
|
|
|
|
|
// 【辅检结果数据来源】
|
|
|
PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
@@ -243,10 +228,10 @@ public class BillProcess {
|
|
|
commonRule.compareNameWithBill(bill.getOperations(), operations_all, bill, billMsgList, NeoEnum.operations.getName());
|
|
|
|
|
|
// 禁忌过敏药品(既往史)
|
|
|
- drugRule.bill(bill.getAllergicmeds(), pastLabel.getAllergyMedicines(), bill, billMsgList, NeoEnum.allergicmeds.getName());
|
|
|
+ drugRule.bill(bill.getAllergicmeds(), allergyMedicines, bill, billMsgList, NeoEnum.allergicmeds.getName());
|
|
|
|
|
|
// 服用药品(主诉、现病史、既往史、结构化药品)
|
|
|
- drugRule.bill(bill.getOralmeds(), allergyAll, bill, billMsgList, NeoEnum.oralmeds.getName());
|
|
|
+ drugRule.bill(bill.getOralmeds(), medicineAll, bill, billMsgList, NeoEnum.oralmeds.getName());
|
|
|
|
|
|
// 禁忌人群
|
|
|
groupRule.bill(wordCrfDTO, bill, billMsgList, NeoEnum.group.getName());
|