|
@@ -12,6 +12,7 @@ import com.lantone.qc.pub.model.entity.GeneralDesc;
|
|
|
import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -93,19 +94,28 @@ public class FIRC0095 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- List<String> markStr = Arrays.asList("病以来", "病来");
|
|
|
- String text = initialDiagLabel.getText();
|
|
|
- for (String str : markStr) {
|
|
|
- if(text.contains(str)){
|
|
|
- String textStr = text.substring(text.lastIndexOf(str));
|
|
|
- presentPastDiags = presentPastDiags.stream().filter(obj->textStr.contains(obj)).collect(Collectors.toSet());
|
|
|
- break;
|
|
|
- }
|
|
|
+
|
|
|
+ if(presentPastDiags!= null && presentPastDiags.size()>0){
|
|
|
+ List<String> markStr = Arrays.asList("病以来", "病来");
|
|
|
+ String text = initialDiagLabel.getText();
|
|
|
+ for (String str : markStr) {
|
|
|
+ if(text.contains(str)){
|
|
|
+ String textStr = text.substring(text.lastIndexOf(str));
|
|
|
+ presentPastDiags = presentPastDiags.stream().filter(obj->textStr.contains(obj)).collect(Collectors.toSet());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* 取既往史中疾病名称 */
|
|
|
if (pastLabel != null && StringUtils.isNotEmpty(pastLabel.getText())) {
|
|
|
List<Diag> pastDiags = pastLabel.getDiags();
|
|
|
+ String text = pastLabel.getText();
|
|
|
+ String pattern = "[\\s\\S]*(?=妊娠).{0,4}((?=高血压)|(?=糖尿病))[\\s\\S]*";
|
|
|
+ if(text.matches(pattern) && ListUtil.isNotEmpty(pastDiags)){
|
|
|
+ List<String> dis = Arrays.asList("高血压", "糖尿病");
|
|
|
+ pastDiags = pastDiags.stream().filter(obj -> !dis.contains(obj.getHospitalDiagName())).collect(Collectors.toList());
|
|
|
+ }
|
|
|
addDiagHospitalName(presentPastDiags, pastDiags, pastLabel.getText());
|
|
|
} else { //结构化数据
|
|
|
List<Diag> pastDiags = new ArrayList<>();
|