3 * LBF form handling for the WordPress Patient Portal.
5 * LICENSE: This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @author Rod Roark <rod@sunsetsystems.com>
20 $sanitize_all_escapes = true;
21 $fake_register_globals = false;
23 require_once("../globals.php");
24 require_once("$srcdir/patient.inc");
25 require_once("$srcdir/formdata.inc.php");
26 require_once("$srcdir/options.inc.php");
27 require_once("portal.inc.php");
29 $postid = intval($_REQUEST['postid']);
31 // Get the portal request data.
32 if (!$postid) die(xlt('Request ID is missing!'));
33 $result = cms_portal_call(array('action' => 'getpost', 'postid' => $postid));
34 if ($result['errmsg']) {
35 die(text($result['errmsg']));
38 // Look up the patient in OpenEMR.
39 $ptid = lookup_openemr_patient($result['post']['user']);
43 <?php
html_header_show(); ?
>
44 <link rel
=stylesheet href
="<?php echo $css_header; ?>" type
="text/css">
46 <style type
="text/css">@import
url(../../library
/dynarch_calendar
.css
);</style
>
49 tr
.head
{ font
-size
:10pt
; background
-color
:#cccccc; text-align:center; }
50 tr
.detail
{ font
-size
:10pt
; background
-color
:#ddddff; }
51 td input
{ background
-color
:transparent
; }
55 <script type
="text/javascript" src
="../../library/textformat.js"></script
>
56 <script type
="text/javascript" src
="../../library/dynarch_calendar.js"></script
>
57 <?php
include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?
>
58 <script type
="text/javascript" src
="../../library/dynarch_calendar_setup.js"></script
>
59 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-1-2-2/index.js"></script
>
61 <script language
="JavaScript">
63 var mypcc
= '<?php echo $GLOBALS['phone_country_code
'] ?>';
65 function myRestoreSession() {
66 if (top
.restoreSession
) top
.restoreSession(); else opener
.top
.restoreSession();
71 var f
= document
.forms
[0];
76 function openPatient() {
78 opener
.top
.RTop
.document
.location
.href
= '../patient_file/summary/demographics.php?set_pid=<?php echo attr($ptid); ?>';
84 <body
class="body_top">
86 <?php
echo "<!-- "; print_r($result); echo " -->\n"; // debugging ?>
90 <form method
='post' action
='lbf_form.php' onsubmit
='return validate()'>
92 <table width
='100%' cellpadding
='1' cellspacing
='2'>
94 <th align
='left'><?php
echo xlt('Field'); ?
></th
>
95 <th align
='left'><?php
echo xlt('Value'); ?
></th
>
99 foreach ($result['fields'] as $field_id => $newvalue) {
100 if (is_array($newvalue)) {
102 foreach ($newvalue as $value) {
103 if ($tmp !== '') $tmp .= ', ';
108 $newvalue = trim($newvalue);
109 $field_title = $result['labels'][$field_id];
110 echo " <tr class='detail'>\n";
111 echo " <td class='bold'>" . text($field_title) . "</td>\n";
113 echo text($newvalue);
122 <input type
='button' value
='<?php echo xla('Open Patient
'); ?>' onclick
="openPatient()" />
124 <input type
='button' value
='<?php echo xla('Back
'); ?>' onclick
="myRestoreSession();location='list_requests.php'" />
129 <script language
="JavaScript">