|
@@ -0,0 +1,48 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
+
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+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.label.DiagLabel;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : BEH03060
|
|
|
+ * @Description : 诊断与体征描述相互矛盾
|
|
|
+ * @Author : 胡敬
|
|
|
+ * @Date: 2020-08-10 19:00
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class BEH03060 extends QCCatalogue {
|
|
|
+
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ DiagLabel initialDiagLabel = inputInfo.getBeHospitalizedDoc().getInitialDiagLabel();
|
|
|
+ if (initialDiagLabel == null || StringUtil.isBlank(initialDiagLabel.getText())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> diags = Lists.newArrayList(initialDiagLabel.getText().split("\n"));
|
|
|
+ long matchNum = diags.stream().filter(x -> x.contains("房扑") || x.contains("房颤")).count();
|
|
|
+ if (matchNum > 0) {
|
|
|
+ Map<String, String> behStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
+ String heartRate = behStructureMap.get("心律");
|
|
|
+ if (StringUtil.isNotBlank(heartRate) && "齐".equals(heartRate)) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String specialCheck = behStructureMap.get("专科体格检查");
|
|
|
+ if (StringUtil.isNotBlank(specialCheck) && specialCheck.contains("律齐")) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|