|
@@ -1,20 +1,55 @@
|
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+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 14:02
|
|
|
*/
|
|
|
@Component
|
|
|
public class BEH0031 extends QCCatalogue {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RedisUtil redisUtil;
|
|
|
+
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
-
|
|
|
+ List<Diag> diags = inputInfo.getBeHospitalizedDoc().getPastLabel().getDiags();
|
|
|
+ if (ListUtil.isEmpty(diags)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Map<String, Object>> diagCache = (Map) redisUtil.get("concept_diag_property_map");
|
|
|
+ long count = diags.stream().map(i -> i.getName())
|
|
|
+ .filter(i -> {
|
|
|
+ boolean flag = false;
|
|
|
+ if (StringUtil.isNotBlank(i)) {
|
|
|
+ Map<String, Object> diagDetailMap = diagCache.get(i);
|
|
|
+ if (diagDetailMap != null) {
|
|
|
+ String chronic = (String) diagDetailMap.get("chronic");
|
|
|
+ if (StringUtil.isNotBlank(chronic) && chronic.equals("1")) {
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return flag;
|
|
|
+ }).count();
|
|
|
+
|
|
|
+ if (count > 0) {
|
|
|
+ status = "0";
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
+
|
|
|
+}
|