|
@ -1732,6 +1732,46 @@ public class XzzxEntranceService{
|
|
|
|
|
|
return xml;
|
|
return xml;
|
|
}
|
|
}
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 获取历史病历
|
|
|
|
*
|
|
|
|
* @param patientId
|
|
|
|
* @param eventNo
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public String SelectEmrInfo(String patientId,String eventNo)throws Exception{
|
|
|
|
String api = "SelectEmrInfo";
|
|
|
|
String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
|
|
|
|
"<root> " +
|
|
|
|
" <serverName>"+api+"</serverName> " +
|
|
|
|
" <format>xml</format>" +
|
|
|
|
" <callOperator></callOperator> " +
|
|
|
|
" <certificate>"+key+"</certificate> " +
|
|
|
|
"</root>";
|
|
|
|
String condition ="";
|
|
|
|
if (!StringUtils.isEmpty(patientId)){
|
|
|
|
condition += "<patientId>"+patientId+"</patientId>";
|
|
|
|
}
|
|
|
|
if (StringUtils.isNotBlank(eventNo)&&!"null".equalsIgnoreCase(eventNo)){
|
|
|
|
condition += "<eventNo>"+eventNo+"</eventNo>";
|
|
|
|
}
|
|
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
|
|
"<root>"+condition+"</root>";
|
|
|
|
|
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
|
params.put("msgHeader",msgHeader);
|
|
|
|
params.put("msgBody",msgBody);
|
|
|
|
logger.info("SelectEmrInfo params:"+params.toString());
|
|
|
|
|
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
|
|
|
|
|
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
|
logger.info("SelectEmrInfo json:"+json);
|
|
|
|
return json;
|
|
|
|
}
|
|
//=====================微信模板消息推送===================================
|
|
//=====================微信模板消息推送===================================
|
|
|
|
|
|
public String sendMes(String wxId,String patient,String cardNo,String first,String noticeContent,String remark,String redirectUrl){
|
|
public String sendMes(String wxId,String patient,String cardNo,String first,String noticeContent,String remark,String redirectUrl){
|
|
@ -2423,6 +2463,14 @@ public class XzzxEntranceService{
|
|
}
|
|
}
|
|
wlyyPrescriptionVO.setInspectionVOs(wlyyInspectionVOList);
|
|
wlyyPrescriptionVO.setInspectionVOs(wlyyInspectionVOList);
|
|
}
|
|
}
|
|
|
|
try {
|
|
|
|
List<WlyyPrescriptionEmrDO> listEmr = selectHistoryEmr(patNo,"");
|
|
|
|
if (null!=listEmr&&listEmr.size()>0){
|
|
|
|
wlyyPrescriptionVO.setWlyyPrescriptionEmrDO(listEmr.get(0));
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
prescriptionVOList.add(wlyyPrescriptionVO);
|
|
prescriptionVOList.add(wlyyPrescriptionVO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@ -3125,6 +3173,38 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
}
|
|
}
|
|
return jsonObject;
|
|
return jsonObject;
|
|
}
|
|
}
|
|
|
|
/**
|
|
|
|
* 获取历史病历
|
|
|
|
* @param patientId 病人id
|
|
|
|
* @param eventNo 病人住院号
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public List<WlyyPrescriptionEmrDO> selectHistoryEmr(String patientId,String eventNo) throws Exception {
|
|
|
|
String response="";
|
|
|
|
String url = entranceUrl+"selectEmrInfo?patientId="+patientId+"&eventNo="+eventNo;
|
|
|
|
response = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
|
List<WlyyPrescriptionEmrDO> wlyyPrescriptionEmrDOList = new ArrayList<>();
|
|
|
|
if(object.getInteger("status")==200){
|
|
|
|
String obj = object.getString("obj");
|
|
|
|
logger.info("obj:"+obj);
|
|
|
|
JSONArray array = JSONArray.parseArray(obj.replace("[]","\"\"")).getJSONArray(0);
|
|
|
|
logger.info("arrayResponse:"+array.toJSONString());
|
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
|
JSONObject jsonObject = array.getJSONObject(i);
|
|
|
|
logger.info("jsonObject:"+jsonObject);
|
|
|
|
WlyyPrescriptionEmrDO wlyyPrescriptionEmrDO = new WlyyPrescriptionEmrDO();
|
|
|
|
wlyyPrescriptionEmrDO.setComplaint(null==jsonObject.get("CHIEF_COMPLAINT")?"":jsonObject.get("CHIEF_COMPLAINT").toString());
|
|
|
|
wlyyPrescriptionEmrDO.setMedicalHistory(null==jsonObject.get("PRESENT_ILLNESS")?"":jsonObject.get("PRESENT_ILLNESS").toString());
|
|
|
|
wlyyPrescriptionEmrDO.setPastHistory(null==jsonObject.get("PAST_HISTORY")?"":jsonObject.get("PAST_HISTORY").toString());
|
|
|
|
wlyyPrescriptionEmrDO.setPhysicalExamination(null==jsonObject.get("PHYSICAL_EXAMINATION")?"":jsonObject.get("PHYSICAL_EXAMINATION").toString());
|
|
|
|
wlyyPrescriptionEmrDO.setAssistExamination(null==jsonObject.get("OBSERVE_RESULT")?"":jsonObject.get("OBSERVE_RESULT").toString());
|
|
|
|
wlyyPrescriptionEmrDO.setAllergicHistory(null==jsonObject.get("ALLERGY_HISTORY")?"":jsonObject.get("ALLERGY_HISTORY").toString());
|
|
|
|
wlyyPrescriptionEmrDOList.add(wlyyPrescriptionEmrDO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return wlyyPrescriptionEmrDOList;
|
|
|
|
}
|
|
|
|
|
|
//=====================hospital应用调用entrance应用============end=================
|
|
//=====================hospital应用调用entrance应用============end=================
|
|
|
|
|