|
@@ -5,8 +5,10 @@ import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.entity.Cause;
|
|
|
import com.lantone.qc.pub.model.entity.Clinical;
|
|
|
+import com.lantone.qc.pub.model.entity.Diag;
|
|
|
import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -38,6 +40,10 @@ public class BEH0014 extends QCCatalogue {
|
|
|
}
|
|
|
}*/
|
|
|
PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
|
+ if (presentLabel == null) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
List<Clinical> clinicals = presentLabel.getClinicals();
|
|
|
if (ListUtil.isNotEmpty(clinicals)) {
|
|
|
for (Clinical clinical : clinicals) {
|
|
@@ -56,11 +62,26 @@ public class BEH0014 extends QCCatalogue {
|
|
|
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("查") || present.contains("撞") || present.contains("伤") || present.contains("月经")) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
+ //模型在现病史前30个字里能提出来疾病,那也可以算有诱因
|
|
|
+ List<Diag> presentDiags = presentLabel.getDiags();
|
|
|
+ if (presentDiags.size() > 0) {
|
|
|
+ for (Diag diag : presentDiags) {
|
|
|
+ String hospitalDiagName = diag.getHospitalDiagName();
|
|
|
+ if (StringUtil.isBlank(hospitalDiagName)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (present.contains(hospitalDiagName)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
List<Cause> causes = presentLabel.getCauses();
|
|
|
if (causes != null && causes.size() > 0) {
|
|
|
status.set("0");
|