|
@@ -1,13 +1,13 @@
|
|
package com.diagbot.facade.rule;
|
|
package com.diagbot.facade.rule;
|
|
|
|
|
|
import com.diagbot.dto.BillDTO;
|
|
import com.diagbot.dto.BillDTO;
|
|
|
|
+import com.diagbot.dto.BillMsg;
|
|
import com.diagbot.dto.BillNeoDTO;
|
|
import com.diagbot.dto.BillNeoDTO;
|
|
import com.diagbot.dto.DrugBillNeoDTO;
|
|
import com.diagbot.dto.DrugBillNeoDTO;
|
|
-import com.diagbot.dto.LisBillNeoDTO;
|
|
|
|
-import com.diagbot.dto.PacsBillNeoDTO;
|
|
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -18,27 +18,58 @@ import java.util.List;
|
|
@Component
|
|
@Component
|
|
public class BillRuleFacade {
|
|
public class BillRuleFacade {
|
|
|
|
|
|
- public BillDTO process(BillNeoDTO billNeoDTO, WordCrfDTO wordCrfDTO) {
|
|
|
|
|
|
+ public BillDTO process(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO) {
|
|
BillDTO billDTO = new BillDTO();
|
|
BillDTO billDTO = new BillDTO();
|
|
// 化验规则处理
|
|
// 化验规则处理
|
|
- processBillWithLis(billNeoDTO.getLisBillNeoDTOList(), wordCrfDTO, billDTO);
|
|
|
|
|
|
+ processBillWithLis(billNeoDTOList, wordCrfDTO, billDTO);
|
|
// 辅检规则处理
|
|
// 辅检规则处理
|
|
- processBillWithPacs(billNeoDTO.getPacsBillNeoDTOList(), wordCrfDTO, billDTO);
|
|
|
|
|
|
+ processBillWithPacs(billNeoDTOList, wordCrfDTO, billDTO);
|
|
// 药品规则处理
|
|
// 药品规则处理
|
|
- processBillWithDrug(billNeoDTO.getDrugBillNeoDTOList(), wordCrfDTO, billDTO);
|
|
|
|
|
|
+ processBillWithDrug(billNeoDTOList, wordCrfDTO, billDTO);
|
|
return billDTO;
|
|
return billDTO;
|
|
}
|
|
}
|
|
|
|
|
|
- public void processBillWithLis(List<LisBillNeoDTO> lisBillNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 化验规则处理
|
|
|
|
+ *
|
|
|
|
+ * @param billNeoDTOList
|
|
|
|
+ * @param wordCrfDTO
|
|
|
|
+ * @param billDTO
|
|
|
|
+ */
|
|
|
|
+ public void processBillWithLis(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public void processBillWithPacs(List<PacsBillNeoDTO> pacsBillNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 辅检规则处理
|
|
|
|
+ *
|
|
|
|
+ * @param billNeoDTOList
|
|
|
|
+ * @param wordCrfDTO
|
|
|
|
+ * @param billDTO
|
|
|
|
+ */
|
|
|
|
+ public void processBillWithPacs(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public void processBillWithDrug(List<DrugBillNeoDTO> drugBillNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 药品规则处理
|
|
|
|
+ *
|
|
|
|
+ * @param billNeoDTOList
|
|
|
|
+ * @param wordCrfDTO
|
|
|
|
+ * @param billDTO
|
|
|
|
+ */
|
|
|
|
+ public void processBillWithDrug(List<BillNeoDTO> billNeoDTOList, WordCrfDTO wordCrfDTO, BillDTO billDTO) {
|
|
|
|
+ for (BillNeoDTO bill : billNeoDTOList) {
|
|
|
|
+ List<DrugBillNeoDTO> drugBillNeoDTOList = bill.getDrugBillNeoDTOList();
|
|
|
|
+ List<BillMsg> drugBill = new ArrayList<>();
|
|
|
|
+ for (DrugBillNeoDTO drug : drugBillNeoDTOList) {
|
|
|
|
+ // 性别
|
|
|
|
+ BillMsg billMsg = RuleUtil.compareSexWithBill(drug.getGender(), wordCrfDTO, bill.getName());
|
|
|
|
+ if (billMsg != null) {
|
|
|
|
+ drugBill.add(billMsg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|