|
@@ -1,6 +1,7 @@
|
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
import com.lantone.qc.pub.Content;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
@@ -41,21 +42,18 @@ public class BEH03332 extends QCCatalogue {
|
|
|
if (chiefLabel == null || StringUtil.isEmpty(chiefLabelText)) {
|
|
|
return;
|
|
|
}
|
|
|
- String rex="([0-9一二三四五六七八九十百]{1,5})";
|
|
|
- String rex2="([天日周年月]|星期)";
|
|
|
+ String rex=Content.SJZZ_TIME;
|
|
|
+ String rex2=Content.SJZZ_UNIT;
|
|
|
Pattern pattern = Pattern.compile(sjzz);
|
|
|
- Pattern patternOne = Pattern.compile(rex);
|
|
|
Pattern patternTwo = Pattern.compile(rex2);
|
|
|
Matcher ma = pattern.matcher(chiefLabelText);
|
|
|
while (ma.find()) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
String group = ma.group();
|
|
|
- Matcher maOne = patternOne.matcher(group);
|
|
|
Matcher maTwo = patternTwo.matcher(group);
|
|
|
- boolean one = maOne.find();
|
|
|
boolean two = maTwo.find();
|
|
|
- String groupOne = maOne.group();
|
|
|
String groupTwo = maTwo.group();
|
|
|
+ String groupOne = group.replace(groupTwo, "").replace("+","");
|
|
|
String toString = sb.append(".*(").append(groupOne).append("[^。,;。,;]{0,3}").append(groupTwo).append(").*").toString();
|
|
|
timeZZ.add(toString);
|
|
|
}
|
|
@@ -71,12 +69,13 @@ public class BEH03332 extends QCCatalogue {
|
|
|
if(difficultCaseDiscussDoc==null){
|
|
|
continue;
|
|
|
}
|
|
|
- String discussDoc = difficultCaseDiscussDoc.getStructureMap().get("病程内容");
|
|
|
+ String discussDoc = difficultCaseDiscussDoc.getStructureMap().get("原始文本");
|
|
|
if(StringUtil.isEmpty(discussDoc)){
|
|
|
continue;
|
|
|
}
|
|
|
+ String aChar = CatalogueUtil.removeSpecialChar(discussDoc);
|
|
|
for (String zz : timeZZ) {
|
|
|
- if(!discussDoc.matches(zz)){
|
|
|
+ if(!aChar.matches(zz)){
|
|
|
status.set("-1");
|
|
|
return;
|
|
|
}
|