|
@@ -10,14 +10,12 @@ import com.diagbot.entity.JSONResponseBean;
|
|
|
import com.diagbot.entity.Request;
|
|
|
import com.diagbot.entity.Response;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
-import com.diagbot.service.InquiryTriageService;
|
|
|
import com.diagbot.service.impl.InquiryTriageServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.FastJsonUtils;
|
|
|
import com.diagbot.util.GsonUtil;
|
|
|
import com.diagbot.util.HttpUtils;
|
|
|
-import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.HospitalVO;
|
|
|
import com.diagbot.vo.InquiryTriageMechVO;
|
|
@@ -28,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import javax.swing.text.Utilities;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
@@ -75,22 +72,20 @@ public class InquiryTriageFacade extends InquiryTriageServiceImpl {
|
|
|
hospitalVO.setSysType(saveInquiryVO.getSysType());
|
|
|
// 保存记录表
|
|
|
optInfoFacade.saveOptOnfo(hospitalVO, "2");
|
|
|
- //邵逸夫医院 心理测试 对接纳里时,返回url
|
|
|
+ //邵逸夫医院 分诊对接纳里时,返回科室编码
|
|
|
SaveInquiryTriageDTO saveInquiryDTO = new SaveInquiryTriageDTO();
|
|
|
|
|
|
-
|
|
|
if (saveInquiryVO.getHospitalCode().equals("邵逸夫医院")
|
|
|
&& saveInquiryVO.getIdType().equals(1)) {
|
|
|
//去咨询
|
|
|
- List<String> naliRetList = getUrl(saveInquiryVO);
|
|
|
- String retUrl = naliRetList.get(0);
|
|
|
- saveInquiryDTO.setBody(retUrl);
|
|
|
- saveInquiryDTO.setResponse(naliRetList.get(1));
|
|
|
- saveInquiryDTO.setRequest(naliRetList.get(2));
|
|
|
- saveInquiryDTO.setRequestBodys(naliRetList.get(3));
|
|
|
+ List<Object> naliRetList = getUrl(saveInquiryVO);
|
|
|
+ saveInquiryDTO.setBodyMap((Map)naliRetList.get(0));
|
|
|
+ saveInquiryDTO.setResponse(naliRetList.get(1).toString());
|
|
|
+ saveInquiryDTO.setRequest(naliRetList.get(2).toString());
|
|
|
+ saveInquiryDTO.setRequestBodys(naliRetList.get(3).toString());
|
|
|
}else if(saveInquiryVO.getHospitalCode().equals("邵逸夫医院")
|
|
|
&& saveInquiryVO.getIdType().equals(2)){
|
|
|
- //去挂号。
|
|
|
+ //去挂号。2期
|
|
|
//TODO
|
|
|
}
|
|
|
return saveInquiryDTO;
|
|
@@ -107,10 +102,10 @@ public class InquiryTriageFacade extends InquiryTriageServiceImpl {
|
|
|
dataNew = BeanUtil.listCopyTo(data, InquiryTriageDTO.class);
|
|
|
return dataNew;
|
|
|
}
|
|
|
- private List<String> getUrl(SaveInquiryTriageVO saveInquiryVO) {
|
|
|
+ private List<Object> getUrl(SaveInquiryTriageVO saveInquiryVO) {
|
|
|
//TODO 待定
|
|
|
- List<String> ret = Lists.newArrayList();
|
|
|
- String retUrl = null;
|
|
|
+ List<Object> ret = Lists.newArrayList();
|
|
|
+// Map<String,Object> retUrl = null;
|
|
|
Request request = null;
|
|
|
Response response = null;
|
|
|
try {
|
|
@@ -123,11 +118,10 @@ public class InquiryTriageFacade extends InquiryTriageServiceImpl {
|
|
|
log.info("response:" + FastJsonUtils.getBeanToJson(response));
|
|
|
if (response.isSuccess()) {
|
|
|
JSONResponseBean result = response.getJsonResponseBean();
|
|
|
- retUrl = result.getBody().toString();
|
|
|
+ ret.add(result.getBody());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
- ret.add(retUrl);
|
|
|
ret.add(FastJsonUtils.getBeanToJson(response));
|
|
|
ret.add(FastJsonUtils.getBeanToJson(request));
|
|
|
ret.add(FastJsonUtils.getBeanToJson(request.getBodys()));
|
|
@@ -135,12 +129,9 @@ public class InquiryTriageFacade extends InquiryTriageServiceImpl {
|
|
|
}
|
|
|
private Request getltcs(SaveInquiryTriageVO saveInquiryVO) {
|
|
|
List bodyList = new ArrayList<>();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
Map<String, Object> body = new HashMap<>();
|
|
|
body.put("disDeptist",saveInquiryVO.getDisDeptist() );
|
|
|
- //body.put("patName", saveInquiryVO.getPatName());
|
|
|
+ body.put("hospitalCode", saveInquiryVO.getHospitalCode());
|
|
|
body.put("patAge", saveInquiryVO.getPatAge());
|
|
|
body.put("patSex", saveInquiryVO.getPatSex());
|
|
|
body.put("idType", saveInquiryVO.getIdType());
|
|
@@ -150,11 +141,9 @@ public class InquiryTriageFacade extends InquiryTriageServiceImpl {
|
|
|
bodyList.add(body);
|
|
|
|
|
|
//X-Service-Id对应的值
|
|
|
- String serviceId = "consult.questionRecordService";
|
|
|
+ String serviceId = "consult.diagnoseService";
|
|
|
//X-Service-Method对应的值
|
|
|
- String method = "saveQuestionRecord";
|
|
|
+ String method = "findConsultDocByDiagnose";
|
|
|
return new Request(serviceId, method, bodyList);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|