wr.close();
} catch (IOException ex) {
throw new SiteException("External CDA Query client unavailable", ex);
}
CdaQueryResult cdaQueryResult = new CdaQueryResult();
try {
return cdaQueryResult.parseDocument(conn.getInputStream());
} catch (IOException ex) {
throw new SiteException("Unable to parse CdaQuery result", ex);
}
}