|
@ -3003,7 +3003,7 @@ public class DsyyEntranceService {
|
|
}
|
|
}
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
httpLogDO.setCode("selectEmrInfo");
|
|
httpLogDO.setCode("selectEmrInfo");
|
|
httpLogDO.setName("查下电子病历");
|
|
|
|
|
|
httpLogDO.setName("查询电子病历");
|
|
httpLogDO.setRequest(xml);
|
|
httpLogDO.setRequest(xml);
|
|
httpLogDO.setResponse(response);
|
|
httpLogDO.setResponse(response);
|
|
httpLogDO.setStatus("1");
|
|
httpLogDO.setStatus("1");
|
|
@ -3013,39 +3013,42 @@ public class DsyyEntranceService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通用查询检查、检验报告详情接口
|
|
|
|
*
|
|
|
|
|
|
* 查询出院小结、门诊病历
|
|
|
|
* 门诊病历 :JHIDS-USD-HLWMZBL-014 出院小结:JHIDS-USD-HLWCYXJ-013
|
|
* @param serverCode
|
|
* @param serverCode
|
|
* @param patientId
|
|
* @param patientId
|
|
* @param visitNo
|
|
* @param visitNo
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public JSONArray selectReportInfo(String serverCode,String patientId,String visitNo) throws Exception {
|
|
|
|
String url = "HTTP://10.95.8.41:51221";
|
|
|
|
String xml = "{\n" +
|
|
|
|
" \"serverCode\": \""+serverCode+"\",\n" +
|
|
|
|
" \"sysCode\": \"HLW\",\n" +
|
|
|
|
" \"pageSize\": \"10\",\n" +
|
|
|
|
" \"pageNo\": \"1\",\n" +
|
|
|
|
" \t\"orders\": [\n" +
|
|
|
|
"\t\n" +
|
|
|
|
"\t],\n" +
|
|
|
|
"\t\"condition\": [\n" +
|
|
|
|
"\t\t{\n" +
|
|
|
|
"\t\t\t\"column\": \"PATIENT_ID\",\n" +
|
|
|
|
"\t\t\t\"type\": \"eq\",\n" +
|
|
|
|
"\t\t\t\"value\": \""+patientId+"\"\n" +
|
|
|
|
"\t\t},\n" +
|
|
|
|
" \t{\n" +
|
|
|
|
"\t\t\t\"column\": \"VISIT_ID\",\n" +
|
|
|
|
"\t\t\t\"type\": \"eq\",\n" +
|
|
|
|
"\t\t\t\"value\": \""+visitNo+"\"\n" +
|
|
|
|
"\t\t}\n" +
|
|
|
|
"\t]\n" +
|
|
|
|
"}";
|
|
|
|
|
|
public JSONArray selectReportInfo(String serverCode,String patientId,String visitNo,int page,int size) throws Exception {
|
|
|
|
String url = "http://10.95.8.41:51225";
|
|
|
|
JSONObject data = new JSONObject();
|
|
|
|
JSONArray orders = new JSONArray();
|
|
|
|
JSONArray condition = new JSONArray();
|
|
|
|
data.put("serverCode",serverCode);
|
|
|
|
data.put("sysCode","HLW");
|
|
|
|
data.put("pageSize",size);
|
|
|
|
data.put("pageNo",page);
|
|
|
|
data.put("orders",orders);
|
|
|
|
if (StringUtils.isNoneBlank(patientId)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","PATIENT_ID");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",patientId);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(visitNo)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","VISIT_NO");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",visitNo);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
data.put("condition",condition);
|
|
|
|
String xml = data.toJSONString();
|
|
logger.info("xml"+xml);
|
|
logger.info("xml"+xml);
|
|
String response = httpClientUtil.postHeadBodyText(url,xml);
|
|
|
|
|
|
String response = httpClientUtil.postHeadBodyText2(url,xml);
|
|
logger.info("response===="+response);
|
|
logger.info("response===="+response);
|
|
JSONArray jsonArray =new JSONArray();
|
|
JSONArray jsonArray =new JSONArray();
|
|
Object json = JSON.parse(response);
|
|
Object json = JSON.parse(response);
|
|
@ -3057,19 +3060,12 @@ public class DsyyEntranceService {
|
|
} else if (json instanceof JSONArray) {
|
|
} else if (json instanceof JSONArray) {
|
|
JSONArray array = (JSONArray) json;
|
|
JSONArray array = (JSONArray) json;
|
|
array = JSONArray.parseArray(response);
|
|
array = JSONArray.parseArray(response);
|
|
for (int i=0;i<array.size();i++){
|
|
|
|
JSONObject object = array.getJSONObject(i);
|
|
|
|
String EMRPDF=object.getString("EMRPDF");
|
|
|
|
byte[] emrByte = Base64.decodeBase64(EMRPDF);
|
|
|
|
String emrDecode = new String(emrByte, "GBK");
|
|
|
|
object.put("EMRPDFHTMl", emrDecode);
|
|
|
|
}
|
|
|
|
jsonArray = array;
|
|
jsonArray = array;
|
|
|
|
|
|
}
|
|
}
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
httpLogDO.setCode("selectEmrInfo");
|
|
|
|
httpLogDO.setName("查下电子病历");
|
|
|
|
|
|
httpLogDO.setCode(serverCode);
|
|
|
|
httpLogDO.setName(serverCode);
|
|
httpLogDO.setRequest(xml);
|
|
httpLogDO.setRequest(xml);
|
|
httpLogDO.setResponse(response);
|
|
httpLogDO.setResponse(response);
|
|
httpLogDO.setStatus("1");
|
|
httpLogDO.setStatus("1");
|
|
@ -3078,15 +3074,18 @@ public class DsyyEntranceService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通用查询检验报告列表接口
|
|
|
|
|
|
* 检验报告列表接口
|
|
*
|
|
*
|
|
* @param
|
|
* @param
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
public JSONArray selectTestReportList(String idcard,String cardNo,String startTime,String endTime,String reportId,int page,int size) throws Exception {
|
|
public JSONArray selectTestReportList(String idcard,String cardNo,String startTime,String endTime,String reportId,int page,int size) throws Exception {
|
|
String url = "http://10.95.8.41:51221";
|
|
|
|
|
|
String url = "http://10.95.8.41:51225";
|
|
JSONObject data = new JSONObject();
|
|
JSONObject data = new JSONObject();
|
|
JSONArray orders = new JSONArray();
|
|
JSONArray orders = new JSONArray();
|
|
JSONArray condition = new JSONArray();
|
|
JSONArray condition = new JSONArray();
|
|
@ -3095,32 +3094,119 @@ public class DsyyEntranceService {
|
|
data.put("pageSize",size);
|
|
data.put("pageSize",size);
|
|
data.put("pageNo",page);
|
|
data.put("pageNo",page);
|
|
data.put("orders",orders);
|
|
data.put("orders",orders);
|
|
JSONObject item = new JSONObject();
|
|
|
|
|
|
|
|
if (StringUtils.isNoneBlank(idcard)){
|
|
if (StringUtils.isNoneBlank(idcard)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
item.put("column","idcard");
|
|
item.put("column","idcard");
|
|
item.put("type","eq");
|
|
item.put("type","eq");
|
|
item.put("value",idcard);
|
|
item.put("value",idcard);
|
|
condition.add(item);
|
|
condition.add(item);
|
|
}
|
|
}
|
|
if (StringUtils.isNoneBlank(cardNo)){
|
|
if (StringUtils.isNoneBlank(cardNo)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
item.put("column","cardNo");
|
|
item.put("column","cardNo");
|
|
item.put("type","eq");
|
|
item.put("type","eq");
|
|
item.put("value",cardNo);
|
|
item.put("value",cardNo);
|
|
condition.add(item);
|
|
condition.add(item);
|
|
}
|
|
}
|
|
if (StringUtils.isNoneBlank(startTime)){
|
|
if (StringUtils.isNoneBlank(startTime)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
item.put("column","startTime");
|
|
item.put("column","startTime");
|
|
item.put("type","eq");
|
|
|
|
|
|
item.put("type","ge");
|
|
item.put("value",startTime);
|
|
item.put("value",startTime);
|
|
condition.add(item);
|
|
condition.add(item);
|
|
}
|
|
}
|
|
if (StringUtils.isNoneBlank(endTime)){
|
|
if (StringUtils.isNoneBlank(endTime)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
item.put("column","endTime");
|
|
item.put("column","endTime");
|
|
|
|
item.put("type","le");
|
|
|
|
item.put("value",endTime);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(reportId)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","reportId");
|
|
item.put("type","eq");
|
|
item.put("type","eq");
|
|
|
|
item.put("value",reportId);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
data.put("condition",condition);
|
|
|
|
String xml = data.toJSONString();
|
|
|
|
logger.info("xml"+xml);
|
|
|
|
String response = httpClientUtil.postHeadBodyText2(url,xml);
|
|
|
|
logger.info("response===="+response);
|
|
|
|
JSONArray jsonArray =new JSONArray();
|
|
|
|
Object json = JSON.parse(response);
|
|
|
|
if (json instanceof JSONObject) {
|
|
|
|
JSONObject jsonObject = (JSONObject) json;
|
|
|
|
if (jsonObject.getString("code").equalsIgnoreCase("401")){
|
|
|
|
throw new Exception(jsonObject.getString("message"));
|
|
|
|
}
|
|
|
|
} else if (json instanceof JSONArray) {
|
|
|
|
JSONArray array = (JSONArray) json;
|
|
|
|
array = JSONArray.parseArray(response);
|
|
|
|
jsonArray = array;
|
|
|
|
|
|
|
|
}
|
|
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
|
|
httpLogDO.setCode("JHIDS-USD-hlwcxjysju017-018");
|
|
|
|
httpLogDO.setName("检验报告数据");
|
|
|
|
httpLogDO.setRequest(xml);
|
|
|
|
httpLogDO.setResponse(response);
|
|
|
|
httpLogDO.setStatus("1");
|
|
|
|
wlyyHttpLogDao.save(httpLogDO);
|
|
|
|
return jsonArray;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 检查报告列表接口
|
|
|
|
*
|
|
|
|
* @param
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public JSONArray selectInspectReportList(String idcard,String cardNo,String startTime,String endTime,String reportId,int page,int size) throws Exception {
|
|
|
|
String url = "http://10.95.8.41:51225";
|
|
|
|
JSONObject data = new JSONObject();
|
|
|
|
JSONArray orders = new JSONArray();
|
|
|
|
JSONArray condition = new JSONArray();
|
|
|
|
data.put("serverCode","JHIDS-USD-HLWJCJK-019");
|
|
|
|
data.put("sysCode","HLW");
|
|
|
|
data.put("pageSize",size);
|
|
|
|
data.put("pageNo",page);
|
|
|
|
data.put("orders",orders);
|
|
|
|
|
|
|
|
if (StringUtils.isNoneBlank(idcard)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","idcard");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",idcard);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(cardNo)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","cardNo");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",cardNo);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(startTime)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","startTime");
|
|
|
|
item.put("type","ge");
|
|
|
|
item.put("value",startTime);
|
|
|
|
condition.add(item);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(endTime)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
item.put("column","endTime");
|
|
|
|
item.put("type","le");
|
|
item.put("value",endTime);
|
|
item.put("value",endTime);
|
|
condition.add(item);
|
|
condition.add(item);
|
|
}
|
|
}
|
|
if (StringUtils.isNoneBlank(reportId)){
|
|
if (StringUtils.isNoneBlank(reportId)){
|
|
|
|
JSONObject item = new JSONObject();
|
|
item.put("column","reportId");
|
|
item.put("column","reportId");
|
|
item.put("type","eq");
|
|
item.put("type","eq");
|
|
item.put("value",reportId);
|
|
item.put("value",reportId);
|
|
@ -3145,8 +3231,8 @@ public class DsyyEntranceService {
|
|
|
|
|
|
}
|
|
}
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
httpLogDO.setCode("selectEmrInfo");
|
|
|
|
httpLogDO.setName("查下电子病历");
|
|
|
|
|
|
httpLogDO.setCode("JHIDS-USD-HLWJCJK-019");
|
|
|
|
httpLogDO.setName("检查报告数据");
|
|
httpLogDO.setRequest(xml);
|
|
httpLogDO.setRequest(xml);
|
|
httpLogDO.setResponse(response);
|
|
httpLogDO.setResponse(response);
|
|
httpLogDO.setStatus("1");
|
|
httpLogDO.setStatus("1");
|