|
@@ -1,12 +1,20 @@
|
|
|
package com.diagbot.process;
|
|
|
|
|
|
+import com.diagbot.biz.push.entity.Lis;
|
|
|
+import com.diagbot.biz.push.entity.Pacs;
|
|
|
import com.diagbot.dto.BillDTO;
|
|
|
import com.diagbot.dto.BillMsg;
|
|
|
import com.diagbot.dto.BillNeoDTO;
|
|
|
import com.diagbot.dto.DrugBillNeoDTO;
|
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
+import com.diagbot.model.entity.Clinical;
|
|
|
+import com.diagbot.model.entity.Diag;
|
|
|
+import com.diagbot.model.label.ChiefLabel;
|
|
|
+import com.diagbot.model.label.DiagLabel;
|
|
|
+import com.diagbot.model.label.PresentLabel;
|
|
|
import com.diagbot.rule.AgeRule;
|
|
|
-import com.diagbot.rule.DiseaseRule;
|
|
|
+import com.diagbot.rule.DiagRule;
|
|
|
+import com.diagbot.rule.LisPacsRule;
|
|
|
import com.diagbot.rule.SexRule;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -63,6 +71,23 @@ public class BillProcess {
|
|
|
* @param billDTO
|
|
|
*/
|
|
|
public void processBillWithDrug(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
+ DiagLabel diagLabel = wordCrfDTO.getDiagLabel();
|
|
|
+ ChiefLabel chiefLabel = wordCrfDTO.getChiefLabel();
|
|
|
+ PresentLabel presentLabel = wordCrfDTO.getPresentLabel();
|
|
|
+ List<Diag> diags =null;
|
|
|
+ List<Clinical> clinicals =null;
|
|
|
+ if(diagLabel != null){
|
|
|
+ diags = diagLabel.getDiags();
|
|
|
+ }
|
|
|
+ if(chiefLabel != null){
|
|
|
+ clinicals.addAll(chiefLabel.getClinicals());
|
|
|
+ }
|
|
|
+ if(presentLabel != null){
|
|
|
+ clinicals.addAll(presentLabel.getClinicals());
|
|
|
+ }
|
|
|
+ List<Lis> lis = wordCrfDTO.getLis();
|
|
|
+ List<Pacs> pacs = wordCrfDTO.getPacs();
|
|
|
+
|
|
|
List<BillMsg> drugBill = new ArrayList<>();
|
|
|
for (BillNeoDTO bill : billNeoDTOList) {
|
|
|
List<DrugBillNeoDTO> drugBillNeoDTOList = bill.getDrugBillNeoDTOList();
|
|
@@ -72,9 +97,21 @@ public class BillProcess {
|
|
|
CoreUtil.addBeanToList(drugBill, sexMsg);
|
|
|
|
|
|
// 诊断
|
|
|
- BillMsg billMsg_disease = DiseaseRule.compareDiseaseWithBill(drug.getDisease(), wordCrfDTO, bill.getName());
|
|
|
+ BillMsg billMsg_disease = DiagRule.compareDiseaseWithBill(drug.getDisease(), diags, bill.getName());
|
|
|
CoreUtil.addBeanToList(drugBill, billMsg_disease);
|
|
|
|
|
|
+ //化验
|
|
|
+ BillMsg lisMsg = LisPacsRule.compareLisPacsWithBill(drug.getLis(), lis, bill.getName());
|
|
|
+ CoreUtil.addBeanToList(drugBill, lisMsg);
|
|
|
+
|
|
|
+ //辅检
|
|
|
+ BillMsg pacsMsg = LisPacsRule.compareLisPacsWithBill(drug.getPACS(), pacs, bill.getName());
|
|
|
+ CoreUtil.addBeanToList(drugBill, pacsMsg);
|
|
|
+
|
|
|
+ //临床表现
|
|
|
+ BillMsg clinicalMsg = DiagRule.compareDiseaseWithBill(drug.getClinicfindings(), clinicals, bill.getName());
|
|
|
+ CoreUtil.addBeanToList(drugBill, clinicalMsg);
|
|
|
+
|
|
|
// 年龄
|
|
|
BillMsg ageMsg = AgeRule.compareAgeWithBill(drug.getAgeNeoDTO(), wordCrfDTO, bill.getName());
|
|
|
CoreUtil.addBeanToList(drugBill, ageMsg);
|