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 <?php
html_header_show(); ?
>
38 <link rel
=stylesheet href
="<?php echo $css_header; ?>" type
="text/css">
39 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.min.css">
43 tr
.head
{ font
-size
:10pt
; background
-color
:#cccccc; text-align:center; }
44 tr
.detail
{ font
-size
:10pt
; background
-color
:#ddddff; }
45 td input
{ background
-color
:transparent
; }
49 <script type
="text/javascript" src
="../../library/textformat.js?v=<?php echo $v_js_includes; ?>"></script
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-1-7-2/jquery.min.js"></script
>
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker/build/jquery.datetimepicker.full.min.js"></script
>
53 <script language
="JavaScript">
55 function myRestoreSession() {
56 if (top
.restoreSession
) top
.restoreSession(); else opener
.top
.restoreSession();
61 var f
= document
.forms
[0];
66 function openPatient() {
68 opener
.top
.RTop
.document
.location
.href
= '../patient_file/summary/demographics.php?set_pid=<?php echo attr($ptid); ?>';
71 $
(document
).ready(function() {
72 $
('.datepicker').datetimepicker({
73 <?php
$datetimepicker_timepicker = false; ?
>
74 <?php
$datetimepicker_showseconds = false; ?
>
75 <?php
$datetimepicker_formatInput = true; ?
>
76 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
77 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
79 $
('.datetimepicker').datetimepicker({
80 <?php
$datetimepicker_timepicker = true; ?
>
81 <?php
$datetimepicker_showseconds = false; ?
>
82 <?php
$datetimepicker_formatInput = true; ?
>
83 <?php
require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?
>
84 <?php
// can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
91 <body
class="body_top">
95 echo " -->\n"; // debugging ?>
99 <form method
='post' action
='lbf_form.php' onsubmit
='return validate()'>
101 <table width
='100%' cellpadding
='1' cellspacing
='2'>
103 <th align
='left'><?php
echo xlt('Field'); ?
></th
>
104 <th align
='left'><?php
echo xlt('Value'); ?
></th
>
108 foreach ($result['fields'] as $field_id => $newvalue) {
109 if (is_array($newvalue)) {
111 foreach ($newvalue as $value) {
122 $newvalue = trim($newvalue);
123 $field_title = $result['labels'][$field_id];
124 echo " <tr class='detail'>\n";
125 echo " <td class='bold'>" . text($field_title) . "</td>\n";
127 echo text($newvalue);
136 <input type
='button' value
='<?php echo xla('Open Patient
'); ?>' onclick
="openPatient()" />
138 <input type
='button' value
='<?php echo xla('Back
'); ?>' onclick
="myRestoreSession();location='list_requests.php'" />