|
@ -217,48 +217,6 @@ public class EntranceService {
|
|
|
return ConvertUtil.convertListEnvelopByString(resp);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 门诊处方信息(所有处方)根据处方信息封装到实体中
|
|
|
* @param REGISTER_SN 流水号,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
|
|
|
* @param realOrder 处方号 ,选择输入参数,该参数输入时获取到处方号为realOrder的处方
|
|
|
* @param PAT_NO 病人id ,必传参数,只传病人id时,获取该病人的所有处方
|
|
|
* @param ADM_NO 就诊唯一号 ,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
|
|
|
* @param demoFlag 是否获取demo数据
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<WlyyPrescriptionVO> BS16017(String REGISTER_SN,String realOrder,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
|
|
|
String fid=BS16017;
|
|
|
String resp = "";
|
|
|
if (demoFlag) {
|
|
|
resp = getJosnFileResullt(fid);
|
|
|
} else {
|
|
|
StringBuffer sbs = new StringBuffer();
|
|
|
//AccessControl :用户、密码、服务id
|
|
|
sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
|
|
|
//MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
|
|
|
sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
|
|
|
//查询信息拼接
|
|
|
sbs.append("<MsgInfo><endNum>20000</endNum><Msg/>");
|
|
|
if (StringUtils.isNotBlank(REGISTER_SN)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"REGISTER_SN\" splice=\"and\" value=\"'" + REGISTER_SN + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(realOrder)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"real_order\" splice=\"and\" value=\"'" + realOrder + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(PAT_NO)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"PAT_NO\" splice=\"and\" value=\"'" + PAT_NO + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(ADM_NO)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"ADM_NO\" splice=\"and\" value=\"'" + ADM_NO + "'\"/>");
|
|
|
}
|
|
|
//查询信息结束
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
}
|
|
|
return convertWlyyPrescriptionVOInBodyRow(resp);
|
|
|
}
|
|
|
/**
|
|
|
* 处方(处方主体+诊断+药品)适配
|
|
|
* @param obj 接口返回参数
|
|
@ -377,6 +335,48 @@ public class EntranceService {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 门诊处方信息(所有处方)根据处方信息封装到实体中
|
|
|
* @param REGISTER_SN 流水号,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
|
|
|
* @param realOrder 处方号 ,选择输入参数,该参数输入时获取到处方号为realOrder的处方
|
|
|
* @param PAT_NO 病人id ,必传参数,只传病人id时,获取该病人的所有处方
|
|
|
* @param ADM_NO 就诊唯一号 ,选择输入参数,该参数输入时获取该病人的此次就诊的所有处方
|
|
|
* @param demoFlag 是否获取demo数据
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<WlyyPrescriptionVO> BS16017(String REGISTER_SN,String realOrder,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
|
|
|
String fid=BS16017;
|
|
|
String resp = "";
|
|
|
if (demoFlag) {
|
|
|
resp = getJosnFileResullt(fid);
|
|
|
} else {
|
|
|
StringBuffer sbs = new StringBuffer();
|
|
|
//AccessControl :用户、密码、服务id
|
|
|
sbs.append("<ESBEntry><AccessControl><Fid>" + fid + "</Fid><UserName>"+mqUser+"</UserName><Password>"+mqPwd+"</Password></AccessControl>");
|
|
|
//MessageHeader :固定值 消费方系统编号 S60,提供方系统编号 S01
|
|
|
sbs.append("<MessageHeader><Fid>" + fid + "</Fid><MsgDate>" + DateUtil.dateToStr(new Date(), DateUtil.YYYY_MM_DD_HH_MM_SS) + "</MsgDate><SourceSysCode>"+sourceSysCode+"</SourceSysCode><TargetSysCode>"+targetSysCode+"</TargetSysCode></MessageHeader>");
|
|
|
//查询信息拼接
|
|
|
sbs.append("<MsgInfo><endNum>20000</endNum><Msg/>");
|
|
|
if (StringUtils.isNotBlank(REGISTER_SN)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"REGISTER_SN\" splice=\"and\" value=\"'" + REGISTER_SN + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(realOrder)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"real_order\" splice=\"and\" value=\"'" + realOrder + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(PAT_NO)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"PAT_NO\" splice=\"and\" value=\"'" + PAT_NO + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(ADM_NO)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"ADM_NO\" splice=\"and\" value=\"'" + ADM_NO + "'\"/>");
|
|
|
}
|
|
|
//查询信息结束
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
}
|
|
|
return convertWlyyPrescriptionVOInBodyRow(resp);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 初始化处方接口
|
|
@ -669,7 +669,9 @@ public class EntranceService {
|
|
|
sbs.append("<query compy=\"=\" item=\"charge_code\" splice=\"and\" value=\"'" + charge_code + "'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(py_code)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"py_code\" splice=\"and\" value=\"'" + py_code + "'\"/>");
|
|
|
py_code=py_code.toUpperCase();
|
|
|
logger.info("py_code="+py_code);
|
|
|
sbs.append("<query compy=\"like\" item=\"py_code\" splice=\"and\" value=\"'%" + py_code + "%'\"/>");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(stock_amount)) {
|
|
|
sbs.append("<query compy=\">=\" item=\"stock_amount\" splice=\"and\" value=\"'" + stock_amount + "'\"/>");
|
|
@ -712,7 +714,9 @@ public class EntranceService {
|
|
|
sbs.append("<query compy=\"=\" item=\"supply_code\" splice=\"and\" value=\"'" + supply_code + "'\"/>");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(py_code)){
|
|
|
sbs.append("<query compy=\"=\" item=\"py_code\" splice=\"and\" value=\"'"+py_code+"'\"/>");
|
|
|
py_code=py_code.toUpperCase();
|
|
|
logger.info("py_code="+py_code);
|
|
|
sbs.append("<query compy=\"like\" item=\"py_code\" splice=\"and\" value=\"'%"+py_code+"%'\"/>");
|
|
|
}
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
@ -1016,7 +1020,9 @@ public class EntranceService {
|
|
|
//查询信息拼接
|
|
|
sbs.append("<MsgInfo><endNum>1000</endNum><Msg/>");
|
|
|
if (StringUtils.isNotBlank(py_code)) {
|
|
|
sbs.append("<query compy=\"=\" item=\"py_code\" splice=\"and\" value=\"'" + py_code + "'\"/>");
|
|
|
py_code=py_code.toUpperCase();
|
|
|
logger.info("py_code="+py_code);
|
|
|
sbs.append("<query compy=\"like\" item=\"py_code\" splice=\"and\" value=\"'%" + py_code + "%'\"/>");
|
|
|
}
|
|
|
sbs.append("<startNum>1</startNum></MsgInfo></ESBEntry>");
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
@ -1041,7 +1047,9 @@ public class EntranceService {
|
|
|
//查询信息拼接
|
|
|
sbs.append("<MsgInfo><endNum>1000</endNum><Msg/>");
|
|
|
if(StringUtils.isNotBlank(py_code)){
|
|
|
sbs.append("<query compy=\"=\" item=\"py_code\" splice=\"and\" value=\"'"+py_code+"'\"/>");
|
|
|
py_code=py_code.toUpperCase();
|
|
|
logger.info("py_code="+py_code);
|
|
|
sbs.append("<query compy=\"like\" item=\"py_code\" splice=\"and\" value=\"'%"+py_code+"%'\"/>");
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(win_no)){
|
|
|
sbs.append("<query compy=\"=\" item=\"win_no\" splice=\"and\" value=\"'"+win_no+"'\"/>");
|
|
@ -1509,12 +1517,12 @@ public class EntranceService {
|
|
|
doctorCode = null == jsonObjectBody.get("Emp_Code") ? "" : jsonObjectBody.get("Emp_Code").toString();
|
|
|
//根据医生及分部,获取医生号别
|
|
|
net.sf.json.JSONArray jsonArrayCharge = BS55010(winNo, doctorCode, null, false);
|
|
|
String chareType = "";
|
|
|
String chareType=null;
|
|
|
if(null!=jsonArrayCharge){
|
|
|
for (Object objectCharge : jsonArrayCharge) {
|
|
|
net.sf.json.JSONObject jsonObjectBodyCharge = (net.sf.json.JSONObject) objectCharge;
|
|
|
if (null != jsonObjectBodyCharge) {
|
|
|
chareType = null == jsonObjectBodyCharge.get("charge_type") ? "" : jsonObjectBodyCharge.get("charge_type").toString();
|
|
|
chareType = null == jsonObjectBodyCharge.get("charge_type") ? null : jsonObjectBodyCharge.get("charge_type").toString();
|
|
|
}
|
|
|
}
|
|
|
}
|