|
@@ -6,6 +6,7 @@ import com.diagbot.model.entity.Diag;
|
|
import com.diagbot.model.entity.Negative;
|
|
import com.diagbot.model.entity.Negative;
|
|
import com.diagbot.model.label.DiagLabel;
|
|
import com.diagbot.model.label.DiagLabel;
|
|
import com.diagbot.util.CoreUtil;
|
|
import com.diagbot.util.CoreUtil;
|
|
|
|
+import com.diagbot.util.ListUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.lang.annotation.Native;
|
|
import java.lang.annotation.Native;
|
|
@@ -28,30 +29,23 @@ public class DiagRule {
|
|
*/
|
|
*/
|
|
public static <T> BillMsg compareDiseaseWithBill(List<String> drugLises, List<T> inputLises, String name) {
|
|
public static <T> BillMsg compareDiseaseWithBill(List<String> drugLises, List<T> inputLises, String name) {
|
|
List<String> reports = new ArrayList<>();
|
|
List<String> reports = new ArrayList<>();
|
|
- if(inputLises != null && inputLises.size() > 0){
|
|
|
|
|
|
+ if(inputLises != null && ListUtil.isNotEmpty(inputLises)){
|
|
for (T d:inputLises) {
|
|
for (T d:inputLises) {
|
|
Negative val = (Negative)CoreUtil.getFieldValue(d, "Negative");
|
|
Negative val = (Negative)CoreUtil.getFieldValue(d, "Negative");
|
|
if(val == null){
|
|
if(val == null){
|
|
String c = (String) CoreUtil.getFieldValue(d, "standName");
|
|
String c = (String) CoreUtil.getFieldValue(d, "standName");
|
|
|
|
+ String c_name = (String) CoreUtil.getFieldValue(d, "name");
|
|
if(StringUtils.isNotBlank(c) && drugLises.contains(c)){
|
|
if(StringUtils.isNotBlank(c) && drugLises.contains(c)){
|
|
- reports.add(c);
|
|
|
|
|
|
+ reports.add(c_name);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(reports.size()>0){
|
|
|
|
- String message = "";
|
|
|
|
- for(int i=0;i<reports.size();i++){
|
|
|
|
- if(i != reports.size()-1){
|
|
|
|
- message +=i+",";
|
|
|
|
- }else {
|
|
|
|
- message += i;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ if(ListUtil.isNotEmpty(reports)){
|
|
|
|
+ String message = CoreUtil.listConvertString(reports);
|
|
BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(message, name);
|
|
BillMsg commonBillMsg = CoreUtil.getCommonBillMsg(message, name);
|
|
return commonBillMsg;
|
|
return commonBillMsg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|