|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.TypeReference;
|
|
|
import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.dto.*;
|
|
|
import com.diagbot.entity.node.*;
|
|
|
+import com.diagbot.enums.TypeEnum;
|
|
|
import com.diagbot.model.label.PacsLabel;
|
|
|
import com.diagbot.model.label.VitalLabel;
|
|
|
import com.diagbot.util.CoreUtil;
|
|
@@ -226,6 +227,7 @@ public class YiBaoOperationNameNode {
|
|
|
try {
|
|
|
String cond = operation.getHighriskcond();
|
|
|
JSONObject jobj = JSONObject.parseObject(cond);
|
|
|
+
|
|
|
// 判断年龄
|
|
|
JSONObject ageobj = jobj.getJSONObject("年龄");
|
|
|
int age = wordCrfDTO.getAge();
|
|
@@ -233,8 +235,11 @@ public class YiBaoOperationNameNode {
|
|
|
nodeNeoDTO = NeoUtil.jsontoNodeNeoDTO("年龄", ageobj);
|
|
|
match = CoreUtil.compareNum(nodeNeoDTO, age);
|
|
|
if (match) {
|
|
|
+ nodeNeoDTO.setVal("年龄:"+age);
|
|
|
+ nodeNeoDTO.setTermtype(TypeEnum.age.getName());
|
|
|
highRiskNeoDTO.getFactor().add(nodeNeoDTO);
|
|
|
}
|
|
|
+
|
|
|
// 判断生命体征和查体
|
|
|
VitalLabel vitalLabel = wordCrfDTO.getVitalLabel();
|
|
|
JSONObject vitalobj = jobj.getJSONObject("生命体征及查体");
|
|
@@ -243,6 +248,8 @@ public class YiBaoOperationNameNode {
|
|
|
res = CoreUtil.compareVital(nodeNeoDTO, vitalLabel);
|
|
|
|
|
|
if ((Boolean)res.get("flag")) {
|
|
|
+ nodeNeoDTO.setVal(res.get("msg").toString());
|
|
|
+ nodeNeoDTO.setTermtype(TypeEnum.vital.getName());
|
|
|
highRiskNeoDTO.getFactor().add(nodeNeoDTO);
|
|
|
}
|
|
|
}
|
|
@@ -251,10 +258,12 @@ public class YiBaoOperationNameNode {
|
|
|
List<Item> diags = wordCrfDTO.getDiag();
|
|
|
JSONObject diagobj = jobj.getJSONObject("合并疾病");
|
|
|
for (String key : diagobj.keySet()) {
|
|
|
- nodeNeoDTO = NeoUtil.jsontoNodeNeoDTO(key, diagobj.getJSONObject(key));
|
|
|
- match = CoreUtil.compareNameWithNodeNeoDTO(nodeNeoDTO, diags);
|
|
|
- if (match) {
|
|
|
- highRiskNeoDTO.getFactor().add(nodeNeoDTO);
|
|
|
+ for (Item item : diags) {
|
|
|
+ if (item.getUniqueName().equals(key)) {
|
|
|
+ nodeNeoDTO.setVal(item.getUniqueName());
|
|
|
+ nodeNeoDTO.setTermtype(TypeEnum.disease.getName());
|
|
|
+ highRiskNeoDTO.getFactor().add(nodeNeoDTO);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -267,6 +276,8 @@ public class YiBaoOperationNameNode {
|
|
|
res = CoreUtil.compareLis(nodeNeoDTO, lis);
|
|
|
|
|
|
if ((Boolean)res.get("flag")) {
|
|
|
+ nodeNeoDTO.setVal(res.get("msg").toString());
|
|
|
+ nodeNeoDTO.setTermtype(TypeEnum.lis.getName());
|
|
|
highRiskNeoDTO.getFactor().add(nodeNeoDTO);
|
|
|
}
|
|
|
}
|
|
@@ -275,13 +286,13 @@ public class YiBaoOperationNameNode {
|
|
|
// 判断辅检结果
|
|
|
PacsLabel pacs1bl = wordCrfDTO.getPacsLabel();
|
|
|
JSONObject pacsobj = jobj.getJSONObject("辅检结果描述");
|
|
|
- Map<String, String> keywords = JSONObject.parseObject(pacsobj.toJSONString(), new TypeReference<Map<String, String>>(){});
|
|
|
for (String key : pacsobj.keySet()) {
|
|
|
|
|
|
for (Item item : pacs1bl.getRes()) {
|
|
|
if (item.getDateValue().contains(key)) {
|
|
|
nodeNeoDTO = new NodeNeoDTO();
|
|
|
nodeNeoDTO.setName(item.getDateValue());
|
|
|
+ nodeNeoDTO.setTermtype(TypeEnum.pacs.getName());
|
|
|
highRiskNeoDTO.getFactor().add(nodeNeoDTO);
|
|
|
}
|
|
|
}
|