|
@@ -33,32 +33,37 @@ public class BEH0005 extends QCCatalogue {
|
|
|
}
|
|
|
List<PD> pds = chiefLabel.getPds();
|
|
|
String chiefText = chiefLabel.getText();
|
|
|
- if (chiefText.contains("检查") || chiefText.contains("术后") || chiefText.contains("药物")) {
|
|
|
- return;
|
|
|
- } else {
|
|
|
- List<String> words = Lists.newArrayList("年", "月", "周", "天", "日", "时","分");
|
|
|
- String name;
|
|
|
- for (PD pd : pds) {
|
|
|
- name = pd.getName();
|
|
|
- if (StringUtil.isNotBlank(name)) {
|
|
|
+ if (StringUtil.isNotBlank(chiefText)) {
|
|
|
+ chiefText = chiefText.replace("月经", "");/* 月经这个词会影响逻辑判断,这里把月经这个词去除 */
|
|
|
+ if (chiefText.contains("检查") || chiefText.contains("术后") || chiefText.contains("药物")) {
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ List<String> words = Lists.newArrayList("年", "月", "周", "天", "日", "时", "分");
|
|
|
+ String name;
|
|
|
+ for (PD pd : pds) {
|
|
|
+ name = pd.getName();
|
|
|
+ if (StringUtil.isBlank(name)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
for (String word : words) {
|
|
|
if (name.contains(word)) {
|
|
|
timeIndex.add(chiefText.indexOf(word));
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- if (timeIndex.size() > 0) {
|
|
|
- int min = timeIndex.get(0);
|
|
|
- for (Integer data : timeIndex) {
|
|
|
- if (data < min) {
|
|
|
- min = data;
|
|
|
+ if (timeIndex.size() > 0) {
|
|
|
+ int min = timeIndex.get(0);
|
|
|
+ for (Integer data : timeIndex) {
|
|
|
+ if (data < min) {
|
|
|
+ min = data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (min != timeIndex.get(0)) {
|
|
|
+ status.set("-1");
|
|
|
}
|
|
|
- }
|
|
|
- if (min != timeIndex.get(0)) {
|
|
|
- status.set("-1");
|
|
|
}
|
|
|
}
|
|
|
}
|