added new datepicker to amendments gui
[openemr.git] / interface / de_identification_forms / re_identification_input_screen.php
blob67f491105113eec8e496763b84f3cddb0b0cb8ff
1 <?php
2 /********************************************************************************\
3 * Copyright (C) ViCarePlus, Visolve (vicareplus_engg@visolve.com) *
4 * *
5 * 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 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18 \********************************************************************************/
19 require_once("../globals.php");
20 require_once("$srcdir/lists.inc");
21 require_once("$srcdir/patient.inc");
22 require_once("$srcdir/acl.inc");
23 require_once("$srcdir/options.inc.php");
25 <html>
26 <head>
27 <title><?php xl('Re Identification','e'); ?></title>
28 <link rel="stylesheet" href='<?php echo $css_header ?>' type='text/css'>
29 <link rel="stylesheet"
30 href='<?php echo $GLOBALS['webroot'] ?>/library/dynarch_calendar.css'
31 type='text/css'>
33 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $v_js_includes; ?>"></script>
35 <style type="text/css">
36 .style1 {
37 text-align: center;
39 </style>
40 <script language="JavaScript">
41 function form_validate()
44 if(document.forms[0].re_id_code.value == "undefined" || document.forms[0].re_id_code.value == "")
46 alert("<?php echo xl('Enter the Re Identification code');?>");
47 return false;
49 top.restoreSession();
50 return true;
53 function download_file()
55 alert("<?php echo xl('Re-identification files will be saved in'); echo ' `'.$GLOBALS['temporary_files_dir'].'` '; echo xl('location of the openemr machine and may contain sensitive data, so it is recommended to manually delete the files after its use');?>");
56 document.re_identification.submit();
59 </script>
60 </head>
61 <body class="body_top">
62 <strong><?php xl('Re Identification','e'); ?></strong>
63 <div id="overDiv"
64 style="position: absolute; visibility: hidden; z-index: 1000;"></div>
65 <form name="re_identification" enctype="Re_identification_ip_single_code"
66 action="re_identification_op_single_patient.php" method="POST" onsubmit="return form_validate();"><?php
67 $row = sqlQuery("SHOW TABLES LIKE 'de_identification_status'");
68 if (empty($row))
71 <table> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr>
72 <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr>
73 </table>
74 <table class="de_identification_status_message" align="center" >
75 <tr valign="top">
76 <td>&nbsp;</td>
77 <td rowspan="3">
78 <br>
79 <?php echo xl('Please upgrade OpenEMR Database to include De Identification procedures, function, tables'); ?>
80 </br></br><a target="Blank" href="../../contrib/util/de_identification_upgrade.php"><?php echo xl('Click here');?></a>
81 <?php echo xl('to run');
82 echo " de_identification_upgrade.php</br>";?><br>
83 </td>
84 <td>&nbsp;</td>
85 </tr>
86 <tr>
87 <td>&nbsp;</td>
88 <td>&nbsp;</td>
89 </tr>
90 <tr>
91 <td>&nbsp;</td>
92 <td>&nbsp;</td>
93 </tr>
94 </table>
95 <?php
97 else {
98 $query = "select status from re_identification_status";
99 $res = sqlStatement($query);
100 if ($row = sqlFetchArray($res))
102 $reIdentificationStatus = addslashes($row['status']);
103 /* $reIdentificationStatus:
104 * 0 - There is no Re Identification in progress. (start new Re Identification process)
105 * 1 - A Re Identification process is currently in progress.
106 * 2 - The Re Identification process completed and xls file is ready to download
110 if($reIdentificationStatus == 1)
112 //1 - A Re Identification process is currently in progress
114 <table>
115 <tr>
116 <td>&nbsp;</td>
117 <td>&nbsp;</td>
118 </tr>
119 <tr>
120 <td>&nbsp;</td>
121 <td>&nbsp;</td>
122 </tr>
123 </table>
124 <table class="de_identification_status_message" align="center">
125 <tr valign="top">
126 <td>&nbsp;</td>
127 <td rowspan="3"><br>
128 <?php echo xl('Re Identification Process is ongoing');
129 echo "</br></br>";
130 echo xl('Please visit Re Identification screen after some time');
131 echo "</br>"; ?> <br>
132 </td>
133 <td>&nbsp;</td>
134 </tr>
135 <tr>
136 <td>&nbsp;</td>
137 <td>&nbsp;</td>
138 </tr>
139 <tr>
140 <td>&nbsp;</td>
141 <td>&nbsp;</td>
142 </tr>
143 </table>
144 <?php
146 else if($reIdentificationStatus == 0)
148 //0 - There is no Re Identification in progress. (start new Re Identification process)
150 <center></br>
151 </br>
152 <?php xl('Enter the Re Identification code','e'); ?> <input
153 type='text' size='50' name='re_id_code' id='re_id_code'
154 title='<?php xl('Enter the Re Identification code','e'); ?>' /> </br>
155 </br>
156 <Input type="Submit" Name="Submit" Value=<?php echo xl("submit");?>></center>
157 <?php
159 else if($reIdentificationStatus == 2)
161 //2 - The Re Identification process completed and xls file is ready to download
162 $query = "SELECT count(*) as count FROM re_identified_data ";
163 $res = sqlStatement($query);
164 if ($row = sqlFetchArray($res))
166 $no_of_items = addslashes($row['count']);
168 if($no_of_items <= 1)
170 //start new search - no patient record fount
171 $query = "update re_identification_status set status = 0";
172 $res = sqlStatement($query);
174 <table>
175 <tr>
176 <td>&nbsp;</td>
177 <td>&nbsp;</td>
178 </tr>
179 <tr>
180 <td>&nbsp;</td>
181 <td>&nbsp;</td>
182 </tr>
183 </table>
184 <table class="de_identification_status_message" align="center">
185 <tr valign="top">
186 <td>&nbsp;</td>
187 <td rowspan="3"><br>
188 <?php echo xl('No Patient record found for the given Re Identification code');
189 echo "</br></br>";
190 echo xl('Please enter the correct Re Identification code');
191 echo "</br>"; ?> </br>
192 </td>
193 <td>&nbsp;</td>
194 </tr>
195 <tr>
196 <td>&nbsp;</td>
197 <td>&nbsp;</td>
198 </tr>
199 <tr>
200 <td>&nbsp;</td>
201 <td>&nbsp;</td>
202 </tr>
203 </table>
204 <table align="center">
205 <tr>
206 <td>&nbsp;</td>
207 <td>&nbsp;</td>
208 </tr>
209 </table>
211 <?php
213 else {
215 <table>
216 <tr>
217 <td>&nbsp;</td>
218 <td>&nbsp;</td>
219 </tr>
220 <tr>
221 <td>&nbsp;</td>
222 <td>&nbsp;</td>
223 </tr>
224 </table>
225 <table class="de_identification_status_message"" align="center">
226 <tr valign="top">
227 <td>&nbsp;</td>
228 <td rowspan="3"><br>
229 <?php echo xl('Re Identification Process is completed');
230 echo "</br></br>";
231 echo xl('Please Click download button to download the Re Identified data');
232 echo "</br>"; ?> <br>
233 </td>
234 <td>&nbsp;</td>
235 </tr>
236 <tr>
237 <td>&nbsp;</td>
238 <td>&nbsp;</td>
239 </tr>
240 <tr>
241 <td>&nbsp;</td>
242 <td>&nbsp;</td>
243 </tr>
244 </table>
245 <table align="center">
246 <tr>
247 <td>&nbsp;</td>
248 <td>&nbsp;</td>
249 </tr>
250 <tr>
251 <td colspan="2" class="style1"><input type="button" name="Download"
252 value=<?php echo xl("Download"); ?> onclick="download_file()" ></td>
253 </tr>
254 </table>
255 <?php
261 </form>
262 </body>
263 </html>