Initial import.
[openemr.git] / contrib / forms / documents / report.php
blob3830312a20ae2af2d19a70d38f4c12b7aae5b74f
1 <?php
2 # for reporting the files scanned on the forms
3 # this is for scanned docs.
5 include_once("../../globals.php");
6 include_once($GLOBALS["srcdir"]."/api.inc");
10 function documents_report( $pid, $encounter, $cols, $id) {
12 $row = formFetch("form_documents", $id);
14 if ($row) {
15 // render
16 $doc_path=stripslashes ($row['document_path']);
17 $doc_image=stripslashes ($row['document_image']);
18 $doc_source=trim ( stripslashes ($row['document_source']));
19 $doc_description=trim ( stripslashes ($row['document_description']));
20 $doc_date=$row['date'];
21 $doc_date=substr ($doc_date,5,2)."/".substr ($doc_date,8,2)."/".substr ($doc_date,0,4);
23 echo ("<table>");
24 echo ("<tr><td>Document Scanned on: $doc_date</td></tr>");
25 if ($doc_source)
26 echo ("<tr><td>Received from: $doc_source </td></tr>");
27 if ($doc_description)
28 echo ("<tr><td>Description: $doc_description </td></tr>");
29 echo ("<tr><td><img src=\"../../forms/documents/scanned/${pid}/${doc_image}\"></td></tr>");
30 echo ("</table>");
31 // eof render
34 ?>