|
@ -1258,7 +1258,7 @@ public class XzzxEntranceService{
|
|
|
condition1 += "<DayCount>"+prescriptionInfoDO.getDays()+"</DayCount>";
|
|
|
condition1 += "<Usage>"+prescriptionInfoDO.getSupplyCode()+"</Usage>";
|
|
|
condition1 += "<TotalDoseage>"+prescriptionInfoDO.getQuantity()+"</TotalDoseage>";
|
|
|
condition1 += "<TotalUnit>"+prescriptionInfoDO.getPackQuantity()+prescriptionInfoDO.getUnitName()+"/"+prescriptionInfoDO.getPackUnit()+"</TotalUnit>";
|
|
|
condition1 += "<TotalUnit>"+prescriptionInfoDO.getPackUnit()+"</TotalUnit>";
|
|
|
condition1 += "<PrescribeMemo>"+"</PrescribeMemo>";
|
|
|
condition1 += "<FryMode>"+"</FryMode>";
|
|
|
condition1 += "<HerbalTakeMethodClass>"+"</HerbalTakeMethodClass>";
|
|
@ -1282,6 +1282,95 @@ public class XzzxEntranceService{
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 保存入门诊断信息到his
|
|
|
* @param ApplyNo
|
|
|
* @param DiagnosisName
|
|
|
* @param DiagnosisCode
|
|
|
* @param ChnSymPtomsCode
|
|
|
* @param ChnSymPtomsName
|
|
|
* @param ChnDiagnosisCode
|
|
|
* @param ChnDiagnosisName
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String saveDiagnosis(String ApplyNo,String DiagnosisName,String DiagnosisCode,
|
|
|
String ChnSymPtomsCode,String ChnSymPtomsName,String ChnDiagnosisCode,String ChnDiagnosisName)throws Exception{
|
|
|
String api = "saveDiagnosis";
|
|
|
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(ApplyNo)){
|
|
|
condition += "<ApplyNo>"+ApplyNo+"</ApplyNo>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(DiagnosisName)){
|
|
|
condition += "<DiagnosisName>"+DiagnosisName+"</DiagnosisName>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(DiagnosisCode)){
|
|
|
condition += "<DiagnosisCode>"+DiagnosisCode+"</DiagnosisCode>";
|
|
|
}
|
|
|
|
|
|
condition+="<ChnSymPtomsCode>"+"</ChnSymPtomsCode>";
|
|
|
condition+="<ChnSymPtomsName>"+"</ChnSymPtomsName>";
|
|
|
condition+="<ChnDiagnosisCode>"+"</ChnDiagnosisCode>";
|
|
|
condition+="<ChnDiagnosisName>"+"</ChnDiagnosisName>";
|
|
|
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("saveDiagnosis params:"+params.toString());
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info(" saveDiagnosis json:"+json);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 发送退号信息到his
|
|
|
* @param ApplyNo
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public String refundConsultation(String ApplyNo,String PayCardNo)throws Exception{
|
|
|
String api = "refundConsultation";
|
|
|
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(ApplyNo)){
|
|
|
condition += "<ApplyNo>"+ApplyNo+"</ApplyNo>";
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(PayCardNo)){
|
|
|
condition += "<PayCardNo>"+PayCardNo+"</PayCardNo>";
|
|
|
}
|
|
|
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("refundConsultation params:"+params.toString());
|
|
|
String xml = getXzzxWebServiceInfo("CallInterface",params,getOperateUrl());
|
|
|
XMLSerializer xmlSerializer = new XMLSerializer();
|
|
|
String json = xmlSerializer.read(xml).toString();
|
|
|
logger.info("refundConsultation json:"+json);
|
|
|
return json;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 组装检查检验项目参数
|
|
|
*
|
|
@ -2716,7 +2805,7 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* 保存处方到entrance
|
|
|
* @param ioFlag 门诊住院标志
|
|
|
* @param payCardNo 就诊卡号
|
|
|
* @param nullahNumber 挂号流水号
|
|
@ -2754,6 +2843,58 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 保存诊断到entrance
|
|
|
* @param applyNo 必填,流水号
|
|
|
* @param diagnosisName 必填,诊断名称
|
|
|
* @param diagnosisCode 诊断代码
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject saveDiagnosisToEntrance(String applyNo,String diagnosisName,String diagnosisCode) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
String response = "";
|
|
|
String url = entranceUrl+"saveDiagnosis";
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("ApplyNo",applyNo);
|
|
|
params.put("DiagnosisName",diagnosisName);
|
|
|
params.put("DiagnosisCode",diagnosisCode);
|
|
|
logger.info("params"+params.toString());
|
|
|
response = httpClientUtil.httpPost(url,params);
|
|
|
logger.info("诊断同步"+response);
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
if(object.getInteger("status")==200){
|
|
|
jsonObject = object.getJSONObject("obj");
|
|
|
}
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 发送退号信息到entrance
|
|
|
* @param applyNo 必填,流水号
|
|
|
* @param payCardNo 必填,卡号
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONObject refundConsultationToEntrance(String applyNo,String payCardNo) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
String response = "";
|
|
|
String url = entranceUrl+"refundConsultation";
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
Map<String,String> params = new HashedMap();
|
|
|
params.put("ApplyNo",applyNo);
|
|
|
params.put("PayCardNo",payCardNo);
|
|
|
logger.info("params"+params.toString());
|
|
|
response = httpClientUtil.httpPost(url,params);
|
|
|
logger.info("诊断同步"+response);
|
|
|
JSONObject object = JSONObject.parseObject(response);
|
|
|
if(object.getInteger("status")==200){
|
|
|
jsonObject = object.getJSONObject("obj");
|
|
|
}
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
//=====================hospital应用调用entrance应用============end=================
|
|
|
|
|
|
|