|
@@ -1,7 +1,17 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.diagbot.biz.push.entity.Item;
|
|
|
+import com.diagbot.biz.push.entity.Lis;
|
|
|
+import com.diagbot.biz.push.entity.Pacs;
|
|
|
+import com.diagbot.client.DataServiceClient;
|
|
|
+import com.diagbot.dto.PushDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.entity.DiseaseIcd;
|
|
|
import com.diagbot.entity.InputInfo;
|
|
|
+import com.diagbot.entity.PacsConfig;
|
|
|
+import com.diagbot.entity.TranLisConfig;
|
|
|
import com.diagbot.enums.SysTypeEnum;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
@@ -10,6 +20,7 @@ import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.ConceptIntroduceVO;
|
|
|
import com.diagbot.vo.PushJoinVO;
|
|
|
import com.diagbot.vo.PushVO;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -17,165 +28,301 @@ import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* HIS接口对接业务
|
|
|
- *
|
|
|
- * @author QQ
|
|
|
*
|
|
|
+ * @author QQ
|
|
|
*/
|
|
|
@Component
|
|
|
public class PushFacade {
|
|
|
- @Autowired
|
|
|
- MrFacade mrFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- ReadProperties readProperties;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- InputInfoFacade inputInfoFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- SysSetFacade sysSetFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- TranLisConfigFacade tranLisConfigFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- PacsConfigFacade pacsConfigFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- TranDiseaseIcdFacade diseaseIcdFacade;
|
|
|
-
|
|
|
- /**
|
|
|
- * plan: 配置信息编号,默认0 hospitalCode:医院code mrId:医院数据唯一标识 tipsName:
|
|
|
- * 静态信息名称(化验项名称、辅捡项名称) tipsType:
|
|
|
- * 静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
|
|
|
- * showTab: 0默认显示治疗方案 1默认显示静态信息
|
|
|
- *
|
|
|
- * @param pushVO
|
|
|
- * @return
|
|
|
- */
|
|
|
- public String getDataService(PushVO pushVO) {
|
|
|
- PushJoinVO pushJoinVO = new PushJoinVO();
|
|
|
- pushVO.setSysType(SysTypeEnum.DATA_SERVICE.getKey());//数据服务模式
|
|
|
- BeanUtil.copyProperties(pushVO, pushJoinVO);
|
|
|
-
|
|
|
- List<ConceptIntroduceVO> conceptIntroduceVOList = new ArrayList<ConceptIntroduceVO>();
|
|
|
- if("6".equals(pushVO.getCode())){
|
|
|
- if(pushVO.getPacsOrder().size()>0){
|
|
|
- pushVO.getPacsOrder().forEach(i->{
|
|
|
- if(StringUtil.isNotEmpty(i.getName())){
|
|
|
- getPacsConfig(conceptIntroduceVOList,i.getName(),pushVO.getHosCode());
|
|
|
- }
|
|
|
- } );
|
|
|
- }
|
|
|
- }else if("7".equals(pushVO.getCode())){
|
|
|
- if(pushVO.getLisOrder().size()>0){
|
|
|
- pushVO.getLisOrder().forEach(i->{
|
|
|
- if(StringUtil.isNotEmpty(i.getName())){
|
|
|
- getLisConfig(conceptIntroduceVOList,i.getName(),pushVO.getHosCode());
|
|
|
- }
|
|
|
- } );
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //病史
|
|
|
- if(pushVO.getMedicalHistory()!=null){
|
|
|
- pushJoinVO.setPasts(pushVO.getMedicalHistory().getPasts());
|
|
|
- pushJoinVO.setInfectious(pushVO.getMedicalHistory().getInfectious());
|
|
|
- pushJoinVO.setOperation(pushVO.getMedicalHistory().getOther());
|
|
|
- pushJoinVO.setAllergy(pushVO.getMedicalHistory().getAllergy());
|
|
|
- pushJoinVO.setVaccination(pushVO.getMedicalHistory().getVaccination());
|
|
|
- pushJoinVO.setPersonal(pushVO.getMedicalHistory().getPersonal());
|
|
|
- pushJoinVO.setMarital(pushVO.getMedicalHistory().getMarital());
|
|
|
- pushJoinVO.setFamily(pushVO.getMedicalHistory().getFamily());
|
|
|
- pushJoinVO.setMenstrual(pushVO.getMedicalHistory().getMenstrual());
|
|
|
- pushJoinVO.setOther(pushVO.getMedicalHistory().getOther());
|
|
|
- }
|
|
|
-
|
|
|
- // 将基本参数保存到redis
|
|
|
- String mrId = mrFacade.createMr(pushJoinVO);
|
|
|
- // 竖版
|
|
|
- String url = "";
|
|
|
- String urlVer = readProperties.remoteAddressVer + "?hospitalCode=" + pushVO.getHosCode() + "&mrId=" + mrId;
|
|
|
- String urlHor = readProperties.remoteAddressHor + "?hospitalCode=" + pushVO.getHosCode() + "&mrId=" + mrId;
|
|
|
-
|
|
|
- // 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
- if ("hor".equalsIgnoreCase(pushVO.getShowType())) {
|
|
|
- // 横版
|
|
|
- urlHor += "&showTab=1&tipsMode=2&tipsInfoList=" + JSONObject.toJSONString(conceptIntroduceVOList) + "&plan=" + pushVO.getCode();
|
|
|
- url = urlHor;
|
|
|
- } else {
|
|
|
- // 竖版
|
|
|
- urlVer += "&showTab=0&tipsMode=2&tipsInfoList=" + JSONObject.toJSONString(conceptIntroduceVOList) + "&plan=" + pushVO.getCode();
|
|
|
- url = urlVer;
|
|
|
- }
|
|
|
-
|
|
|
- //将请求记录到统计表
|
|
|
- saveInputInfo(pushVO, url);
|
|
|
- return url;
|
|
|
- }
|
|
|
-
|
|
|
- private void saveInputInfo(PushVO pushVO, String url) {
|
|
|
- InputInfo inputInfo = new InputInfo();
|
|
|
- inputInfo.setHospitalCode(pushVO.getHosCode());
|
|
|
- inputInfo.setHosptialDeptCode(pushVO.getHospitalDeptCopde());
|
|
|
- inputInfo.setDoctorCode(pushVO.getDoctorCode());
|
|
|
- inputInfo.setInquiryCode(pushVO.getInquiryCode());
|
|
|
- inputInfo.setAge(pushVO.getAge());
|
|
|
- inputInfo.setSexType(pushVO.getSex().toString());
|
|
|
- inputInfo.setParamIn(JSONObject.toJSONString(pushVO));
|
|
|
- inputInfo.setParamOut(url);
|
|
|
- inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
|
|
|
- inputInfo.setRemark(pushVO.getCode());
|
|
|
- inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取公表项中对应的辅检,未查询到时去化验公表项再查
|
|
|
- *
|
|
|
- * @param
|
|
|
- */
|
|
|
- private void getPacsConfig(List<ConceptIntroduceVO> conceptIntroduceVOList,String pacsName,String hosCode) {
|
|
|
- // 比对映射表中的辅检项
|
|
|
- Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(hosCode,pacsName);
|
|
|
- if (pacsMap!=null) {
|
|
|
- String uniqueName = pacsMap.get("unique_name").toString();
|
|
|
- if (!"".equals(uniqueName) && uniqueName != null) {
|
|
|
- String[] uniqueNames = uniqueName.split("、");
|
|
|
- for (int i = 0; i < uniqueNames.length; i++) {
|
|
|
- ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
- conceptIntroduceVO.setName(uniqueNames[i]);
|
|
|
- conceptIntroduceVO.setType(6);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
- conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
|
|
|
- conceptIntroduceVOList.add(conceptIntroduceVO);
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取公表项中对应的化验,未查询到时去辅检公表项再查
|
|
|
- *
|
|
|
- * @param conceptIntroduceVOList
|
|
|
- * @param
|
|
|
- */
|
|
|
- private void getLisConfig(List<ConceptIntroduceVO> conceptIntroduceVOList,String lisName,String hosCode) {
|
|
|
- // 比对映射表中的化验项
|
|
|
- Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(hosCode,lisName);
|
|
|
- if (lisMap!=null) {
|
|
|
- String uniqueName = lisMap.get("unique_name").toString();
|
|
|
- String[] uniqueNames = uniqueName.split("、");
|
|
|
- for (int i = 0; i < uniqueNames.length; i++) {
|
|
|
- ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
- conceptIntroduceVO.setName(uniqueNames[i]);
|
|
|
- conceptIntroduceVO.setType(12);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
- conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
|
|
|
- conceptIntroduceVOList.add(conceptIntroduceVO);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ @Autowired
|
|
|
+ MrFacade mrFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ ReadProperties readProperties;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ InputInfoFacade inputInfoFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ SysSetFacade sysSetFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ TranLisConfigFacade tranLisConfigFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ PacsConfigFacade pacsConfigFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ TranDiseaseIcdFacade diseaseIcdFacade;
|
|
|
+ @Autowired
|
|
|
+ DiseaseIcdFacade diseaseIcdFacade1;
|
|
|
+ @Autowired
|
|
|
+ DataServiceClient dataServiceClient;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * plan: 配置信息编号,默认0 hospitalCode:医院code mrId:医院数据唯一标识 tipsName:
|
|
|
+ * 静态信息名称(化验项名称、辅捡项名称) tipsType:
|
|
|
+ * 静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
|
|
|
+ * showTab: 0默认显示治疗方案 1默认显示静态信息
|
|
|
+ *
|
|
|
+ * @param pushVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public RespDTO getDataService(PushVO pushVO) {
|
|
|
+ PushJoinVO pushJoinVO = new PushJoinVO();
|
|
|
+ pushJoinVO.setFeatureType("1,4,5,6,7,22");
|
|
|
+ pushVO.setSysType(SysTypeEnum.DATA_SERVICE.getKey());//数据服务模式
|
|
|
+ BeanUtil.copyProperties(pushVO, pushJoinVO);
|
|
|
+
|
|
|
+ List<ConceptIntroduceVO> conceptIntroduceVOList = new ArrayList<ConceptIntroduceVO>();
|
|
|
+ if ("7".equals(pushVO.getCode())) {
|
|
|
+ if (pushVO.getPacsOrder().size() > 0) {
|
|
|
+ pushVO.getPacsOrder().forEach(i -> {
|
|
|
+ if (StringUtil.isNotEmpty(i.getName())) {
|
|
|
+ getPacsConfig(conceptIntroduceVOList, i.getName(), pushVO.getHosCode());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else if ("6".equals(pushVO.getCode())) {
|
|
|
+ if (pushVO.getLisOrder().size() > 0) {
|
|
|
+ pushVO.getLisOrder().forEach(i -> {
|
|
|
+ if (StringUtil.isNotEmpty(i.getName())) {
|
|
|
+ getLisConfig(conceptIntroduceVOList, i.getName(), pushVO.getHosCode());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ StringBuilder stringBuilder =new StringBuilder();
|
|
|
+ //根据医院编号和his方疾病名称得到朗通疾病名称
|
|
|
+ if (pushJoinVO.getDiagOrder() != null) {
|
|
|
+ List<Item> items = pushJoinVO.getDiagOrder().stream().map(item -> {
|
|
|
+ Item item1 = new Item();
|
|
|
+ BeanUtils.copyProperties(item, item1);
|
|
|
+ Map<String, Object> diagMap = diseaseIcdFacade.getDiseaseIcdByDiseaseName(pushJoinVO.getHosCode(), item.getName());
|
|
|
+ if (diagMap != null) {
|
|
|
+ String uniqueName = diagMap.get("concept_dis_name").toString();
|
|
|
+ item1.setUniqueName(uniqueName);
|
|
|
+ }
|
|
|
+
|
|
|
+ return item1;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ pushJoinVO.setDiagOrder(items);
|
|
|
+ }
|
|
|
+ if (pushJoinVO.getDiag() != null) {
|
|
|
+ List<Item> items = pushJoinVO.getDiag().stream().map(item -> {
|
|
|
+ Item item1 = new Item();
|
|
|
+ BeanUtils.copyProperties(item, item1);
|
|
|
+ Map<String, Object> diagMap = diseaseIcdFacade.getDiseaseIcdByDiseaseName(pushJoinVO.getHosCode(), item.getName());
|
|
|
+ if (diagMap != null) {
|
|
|
+ String uniqueName = diagMap.get("concept_dis_name").toString();
|
|
|
+ item1.setUniqueName(uniqueName);
|
|
|
+ }
|
|
|
+ return item1;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ pushJoinVO.setDiag(items);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //根据医院编号和mealName来获取uniqueName
|
|
|
+ if (pushJoinVO.getPacsOrder() != null) {
|
|
|
+ List<Pacs> pacsOrder = pushJoinVO.getPacsOrder().stream().map(item -> {
|
|
|
+ Pacs pacs = new Pacs();
|
|
|
+ BeanUtils.copyProperties(item, pacs);
|
|
|
+ Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(pushJoinVO.getHosCode(), item.getName());
|
|
|
+ if (pacsMap != null) {
|
|
|
+ String uniqueName = pacsMap.get("unique_name").toString();
|
|
|
+ pacs.setUniqueName(uniqueName);
|
|
|
+ }
|
|
|
+ return pacs;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ pushJoinVO.setPacsOrder(pacsOrder);
|
|
|
+
|
|
|
+ }
|
|
|
+ if (pushJoinVO.getPacs() != null) {
|
|
|
+ List<Pacs> pacs = pushJoinVO.getPacs().stream().map(item -> {
|
|
|
+ Pacs pacs1 = new Pacs();
|
|
|
+ BeanUtils.copyProperties(item, pacs1);
|
|
|
+ Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(pushJoinVO.getHosCode(), item.getName());
|
|
|
+ if (pacsMap != null) {
|
|
|
+ String uniqueName = pacsMap.get("unique_name").toString();
|
|
|
+ pacs1.setUniqueName(uniqueName);
|
|
|
+ }
|
|
|
+ return pacs1;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ pushJoinVO.setPacs(pacs);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //根据医院编码和his方传过来的mealName,itemName来得到它的uniqueName';
|
|
|
+ if (pushJoinVO.getLisOrder() != null) {
|
|
|
+ List<Lis> lisOrder = pushJoinVO.getLisOrder().stream().map(lis -> {
|
|
|
+ Lis lis1 = new Lis();
|
|
|
+ BeanUtils.copyProperties(lis, lis1);
|
|
|
+ Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(pushJoinVO.getHosCode(), lis.getName());
|
|
|
+ if (lisMap != null) {
|
|
|
+ String uniqueName = lisMap.get("unique_name").toString();
|
|
|
+ int index = uniqueName.indexOf("-");
|
|
|
+ lis1.setUniqueName(uniqueName.substring(0, index));
|
|
|
+ }
|
|
|
+ return lis1;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+ pushJoinVO.setLisOrder(lisOrder);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pushJoinVO.getLis() != null) {
|
|
|
+ List<Lis> lis = pushJoinVO.getLis().stream().map(lis1 -> {
|
|
|
+ Lis lis2 = new Lis();
|
|
|
+ BeanUtils.copyProperties(lis1, lis2);
|
|
|
+ Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(pushJoinVO.getHosCode(), lis1.getName());
|
|
|
+ if (lisMap != null) {
|
|
|
+ String uniqueName = lisMap.get("unique_name").toString();
|
|
|
+ int index = uniqueName.indexOf("-");
|
|
|
+ lis1.setUniqueName(uniqueName.substring(0, index));
|
|
|
+ }
|
|
|
+ return lis2;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ pushJoinVO.setLis(lis);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //病史
|
|
|
+ if (pushVO.getMedicalHistory() != null) {
|
|
|
+ pushJoinVO.setPasts(pushVO.getMedicalHistory().getPasts());
|
|
|
+ pushJoinVO.setInfectious(pushVO.getMedicalHistory().getInfectious());
|
|
|
+ pushJoinVO.setOperation(pushVO.getMedicalHistory().getOther());
|
|
|
+ pushJoinVO.setAllergy(pushVO.getMedicalHistory().getAllergy());
|
|
|
+ pushJoinVO.setVaccination(pushVO.getMedicalHistory().getVaccination());
|
|
|
+ pushJoinVO.setPersonal(pushVO.getMedicalHistory().getPersonal());
|
|
|
+ pushJoinVO.setMarital(pushVO.getMedicalHistory().getMarital());
|
|
|
+ pushJoinVO.setFamily(pushVO.getMedicalHistory().getFamily());
|
|
|
+ pushJoinVO.setMenstrual(pushVO.getMedicalHistory().getMenstrual());
|
|
|
+ pushJoinVO.setOther(pushVO.getMedicalHistory().getOther());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 将基本参数保存到redis
|
|
|
+ String mrId = mrFacade.createMr(pushJoinVO);
|
|
|
+ System.out.println(JSONObject.toJSONString(pushJoinVO));
|
|
|
+
|
|
|
+ if (pushVO.getCode().equals("5")) {
|
|
|
+ pushJoinVO.setRuleType("1,2");
|
|
|
+ RespDTO<PushDTO> respDTO = dataServiceClient.push(pushJoinVO);
|
|
|
+
|
|
|
+ if (null == respDTO.data) {
|
|
|
+ return RespDTO.onPushError("没有返回结果");
|
|
|
+ }
|
|
|
+ if (respDTO.data.getHasIndications().equals("0")) {
|
|
|
+ return RespDTO.onPushError("无推送结果");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (pushVO.getCode().equals("9")) {
|
|
|
+ RespDTO<PushDTO> respDTO = dataServiceClient.push(pushJoinVO);
|
|
|
+ System.out.println(JSONObject.toJSONString(respDTO));
|
|
|
+ if (null == respDTO.data) {
|
|
|
+ return RespDTO.onPushError("没有返回结果");
|
|
|
+ }
|
|
|
+ if (respDTO.data.getLab()==null&&respDTO.data.getPacs()==null) {
|
|
|
+ return RespDTO.onPushError("无推送结果");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 竖版
|
|
|
+ String url = "";
|
|
|
+ String urlVer = readProperties.remoteAddressVer + "?hospitalCode=" + pushVO.getHosCode() + "&mrId=" + mrId;
|
|
|
+ String urlHor = readProperties.remoteAddressHor + "?hospitalCode=" + pushVO.getHosCode() + "&mrId=" + mrId;
|
|
|
+
|
|
|
+ // 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
+
|
|
|
+
|
|
|
+ if ("hor".equalsIgnoreCase(pushVO.getShowType())) {
|
|
|
+ // 横版
|
|
|
+ urlHor += "&showTab=1&tipsMode=2&tipsInfoList=" + JSONObject.toJSONString(conceptIntroduceVOList) + "&plan=" + pushVO.getCode();
|
|
|
+ url = urlHor;
|
|
|
+ } else {
|
|
|
+ // 竖版
|
|
|
+ urlVer += "&showTab=0&tipsMode=2&tipsInfoList=" + JSONObject.toJSONString(conceptIntroduceVOList) + "&plan=" + pushVO.getCode();
|
|
|
+ url = urlVer;
|
|
|
+ }
|
|
|
+ System.out.println(JSONObject.toJSONString(conceptIntroduceVOList));
|
|
|
+ //将请求记录到统计表
|
|
|
+ saveInputInfo(pushVO, url);
|
|
|
+ return RespDTO.onSuc(url);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void saveInputInfo(PushVO pushVO, String url) {
|
|
|
+ InputInfo inputInfo = new InputInfo();
|
|
|
+ inputInfo.setHospitalCode(pushVO.getHosCode());
|
|
|
+ inputInfo.setHosptialDeptCode(pushVO.getHospitalDeptCopde());
|
|
|
+ inputInfo.setDoctorCode(pushVO.getDoctorCode());
|
|
|
+ inputInfo.setInquiryCode(pushVO.getInquiryCode());
|
|
|
+ inputInfo.setAge(pushVO.getAge());
|
|
|
+ inputInfo.setSexType(pushVO.getSex().toString());
|
|
|
+ inputInfo.setParamIn(JSONObject.toJSONString(pushVO));
|
|
|
+ inputInfo.setParamOut(url);
|
|
|
+ inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
|
|
|
+ inputInfo.setRemark(pushVO.getCode());
|
|
|
+ inputInfoFacade.saveInputInfo(inputInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取公表项中对应的辅检,未查询到时去化验公表项再查
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ */
|
|
|
+ private void getPacsConfig(List<ConceptIntroduceVO> conceptIntroduceVOList, String pacsName, String hosCode) {
|
|
|
+ // 比对映射表中的辅检项
|
|
|
+ Map<String, Object> pacsMap = pacsConfigFacade.getPacsConfigByMealname(hosCode, pacsName);
|
|
|
+ if (pacsMap != null) {
|
|
|
+ String uniqueName = pacsMap.get("unique_name").toString();
|
|
|
+ if (!"".equals(uniqueName) && uniqueName != null) {
|
|
|
+ String[] uniqueNames = uniqueName.split("、");
|
|
|
+ for (int i = 0; i < uniqueNames.length; i++) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ conceptIntroduceVO.setName(uniqueNames[i]);
|
|
|
+ conceptIntroduceVO.setType(6);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
+ conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
|
|
|
+ conceptIntroduceVOList.add(conceptIntroduceVO);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取公表项中对应的化验,未查询到时去辅检公表项再查
|
|
|
+ *
|
|
|
+ * @param conceptIntroduceVOList
|
|
|
+ * @param
|
|
|
+ */
|
|
|
+ private void getLisConfig(List<ConceptIntroduceVO> conceptIntroduceVOList, String lisName, String hosCode) {
|
|
|
+ // 比对映射表中的化验项
|
|
|
+ Map<String, Object> lisMap = tranLisConfigFacade.getLisConfigByMealName(hosCode, lisName);
|
|
|
+ if (lisMap != null) {
|
|
|
+ String uniqueName = lisMap.get("unique_name").toString();
|
|
|
+ String[] uniqueNames = uniqueName.split("、");
|
|
|
+ for (int i = 0; i < uniqueNames.length; i++) {
|
|
|
+ ConceptIntroduceVO conceptIntroduceVO = new ConceptIntroduceVO();
|
|
|
+ int index =uniqueNames[i].indexOf("-");
|
|
|
+ conceptIntroduceVO.setName(uniqueNames[i].substring(0,index));
|
|
|
+ conceptIntroduceVO.setType(12);// 1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标
|
|
|
+ conceptIntroduceVO.setPosition(1);// 1-摘要,2-全文,5-药品说明书,6-不良反应
|
|
|
+ conceptIntroduceVOList.add(conceptIntroduceVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|