|
@@ -9,6 +9,7 @@ import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -16,12 +17,15 @@ import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @ClassName : BEH0009
|
|
* @ClassName : BEH0009
|
|
- * @Description :主诉中缺少主症状
|
|
|
|
|
|
+ * @Description :主诉缺少主症状
|
|
* @Author : 楼辉荣
|
|
* @Author : 楼辉荣
|
|
* @Date: 2020-03-06 17:28
|
|
* @Date: 2020-03-06 17:28
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
public class BEH0009 extends QCCatalogue {
|
|
public class BEH0009 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");
|
|
@@ -34,10 +38,19 @@ public class BEH0009 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
String chiefText = chiefLabel.getText();
|
|
String chiefText = chiefLabel.getText();
|
|
- if (StringUtil.isNotBlank(chiefText) &&
|
|
|
|
- (chiefText.contains("检查") || chiefText.contains("术后") || chiefText.contains("药物") || chiefText.contains("发现") || chiefText.contains("误服"))) {
|
|
|
|
- status.set("0");
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(chiefText)) {
|
|
|
|
+ for (String word : containList) {
|
|
|
|
+ if (chiefText.contains(word)) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
+ List<Clinical> clinicals = chiefLabel.getClinicals();
|
|
|
|
+ if (clinicals != null && clinicals.size() > 0) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
List<Diag> diags = chiefLabel.getDiags();
|
|
List<Diag> diags = chiefLabel.getDiags();
|
|
if (diags != null && diags.size() > 0) {
|
|
if (diags != null && diags.size() > 0) {
|
|
for (Diag diag : diags) {
|
|
for (Diag diag : diags) {
|
|
@@ -49,33 +62,6 @@ public class BEH0009 extends QCCatalogue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (StringUtil.isNotBlank(chiefText) && status.get().equals("-1")) {
|
|
|
|
- List<Clinical> clinicals = chiefLabel.getClinicals();
|
|
|
|
- if (clinicals.size() > 0) {
|
|
|
|
- /* 主诉中没有伴字,有症状即可 */
|
|
|
|
- if (!chiefText.contains("伴")){
|
|
|
|
- status.set("0");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- for (Clinical clinical : clinicals) {
|
|
|
|
- indexMap.put(clinical.getName(), chiefText.indexOf(clinical.getName()));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- int index_ban = chiefText.indexOf("伴");
|
|
|
|
- if (indexMap.size() > 0) {
|
|
|
|
- if (index_ban == -1) {
|
|
|
|
- status.set("0");
|
|
|
|
- } else {
|
|
|
|
- for (Map.Entry<String, Integer> s : indexMap.entrySet()) {
|
|
|
|
- Integer value = s.getValue();
|
|
|
|
- if (value < index_ban) {
|
|
|
|
- status.set("0");
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|