|
@ -3008,6 +3008,72 @@ public class DsyyEntranceService {
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 通用查询检查、检验报告详情接口
|
|
|
*
|
|
|
* @param serverCode
|
|
|
* @param patientId
|
|
|
* @param visitNo
|
|
|
* @return
|
|
|
* @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" +
|
|
|
"}";
|
|
|
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{
|
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(prescriptionId).get();
|
|
|
if (prescriptionDO==null){
|