|
@@ -1,12 +1,13 @@
|
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
|
|
|
-import com.google.common.collect.Lists;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
|
import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -28,39 +29,16 @@ public class BEH0032 extends QCCatalogue {
|
|
|
if (ListUtil.isEmpty(diags)) {
|
|
|
return;
|
|
|
}
|
|
|
- String pastLabelText = pastLabel.getText();
|
|
|
- List<String> yinxDiagNames = diags.stream().filter(i -> i.getNegative() != null).map(i -> i.getName()).collect(Collectors.toList());
|
|
|
- List<String> yangxDiagNams = diags.stream().filter(i -> i.getNegative() == null).map(i -> i.getName()).collect(Collectors.toList());
|
|
|
- if (isNotHas(yinxDiagNames, pastLabelText) || isNotHas(yangxDiagNams, pastLabelText)) {
|
|
|
+ List<String> wtDiagNames = CatalogueUtil.noInQuotes(
|
|
|
+ diags.stream().map(i -> i.getName()).filter(i -> StringUtil.isNotBlank(i)).distinct().collect(Collectors.toList()),
|
|
|
+ pastLabel.getText()
|
|
|
+ );
|
|
|
+ if (ListUtil.isNotEmpty(wtDiagNames)) {
|
|
|
status = "-1";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 是未标引号吗?
|
|
|
- *
|
|
|
- * @param diagNames ture-是未标 false-标了
|
|
|
- * @return
|
|
|
- */
|
|
|
- private boolean isNotHas(List<String> diagNames, String pastLabelText) {
|
|
|
- boolean flag = false;
|
|
|
- if (ListUtil.isNotEmpty(diagNames)) {
|
|
|
- List<String> sections = Lists.newArrayList();
|
|
|
- int index = 0;
|
|
|
- for (String txt : pastLabelText.split("\"")) {
|
|
|
- if (index % 2 == 1) {
|
|
|
- sections.add(txt);
|
|
|
- }
|
|
|
- index++;
|
|
|
- }
|
|
|
- for (String diagName : diagNames) {
|
|
|
- if (sections.stream().filter(section -> section.indexOf(diagName) != -1).count() == 0) {
|
|
|
- flag = true;
|
|
|
- info += diagName + " ";
|
|
|
- }
|
|
|
+ for (String wtDiagName : wtDiagNames) {
|
|
|
+ info += wtDiagName + " ";
|
|
|
}
|
|
|
}
|
|
|
- return flag;
|
|
|
}
|
|
|
|
|
|
}
|