|
@@ -0,0 +1,45 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.firstpagerecord;
|
|
|
+
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.pub.Content;
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP02992
|
|
|
+ * @Description : 药物过敏与既往史不一致(结构化数据)
|
|
|
+ * @Author : rengb
|
|
|
+ * @Date: 2020-03-18 14:07
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class FIRP02992 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getBeHospitalizedDoc() != null) {
|
|
|
+ Map<String, String> fpStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ String fpDrugAllergy = fpStructureMap.get(Content.drugAllergy);
|
|
|
+ fpDrugAllergy = StringUtil.isBlank(fpDrugAllergy) ? "" : fpDrugAllergy;
|
|
|
+
|
|
|
+ Map<String, String> beStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
+ String beDrugAllergy = beStructureMap.get("过敏史");
|
|
|
+ beDrugAllergy = StringUtil.isBlank(beDrugAllergy) ? "" : beDrugAllergy;
|
|
|
+
|
|
|
+ if (!fpDrugAllergy.equals(beDrugAllergy)) {
|
|
|
+ String regx = ";|;|,|,|、| ";
|
|
|
+ List<String> fpList = Lists.newArrayList(fpDrugAllergy.split(regx));
|
|
|
+ List<String> beList = Lists.newArrayList(beDrugAllergy.split(regx));
|
|
|
+ if (!ListUtil.equals(fpList, beList)) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|