|
@@ -29,14 +29,18 @@ public class TransfusionSuggestNode {
|
|
|
List<String> surgery = new ArrayList<>();
|
|
|
Map<String, Lis> lismap = new HashMap<>();
|
|
|
String disname, surgname, lisname;
|
|
|
+ String diagname = "";
|
|
|
+ String opername = "";
|
|
|
Lis lisresult;
|
|
|
|
|
|
for (Item dg : wordCrfDTO.getDiag()) {
|
|
|
diseases.add(dg.getUniqueName());
|
|
|
+ diagname = dg.getUniqueName();
|
|
|
}
|
|
|
|
|
|
for (Item op : wordCrfDTO.getOperation()) {
|
|
|
surgery.add(op.getUniqueName());
|
|
|
+ opername = op.getUniqueName();
|
|
|
}
|
|
|
|
|
|
for (Lis lisitem : wordCrfDTO.getLis()) {
|
|
@@ -90,43 +94,53 @@ public class TransfusionSuggestNode {
|
|
|
|
|
|
if (tf.getDiseases().size()>0) {
|
|
|
List<YiBaoDiseaseName> ybdisease = new ArrayList(tf.getDiseases());
|
|
|
- if (diseases.contains(ybdisease.get(0).getName())) {
|
|
|
- disname = ybdisease.get(0).getName();
|
|
|
- }
|
|
|
+ disname = ybdisease.get(0).getName();
|
|
|
}
|
|
|
|
|
|
if (tf.getOperations().size()>0) {
|
|
|
List<YiBaoOperationName> yboperation = new ArrayList(tf.getOperations());
|
|
|
- if (surgery.contains(yboperation.get(0).getName())) {
|
|
|
- surgname = yboperation.get(0).getName();
|
|
|
- }
|
|
|
+ surgname = yboperation.get(0).getName();
|
|
|
}
|
|
|
|
|
|
|
|
|
+ otherTipTfNeoDTO = null;
|
|
|
if (StringUtil.isNotBlank(lisname) || StringUtil.isNotBlank(disname) || StringUtil.isNotBlank(surgname)) {
|
|
|
|
|
|
if (StringUtil.isNotBlank(lisname) && null!=lisresult) {
|
|
|
- otherTipTfNeoDTO.getLisList().add(lisresult);
|
|
|
- }
|
|
|
+ if (disname.equals(diagname) && surgname.equals(opername)) {
|
|
|
+ otherTipTfNeoDTO = new OtherTipTransfusionNeoDTO();
|
|
|
|
|
|
- if (StringUtil.isNotBlank(surgname)) {
|
|
|
- item = new Item();
|
|
|
- item.setName(surgname);
|
|
|
- item.setUniqueName(surgname);
|
|
|
-
|
|
|
- otherTipTfNeoDTO.getOperation().add(item);
|
|
|
+ otherTipTfNeoDTO.getLisList().add(lisresult);
|
|
|
+ }
|
|
|
}
|
|
|
+ else if (StringUtil.isNotBlank(surgname) && surgname.equals(opername)) {
|
|
|
+ if (disname.equals(diagname)) {
|
|
|
+ if (null == otherTipTfNeoDTO) {
|
|
|
+ otherTipTfNeoDTO = new OtherTipTransfusionNeoDTO();
|
|
|
+ }
|
|
|
+ item = new Item();
|
|
|
+ item.setName(surgname);
|
|
|
+ item.setUniqueName(surgname);
|
|
|
|
|
|
- if (StringUtil.isNotBlank(disname)) {
|
|
|
+ otherTipTfNeoDTO.getOperation().add(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (StringUtil.isNotBlank(disname) && disname.equals(diagname)) {
|
|
|
+ if (null==otherTipTfNeoDTO) {
|
|
|
+ otherTipTfNeoDTO = new OtherTipTransfusionNeoDTO();
|
|
|
+ }
|
|
|
item = new Item();
|
|
|
item.setName(disname);
|
|
|
item.setUniqueName(disname);
|
|
|
|
|
|
otherTipTfNeoDTO.getDiag().add(item);
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
+ if (otherTipTfNeoDTO!=null) {
|
|
|
ottfNeoDTOs.add(otherTipTfNeoDTO);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -141,17 +155,13 @@ public class TransfusionSuggestNode {
|
|
|
public List<OtherTipTransfusionNeoDTO> getTransfusionSuggest(WordCrfDTO wordCrfDTO, TransfusionSuggestRepository transfusionSugRepository) {
|
|
|
|
|
|
List<OtherTipTransfusionNeoDTO> tfNeoDTOs = new ArrayList<>();
|
|
|
- List<OtherTipTransfusionNeoDTO> ottfDTOs;
|
|
|
-
|
|
|
|
|
|
List<TransfusionSuggest> tslist;
|
|
|
|
|
|
tslist = transfusionSugRepository.findByNameContaining("");
|
|
|
|
|
|
if (ListUtil.isNotEmpty(tslist)) {
|
|
|
- ottfDTOs = findSuggest(tslist, wordCrfDTO);
|
|
|
-
|
|
|
- tfNeoDTOs.addAll(ottfDTOs);
|
|
|
+ tfNeoDTOs = findSuggest(tslist, wordCrfDTO);
|
|
|
}
|
|
|
|
|
|
return tfNeoDTOs;
|