|
@@ -3,8 +3,10 @@ package com.diagbot.util;
|
|
|
import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.biz.push.entity.Lis;
|
|
|
import com.diagbot.dto.NodeNeoDTO;
|
|
|
+import com.diagbot.model.entity.BodyPart;
|
|
|
import com.diagbot.model.entity.Clinical;
|
|
|
import com.diagbot.model.entity.Negative;
|
|
|
+import com.diagbot.model.entity.PD;
|
|
|
import com.diagbot.model.entity.Usual;
|
|
|
import com.diagbot.model.entity.Vital;
|
|
|
import com.diagbot.model.label.VitalLabel;
|
|
@@ -895,7 +897,7 @@ public class CoreUtil {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 筛选对象列表中“uniqueName”字段为空的数据,返回targetProperty字段列表
|
|
|
+ * 筛选对象列表中“name”字段不为空的数据
|
|
|
*
|
|
|
* @param list
|
|
|
* @param <T>
|
|
@@ -911,6 +913,64 @@ public class CoreUtil {
|
|
|
.collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 筛选对象列表中“name”字段不为空的数据,再拼接:bodyPart + name
|
|
|
+ *
|
|
|
+ * @param list
|
|
|
+ * @param <T>
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static <T> List<String> getNameAppendBodySymptom(List<T> list) {
|
|
|
+ List<String> res = new ArrayList<>();
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ for (T t : list) {
|
|
|
+ // 症状需要提取名称
|
|
|
+ String name = (String) getFieldValue(t, "name");
|
|
|
+ if (StringUtil.isNotBlank(name)) {
|
|
|
+ res.add(name);
|
|
|
+ }
|
|
|
+ BodyPart bodyPart = (BodyPart)getFieldValue(t, "bodyPart");
|
|
|
+ if (bodyPart != null && StringUtil.isNotBlank(bodyPart.getName())) {
|
|
|
+ res.add(bodyPart.getName() + name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 筛选对象列表中“name”字段不为空的数据,再拼接:bodyPart + name
|
|
|
+ *
|
|
|
+ * @param list
|
|
|
+ * @param <T>
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static <T> List<String> getNameAppendBodyVital(List<T> list) {
|
|
|
+ List<String> res = new ArrayList<>();
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ for (T t : list) {
|
|
|
+ // 刨去体温,脉搏,数值类型的体征数据
|
|
|
+ PD pd = (PD)getFieldValue(t, "pd");
|
|
|
+ if (pd == null || (pd != null && StringUtil.isNotBlank(pd.getUnit()))) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String name = (String) getFieldValue(t, "name");
|
|
|
+ // 查体拼接结果
|
|
|
+ if (StringUtil.isNotBlank(pd.getName())) {
|
|
|
+ // 查体结果
|
|
|
+ res.add(name + pd.getName());
|
|
|
+ // 查体部位 + 查体结果
|
|
|
+ BodyPart bodyPart = (BodyPart)getFieldValue(t, "bodyPart");
|
|
|
+ if (bodyPart != null && StringUtil.isNotBlank(bodyPart.getName())) {
|
|
|
+ res.add(bodyPart.getName() + name + pd.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 筛选对象列表中“uniqueName”字段为空的数据,返回“name”字段列表
|