|
@@ -0,0 +1,50 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
+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 org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : BEH0006
|
|
|
+ * @Description :现病史症状缺少近期事件描述
|
|
|
+ * @Author : 楼辉荣
|
|
|
+ * @Date: 2020-03-06 17:28
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class BEH0018 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status = "0";
|
|
|
+ PresentLabel presentLabel = inputInfo.getBeHospitalizedDoc().getPresentLabel();
|
|
|
+ String chief_text = presentLabel.getText();
|
|
|
+ if(chief_text.contains("年")){
|
|
|
+ List<Clinical> clinicals = presentLabel.getClinicals();
|
|
|
+ if(clinicals.size()>0){
|
|
|
+ List<String> unitList = new ArrayList<>();
|
|
|
+ for (Clinical clinical:clinicals) {
|
|
|
+ List<PD> timestamp = clinical.getTimestamp();
|
|
|
+ if(timestamp != null){
|
|
|
+ for (PD pd:timestamp) {
|
|
|
+ if(!CatalogueUtil.isEmpty(pd.getUnit())){
|
|
|
+ unitList.add(pd.getUnit());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(!unitList.contains("天")){
|
|
|
+ status = "-1";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|