|
@@ -12,6 +12,7 @@ import com.lantone.qc.pub.util.StringUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@@ -23,6 +24,9 @@ import java.util.List;
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
public class BEH0014 extends QCCatalogue {
|
|
public class BEH0014 extends QCCatalogue {
|
|
|
|
+ private List<String> containList = Arrays.asList("体检", "发现", "检查", "因", "确诊", "诊断", "复查", "术后"
|
|
|
|
+ , "药物", "误服", "查", "撞", "伤", "月经", "暴力", "超", "术");
|
|
|
|
+
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
status.set("0");
|
|
status.set("0");
|
|
@@ -53,18 +57,18 @@ public class BEH0014 extends QCCatalogue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- //硬规则匹配 前30个字有"体检"或"发现"或"检查"字样
|
|
|
|
|
|
+ //硬规则匹配 前30个字有"体检"或"发现"或"检查"(containList)字样
|
|
String present = presentLabel.getText();
|
|
String present = presentLabel.getText();
|
|
if (StringUtils.isNotEmpty(present)) {
|
|
if (StringUtils.isNotEmpty(present)) {
|
|
if (present.length() > 30) {
|
|
if (present.length() > 30) {
|
|
present = present.substring(0, 30);
|
|
present = present.substring(0, 30);
|
|
}
|
|
}
|
|
- present = present.replaceAll("[\"“”]","");
|
|
|
|
- if (present.contains("体检") || present.contains("发现") || present.contains("检查") || present.contains("因")
|
|
|
|
- || present.contains("确诊") || present.contains("诊断") || present.contains("复查") || present.contains("术后")
|
|
|
|
- || present.contains("药物") || present.contains("误服") || present.contains("查") || present.contains("撞") || present.contains("伤") || present.contains("月经")) {
|
|
|
|
- status.set("0");
|
|
|
|
- return;
|
|
|
|
|
|
+ present = present.replaceAll("[\"“”]", "");
|
|
|
|
+ for (String word : containList) {
|
|
|
|
+ if (present.contains(word)) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//模型在现病史前30个字里能提出来疾病,那也可以算有诱因
|
|
//模型在现病史前30个字里能提出来疾病,那也可以算有诱因
|
|
List<Diag> presentDiags = presentLabel.getDiags();
|
|
List<Diag> presentDiags = presentLabel.getDiags();
|