|
@@ -23,6 +23,7 @@ import com.google.common.collect.Lists;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -159,20 +160,20 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
String uniqueName = "";
|
|
String uniqueName = "";
|
|
Integer type = emrIntroduceVO.getType();
|
|
Integer type = emrIntroduceVO.getType();
|
|
if (type.equals(QuestionTypeEnum.Lis.getKey())) {
|
|
if (type.equals(QuestionTypeEnum.Lis.getKey())) {
|
|
- if (StringUtil.isNotBlank(emrIntroduceVO.getMealName()))
|
|
|
|
- if (StringUtil.isNotBlank(emrIntroduceVO.getItemName())) {
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(emrIntroduceVO.getName()))
|
|
|
|
+ if (StringUtil.isNotBlank(emrIntroduceVO.getDetailName())) {
|
|
RespDTO<Map<String, Map<String, String>>> respLisConfigMap = tranServiceClient.getLisConfigByHosCode_NotEmptyItemName(hosCodeVO);
|
|
RespDTO<Map<String, Map<String, String>>> respLisConfigMap = tranServiceClient.getLisConfigByHosCode_NotEmptyItemName(hosCodeVO);
|
|
Map<String, Map<String, String>> lisConfigMap = respLisConfigMap.data;
|
|
Map<String, Map<String, String>> lisConfigMap = respLisConfigMap.data;
|
|
- uniqueName = lisConfigMap.get(emrIntroduceVO.getMealName()).get(emrIntroduceVO.getItemName());
|
|
|
|
|
|
+ uniqueName = lisConfigMap.get(emrIntroduceVO.getName()).get(emrIntroduceVO.getDetailName());
|
|
} else {
|
|
} else {
|
|
RespDTO<Map<String, String>> respLisConfigMap_emptyItemName = tranServiceClient.getLisConfigByHosCode_EmptyItemName(hosCodeVO);
|
|
RespDTO<Map<String, String>> respLisConfigMap_emptyItemName = tranServiceClient.getLisConfigByHosCode_EmptyItemName(hosCodeVO);
|
|
Map<String, String> lisConfigMap_emptyItemName = respLisConfigMap_emptyItemName.data;
|
|
Map<String, String> lisConfigMap_emptyItemName = respLisConfigMap_emptyItemName.data;
|
|
- uniqueName = lisConfigMap_emptyItemName.get(emrIntroduceVO.getMealName());
|
|
|
|
|
|
+ uniqueName = lisConfigMap_emptyItemName.get(emrIntroduceVO.getName());
|
|
}
|
|
}
|
|
} else if (type.equals(QuestionTypeEnum.Pacs.getKey())) {
|
|
} else if (type.equals(QuestionTypeEnum.Pacs.getKey())) {
|
|
RespDTO<Map<String, String>> respPacsConfigMap = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
|
|
RespDTO<Map<String, String>> respPacsConfigMap = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
|
|
Map<String, String> pacsConfigMap = respPacsConfigMap.data;
|
|
Map<String, String> pacsConfigMap = respPacsConfigMap.data;
|
|
- uniqueName = pacsConfigMap.get(emrIntroduceVO.getMealName());
|
|
|
|
|
|
+ uniqueName = pacsConfigMap.get(emrIntroduceVO.getName());
|
|
}
|
|
}
|
|
|
|
|
|
//未找到公表映射项目
|
|
//未找到公表映射项目
|
|
@@ -183,10 +184,12 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
RespDTO<Map<String, String>> respTitleMappingMap = tranServiceClient.getTitleMappingHosCode(hosCodeVO);
|
|
RespDTO<Map<String, String>> respTitleMappingMap = tranServiceClient.getTitleMappingHosCode(hosCodeVO);
|
|
Map<String, String> titleMappingMap = respTitleMappingMap.data;
|
|
Map<String, String> titleMappingMap = respTitleMappingMap.data;
|
|
String[] titles = emrIntroduceVO.getTitles();
|
|
String[] titles = emrIntroduceVO.getTitles();
|
|
|
|
+ Map<String, String> titleMapping = new LinkedHashMap<>();
|
|
List<String> uniqueTitleList = Lists.newLinkedList();
|
|
List<String> uniqueTitleList = Lists.newLinkedList();
|
|
if (titles.length > 0) {
|
|
if (titles.length > 0) {
|
|
for (String title : titles) {
|
|
for (String title : titles) {
|
|
String uniqueTitle = titleMappingMap.get(title);
|
|
String uniqueTitle = titleMappingMap.get(title);
|
|
|
|
+ titleMapping.put(title, uniqueName);
|
|
if (StringUtil.isNotBlank(uniqueTitle)) {
|
|
if (StringUtil.isNotBlank(uniqueTitle)) {
|
|
uniqueTitleList.add(uniqueTitle);
|
|
uniqueTitleList.add(uniqueTitle);
|
|
}
|
|
}
|
|
@@ -213,13 +216,31 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
|
|
|
QueryWrapper<IntroduceDetail> introduceDetailQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<IntroduceDetail> introduceDetailQueryWrapper = new QueryWrapper<>();
|
|
introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
- eq("introduce_id", introduceMap.getIntroduceId()).orderByAsc("order_no");
|
|
|
|
- //如果标题不为空,按标题返回,否则,全部返回
|
|
|
|
- if (uniqueTitleList.size() > 0) {
|
|
|
|
- introduceDetailQueryWrapper.in("title", uniqueTitleList);
|
|
|
|
|
|
+ eq("introduce_id", introduceMap.getIntroduceId()).
|
|
|
|
+ orderByAsc("order_no");
|
|
|
|
+ //如果标题列表未传,全部返回
|
|
|
|
+ if (emrIntroduceVO.getTitles().length > 0) {
|
|
|
|
+ if (uniqueTitleList.size() > 0) {
|
|
|
|
+ introduceDetailQueryWrapper.in("title", uniqueTitleList);
|
|
|
|
+ } else {
|
|
|
|
+ //标题未匹配上,不返回数据,加一个不成立的条件
|
|
|
|
+ introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.Y.getKey());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
|
|
List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
|
|
- List<EMRIntroduceDetailDTO> emrDetailList = BeanUtil.listCopyTo(introduceDetailList, EMRIntroduceDetailDTO.class);
|
|
|
|
- return emrDetailList;
|
|
|
|
|
|
+ List<EMRIntroduceDetailDTO> retList = Lists.newLinkedList();
|
|
|
|
+ for (Map.Entry<String, String> entry : titleMapping.entrySet()) {
|
|
|
|
+ EMRIntroduceDetailDTO detailDTO = new EMRIntroduceDetailDTO();
|
|
|
|
+ detailDTO.setTitle(entry.getKey());
|
|
|
|
+ if (StringUtil.isNotBlank(entry.getValue())) {
|
|
|
|
+ for (IntroduceDetail introduceDetail : introduceDetailList) {
|
|
|
|
+ if (entry.getValue().equals(introduceDetail.getTitle())) {
|
|
|
|
+ detailDTO.setText(introduceDetail.getText());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ retList.add(detailDTO);
|
|
|
|
+ }
|
|
|
|
+ return retList;
|
|
}
|
|
}
|
|
}
|
|
}
|