4 * Patient disclosures main screen.
6 * Copyright (C) Visolve <vicareplus_engg@visolve.com>
7 * Copyright (C) 2017 Brady Miller <brady.g.miller@gmail.com>
9 * LICENSE: This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
21 * @author Visolve <vicareplus_engg@visolve.com>
22 * @author Brady Miller <brady@sparmy.com>
23 * @link http://www.open-emr.org
27 //SANITIZE ALL ESCAPES
28 $sanitize_all_escapes=true;
31 //STOP FAKE REGISTER GLOBALS
32 $fake_register_globals=false;
36 require_once("../../globals.php");
37 require_once("$srcdir/options.inc.php");
39 //if the edit button for editing disclosure is set.
40 if (isset($_GET['editlid']))
42 $editlid=$_GET['editlid'];
47 <link rel
='stylesheet' href
="<?php echo $css_header;?>" type
="text/css">
48 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
50 <!-- supporting javascript code
-->
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-min-3-1-1/index.js"></script
>
52 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js"></script
>
54 <script type
="text/javascript">
55 //function to validate fields in record disclosure page
58 if (document
.forms
[0].dates
.value
.length
<=0)
60 {document
.forms
[0].dates
.focus();document
.forms
[0].dates
.style
.backgroundColor
="red";
62 else if (document
.forms
[0].recipient_name
.value
.length
<=0)
64 document
.forms
[0].dates
.style
.backgroundColor
="white";
65 document
.forms
[0].recipient_name
.focus();document
.forms
[0].recipient_name
.style
.backgroundColor
="red";
67 else if (document
.forms
[0].desc_disc
.value
.length
<=0)
69 document
.forms
[0].recipient_name
.style
.backgroundColor
="white";
70 document
.forms
[0].desc_disc
.focus();document
.forms
[0].desc_disc
.style
.backgroundColor
="red";
72 else if (document
.forms
[0].dates
.value
.length
>0 && document
.forms
[0].recipient_name
.value
.length
>0 && document
.forms
[0].desc_disc
.value
.length
>0)
75 document
.forms
[0].submit();
79 $
(document
).ready(function() {
80 $
('.datepicker').datetimepicker({
81 <?php
$datetimepicker_timepicker = true; ?
>
82 <?php
$datetimepicker_formatInput = false; ?
>
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 ?>
90 <body
class="body_top">
91 <div id
="record-disclosure" style
='float: left; margin-right: 10px' >
92 <div style
='float: left; margin-right: 5px'><?php
if($editlid) {?
><!--Edit the disclosures
-->
93 <span
class="title"><?php
echo htmlspecialchars(xl('Edit Disclosure'),ENT_NOQUOTES
); ?
></span
><?php
}
94 else {?
> <span
class="title"><?php
echo htmlspecialchars(xl('Record Disclosure'),ENT_NOQUOTES
); ?
></span
><?php
}?
>
96 <div
><a onclick
="return submitform()" class="css_button large_button"
97 name
='form_save' id
='form_save' href
='#'> <span
98 class='css_button_span large_button_span'><?php
echo htmlspecialchars(xl('Save'),ENT_NOQUOTES
);?
></span
>
100 <div
><a
class="css_button large_button" id
='cancel'
101 href
='disclosure_full.php' target
='_parent' onclick
='top.restoreSession()'> <span
102 class='css_button_span large_button_span'><?php
echo htmlspecialchars(xl('Cancel'),ENT_NOQUOTES
);?
></span
>
105 <form NAME
="disclosure_form" METHOD
="POST" ACTION
="disclosure_full.php" target
='_parent' onsubmit
='return top.restoreSession()'>
106 <input type
=hidden name
=mode value
="disclosure">
107 <table border
=0 cellpadding
=3 cellspacing
=0 align
='center'>
110 <td
><span
class='text'><?php
echo htmlspecialchars(xl('Date'),ENT_NOQUOTES
); ?
>:</span
></td
>
111 <td
><!--retrieve disclosures from extended_log table
for modifications
-->
114 $dres=sqlQuery("select date,recipient,description,event from extended_log where id=?", array($editlid) );
115 $description=$dres{"description"};
116 $app_event=$dres{"event"};
117 $disc_date=$dres{"date"};
118 $recipient_name=$dres{"recipient"};
120 <input type
=hidden name
=disclosure_id value
="<?php echo htmlspecialchars($editlid,ENT_QUOTES); ?>">
121 <input type
=hidden name
=updatemode value
="disclosure_update">
122 <input type
='entry' size
='20' class='datepicker' name
='dates' id
='dates' value
='<?php echo htmlspecialchars($disc_date,ENT_QUOTES);?>' style
="background-color:white"/> 
; <?php
125 ?
> <input type
='entry' size
='20' class='datepicker' name
='dates' id
='dates' value
='' style
="background-color:white"/> 
;
130 <td
><span
class=text
><?php
echo htmlspecialchars(xl('Type of Disclosure'),ENT_NOQUOTES
); ?
>: </span
></TD
>
131 <td
><?php
if($editlid)
133 //To incorporate the disclosure types into the list_options listings
134 generate_form_field(array('data_type'=>1,'field_id'=>'disclosure_type','list_id'=>'disclosure_type','fld_length'=>'10','max_length'=>'63','empty_title'=>'SKIP'), $app_event);}
136 //To incorporate the disclosure types into the list_options listings
137 generate_form_field(array('data_type'=>1,'field_id'=>'disclosure_type','list_id'=>'disclosure_type','fld_length'=>'10','max_length'=>'63','empty_title'=>'SKIP'), $title);
142 <td
><span
class=text
><?php
echo htmlspecialchars(xl('Recipient of the Disclosure'),ENT_NOQUOTES
); ?
>:
147 ?
> <input type
=entry name
=recipient_name size
=20 value
="<?php echo htmlspecialchars($recipient_name,ENT_QUOTES); ?>"></td
>
151 <input type
=entry name
=recipient_name size
=20 value
="">
158 <span
class=text
><?php
echo htmlspecialchars(xl('Description of the Disclosure'),ENT_NOQUOTES
); ?
>:</span
></td
>
163 <textarea name
=desc_disc wrap
=auto rows
=4 cols
=30><?php
echo htmlspecialchars($description,ENT_NOQUOTES
); ?
></textarea
>
167 <td
><textarea name
=desc_disc wrap
=auto rows
=4 cols
=30></textarea
><?php
}?
>