-
Notifications
You must be signed in to change notification settings - Fork 10
/
consulthistory.php
355 lines (353 loc) · 17.5 KB
/
consulthistory.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<?php
session_start();
include('modules/dbhandler.php');
include('modules/functions.php');
if(isset($_SESSION['id'])){
if($_SESSION['privileges'] == 'sec' || $_SESSION['privileges'] == 'aux' || $_SESSION['privileges'] == 'den' || $_SESSION['privileges'] == 'man' || $_SESSION['privileges'] == 'web'){
if(isset($_GET['id'])){
$handler = new DBHandler();
$history = $handler->getHistory($_GET['id']);
if($history != null){
$patientdata = $handler->getPatientDataById($history[1]);
}
}
else{
header('Location:error.php');
}
}
else{
header('Location:denied.php');
}
}
else{
header('Location:index.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dental: Ver Historia Clínica</title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
<?php include('includes/styles.php');?>
<?php include('includes/jquery.php');?>
<script type="text/javascript" src="js/consulthistory.js"></script>
</head>
<body>
<div id="header">
<div class="center"><a href="menu.php"><img alt="logo" src="images/logo.png" /></a></div>
<div class="usersession">
<img alt="user" src="images/user.png" />
Registrado como <?php echo $_SESSION['firstname'] . ' ' . $_SESSION['firstlastname'] . ' ' . $_SESSION['secondlastname'];?> |
<a href="logout.php" class="session">Cerrar Sesión</a>
</div>
</div>
<div id="outer-wrapper">
<fieldset>
<?php
if(isset($patientdata)){
if($patientdata != null){
?>
<legend><a href="medicalrecord.php?id=<?php echo $patientdata['id'];?>">Historia Clínica</a> → Ver Historia Clínica: <a href="patient.php?id=<?php echo $patientdata['id'];?>"><?php echo $patientdata['firstname'] . ' ' . $patientdata['firstlastname'] . ' ' . $patientdata['secondlastname'];?></a></legend>
<?php
if($patientdata['active'] == 1){
if($history != null){
?>
<form action="#" id="medicalrecord">
<h1>Información Inicial (Automático)</h1>
<hr />
<p class="form">
<label for="id">Id Historia</label>
<input id="id" name="id" readonly="readonly" style="width:10%;" type="text" value="<?php echo $history[0];?>" />
</p>
<p class="form">
<label for="patient">Id Paciente</label>
<input id="patient" name="patient" readonly="readonly" style="width:10%;" type="text" value="<?php echo $patientdata['id'];?>" />
</p>
<p class="form">
<label for="user">Id Usuario</label>
<input id="user" name="user" readonly="readonly" style="width:10%;" type="text" value="<?php echo $_SESSION['id'];?>" />
</p>
<p class="form">
<label for="username">Nombre Usuario</label>
<input id="username" name="username" readonly="readonly" type="text" value="<?php echo $_SESSION['name'];?>" />
</p>
<p class="form">
<label for="date">Fecha</label>
<input id="date" name="date" readonly="readonly" style="width:10%;" type="text" value="<?php echo date('m/d/Y');?>" />
<span style="font-style:italic;">mm/dd/aaaa</span>
</p>
<h1>1. Antecedentes del Paciente</h1>
<hr />
<p class="form">
<label for="history1">Afecciones cardiacas</label>
<select id="history1" name="history1"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc1" name="historydesc1" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history2">Diabetes</label>
<select id="history2" name="history2"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc2" name="historydesc2" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history3">Asma</label>
<select id="history3" name="history3"><option value="0">No</option><option value="1">Si</option></select>
<input id="history3desc" name="historydesc3" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history4">Hipertensión</label>
<select id="history4" name="history4"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc4" name="historydesc4" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history5">Epilepsia</label>
<select id="history5" name="history5"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc5" name="historydesc5" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history6">Cancer</label>
<select id="history6" name="history6"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc6" name="historydesc6" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history7">Tuberculosis</label>
<select id="history7" name="history7"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc7" name="historydesc7" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history8">VIH - Sida</label>
<select id="history8" name="history8"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc8" name="historydesc8" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history9">Hepatitis</label>
<select id="history9" name="history9"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc9" name="historydesc9" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history10">Fiebre reumática</label>
<select id="history10" name="history10"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc10" name="historydesc10" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history11">Gastrointestinales</label>
<select id="history11" name="history11"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc11" name="historydesc11" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history12">Convulsiones</label>
<select id="history12" name="history12"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc12" name="historydesc12" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history13">Fracturas</label>
<select id="history13" name="history13"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc13" name="historydesc13" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history14">Hemorragias</label>
<select id="history14" name="history14"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc14" name="historydesc14" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history15">Alergias</label>
<select id="history15" name="history15"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc15" name="historydesc15" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history16">Hábitos</label>
<select id="history16" name="history16"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc16" name="historydesc16" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history17">Medicamentos</label>
<select id="history17" name="history17"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc17" name="historydesc17" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history18">Hospitalización</label>
<select id="history18" name="history18"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc18" name="historydesc18" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="history19">Transfusiones</label>
<select id="history19" name="history19"><option value="0">No</option><option value="1">Si</option></select>
<input id="historydesc19" name="historydesc19" style="width:60%;" type="text" />
</p>
<h1>2. Examen Clínico</h1>
<hr />
<p class="form">
<label for="test1">Adenopatías</label>
<select id="test1" name="test1"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc1" name="testdesc1" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test2">ATM</label>
<select id="test2" name="test2"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc2" name="testdesc2" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test3">Maxilares</label>
<select id="test3" name="test3"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc3" name="testdesc3" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test4">Labios</label>
<select id="test4" name="test4"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc4" name="testdesc4" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test5">Mejillas</label>
<select id="test5" name="test5"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc5" name="testdesc5" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test6">Luxación de mandíbula</label>
<select id="test6" name="test6"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc6" name="testdesc6" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test7">Fractura de mandíbula</label>
<select id="test7" name="test7"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc7" name="testdesc7" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test8">Amigdalitis</label>
<select id="test8" name="test8"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc8" name="testdesc8" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test9">Repetició infecciones orales</label>
<select id="test9" name="test9"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc9" name="testdesc9" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test10">Mal aliento</label>
<select id="test10" name="test10"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc10" name="testdesc10" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test11">Fuegos</label>
<select id="test11" name="test11"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc11" name="testdesc11" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test12">Lengua</label>
<select id="test12" name="test12"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc12" name="testdesc12" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test13">Paladar</label>
<select id="test13" name="test13"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc13" name="testdesc13" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test14">Carrillo</label>
<select id="test14" name="test14"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc14" name="testdesc14" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test15">Piso de la boca</label>
<select id="test15" name="test15"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc15" name="testdesc15" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test16">Encias</label>
<select id="test16" name="test16"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc16" name="testdesc16" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test17">Oclusión</label>
<select id="test17" name="test17"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc17" name="testdesc17" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test18">Manchas</label>
<select id="test18" name="test18"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc18" name="testdesc18" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test19">Facetas de desgaste</label>
<select id="test19" name="test19"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc19" name="testdesc19" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test20">Frenillos</label>
<select id="test20" name="test20"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc20" name="testdesc20" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="test21">Movilidad</label>
<select id="test21" name="test21"><option value="0">No</option><option value="1">Si</option></select>
<input id="testdesc21" name="testdesc21" style="width:60%;" type="text" />
</p>
<p class="form">
<label for="plaque">% placa bacteriana</label>
<select id="plaque" name="plaque">
<?php
for($i = 0;$i <= 100;$i += 1){
?>
<option value="<?php echo $i;?>"><?php echo $i . '%';?></option>
<?php
}
?>
</select>
</p>
<h1>3. Motivo de la Consulta</h1>
<hr />
<p class="form">
<label for="lastvisit">Última visita al odontólogo</label>
<input id="lastvisit" name="lastvisit" type="text" />
</p>
<p class="form">
<label for="origin">Origen de la enfermedad</label>
<select id="origin" name="origin">
<option value="0">---</option>
<option value="1">Enfermedad General</option>
<option value="2">Accidente de Trabajo</option>
<option value="3">Enfermedad Profesional</option>
</select>
</p>
<p class="form">
<label for="originhistory">Historia de la enfermedad</label>
<textarea id="originhistory" name="originhistory" cols="200" rows="20"></textarea>
</p>
<p class="form">
<label for="background">Antecedentes de importancia</label>
<textarea id="background" name="background" cols="200" rows="20"></textarea>
</p>
</form>
<?php
}
else{
?>
<p class="center warning">El paciente no tiene registrado sus antecedentes</p>
<p class="center"><a href="consultbackground.php?id=<?php echo $patientdata['id'];?>">Ver Antecedentes</a></p>
<?php
}
}
else{
?>
<p class="center warning">El paciente se encuentra inactivo<br />Consulte a gerencia para el proceso de activación</p>
<?php
}
}
else{
?>
<legend>Paciente no encontrado</legend>
<p class="center warning">Paciente no encontrado</p>
<?php
}
}
else{
?>
<legend>Historia Clínica no encontrada</legend>
<p class="center warning">La historia clínica solicitada no existe dentro del sistema</p>
<?php
}
?>
</fieldset>
<div id="message" style="display:none;"></div>
</div>
</body>
</html>