3 * LBF form handling for the WordPress Patient Portal.
6 * @link http://www.open-emr.org
7 * @author Rod Roark <rod@sunsetsystems.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2014 Rod Roark <rod@sunsetsystems.com>
10 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 require_once("../globals.php");
16 require_once("$srcdir/patient.inc");
17 require_once("$srcdir/options.inc.php");
18 require_once("portal.inc.php");
20 $postid = intval($_REQUEST['postid']);
22 // Get the portal request data.
24 die(xlt('Request ID is missing!'));
27 $result = cms_portal_call(array('action' => 'getpost', 'postid' => $postid));
28 if ($result['errmsg']) {
29 die(text($result['errmsg']));
32 // Look up the patient in OpenEMR.
33 $ptid = lookup_openemr_patient($result['post']['user']);
37 <link rel
=stylesheet href
="<?php echo $css_header; ?>" type
="text/css">
38 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.min.css">
42 tr
.head
{ font
-size
:10pt
; background
-color
:#cccccc; text-align:center; }
43 tr
.detail
{ font
-size
:10pt
; background
-color
:#ddddff; }
44 td input
{ background
-color
:transparent
; }
48 <script type
="text/javascript" src
="../../library/textformat.js?v=<?php echo $v_js_includes; ?>"></script
>
49 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-1-7-2/jquery.min.js"></script
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script
>
52 <script language
="JavaScript">
54 function myRestoreSession() {
55 if (top
.restoreSession
) top
.restoreSession(); else opener
.top
.restoreSession();
60 var f
= document
.forms
[0];
65 function openPatient() {
67 opener
.top
.RTop
.document
.location
.href
= '../patient_file/summary/demographics.php?set_pid=<?php echo attr($ptid); ?>';
71 $
('.datepicker').datetimepicker({
72 <?php
$datetimepicker_timepicker = false; ?
>
73 <?php
$datetimepicker_showseconds = false; ?
>
74 <?php
$datetimepicker_formatInput = true; ?
>
75 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
76 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
78 $
('.datetimepicker').datetimepicker({
79 <?php
$datetimepicker_timepicker = true; ?
>
80 <?php
$datetimepicker_showseconds = false; ?
>
81 <?php
$datetimepicker_formatInput = true; ?
>
82 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
83 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
90 <body
class="body_top">
94 echo " -->\n"; // debugging ?>
98 <form method
='post' action
='lbf_form.php' onsubmit
='return validate()'>
100 <table width
='100%' cellpadding
='1' cellspacing
='2'>
102 <th align
='left'><?php
echo xlt('Field'); ?
></th
>
103 <th align
='left'><?php
echo xlt('Value'); ?
></th
>
107 foreach ($result['fields'] as $field_id => $newvalue) {
108 if (is_array($newvalue)) {
110 foreach ($newvalue as $value) {
121 $newvalue = trim($newvalue);
122 $field_title = $result['labels'][$field_id];
123 echo " <tr class='detail'>\n";
124 echo " <td class='bold'>" . text($field_title) . "</td>\n";
126 echo text($newvalue);
135 <input type
='button' value
='<?php echo xla('Open Patient
'); ?>' onclick
="openPatient()" />
137 <input type
='button' value
='<?php echo xla('Back
'); ?>' onclick
="myRestoreSession();location='list_requests.php'" />