4 * Patient disclosures main screen.
6 * Copyright (C) Visolve <vicareplus_engg@visolve.com>
8 * LICENSE: This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
20 * @author Visolve <vicareplus_engg@visolve.com>
21 * @author Brady Miller <brady@sparmy.com>
22 * @link http://www.open-emr.org
26 //SANITIZE ALL ESCAPES
27 $sanitize_all_escapes=true;
30 //STOP FAKE REGISTER GLOBALS
31 $fake_register_globals=false;
35 require_once("../../globals.php");
36 require_once("$srcdir/sql.inc");
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 <!-- supporting javascript code
-->
49 <style type
="text/css">@import
url(<?php
echo $GLOBALS['webroot'] ?
>/library
/dynarch_calendar
.css
);</style
>
50 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.js"></script
>
51 <?php
include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); ?
>
52 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar_setup.js"></script
>
53 <script type
="text/javascript">
54 //function to validate fields in record disclosure page
57 if (document
.forms
[0].dates
.value
.length
<=0)
59 {document
.forms
[0].dates
.focus();document
.forms
[0].dates
.style
.backgroundColor
="red";
61 else if (document
.forms
[0].recipient_name
.value
.length
<=0)
63 document
.forms
[0].dates
.style
.backgroundColor
="white";
64 document
.forms
[0].recipient_name
.focus();document
.forms
[0].recipient_name
.style
.backgroundColor
="red";
66 else if (document
.forms
[0].desc_disc
.value
.length
<=0)
68 document
.forms
[0].recipient_name
.style
.backgroundColor
="white";
69 document
.forms
[0].desc_disc
.focus();document
.forms
[0].desc_disc
.style
.backgroundColor
="red";
71 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)
74 document
.forms
[0].submit();
79 <body
class="body_top">
80 <div style
='float: left; margin-right: 10px'>
81 <div style
='float: left; margin-right: 5px'><?php
if($editlid) {?
><!--Edit the disclosures
-->
82 <span
class="title"><?php
echo htmlspecialchars(xl('Edit Disclosure'),ENT_NOQUOTES
); ?
></span
><?php
}
83 else {?
> <span
class="title"><?php
echo htmlspecialchars(xl('Record Disclosure'),ENT_NOQUOTES
); ?
></span
><?php
}?
>
85 <div
><a onclick
="return submitform()" class="css_button large_button"
86 name
='form_save' id
='form_save' href
='#'> <span
87 class='css_button_span large_button_span'><?php
echo htmlspecialchars(xl('Save'),ENT_NOQUOTES
);?
></span
>
89 <div
><a
class="css_button large_button" id
='cancel'
90 href
='disclosure_full.php' target
='_parent' onclick
='top.restoreSession()'> <span
91 class='css_button_span large_button_span'><?php
echo htmlspecialchars(xl('Cancel'),ENT_NOQUOTES
);?
></span
>
94 <form NAME
="disclosure_form" METHOD
="POST" ACTION
="disclosure_full.php" target
='_parent' onsubmit
='return top.restoreSession()'>
95 <input type
=hidden name
=mode value
="disclosure">
96 <table border
=0 cellpadding
=3 cellspacing
=0 align
='center'>
99 <td
><span
class='text'><?php
echo htmlspecialchars(xl('Date'),ENT_NOQUOTES
); ?
>:</span
></td
>
100 <td
><!--retrieve disclosures from extended_log table
for modifications
-->
103 $dres=sqlQuery("select date,recipient,description,event from extended_log where id=?", array($editlid) );
104 $description=$dres{"description"};
105 $app_event=$dres{"event"};
106 $disc_date=$dres{"date"};
107 $recipient_name=$dres{"recipient"};
109 <input type
=hidden name
=disclosure_id value
="<?php echo htmlspecialchars($editlid,ENT_QUOTES); ?>">
110 <input type
=hidden name
=updatemode value
="disclosure_update">
111 <input type
='entry' size
='20' name
='dates' id
='dates' readonly
='readonly' value
='<?php echo htmlspecialchars($disc_date,ENT_QUOTES);?>' style
="background-color:white"/> 
; <?php
114 ?
> <input type
='entry' size
='20' name
='dates' id
='dates' value
='' readonly
="readonly" style
="background-color:white"/> 
;
117 <!-- image
for date
/time picker
-->
118 <img src
="../../../interface/pic/show_calendar.gif" id
="img_date"
119 width
="24" height
="22" align
="absbottom" style
="cursor: pointer;"
120 title
="<?php echo htmlspecialchars(xl('Date selector'),ENT_QUOTES);?>" /></td
>
121 <script type
="text/javascript">
122 Calendar
.setup({inputField
:'dates', ifFormat
:'%Y-%m-%d %H:%M:%S',
123 button
:'img_date', showsTime
:true});
127 <td
><span
class=text
><?php
echo htmlspecialchars(xl('Type of Disclosure'),ENT_NOQUOTES
); ?
>: </span
></TD
>
128 <td
><?php
if($editlid)
130 //To incorporate the disclosure types into the list_options listings
131 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);}
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'), $title);
139 <td
><span
class=text
><?php
echo htmlspecialchars(xl('Recipient of the Disclosure'),ENT_NOQUOTES
); ?
>:
144 ?
> <input type
=entry name
=recipient_name size
=20 value
="<?php echo htmlspecialchars($recipient_name,ENT_QUOTES); ?>"></td
>
148 <input type
=entry name
=recipient_name size
=20 value
="">
155 <span
class=text
><?php
echo htmlspecialchars(xl('Description of the Disclosure'),ENT_NOQUOTES
); ?
>:</span
></td
>
160 <textarea name
=desc_disc wrap
=auto rows
=4 cols
=30><?php
echo htmlspecialchars($description,ENT_NOQUOTES
); ?
></textarea
>
164 <td
><textarea name
=desc_disc wrap
=auto rows
=4 cols
=30></textarea
><?php
}?
>