|
@@ -9,6 +9,7 @@ import com.diagbot.model.entity.PD;
|
|
|
import com.diagbot.repository.Constants;
|
|
|
import com.diagbot.repository.NodeInfo;
|
|
|
import com.diagbot.repository.datautil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
@@ -177,11 +178,24 @@ public class NeoUtil {
|
|
|
if(pd != null){
|
|
|
String unit = pd.getUnit();
|
|
|
String value = pd.getValue();
|
|
|
- if(unit != null){
|
|
|
+ if(StringUtils.isNotBlank(unit)){
|
|
|
if((unit.contains("年") || unit.contains("月")) && disName.startsWith("急")){
|
|
|
match = false;
|
|
|
}
|
|
|
+ if((unit.contains("周") && (StringUtils.isNotBlank(value) && Integer.parseInt(value) > 2) && disName.startsWith("急"))
|
|
|
+ || (unit.contains("周") && (StringUtils.isNotBlank(value) && Integer.parseInt(value) <= 2) && disName.startsWith("慢"))){
|
|
|
+ match = false;
|
|
|
+ }
|
|
|
+ if((unit.contains("天") && (StringUtils.isNotBlank(value) && Integer.parseInt(value) > 14) && disName.startsWith("急"))
|
|
|
+ || (unit.contains("天") && (StringUtils.isNotBlank(value) && Integer.parseInt(value) <= 14) && disName.startsWith("慢"))){
|
|
|
+ match = false;
|
|
|
+ }
|
|
|
|
|
|
+ }else {
|
|
|
+ if((value.equals("两年") || value.equals("两月") && disName.startsWith("急")) ||
|
|
|
+ ((value.equals("两天") || value.equals("两小时") && disName.startsWith("慢")))){
|
|
|
+ match = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -226,4 +240,12 @@ public class NeoUtil {
|
|
|
return isin;
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ PD pd = new PD();
|
|
|
+ pd.setValue("两月");
|
|
|
+ pd.setUnit("");
|
|
|
+ boolean b = matchPds("急性胰腺炎", pd);
|
|
|
+ System.out.println(b);
|
|
|
+ }
|
|
|
+
|
|
|
}
|