|
@@ -3,7 +3,7 @@ package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
-import com.lantone.qc.pub.model.entity.AllergyMedicine;
|
|
|
+import com.lantone.qc.pub.model.entity.Allergy;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -21,18 +21,22 @@ public class BEH0040 extends QCCatalogue {
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status = "0";
|
|
|
- List<AllergyMedicine> allergyMedicines = inputInfo.getBeHospitalizedDoc().getPastLabel().getAllergyMedicines();
|
|
|
- if (ListUtil.isEmpty(allergyMedicines)) {
|
|
|
+ List<Allergy> allergies = inputInfo.getBeHospitalizedDoc().getPastLabel().getAllergies();
|
|
|
+ if (ListUtil.isEmpty(allergies)) {
|
|
|
return;
|
|
|
}
|
|
|
- for (AllergyMedicine allergyMedicine : allergyMedicines) {
|
|
|
- if (allergyMedicine == null || StringUtil.isBlank(allergyMedicine.getName())) {
|
|
|
+ for (Allergy allergy : allergies) {
|
|
|
+ if (allergy == null
|
|
|
+ || StringUtil.isBlank(allergy.getName())
|
|
|
+ || allergy.getAllergyMedicine() == null
|
|
|
+ || StringUtil.isBlank(allergy.getAllergyMedicine().getName())) {
|
|
|
continue;
|
|
|
}
|
|
|
- if ((allergyMedicine.getNegative() == null || StringUtil.isBlank(allergyMedicine.getNegative().getName()))
|
|
|
- && (allergyMedicine.getPd() == null || StringUtil.isBlank(allergyMedicine.getPd().getName()))
|
|
|
- && (allergyMedicine.getDegree() == null || StringUtil.isBlank(allergyMedicine.getDegree().getName()))) {
|
|
|
- info += allergyMedicine.getName() + " ";
|
|
|
+ if ((allergy.getNegative() == null || StringUtil.isBlank(allergy.getNegative().getName()))
|
|
|
+ && (allergy.getAllergyMedicine().getPd() == null || StringUtil.isBlank(allergy.getAllergyMedicine().getPd().getName()))
|
|
|
+ && (allergy.getAllergyMedicine().getDegree() == null || StringUtil.isBlank(allergy.getAllergyMedicine().getDegree().getName()))
|
|
|
+ && (allergy.getAllergyMedicine().getAllergyDesc() == null || StringUtil.isBlank(allergy.getAllergyMedicine().getAllergyDesc().getName()))) {
|
|
|
+ info += allergy.getAllergyMedicine().getName() + " ";
|
|
|
}
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(info)) {
|