|
@@ -21,29 +21,38 @@ import java.util.List;
|
|
|
@Component
|
|
|
public class BEH0014 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
|
|
|
+ /*List<Clinical> clinicals = inputInfo.getBeHospitalizedDoc().getPresentLabel().getClinicals();
|
|
|
if(clinicals.size()>0){
|
|
|
Clinical clinical = clinicals.get(0);
|
|
|
String clinicalName = clinical.getName();
|
|
|
Cause cause = clinical.getCause();
|
|
|
if(cause == null){
|
|
|
-// int causeIndex = inputInfo.getBeHospitalizedDoc().getPresentLabel().getText().indexOf("因");
|
|
|
-// if (causeIndex < 15 && causeIndex > -1) {
|
|
|
-// status.set("0");
|
|
|
-// } else {
|
|
|
- info.set(clinicalName);
|
|
|
-// }
|
|
|
+ info.set(clinicalName);
|
|
|
}else {
|
|
|
status.set("0");
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
//硬规则匹配 前30个字有"体检"或"发现"或"检查"字样
|
|
|
- String present = inputInfo.getBeHospitalizedDoc().getPresentLabel().getText();
|
|
|
- if (StringUtils.isNotEmpty(present)) {
|
|
|
- if (present.length() > 30) present = present.substring(0, 30);
|
|
|
- if (present.contains("体检") || present.contains("发现") || present.contains("检查")) {
|
|
|
+ if(inputInfo.getBeHospitalizedDoc() != null){
|
|
|
+ String present = inputInfo.getBeHospitalizedDoc().getPresentLabel().getText();
|
|
|
+ if (StringUtils.isNotEmpty(present)) {
|
|
|
+ if (present.length() > 30) present = present.substring(0, 30);
|
|
|
+ if (present.contains("体检") || present.contains("发现") || present.contains("检查")) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Cause> causes = inputInfo.getBeHospitalizedDoc().getPresentLabel().getCauses();
|
|
|
+ if(causes != null && causes.size()>0){
|
|
|
status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
+ }else {
|
|
|
+ status.set("0");
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|