|
@@ -7,15 +7,16 @@ import com.diagbot.dto.HighRiskNeoDTO;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.IndicationDTO;
|
|
import com.diagbot.dto.NodeNeoDTO;
|
|
import com.diagbot.dto.NodeNeoDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
import com.diagbot.dto.WordCrfDTO;
|
|
|
|
+import com.diagbot.enums.TypeEnum;
|
|
import com.diagbot.model.label.PacsLabel;
|
|
import com.diagbot.model.label.PacsLabel;
|
|
import com.diagbot.util.CoreUtil;
|
|
import com.diagbot.util.CoreUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
-import com.diagbot.util.StringUtil;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -43,84 +44,68 @@ public class HighRiskProcess {
|
|
res.getHighRiskList().add(billMsg);
|
|
res.getHighRiskList().add(billMsg);
|
|
System.out.println(highRiskNeoDTO);
|
|
System.out.println(highRiskNeoDTO);
|
|
}
|
|
}
|
|
|
|
+ // TODO 测试数据开始
|
|
|
|
+ HighRiskNeoDTO highRiskNeoDTO = new HighRiskNeoDTO();
|
|
|
|
+ highRiskNeoDTO.setName("锁骨下动脉药物洗脱支架置入术");
|
|
|
|
+ highRiskNeoDTO.setStandname("锁骨下动脉药物洗脱支架置入术");
|
|
|
|
+ highRiskNeoDTO.setType("手术");
|
|
|
|
+ List<NodeNeoDTO> factor = highRiskNeoDTO.getFactor();
|
|
|
|
+ NodeNeoDTO nodeNeo = new NodeNeoDTO();
|
|
|
|
+ nodeNeo.setTermtype("诊断");
|
|
|
|
+ nodeNeo.setName("急性胰腺炎");
|
|
|
|
+ factor.add(nodeNeo);
|
|
|
|
+ NodeNeoDTO nodeLis = new NodeNeoDTO();
|
|
|
|
+ nodeLis.setTermtype("化验");
|
|
|
|
+ nodeLis.setName("白细胞计数");
|
|
|
|
+ nodeLis.setMax(new BigDecimal(20));
|
|
|
|
+ nodeLis.setMin(new BigDecimal(10));
|
|
|
|
+ nodeLis.setValType(0);
|
|
|
|
+ factor.add(nodeLis);
|
|
|
|
+ NodeNeoDTO nodeLis1 = new NodeNeoDTO();
|
|
|
|
+ nodeLis1.setTermtype("化验");
|
|
|
|
+ nodeLis1.setName("红细胞压积");
|
|
|
|
+ nodeLis1.setVal("阳性");
|
|
|
|
+ factor.add(nodeLis1);
|
|
|
|
|
|
|
|
+ NodeNeoDTO nodePass = new NodeNeoDTO();
|
|
|
|
+ nodePass.setTermtype("辅检");
|
|
|
|
+ nodePass.setName("胸部CT");
|
|
|
|
+ nodePass.setVal("肺叶根治性切除标本");
|
|
|
|
+ factor.add(nodePass);
|
|
|
|
+ highRiskNeoDTOList.add(highRiskNeoDTO);
|
|
|
|
+ // TODO 测试数据结束
|
|
proceSurgery(highRiskNeoDTOList, res, wordCrfDTO);
|
|
proceSurgery(highRiskNeoDTOList, res, wordCrfDTO);
|
|
}
|
|
}
|
|
|
|
|
|
public void proceSurgery(List<HighRiskNeoDTO> highRiskNeoDTOList, IndicationDTO res, WordCrfDTO wordCrfDTO) {
|
|
public void proceSurgery(List<HighRiskNeoDTO> highRiskNeoDTOList, IndicationDTO res, WordCrfDTO wordCrfDTO) {
|
|
for (HighRiskNeoDTO highRiskNeoDTO : highRiskNeoDTOList) {
|
|
for (HighRiskNeoDTO highRiskNeoDTO : highRiskNeoDTOList) {
|
|
-
|
|
|
|
String type = highRiskNeoDTO.getType();
|
|
String type = highRiskNeoDTO.getType();
|
|
List<Item> diag = wordCrfDTO.getDiag();
|
|
List<Item> diag = wordCrfDTO.getDiag();
|
|
List<Lis> lisList = wordCrfDTO.getLis();
|
|
List<Lis> lisList = wordCrfDTO.getLis();
|
|
PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
//diagLabel 诊断
|
|
//diagLabel 诊断
|
|
- if (type.equals("手术")) {
|
|
|
|
|
|
+ if (TypeEnum.operation.getName().equals(type)) {
|
|
List<NodeNeoDTO> factor = highRiskNeoDTO.getFactor();
|
|
List<NodeNeoDTO> factor = highRiskNeoDTO.getFactor();
|
|
- NodeNeoDTO nodeNeo = new NodeNeoDTO();
|
|
|
|
- nodeNeo.setTermtype("诊断");
|
|
|
|
- nodeNeo.setName("糖尿病");
|
|
|
|
- factor.add(nodeNeo);
|
|
|
|
- NodeNeoDTO nodeLis = new NodeNeoDTO();
|
|
|
|
- nodeLis.setTermtype("化验");
|
|
|
|
- nodeLis.setName("白细胞计数");
|
|
|
|
- nodeLis.setMax(new BigDecimal(20));
|
|
|
|
- nodeLis.setMin(new BigDecimal(10));
|
|
|
|
- nodeLis.setValType(0);
|
|
|
|
- factor.add(nodeLis);
|
|
|
|
- NodeNeoDTO nodeLis1 = new NodeNeoDTO();
|
|
|
|
- nodeLis1.setTermtype("化验");
|
|
|
|
- nodeLis1.setName("红细胞压积");
|
|
|
|
- nodeLis1.setVal("阳性");
|
|
|
|
- factor.add(nodeLis1);
|
|
|
|
-
|
|
|
|
- NodeNeoDTO nodePass = new NodeNeoDTO();
|
|
|
|
- nodePass.setTermtype("辅检");
|
|
|
|
- nodePass.setName("胸部CT");
|
|
|
|
- nodePass.setVal("肺叶根治性切除标本");
|
|
|
|
- factor.add(nodePass);
|
|
|
|
for (NodeNeoDTO nodeNeoDTO : factor) {
|
|
for (NodeNeoDTO nodeNeoDTO : factor) {
|
|
- if (nodeNeoDTO.getTermtype().equals("诊断")) {
|
|
|
|
|
|
+ if (TypeEnum.disease.getName().equals(nodeNeoDTO.getTermtype())) {
|
|
String name = nodeNeoDTO.getName();
|
|
String name = nodeNeoDTO.getName();
|
|
for (Item item : diag) {
|
|
for (Item item : diag) {
|
|
- if (item.getName().equals(name)) {
|
|
|
|
- BillMsg billMsg = new BillMsg();
|
|
|
|
- billMsg.setMsg("高风险手术 :" + name + ",请留意");
|
|
|
|
- billMsg.setOrderName(highRiskNeoDTO.getName());
|
|
|
|
- billMsg.setOrderStandName(highRiskNeoDTO.getStandname());
|
|
|
|
- billMsg.setType(type);
|
|
|
|
|
|
+ if (item.getUniqueName().equals(name)) {
|
|
|
|
+ BillMsg billMsg = CoreUtil.getComplexOperationMsg("高风险手术", item.getName(), nodeNeoDTO.getTermtype());
|
|
res.getHighRiskList().add(billMsg);
|
|
res.getHighRiskList().add(billMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else if (nodeNeoDTO.getTermtype().equals("化验")) {
|
|
|
|
- boolean flag = false;
|
|
|
|
|
|
+ } else if (TypeEnum.lis.getName().equals(nodeNeoDTO.getTermtype())) {
|
|
for (Lis lis : lisList) {
|
|
for (Lis lis : lisList) {
|
|
if (lis.getUniqueName().equals(nodeNeoDTO.getName())) {
|
|
if (lis.getUniqueName().equals(nodeNeoDTO.getName())) {
|
|
- if (StringUtil.isNotBlank(lis.getOtherValue())) {
|
|
|
|
- if (lis.getOtherValue().equals(nodeNeoDTO.getVal())) {
|
|
|
|
- BillMsg billMsgz = new BillMsg();
|
|
|
|
- billMsgz.setMsg("高风险手术 :" + lis.getName() + lis.getDetailName() + lis.getOtherValue() + ",请留意");
|
|
|
|
- billMsgz.setOrderName(highRiskNeoDTO.getName());
|
|
|
|
- billMsgz.setOrderStandName(highRiskNeoDTO.getStandname());
|
|
|
|
- billMsgz.setType(type);
|
|
|
|
- res.getHighRiskList().add(billMsgz);
|
|
|
|
- }
|
|
|
|
- } else if (lis.getValue() != null) {
|
|
|
|
- double value = lis.getValue();
|
|
|
|
- flag = CoreUtil.compareNum(nodeNeoDTO, value);
|
|
|
|
- if (flag) {
|
|
|
|
- BillMsg billMsgss = new BillMsg();
|
|
|
|
- //map.put("msg", lis.getName() + lis.getDetailName() + CoreUtil.subZeroAndDot(String.valueOf(lis.getValue())));
|
|
|
|
- billMsgss.setMsg("高风险手术 :" + lis.getName() + lis.getDetailName() + CoreUtil.subZeroAndDot(String.valueOf(lis.getValue())) + ",请留意");
|
|
|
|
- billMsgss.setOrderName(highRiskNeoDTO.getName());
|
|
|
|
- billMsgss.setOrderStandName(highRiskNeoDTO.getStandname());
|
|
|
|
- billMsgss.setType(type);
|
|
|
|
- res.getHighRiskList().add(billMsgss);
|
|
|
|
- }
|
|
|
|
|
|
+ Map<String, Object> map = CoreUtil.compareLis(nodeNeoDTO, lis);
|
|
|
|
+ if ((Boolean) map.get("flag") == true) {
|
|
|
|
+ BillMsg billMsg = CoreUtil.getComplexOperationMsg("高风险手术", (String)map.get("msg"), nodeNeoDTO.getTermtype());
|
|
|
|
+ res.getHighRiskList().add(billMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else if (nodeNeoDTO.getTermtype().equals("辅检")) {
|
|
|
|
|
|
+ } else if (TypeEnum.pacs.getName().equals(nodeNeoDTO.getTermtype())) {
|
|
//辅助检查描述
|
|
//辅助检查描述
|
|
List<Item> pacsDescList = new ArrayList<>();
|
|
List<Item> pacsDescList = new ArrayList<>();
|
|
pacsLabel.getPacsNewList().stream().filter(x -> ListUtil.isNotEmpty(x.getPacsResults()) || ListUtil.isNotEmpty(x.getDisease())).forEach(
|
|
pacsLabel.getPacsNewList().stream().filter(x -> ListUtil.isNotEmpty(x.getPacsResults()) || ListUtil.isNotEmpty(x.getDisease())).forEach(
|
|
@@ -139,19 +124,13 @@ public class HighRiskProcess {
|
|
//辅检匹配结果
|
|
//辅检匹配结果
|
|
for (Item item : pacsDescList) {
|
|
for (Item item : pacsDescList) {
|
|
if (item.getUniqueName().equals(nodeNeoDTO.getVal())) {
|
|
if (item.getUniqueName().equals(nodeNeoDTO.getVal())) {
|
|
- BillMsg billMsgss = new BillMsg();
|
|
|
|
- billMsgss.setMsg("高风险手术 :" + item.getUniqueName() + ",请留意");
|
|
|
|
- billMsgss.setOrderName(highRiskNeoDTO.getName());
|
|
|
|
- billMsgss.setOrderStandName(highRiskNeoDTO.getStandname());
|
|
|
|
- billMsgss.setType(type);
|
|
|
|
- res.getHighRiskList().add(billMsgss);
|
|
|
|
|
|
+ BillMsg billMsg = CoreUtil.getComplexOperationMsg("高风险手术", item.getName(), nodeNeoDTO.getTermtype());
|
|
|
|
+ res.getHighRiskList().add(billMsg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
- System.out.println(highRiskNeoDTO);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|