|
@@ -24,7 +24,7 @@ public class BEH0034 extends QCCatalogue {
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
- if(inputInfo.getBeHospitalizedDoc() == null){
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
|
return;
|
|
|
}
|
|
|
PastLabel pastLabel = inputInfo.getBeHospitalizedDoc().getPastLabel();
|
|
@@ -36,19 +36,35 @@ public class BEH0034 extends QCCatalogue {
|
|
|
operations.stream()
|
|
|
.filter(i ->
|
|
|
i != null && StringUtil.isNotBlank(i.getName()) && i.getNegative() == null
|
|
|
- && !"手术史".equals(i.getName()) && !"手术".equals(i.getName()) && !"手术治疗".equals(i.getName())
|
|
|
+ && !"手术史".equals(i.getName()) && !"手术".equals(i.getName()) && !"手术治疗".equals(i.getName())
|
|
|
)
|
|
|
.map(i -> i.getName())
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList()),
|
|
|
- pastLabel.getText().replace("“","\"").replace("”","\"")
|
|
|
+ pastLabel.getText().replace("“", "\"").replace("”", "\"")
|
|
|
);
|
|
|
if (ListUtil.isNotEmpty(wtOperationNames)) {
|
|
|
- status.set("-1");
|
|
|
+ String pastLabelText = pastLabel.getText();
|
|
|
for (String wtOperationName : wtOperationNames) {
|
|
|
+ if (isASMark(pastLabelText, wtOperationName)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ status.set("-1");
|
|
|
info.set(info.get() + wtOperationName + " ");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private boolean isASMark(String pastLabelText, String wtOperationName) {
|
|
|
+ String operName = wtOperationName.replace("手术", "");
|
|
|
+ int index = pastLabelText.indexOf(operName);
|
|
|
+ if (index != -1) {
|
|
|
+ String substring = pastLabelText.substring(index + operName.toCharArray().length, index + operName.toCharArray().length + 1);
|
|
|
+ if (substring.equals("\"") || substring.equals("”")) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
}
|