|
@@ -6,6 +6,7 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
import com.lantone.qc.pub.model.entity.Vaccinate;
|
|
|
import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
+import com.lantone.qc.pub.model.label.PersonalLabel;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -36,20 +37,32 @@ public class BEH0029 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
|
|
|
+ //个人史
|
|
|
+ PersonalLabel personalLabel = beHospitalizedDoc.getPersonalLabel();
|
|
|
/* 如果既往史为空或者既往史文本为空,则不报错 */
|
|
|
- if (pastLabel == null || StringUtil.isBlank(pastLabel.getText())) {
|
|
|
+ if ((pastLabel == null || StringUtil.isBlank(pastLabel.getText())) &&
|
|
|
+ (personalLabel == null || StringUtil.isBlank(personalLabel.getText()))) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
- String pastText = pastLabel.getText();
|
|
|
- if (pastText.contains("详见原病历") || pastText.contains("预防接种")) {
|
|
|
- status.set("0");
|
|
|
- return;
|
|
|
+ if (pastLabel != null) {
|
|
|
+ String pastText = pastLabel.getText();
|
|
|
+ if (pastText.contains("详见原病历") || pastText.contains("预防接种")) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<Vaccinate> vaccinates = pastLabel.getVaccinates();
|
|
|
+ if (ListUtil.isNotEmpty(vaccinates)) {
|
|
|
+ if (vaccinates.stream().map(i -> i.getName()).filter(i -> StringUtil.isNotBlank(i)).count() > 0) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- List<Vaccinate> vaccinates = pastLabel.getVaccinates();
|
|
|
- if (ListUtil.isNotEmpty(vaccinates)) {
|
|
|
- if (vaccinates.stream().map(i -> i.getName()).filter(i -> StringUtil.isNotBlank(i)).count() > 0) {
|
|
|
+ if (personalLabel != null) {
|
|
|
+ String personText = personalLabel.getText();
|
|
|
+ if (StringUtil.isNotBlank(personText) && (personText.contains("详见原病历") || personText.contains("预防接种"))) {
|
|
|
status.set("0");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
}
|