|
|
|
@ -14,6 +14,7 @@ import com.docus.server.common.service.RemoteCallResultService;
|
|
|
|
|
import com.docus.server.report.api.ShunDePeopleService;
|
|
|
|
|
import com.docus.server.report.api.dto.*;
|
|
|
|
|
import com.docus.server.report.api.vo.SdRyBloodReportVO;
|
|
|
|
|
import com.docus.server.report.api.vo.SdRyLiangBiaoReportVO;
|
|
|
|
|
import com.docus.server.report.client.JaxWsDynamicClient;
|
|
|
|
|
import com.docus.server.report.config.SdRyReportQueryConfig;
|
|
|
|
|
import com.docus.server.report.job.ReportJob;
|
|
|
|
@ -148,7 +149,7 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
|
|
|
|
|
String[] param = {functionName, inputString, functionType, caller};
|
|
|
|
|
|
|
|
|
|
RemoteCallResult remoteCallResult = new RemoteCallResult();
|
|
|
|
|
remoteCallResult.setUrl(url+" | "+namespaceUri+" | "+operationName);
|
|
|
|
|
remoteCallResult.setUrl(url + " | " + namespaceUri + " | " + operationName);
|
|
|
|
|
remoteCallResult.setRequest(Arrays.toString(param));
|
|
|
|
|
remoteCallResult.setDescription("根据检查流水和报告序列号,指定要获取的报告,PACS将生成PDF格式的报告,并将PDF文件的BASE64编码串返回。");
|
|
|
|
|
remoteCallResult.setKeyword(examNo + "_" + reportNo);
|
|
|
|
@ -163,7 +164,7 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
|
|
|
|
|
}
|
|
|
|
|
remoteCallResult.setCallStatus(1);
|
|
|
|
|
String base64 = reportJob.parsePacsGetBase64(result);
|
|
|
|
|
if(Func.isBlank(base64)){
|
|
|
|
|
if (Func.isBlank(base64)) {
|
|
|
|
|
remoteCallResult.setRemark("查询base64结果为空!");
|
|
|
|
|
remoteCallResult.setCallStatus(3);
|
|
|
|
|
}
|
|
|
|
@ -171,7 +172,7 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
|
|
|
|
|
remoteCallResult.setCallEndTime(new Date());
|
|
|
|
|
try {
|
|
|
|
|
remoteCallResultService.save(remoteCallResult);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
@ -184,7 +185,7 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
|
|
|
|
|
remoteCallResult.setCallEndTime(new Date());
|
|
|
|
|
try {
|
|
|
|
|
remoteCallResultService.save(remoteCallResult);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
@ -194,11 +195,6 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
SdNurseInsertSugarRequest request = new SdNurseInsertSugarRequest("10086", "1", "nur");
|
|
|
|
|
String requestParam = Func.toJson(request);
|
|
|
|
|
System.out.println(requestParam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public SdNurseInsertSugarResponse getNurseInsertSugarReport(SdNurseInsertSugarRequest request) {
|
|
|
|
@ -255,6 +251,61 @@ public class ShunDePeopleServiceImpl implements ShunDePeopleService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<SdRyLiangBiaoReportVO> getLinagBiaoReport(String inpatientNo, String beginDate, String endDate) {
|
|
|
|
|
String randomUuid = Func.randomUUID();
|
|
|
|
|
String param = "<Root>\n" +
|
|
|
|
|
"\t\t <FunCode>lbGetReport</FunCode>\n" +
|
|
|
|
|
"\t\t <patientid>" + inpatientNo + "</patientid>\n" +
|
|
|
|
|
"\t\t <begin_date>" + beginDate + "</begin_date>\n" +
|
|
|
|
|
"\t\t <end_date>" + endDate + "</end_date>\n" +
|
|
|
|
|
"\t </Root>";
|
|
|
|
|
Object[] params = {param};
|
|
|
|
|
String url = sdRyReportQueryConfig.getLiangbiaoUrl();
|
|
|
|
|
String operationName = "GetHisData";
|
|
|
|
|
try {
|
|
|
|
|
log.info("[" + randomUuid + "] " + "获取量表报告地址:" + url + "参数:" + param);
|
|
|
|
|
String result = JaxWsDynamicClient.send(url, null, operationName, params);
|
|
|
|
|
log.info("[" + randomUuid + "] " + "获取量表报告结果:" + result);
|
|
|
|
|
return parseLiangBiaoResult(result);
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
log.error("[" + randomUuid + "] " + "获取量表报告出错了," + ex.getMessage(), ex);
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static List<SdRyLiangBiaoReportVO> parseLiangBiaoResult(String result) {
|
|
|
|
|
XmlUtil xmlUtil = XmlUtil.of(result);
|
|
|
|
|
Node node = xmlUtil.getNode("/Root/error_code");
|
|
|
|
|
String errorCode = node.getTextContent();
|
|
|
|
|
boolean success = "0".equals(errorCode);
|
|
|
|
|
if (!success) {
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
}
|
|
|
|
|
NodeList reportNodeList = xmlUtil.getNodeList("/Root/ResultData/Row");
|
|
|
|
|
int length = reportNodeList.getLength();
|
|
|
|
|
if (length <= 0) {
|
|
|
|
|
return new ArrayList<>();
|
|
|
|
|
}
|
|
|
|
|
List<SdRyLiangBiaoReportVO> list = new ArrayList<>();
|
|
|
|
|
for (int i = 0; i < length; i++) {
|
|
|
|
|
SdRyLiangBiaoReportVO vo = new SdRyLiangBiaoReportVO();
|
|
|
|
|
Node item = reportNodeList.item(i);
|
|
|
|
|
NodeList childNodes = item.getChildNodes();
|
|
|
|
|
int childNodesLength = childNodes.getLength();
|
|
|
|
|
for (int j = 0; j < childNodesLength; j++) {
|
|
|
|
|
Node childNode = childNodes.item(j);
|
|
|
|
|
if ("PDFUrl".equals(childNode.getNodeName())) {
|
|
|
|
|
String pdfUrl = childNode.getTextContent();
|
|
|
|
|
vo.setFileUrl(pdfUrl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
list.add(vo);
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String organizationQuerySdRyInspectReportUrl(String reportQueryLisUrl) {
|
|
|
|
|
return reportQueryLisUrl + "/query?uuid=" + IdUtil.standardUUID() +
|
|
|
|
|
"&action=" + sdRyReportQueryConfig.getReportQueryInspectAction() +
|
|
|
|
|