|
@ -3078,6 +3078,85 @@ public class DsyyEntranceService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 通用查询检验报告列表接口
|
|
|
|
*
|
|
|
|
* @param serverCode
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public JSONArray selectTestReportList(String serverCode,String idcard,String cardNo,String startTime,String endTime,String reportId,int page,int size) throws Exception {
|
|
|
|
String url = "HTTP://10.95.8.41:51221";
|
|
|
|
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);
|
|
|
|
JSONObject item = new JSONObject();
|
|
|
|
if (StringUtils.isNoneBlank(idcard)){
|
|
|
|
item.put("column","idcard");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",idcard);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(cardNo)){
|
|
|
|
item.put("column","cardNo");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",cardNo);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(startTime)){
|
|
|
|
item.put("column","startTime");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",startTime);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(endTime)){
|
|
|
|
item.put("column","endTime");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",endTime);
|
|
|
|
}
|
|
|
|
if (StringUtils.isNoneBlank(reportId)){
|
|
|
|
item.put("column","reportId");
|
|
|
|
item.put("type","eq");
|
|
|
|
item.put("value",reportId);
|
|
|
|
}
|
|
|
|
data.put("condition",condition);
|
|
|
|
String xml = data.toJSONString();
|
|
|
|
logger.info("xml"+xml);
|
|
|
|
String response = httpClientUtil.postHeadBodyText(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);
|
|
|
|
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;
|
|
|
|
|
|
|
|
}
|
|
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
|
|
httpLogDO.setCode("selectEmrInfo");
|
|
|
|
httpLogDO.setName("查下电子病历");
|
|
|
|
httpLogDO.setRequest(xml);
|
|
|
|
httpLogDO.setResponse(response);
|
|
|
|
httpLogDO.setStatus("1");
|
|
|
|
wlyyHttpLogDao.save(httpLogDO);
|
|
|
|
return jsonArray;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String dzblIcd10Save(String prescriptionId)throws Exception{
|
|
public String dzblIcd10Save(String prescriptionId)throws Exception{
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).get();
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).get();
|
|
if (prescriptionDO==null){
|
|
if (prescriptionDO==null){
|