|
@@ -1,21 +1,46 @@
|
|
|
package com.lantone.qc.kernel.catalogue.leavehospital;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.KernelConstants;
|
|
|
+import com.lantone.qc.kernel.util.RedisUtil;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.entity.Diag;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
- * @Description:
|
|
|
+ * @Description: 出院诊断不标准
|
|
|
* @author: rengb
|
|
|
* @time: 2020/3/10 13:53
|
|
|
*/
|
|
|
@Component
|
|
|
public class LEA0147 extends QCCatalogue {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RedisUtil redisUtil;
|
|
|
+
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
-
|
|
|
+ status = "0";
|
|
|
+ List<Diag> diags = inputInfo.getLeaveHospitalDoc().getLeaveDiagLabel().getDiags();
|
|
|
+ Map<String, Map<String, String>> hospitalDiagMap = redisUtil.getJsonStringValue(KernelConstants.HOSPITAL_DIAG_MAP);
|
|
|
+ if (ListUtil.isNotEmpty(diags) && hospitalDiagMap != null) {
|
|
|
+ long count = diags.stream().filter(i -> {
|
|
|
+ if (i != null && StringUtil.isNotBlank(i.getHospitalDiagName())) {
|
|
|
+ return hospitalDiagMap.get(i.getHospitalDiagName()) == null;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }).count();
|
|
|
+ if (count > 0) {
|
|
|
+ status = "-1";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|