|
@ -1796,13 +1796,13 @@ public class XzzxEntranceService{
|
|
" <certificate>"+key+"</certificate> " +
|
|
" <certificate>"+key+"</certificate> " +
|
|
"</root>";
|
|
"</root>";
|
|
String condition ="";
|
|
String condition ="";
|
|
if (!StringUtils.isEmpty(templateId)&&!"null".equalsIgnoreCase(templateId)){
|
|
|
|
|
|
if (!StringUtils.isEmpty(templateId)){
|
|
condition += "<template_id>"+templateId+"</template_id>";
|
|
condition += "<template_id>"+templateId+"</template_id>";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(patientId)&&!"null".equalsIgnoreCase(templateId)){
|
|
|
|
|
|
if (!StringUtils.isEmpty(patientId)){
|
|
condition += "<patientId>"+patientId+"</patientId>";
|
|
condition += "<patientId>"+patientId+"</patientId>";
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(eventNo)&&!"null".equalsIgnoreCase(eventNo)){
|
|
|
|
|
|
if (!StringUtils.isEmpty(eventNo)){
|
|
condition += "<eventNo>"+eventNo+"</eventNo>";
|
|
condition += "<eventNo>"+eventNo+"</eventNo>";
|
|
}
|
|
}
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
|
@ -1813,13 +1813,92 @@ public class XzzxEntranceService{
|
|
params.put("msgBody",msgBody);
|
|
params.put("msgBody",msgBody);
|
|
logger.info("SelectEmrDispRecord params:"+params.toString());
|
|
logger.info("SelectEmrDispRecord params:"+params.toString());
|
|
|
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
|
|
|
|
|
|
/* XMLSerializer xmlSerializer = new XMLSerializer();
|
|
/* XMLSerializer xmlSerializer = new XMLSerializer();
|
|
String json = xmlSerializer.read(xml).toString();*/
|
|
String json = xmlSerializer.read(xml).toString();*/
|
|
logger.info("SelectEmrDispRecord json:"+xml);
|
|
logger.info("SelectEmrDispRecord json:"+xml);
|
|
return xml;
|
|
return xml;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 查询病历文书列表
|
|
|
|
*
|
|
|
|
* @param patientId
|
|
|
|
* @param eventNo
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public String GetEMRList(String patientId,String eventNo)throws Exception{
|
|
|
|
String api = "GetEMRList";
|
|
|
|
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.isEmpty(eventNo)){
|
|
|
|
condition += "<eventNo>"+eventNo+"</eventNo>";
|
|
|
|
}
|
|
|
|
condition +="<lngCatalogID>50</lngCatalogID>";
|
|
|
|
condition +="<lngEMRType>93</lngEMRType>";
|
|
|
|
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("GetEMRList params:"+params.toString());
|
|
|
|
|
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
|
|
|
|
|
|
|
|
/* XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
|
String json = xmlSerializer.read(xml).toString();*/
|
|
|
|
logger.info("GetEMRList json:"+xml);
|
|
|
|
return xml;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 查询病历文书列表
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public String BrowseSingleEMR(String bstrEmrID)throws Exception{
|
|
|
|
String api = "BrowseSingleEMR";
|
|
|
|
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(bstrEmrID)){
|
|
|
|
condition += "<bstrEmrID>"+bstrEmrID+"</bstrEmrID>";
|
|
|
|
}
|
|
|
|
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("BrowseSingleEMR params:"+params.toString());
|
|
|
|
|
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getSelectUrl());
|
|
|
|
|
|
|
|
/* XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
|
String json = xmlSerializer.read(xml).toString();*/
|
|
|
|
logger.info("BrowseSingleEMR json:"+xml);
|
|
|
|
return xml;
|
|
|
|
}
|
|
//=====================微信模板消息推送===================================
|
|
//=====================微信模板消息推送===================================
|
|
|
|
|
|
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){
|
|
@ -3280,6 +3359,63 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public JSONArray selectHistoryEmrFromEntrance(String patientId,String eventNo) throws Exception {
|
|
|
|
String response="";
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
PatientMappingDO mappingDO = patientMappingDao.findByPatient(patientId);
|
|
|
|
String patient = null;
|
|
|
|
if (mappingDO!=null){
|
|
|
|
patient = mappingDO.getMappingCode();
|
|
|
|
}
|
|
|
|
String url = entranceUrl+"selectEmrInfo?patientId="+patient+"&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 j=0;j<array.size();j++){
|
|
|
|
JSONObject object1 = array.getJSONObject(j);
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
jsonObject.put("DEPT_NAME",object1.getString("DEPT_NAME"));
|
|
|
|
jsonObject.put("TREAT_DATE_TIME",DateUtil.getYyyymmddhhmmss(DateUtil.strToDateLong(object1.getString("VISIT_TIME"))));
|
|
|
|
jsonObject.put("OPID",object1.getString("EMR_ID"));
|
|
|
|
String firstFlag = object1.getString("FIRST_FLAG");
|
|
|
|
if (firstFlag.equalsIgnoreCase("复诊")){
|
|
|
|
jsonObject.put("TREAT_DOCTOR_NAME",object1.getString("RETURN_DOC_SIGN"));
|
|
|
|
}else if (firstFlag.equalsIgnoreCase("初诊")){
|
|
|
|
jsonObject.put("TREAT_DOCTOR_NAME",object1.getString("DOCTOR_SIGNATURE"));
|
|
|
|
}
|
|
|
|
jsonArray.add(jsonObject);
|
|
|
|
}
|
|
|
|
return jsonArray;
|
|
|
|
}else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询病历文书html信息
|
|
|
|
* @param bstrEmrID
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public String selectBrowseSingleEMR(String bstrEmrID) throws Exception {
|
|
|
|
String response="";
|
|
|
|
String url = entranceUrl+"browseSingleEMR?bstrEmrID="+bstrEmrID;
|
|
|
|
response = httpClientUtil.get(url,"GBK");
|
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
|
if(object.getInteger("status")==200){
|
|
|
|
String obj = object.getString("obj");
|
|
|
|
return obj;
|
|
|
|
}else {
|
|
|
|
return "获取失败";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=====================hospital应用调用entrance应用============end=================
|
|
//=====================hospital应用调用entrance应用============end=================
|
|
|
|
|
|
|
|
|