|
@@ -3,8 +3,11 @@ package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.entity.Clinical;
|
|
|
import com.lantone.qc.pub.model.entity.PD;
|
|
|
+import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
|
import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -24,6 +27,27 @@ public class BEH0018 extends QCCatalogue {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
+ ChiefLabel chiefLabel = inputInfo.getBeHospitalizedDoc().getChiefLabel();
|
|
|
+ if (chiefLabel != null && ListUtil.isNotEmpty(chiefLabel.getClinicals())) {
|
|
|
+ List<Clinical> clinicalList = chiefLabel.getClinicals();
|
|
|
+ boolean flag = true;
|
|
|
+ // 主诉症状不超过1年就不报错,单位不包含“年”
|
|
|
+ for (Clinical c : clinicalList) {
|
|
|
+ List<PD> pds = c.getTimestamp();
|
|
|
+ if (ListUtil.isNotEmpty(pds)) {
|
|
|
+ for (PD pd : pds) {
|
|
|
+ if ("年".equals(pd.getUnit()) && !"半年".equals(pd.getName())) {
|
|
|
+ flag = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
|
List<PD> pds = presentLabel.getPds();
|
|
|
if (pds != null && pds.size() > 0) {
|