-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmedical-history.php
282 lines (238 loc) · 11.4 KB
/
medical-history.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
<?php
include_once 'core/patient/patient.inc.php';
is_session_started();
$nameSet = null;
if(isset($_SESSION['key'])) {
$id = get_value_from_session('key');
#destroy_session_value('key');
# getting patient name
if($id !== null) {
$nameSet = get_patient_name($id);
}
# getting patient medical history information
}
include 'header.php';
?>
<div class="container content">
<div class="panel panel-default">
<div class="panel-body" style="padding:0 55px;">
<span><h3><b>Edit Medical History</b></h3></span>
<p>of <b><?php
if ($nameSet !== null) {
echo $nameSet['firstname'] . ' ' . $nameSet['lastname'];
} ?>
</b></p> <br>
<p><a href="edit-personal-info.php">Edit Patient Personal Record</a></p>
<hr style="width: 98%;">
<div class="row">
<div class="form-group">
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<div class="col-md-3">
<label for="q">Medical Conditions</label>
</div>
<div class="col-md-7">
<input type="text" name='medical_condition' class="form-control" id="q" placeholder="Asthmna, Diabetes">
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-submit-rq">Update</button>
</div>
</form>
</div>
</div>
</div>
<div class="panel panel-default" id="pad-panel">
<div class="panel-body">
<div class="row">
<div class="form-group">
<div class="col-md-2">
<label for="condi"><h5><b>Reported Condition:</b></h5></label>
</div>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<div class="col-md-3">
<input type="text" name='condition' class="form-control" id="condi" placeholder="">
</div>
<div class="col-md-1 col-xs-2">
<button type="submit" class="btn btn-primary">Update Conditions</button>
</div>
</form>
<div class="col-md-4 col-md-offset-2">
<span><b>Date Visited:</b> add php script</span>
</div>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-body">
<h5><b>Vitals for this condition</b></h5>
<hr style="width: 98%;">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Weight (LB)</th>
<th>Height</th>
<th>Temp</th>
<th>Pulse</th>
<th>B/P</th>
<th>Resp</th>
<th>Urinalysis</th>
<th>Taken By</th>
</tr>
</thead>
<tbody>
<form class="" action='<?php $_SERVER['PHP_SELF']; ?>' method="post">
<tr>
<!-- Not editable -->
<td>09-09-09 <input type="hidden" name="id" value="x"></td>
<?php if(!empty($_POST) && $_POST['submit'] === 'edit') { ?>
<td><input name="weight" value="<?php echo isset($_POST['weight']) ? $_POST['weight'] : ''; ?>" style="width: 60px;" type="date" class="form-control input-sm" placeholder="weight"></td>
<td><input name="height" value="<?php echo isset($_POST['height']) ? $_POST['height'] : ''; ?>" style="width: 60px;" type="text" class="form-control input-sm" placeholder="height"></td>
<td><input name="temp" value="<?php echo isset($_POST['temp']) ? $_POST['temp'] : ''; ?>" style="width: 60px;" type="text" class="form-control input-sm" placeholder="temp"></td>
<td><input name="pulse" value="<?php echo isset($_POST['pulse']) ? $_POST['pulse'] : ''; ?>" style="width: 60px;" type="text" class="form-control input-sm" placeholder="pulse"></td>
<td><input name="bp" value="<?php echo isset($_POST['bp']) ? $_POST['bp'] : ''; ?>" style="width: 60px;" type="text" class="form-control input-sm" placeholder="bp"></td>
<td><input name="reps" value="<?php echo isset($_POST['resp']) ? $_POST['resp'] : ''; ?>" style="width: 60px;" type="text" class="form-control input-sm" placeholder="resp"></td>
<td><input name="urine" value="<?php echo isset($_POST['urine']) ? $_POST['urine'] : ''; ?>" style="width: 60px;" type="text" class="form-control input-sm" placeholder="urine"></td>
<?php } else { ?>
<td><?php echo isset($_POST['weight']) ? $_POST['weight'] : ''; ?><input type="hidden" name="weight" value="<?php echo isset($_POST['weight']) ? $_POST['weight'] : '' /*Value from databse*/; ?>"></td>
<td>4'4" <input type="hidden" name="height" value="4'4''"></td>
<td>94 <input type="hidden" name="temp" value="94"></td>
<td>34/43 <input type="hidden" name="pulse" value="34/43"></td>
<td>12/70 <input type="hidden" name="bp" value="12/70"></td>
<td>33 <input type="hidden" name="resp" value="33"></td>
<td>45 <input type="hidden" name="urine" value="45"></td>
<?php } ?>
<!-- Not editable -->
<td>Dr. WhathisFace</td>
<?php if(!empty($_POST) && $_POST['submit'] === 'edit') { ?>
<!-- Edit mode for table row -->
<td><button type="submit" name="submit" value='save' class='btn btn-link'>Save</button></td>
<?php } else { ?>
<!-- Save and 'Just Loaded Paged' mode for table row -->
<td><button type="submit" name="submit" value='edit' class='btn btn-link'>Edit</button></td>
<?php } ?>
</tr>
</form>
</tbody>
</table>
</div>
<!-- <form class="" action="<?php# $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group">
<div class="col-md-2 col-xs-2">
<input value="<?php #echo isset($_POST['weight']) ? $_POST['weight'] : ''; ?>" type="date" class="form-control input-sm" name="weight" placeholder="weight">
</div>
<div class="col-md-2 col-xs-2">
<input type="text" class="form-control input-sm" name="height" placeholder="height">
</div>
<div class="col-md-2 col-xs-2">
<input type="text" class="form-control input-sm" name="temp" placeholder="temp">
</div>
<div class="col-md-2 col-xs-2">
<input type="date" class="form-control input-sm" name="pulse" placeholder="pulse">
</div>
<div class="col-md-2 col-xs-2">
<input type="text" class="form-control input-sm" name="bp" placeholder="bp">
</div>
<div class="col-md-2 col-xs-2">
<input type="text" class="form-control input-sm" name="resp" placeholder="resp">
</div>
<div class="col-md-2 col-xs-2">
<input type="date" class="form-control input-sm" name="urinalysis" placeholder="urine">
</div>
<div class="col-md-2 col-xs-2 col-md-offset-8">
<button type="submit" class="btn btn-primary">Update Vitals</button>
</div>
</div>
</form> -->
</div>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-body">
<h5><b>Treatment and Medication for this Condition</b></h5>
<hr style="width: 98%;">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Treatment</th>
<th>Medication</th>
<th>Hospital</th>
<th>Treated By</th>
</tr>
</thead>
<tbody>
<tr>
<td>Anna</td>
<td>Pitt</td>
<td>35</td>
<td>New York</td>
<td>New York</td>
<td><button type="button" class='btn btn-link' name="button">Edit</button></td>
</tr>
</tbody>
</table>
</div>
<form class="" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group">
<div class="col-md-2 col-xs-2">
<input type="date" class="form-control input-sm" name="treatment" placeholder="Treatment">
</div>
<div class="col-md-2 col-xs-2">
<input type="text" class="form-control input-sm" name="medication" placeholder="Medication">
</div>
<div class="col-md-2 col-xs-2 col-md-offset-4">
<button type="submit" class="btn btn-primary">Update Medication & Treatment</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="row">
<div class="panel panel-default">
<div class="panel-body">
<h5><b>Sign and Symptons for this Condition</b></h5>
<hr style="width: 98%;">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Signs</th>
<th>Recorded By</th>
</tr>
</thead>
<tbody>
<tr>
<td>Anna</td>
<td>Pitt</td>
<td>35</td>
<td><button type="button" class='btn btn-link' name="button">Edit</button></td>
</tr>
</tbody>
</table>
</div>
<form class="" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-group">
<div class="col-md-3 col-xs-1">
<input type="date" class="form-control input-sm" name="signs" placeholder="Signs">
</div>
<div class="col-md-2 col-xs-1 col-md-offset-6" >
<button type="submit" class="btn btn-primary">Update Signs & Symptons</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php' ?>
<!-- <script>
$('td').attr('contenteditable',true);
</script> -->