2 require_once(dirname(__FILE__
) . "/../interface/globals.php");
3 require_once(dirname(__FILE__
) . "/../library/classes/Document.class.php");
6 $document_id = $_GET['doc_id'];
7 $d = new Document($document_id);
9 $url = preg_replace("|^(.*)://|","",$url);
10 $from_all = explode("/",$url);
11 $from_filename = array_pop($from_all);
12 $from_patientid = array_pop($from_all);
13 $temp_url = $GLOBALS['OE_SITE_DIR'] . '/documents/' . $from_patientid . '/' . $from_filename;
14 if (!file_exists($temp_url)) {
15 echo xl('The requested document is not present at the expected location on the filesystem or there are not sufficient permissions to access it.','','',' ') . $temp_url;
19 $xml = fread($f,filesize($url));
22 $xmlDom = new DOMDocument();
23 $xmlDom->loadXML($xml);
24 $ss = new DOMDocument();
25 $ss->load(dirname(__FILE__
).'/stylesheet/ccr.xsl');
26 $proc = new XSLTProcessor();
27 $proc->importStylesheet($ss);
28 $s_html = $proc->transformToXML($xmlDom);
31 $xmlDom = new DOMDocument();
32 $xmlDom->loadXML($xml);
33 $ss = new DOMDocument();
34 $ss->load(dirname(__FILE__
).'/stylesheet/cda.xsl');
35 $xslt = new XSLTProcessor();
36 $xslt->importStyleSheet($ss);
37 $html = $xslt->transformToXML($xmlDom);