Moved recent v5.0.0 statement fix to current master.
[openemr.git] / interface / patient_file / transaction / record_request.php
blob458f422b6c7b99b9afa909236b0e5a376c27b4f6
1 <?php
2 /**
3 * Patient Records Request.
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Brady Miller <brady.g.miller@gmail.com>
8 * @copyright Copyright (c) 2010-2017 Brady Miller <brady.g.miller@gmail.com>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 require_once("../../globals.php");
14 use OpenEMR\Core\Header;
17 <html>
18 <head>
20 <title><?php echo xlt('Patient Records Request'); ?></title>
22 <?php Header::setupHeader(); ?>
24 <script language="JavaScript">
25 $(document).ready(function() {
26 $("#req_button").click(function() {
27 // hide the button, show the message, and send the ajax call
28 $('#req_button').hide();
29 $('#openreq').show();
30 top.restoreSession();
31 $.post( "../../../library/ajax/amc_misc_data.php",
33 amc_id: "provide_rec_pat_amc",
34 complete: false,
35 mode: "add_force",
36 patient_id: <?php echo attr($pid); ?>
37 });
38 });
39 });
40 </script>
42 </head>
44 <?php // collect data
45 $recordRequest = sqlQuery("SELECT * FROM `amc_misc_data` WHERE `pid`=? AND `amc_id`='provide_rec_pat_amc' AND (`date_completed` IS NULL OR `date_completed`='') ORDER BY `date_created` DESC", array($pid));
48 <body class="body_top">
49 <div class="container">
50 <div class="row">
51 <div class="col-xs-12">
52 <div class="page-header">
53 <h2><?php echo xlt('Patient Records Request'); ?></h2>
54 </div>
55 </div>
56 </div>
57 <div class="row">
58 <div class="col-xs-12">
59 <?php if (empty($recordRequest)) { ?>
60 <a href="javascript:void(0)" id="req_button" class="btn btn-default btn-save"><?php echo xlt('Patient Record Request'); ?></a>
61 <span class="lead" id="openreq" style="display:none"><?php echo xlt('The patient record request has been recorded.'); ?></span>
62 <?php } else { ?>
63 <a href="javascript:void(0)" id="req_button" class="btn btn-default btn-save" style="display:none"><?php echo xlt('Patient Record Request'); ?></a>
64 <span class="lead" id="openreq"><?php echo xlt('There is already an open patient record request.'); ?></span>
65 <?php } ?>
66 </div>
67 </div>
68 </div>
69 </body>
70 </html>