|
@@ -0,0 +1,318 @@
|
|
|
+package com.diagbot.facade;
|
|
|
+
|
|
|
+import com.diagbot.client.TranServiceClient;
|
|
|
+import com.diagbot.client.bean.HosCodeVO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.util.CryptUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
+import com.diagbot.vo.DiseaseIcdVO;
|
|
|
+import com.diagbot.vo.LisConfigVO;
|
|
|
+import com.diagbot.vo.PacsConfigVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+
|
|
|
+import java.util.LinkedHashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description:tran层对接时无法自动加解密的接口处理
|
|
|
+ * @Author:zhaops
|
|
|
+ * @time: 2020/1/6 10:19
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class TranEnDeFacade {
|
|
|
+ @Autowired
|
|
|
+ private TranServiceClient tranServiceClient;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码和套餐名称获取化验公表映射关系(返回map原文)
|
|
|
+ *
|
|
|
+ * @param lisConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Map<String, List<String>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
|
|
|
+ RespDTO<Map<String, Map<String, List<String>>>> respDTO = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
|
|
|
+ Map<String, Map<String, List<String>>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, Map<String, List<String>>> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码和套餐名称获取化验公表映射关系(返回map加密)
|
|
|
+ *
|
|
|
+ * @param lisConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, Map<String, List<String>>> getLisConfigByMealNameAndHosCode_en(@RequestBody LisConfigVO lisConfigVO) {
|
|
|
+ RespDTO<Map<String, Map<String, List<String>>>> respDTO = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
|
|
|
+ Map<String, Map<String, List<String>>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, Map<String, List<String>>> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, Map<String, List<String>>> entry : map.entrySet()) {
|
|
|
+ Map<String, List<String>> retSubMap = new LinkedHashMap<>();
|
|
|
+ for (Map.Entry<String, List<String>> subEntry : entry.getValue().entrySet()) {
|
|
|
+ if (ListUtil.isNotEmpty(subEntry.getValue())) {
|
|
|
+ CryptUtil.encryptList(subEntry.getValue());
|
|
|
+ }
|
|
|
+ retSubMap.put(CryptUtil.encrypt_char(subEntry.getKey()), subEntry.getValue());
|
|
|
+ }
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), retSubMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码获取辅检公表映射关系(返回map原文)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getPacsConfigByHosCode(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码获取辅检公表映射关系(返回map加密)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getPacsConfigByHosCode_en(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), CryptUtil.encrypt_char(entry.getValue()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取辅检映射关系(返回map原文)
|
|
|
+ *
|
|
|
+ * @param pacsConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<String>> getPacsConfig(@RequestBody PacsConfigVO pacsConfigVO) {
|
|
|
+ RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
|
|
|
+ Map<String, List<String>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, List<String>> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取辅检映射关系(返回map加密)
|
|
|
+ *
|
|
|
+ * @param pacsConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<String>> getPacsConfig_en(@RequestBody PacsConfigVO pacsConfigVO) {
|
|
|
+ RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getPacsConfig(pacsConfigVO);
|
|
|
+ Map<String, List<String>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, List<String>> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, List<String>> entry : map.entrySet()) {
|
|
|
+ if (ListUtil.isNotEmpty(entry.getValue())) {
|
|
|
+ CryptUtil.encryptList(entry.getValue());
|
|
|
+ }
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), entry.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码获取提示信息标题映射关系(返回map原文)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getTitleMappingHosCode(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getTitleMappingHosCode(hosCodeVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码获取提示信息标题映射关系(返回map加密)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getTitleMappingHosCode_en(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getTitleMappingHosCode(hosCodeVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), CryptUtil.encrypt_char(entry.getValue()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码查询诊断icd映射(返回map原文)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getDiseaseIcdByHosCode(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getDiseaseIcdByHosCode(hosCodeVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码查询诊断icd映射(返回map加密)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getDiseaseIcdByHosCode_en(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getDiseaseIcdByHosCode(hosCodeVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), CryptUtil.encrypt_char(entry.getValue()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取诊断名称映射map(返回map原文)
|
|
|
+ *
|
|
|
+ * @param diseaseIcdVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getDiseaseIcdMap(DiseaseIcdVO diseaseIcdVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取诊断名称映射map(返回map加密)
|
|
|
+ *
|
|
|
+ * @param diseaseIcdVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, String> getDiseaseIcdMap_en(DiseaseIcdVO diseaseIcdVO) {
|
|
|
+ RespDTO<Map<String, String>> respDTO = tranServiceClient.getDiseaseIcdMap(diseaseIcdVO);
|
|
|
+ Map<String, String> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, String> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), CryptUtil.encrypt_char(entry.getValue()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码获取化验公表映射关系,公表项做key(返回map原文)
|
|
|
+ *
|
|
|
+ * @param lisConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<String>> getLisConfigByUniqueNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
|
|
|
+ RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
|
|
|
+ Map<String, List<String>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, List<String>> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码获取化验公表映射关系,公表项做key(返回map加密)
|
|
|
+ *
|
|
|
+ * @param lisConfigVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<String>> getLisConfigByUniqueNameAndHosCode_en(@RequestBody LisConfigVO lisConfigVO) {
|
|
|
+ RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
|
|
|
+ Map<String, List<String>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, List<String>> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, List<String>> entry : map.entrySet()) {
|
|
|
+ if (ListUtil.isNotEmpty(entry.getValue())) {
|
|
|
+ CryptUtil.encryptList(entry.getValue());
|
|
|
+ }
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), entry.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码查询辅检公表映射,公表项做key(返回map原文)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<String>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getPacsConfigByUniqueNameAndHosCode(hosCodeVO);
|
|
|
+ Map<String, List<String>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, List<String>> map = respDTO.data;
|
|
|
+ retMap = map;
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据医院编码查询辅检公表映射,公表项做key(返回map加密)
|
|
|
+ *
|
|
|
+ * @param hosCodeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Map<String, List<String>> getPacsConfigByUniqueNameAndHosCode_en(@RequestBody HosCodeVO hosCodeVO) {
|
|
|
+ RespDTO<Map<String, List<String>>> respDTO = tranServiceClient.getPacsConfigByUniqueNameAndHosCode(hosCodeVO);
|
|
|
+ Map<String, List<String>> retMap = new LinkedHashMap<>();
|
|
|
+ if (RespDTOUtil.respIsOK(respDTO)) {
|
|
|
+ Map<String, List<String>> map = respDTO.data;
|
|
|
+ for (Map.Entry<String, List<String>> entry : map.entrySet()) {
|
|
|
+ if (ListUtil.isNotEmpty(entry.getValue())) {
|
|
|
+ CryptUtil.encryptList(entry.getValue());
|
|
|
+ }
|
|
|
+ retMap.put(CryptUtil.encrypt_char(entry.getKey()), entry.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return retMap;
|
|
|
+ }
|
|
|
+}
|