|
@@ -7,22 +7,24 @@ import com.diagbot.biz.push.entity.MedicalIndication;
|
|
import com.diagbot.biz.push.entity.MedicalIndicationDetail;
|
|
import com.diagbot.biz.push.entity.MedicalIndicationDetail;
|
|
import com.diagbot.biz.push.entity.ResponseData;
|
|
import com.diagbot.biz.push.entity.ResponseData;
|
|
import com.diagbot.biz.push.enums.FeatureTypeEnum;
|
|
import com.diagbot.biz.push.enums.FeatureTypeEnum;
|
|
-import com.diagbot.client.TranServiceClient;
|
|
|
|
import com.diagbot.client.bean.CalculateData;
|
|
import com.diagbot.client.bean.CalculateData;
|
|
import com.diagbot.client.bean.HosCodeVO;
|
|
import com.diagbot.client.bean.HosCodeVO;
|
|
|
|
+import com.diagbot.config.CryptConfiguer;
|
|
import com.diagbot.dto.ConceptPushDTO;
|
|
import com.diagbot.dto.ConceptPushDTO;
|
|
import com.diagbot.dto.PushDTO;
|
|
import com.diagbot.dto.PushDTO;
|
|
-import com.diagbot.dto.RespDTO;
|
|
|
|
import com.diagbot.entity.Concept;
|
|
import com.diagbot.entity.Concept;
|
|
|
|
+import com.diagbot.entity.KlSymptom;
|
|
import com.diagbot.enums.ConceptTypeEnum;
|
|
import com.diagbot.enums.ConceptTypeEnum;
|
|
import com.diagbot.enums.LexiconTypeEnum;
|
|
import com.diagbot.enums.LexiconTypeEnum;
|
|
|
|
+import com.diagbot.enums.SysTypeEnum;
|
|
import com.diagbot.facade.ClinicalFacade;
|
|
import com.diagbot.facade.ClinicalFacade;
|
|
import com.diagbot.facade.ConceptFacade;
|
|
import com.diagbot.facade.ConceptFacade;
|
|
|
|
+import com.diagbot.facade.TranEnDeFacade;
|
|
|
|
+import com.diagbot.util.CryptUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.EntityUtil;
|
|
import com.diagbot.util.FastJsonUtils;
|
|
import com.diagbot.util.FastJsonUtils;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ListUtil;
|
|
import com.diagbot.util.ParamConvertUtil;
|
|
import com.diagbot.util.ParamConvertUtil;
|
|
-import com.diagbot.util.RespDTOUtil;
|
|
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.vo.ConceptBaseVO;
|
|
import com.diagbot.vo.ConceptBaseVO;
|
|
import com.diagbot.vo.LisConfigVO;
|
|
import com.diagbot.vo.LisConfigVO;
|
|
@@ -51,9 +53,11 @@ public class PushItemAggregate {
|
|
@Autowired
|
|
@Autowired
|
|
private ConceptFacade conceptFacade;
|
|
private ConceptFacade conceptFacade;
|
|
@Autowired
|
|
@Autowired
|
|
- private TranServiceClient tranServiceClient;
|
|
|
|
|
|
+ private TranEnDeFacade tranEnDeFacade;
|
|
@Autowired
|
|
@Autowired
|
|
private ClinicalFacade clinicalFacade;
|
|
private ClinicalFacade clinicalFacade;
|
|
|
|
+ @Autowired
|
|
|
|
+ CryptConfiguer cryptConfiguer;
|
|
|
|
|
|
@DataProvider("setAll")
|
|
@DataProvider("setAll")
|
|
public PushDTO setAll(
|
|
public PushDTO setAll(
|
|
@@ -114,14 +118,25 @@ public class PushItemAggregate {
|
|
//没有推送信息时,默认取全科模板
|
|
//没有推送信息时,默认取全科模板
|
|
if (StringUtil.isBlank(deptName)) {
|
|
if (StringUtil.isBlank(deptName)) {
|
|
deptName = "全科";
|
|
deptName = "全科";
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ deptName = CryptUtil.encrypt_char(deptName);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
|
|
ConceptBaseVO conceptBaseVO = new ConceptBaseVO();
|
|
conceptBaseVO.setName(deptName);
|
|
conceptBaseVO.setName(deptName);
|
|
conceptBaseVO.setLibType(LexiconTypeEnum.DEPARTMENT.getKey());
|
|
conceptBaseVO.setLibType(LexiconTypeEnum.DEPARTMENT.getKey());
|
|
ConceptPushDTO deptDTO = new ConceptPushDTO();
|
|
ConceptPushDTO deptDTO = new ConceptPushDTO();
|
|
Concept dept = conceptFacade.getConcept(conceptBaseVO);
|
|
Concept dept = conceptFacade.getConcept(conceptBaseVO);
|
|
- if (dept == null && deptName.equals("全科") == false) {
|
|
|
|
- deptName = "全科";
|
|
|
|
|
|
+ if (dept == null) {
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ if (deptName.equals(CryptUtil.encrypt_char("全科")) == false) {
|
|
|
|
+ deptName = CryptUtil.encrypt_char("全科");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (deptName.equals("全科") == false) {
|
|
|
|
+ deptName = "全科";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
conceptBaseVO.setName(deptName);
|
|
conceptBaseVO.setName(deptName);
|
|
dept = conceptFacade.getConcept(conceptBaseVO);
|
|
dept = conceptFacade.getConcept(conceptBaseVO);
|
|
}
|
|
}
|
|
@@ -135,7 +150,8 @@ public class PushItemAggregate {
|
|
|
|
|
|
@DataProvider("setSymptom")
|
|
@DataProvider("setSymptom")
|
|
public List<ConceptPushDTO> setSymptom(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
|
|
public List<ConceptPushDTO> setSymptom(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
|
|
- @InvokeParameter("data") ResponseData data) {
|
|
|
|
|
|
+ @InvokeParameter("data") ResponseData data,
|
|
|
|
+ @InvokeParameter("sysType") Integer sysType) {
|
|
List<ConceptPushDTO> symptomRes = ListUtil.newArrayList();
|
|
List<ConceptPushDTO> symptomRes = ListUtil.newArrayList();
|
|
//症状 概念列表
|
|
//症状 概念列表
|
|
if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Symptom.getKey()))) {
|
|
if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Symptom.getKey()))) {
|
|
@@ -147,6 +163,26 @@ public class PushItemAggregate {
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
if (ListUtil.isNotEmpty(nameList)) {
|
|
if (ListUtil.isNotEmpty(nameList)) {
|
|
symptomRes = getConceptDTOList(nameList, LexiconTypeEnum.SYMPTOM.getKey());
|
|
symptomRes = getConceptDTOList(nameList, LexiconTypeEnum.SYMPTOM.getKey());
|
|
|
|
+ if (sysType.equals(SysTypeEnum.TRIAGE_SERVICE.getKey())
|
|
|
|
+ || sysType.equals(SysTypeEnum.PREC_SERVICE.getKey())) {
|
|
|
|
+ Map<String, KlSymptom> klSymptomMap
|
|
|
|
+ = conceptFacade.getSymptomWithExplain(nameList, LexiconTypeEnum.SYMPTOM.getKey());
|
|
|
|
+ if (klSymptomMap != null) {
|
|
|
|
+ symptomRes.forEach(conceptPushDTO -> {
|
|
|
|
+ if (klSymptomMap.containsKey(conceptPushDTO.getName())) {
|
|
|
|
+ conceptPushDTO
|
|
|
|
+ .setDescription(klSymptomMap.get(conceptPushDTO.getName()).getDescription());
|
|
|
|
+ conceptPushDTO
|
|
|
|
+ .setExplains(klSymptomMap.get(conceptPushDTO.getName()).getExplains());
|
|
|
|
+ if (StringUtil.isBlank(klSymptomMap.get(conceptPushDTO.getName()).getExplains())) {
|
|
|
|
+ conceptPushDTO.setHasExplain(0);
|
|
|
|
+ } else {
|
|
|
|
+ conceptPushDTO.setHasExplain(1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -205,7 +241,6 @@ public class PushItemAggregate {
|
|
List<ConceptPushDTO> lisDTO = getConceptDTOList(nameList, LexiconTypeEnum.LIS_PACKAGE.getKey());
|
|
List<ConceptPushDTO> lisDTO = getConceptDTOList(nameList, LexiconTypeEnum.LIS_PACKAGE.getKey());
|
|
if (isConnect) {
|
|
if (isConnect) {
|
|
lisDTO = addClientName(lisDTO, hosCode, ConceptTypeEnum.Lis.getKey());
|
|
lisDTO = addClientName(lisDTO, hosCode, ConceptTypeEnum.Lis.getKey());
|
|
- //lisDTO = removeLisDetail(lisDTO);
|
|
|
|
}
|
|
}
|
|
labRes = lisDTO;
|
|
labRes = lisDTO;
|
|
}
|
|
}
|
|
@@ -216,9 +251,9 @@ public class PushItemAggregate {
|
|
|
|
|
|
@DataProvider("setRetPacs")
|
|
@DataProvider("setRetPacs")
|
|
public List<ConceptPushDTO> setRetPacs(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
|
|
public List<ConceptPushDTO> setRetPacs(@InvokeParameter("featureTypeSet") Set<String> featureTypeSet,
|
|
- @InvokeParameter("data") ResponseData data,
|
|
|
|
- @InvokeParameter("isConnect") Boolean isConnect,
|
|
|
|
- @InvokeParameter("hosCode") String hosCode) {
|
|
|
|
|
|
+ @InvokeParameter("data") ResponseData data,
|
|
|
|
+ @InvokeParameter("isConnect") Boolean isConnect,
|
|
|
|
+ @InvokeParameter("hosCode") String hosCode) {
|
|
List<ConceptPushDTO> labRes = ListUtil.newArrayList();
|
|
List<ConceptPushDTO> labRes = ListUtil.newArrayList();
|
|
//辅检 概念列表
|
|
//辅检 概念列表
|
|
if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Pacs.getKey()))) {
|
|
if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Feature_Type_Pacs.getKey()))) {
|
|
@@ -284,6 +319,17 @@ public class PushItemAggregate {
|
|
disRes = disMapDTO;
|
|
disRes = disMapDTO;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //诊断转成明文
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ for (Map.Entry<String, List<ConceptPushDTO>> entry : disRes.entrySet()) {
|
|
|
|
+ if (ListUtil.isNotEmpty(entry.getValue())) {
|
|
|
|
+ for (ConceptPushDTO conceptPushDTO : entry.getValue()) {
|
|
|
|
+ conceptPushDTO.setName(CryptUtil.decrypt_char(conceptPushDTO.getName()));
|
|
|
|
+ }
|
|
|
|
+ disRes.put(entry.getKey(), entry.getValue());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return disRes;
|
|
return disRes;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -313,6 +359,9 @@ public class PushItemAggregate {
|
|
JSONObject scaleJson = detail.getContent();
|
|
JSONObject scaleJson = detail.getContent();
|
|
if (null != scaleJson.get("name")) {
|
|
if (null != scaleJson.get("name")) {
|
|
String scaleName = scaleJson.get("name").toString();
|
|
String scaleName = scaleJson.get("name").toString();
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ scaleName = CryptUtil.encrypt_char(scaleName);
|
|
|
|
+ }
|
|
conceptBaseVO.setName(scaleName);
|
|
conceptBaseVO.setName(scaleName);
|
|
conceptBaseVO.setLibType(LexiconTypeEnum.GAUGE.getKey());
|
|
conceptBaseVO.setLibType(LexiconTypeEnum.GAUGE.getKey());
|
|
Concept scaleConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
Concept scaleConcept = conceptFacade.getConcept(conceptBaseVO);
|
|
@@ -371,7 +420,6 @@ public class PushItemAggregate {
|
|
return conceptDTOS;
|
|
return conceptDTOS;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 添加外部名称(调用方)
|
|
* 添加外部名称(调用方)
|
|
*
|
|
*
|
|
@@ -389,42 +437,50 @@ public class PushItemAggregate {
|
|
.stream()
|
|
.stream()
|
|
.map(concept -> concept.getName())
|
|
.map(concept -> concept.getName())
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
+ //加密情况下,转成原文调trans层接口
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ CryptUtil.decryptList(uniqueNameList);
|
|
|
|
+ }
|
|
lisConfigVO.setUniqueNameList(uniqueNameList);
|
|
lisConfigVO.setUniqueNameList(uniqueNameList);
|
|
if (type.equals(ConceptTypeEnum.Lis.getKey())) {
|
|
if (type.equals(ConceptTypeEnum.Lis.getKey())) {
|
|
- RespDTO<Map<String, List<String>>> lisRes
|
|
|
|
- = tranServiceClient.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
|
|
|
|
- if (RespDTOUtil.respIsOK(lisRes)) {
|
|
|
|
- Map<String, List<String>> lisMappingByUniqueName = lisRes.data;
|
|
|
|
- for (ConceptPushDTO concept : concepts) {
|
|
|
|
- List<String> clientNames = lisMappingByUniqueName.get(concept.getName());
|
|
|
|
- if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
|
- concept.setClientNames(clientNames);
|
|
|
|
- }
|
|
|
|
|
|
+ Map<String, List<String>> lisMappingByUniqueName = tranEnDeFacade.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
|
|
|
|
+ for (ConceptPushDTO concept : concepts) {
|
|
|
|
+ List<String> clientNames = Lists.newLinkedList();
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ clientNames = lisMappingByUniqueName.get(CryptUtil.decrypt_char(concept.getName()));
|
|
|
|
+ } else {
|
|
|
|
+ clientNames = lisMappingByUniqueName.get(concept.getName());
|
|
|
|
+ }
|
|
|
|
+ if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
|
+ concept.setClientNames(clientNames);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (type.equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
} else if (type.equals(ConceptTypeEnum.Pacs.getKey())) {
|
|
- RespDTO<Map<String, List<String>>> pacsRes
|
|
|
|
- = tranServiceClient.getPacsConfigByUniqueNameAndHosCode(hosCodeVO);
|
|
|
|
- if (RespDTOUtil.respIsOK(pacsRes)) {
|
|
|
|
- Map<String, List<String>> pacsConfigMapByUniqueName = pacsRes.data;
|
|
|
|
- for (ConceptPushDTO concept : concepts) {
|
|
|
|
- List<String> clientNames = pacsConfigMapByUniqueName.get(concept.getName());
|
|
|
|
- if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
|
- concept.setClientNames(clientNames);
|
|
|
|
- }
|
|
|
|
|
|
+ Map<String, List<String>> pacsConfigMapByUniqueName = tranEnDeFacade.getPacsConfigByUniqueNameAndHosCode(hosCodeVO);
|
|
|
|
+ for (ConceptPushDTO concept : concepts) {
|
|
|
|
+ List<String> clientNames = Lists.newLinkedList();
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ clientNames = pacsConfigMapByUniqueName.get(CryptUtil.decrypt_char(concept.getName()));
|
|
|
|
+ } else {
|
|
|
|
+ clientNames = pacsConfigMapByUniqueName.get(concept.getName());
|
|
|
|
+ }
|
|
|
|
+ if (ListUtil.isNotEmpty(clientNames)) {
|
|
|
|
+ concept.setClientNames(clientNames);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (type.equals(ConceptTypeEnum.Disease.getKey())) {
|
|
} else if (type.equals(ConceptTypeEnum.Disease.getKey())) {
|
|
- RespDTO<Map<String, String>> disRes = tranServiceClient.getDiseaseIcdByHosCode(hosCodeVO);
|
|
|
|
- if (RespDTOUtil.respIsOK(disRes)) {
|
|
|
|
- Map<String, String> disMap = disRes.data;
|
|
|
|
- for (ConceptPushDTO concept : concepts) {
|
|
|
|
- String clientName = disMap.get(concept.getName());
|
|
|
|
- if (StringUtil.isNotBlank(clientName)) {
|
|
|
|
- List<String> clientNames = Lists.newLinkedList();
|
|
|
|
- clientNames.add(clientName);
|
|
|
|
- concept.setClientNames(clientNames);
|
|
|
|
- }
|
|
|
|
|
|
+ Map<String, String> disMap = tranEnDeFacade.getDiseaseIcdByHosCode(hosCodeVO);
|
|
|
|
+ for (ConceptPushDTO concept : concepts) {
|
|
|
|
+ String clientName = "";
|
|
|
|
+ if (cryptConfiguer.cryptFlag) {
|
|
|
|
+ clientName = disMap.get(CryptUtil.decrypt_char(concept.getName()));
|
|
|
|
+ } else {
|
|
|
|
+ clientName = disMap.get(concept.getName());
|
|
|
|
+ }
|
|
|
|
+ if (StringUtil.isNotBlank(clientName)) {
|
|
|
|
+ List<String> clientNames = Lists.newLinkedList();
|
|
|
|
+ clientNames.add(clientName);
|
|
|
|
+ concept.setClientNames(clientNames);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|