Now add the replacement 3.2 HTML Docs
[openemr.git] / library / football_injury.inc.php
blob01b364c03a506d7284e22e1e8c16c6ef7ec59701
1 <?php
2 $arr_injtime = array(
3 '1' => 'Warm Up',
4 '2' => 'Extra Time',
5 '3' => 'Cool Down',
6 '4' => 'Training Warm Up',
7 '5' => 'Training Session',
8 '6' => 'Training Cool Down',
9 '7' => 'Training Rehab',
12 $arr_activity = array(
13 'tackling' => 'Tackling',
14 'tackled' => 'Tackled',
15 'collision' => 'Collision',
16 'kicked' => 'Kicked',
17 'elbow' => 'Use of Elbow',
18 'passing' => 'Passing',
19 'shooting' => 'Shooting',
20 'running' => 'Running',
21 'dribbling' => 'Dribbling',
22 'heading' => 'Heading',
23 'jumping' => 'Jumping',
24 'landing' => 'Landing',
25 'fall' => 'Fall',
26 'stretching' => 'Stretching',
27 'turning' => 'Twist/Turning',
28 'throwing' => 'Throwing',
29 'diving' => 'Diving',
30 'overuse' => 'Overuse',
33 $arr_sanction = array(
34 'nofoul' => 'No Foul',
35 'oppfoul' => 'Opponent Foul',
36 'ownfoul' => 'Own Foul',
37 'yellow' => 'Yellow Card',
38 'red' => 'Red Card',
41 $arr_surface = array(
42 '1' => 'Pitch' ,
43 '2' => 'Training' ,
44 '3' => 'Artificial' ,
45 '4' => 'Indoor' ,
46 '5' => 'Gym' ,
47 '6' => 'Other' ,
50 $arr_position = array(
51 '1' => 'Defender' ,
52 '2' => 'Midfield Offensive',
53 '3' => 'Midfield Defensive',
54 '4' => 'Forward' ,
55 '5' => 'Goal Keeper' ,
56 '6' => 'Substitute' ,
59 $arr_footwear = array(
60 '1' => 'Molded Stud' ,
61 '2' => 'Detachable Stud' ,
62 '3' => 'Indoor Shoes' ,
63 '4' => 'Blades' ,
66 $arr_side = array(
67 '1' => 'Left' ,
68 '2' => 'Right' ,
69 '3' => 'Bilateral' ,
70 '4' => 'Not Applicable',
73 $arr_removed = array(
74 '1' => 'Immediately',
75 '2' => 'Later' ,
76 '3' => 'Not at All' ,
79 $arr_match_type = array(
80 '1' => 'Premiership',
81 '2' => 'FA Cup',
82 '3' => 'League Cup',
83 '4' => 'Champions League Cup',
84 '5' => 'Championship Match',
85 '6' => 'League One Match',
86 '7' => 'League Two Match',
87 '8' => 'International Match',
88 '9' => 'Friendly'
91 $firow = array();
93 function rbfiinput($name, $value, $desc, $colname) {
94 global $firow;
95 $ret = "<input type='radio' name='$name' value='$value'";
96 if ($firow[$colname] == $value) $ret .= " checked";
97 $ret .= " />$desc";
98 return $ret;
101 function rbficell($name, $value, $desc, $colname) {
102 return "<td width='25%' nowrap>" . rbfiinput($name, $value, $desc, $colname) . "</td>\n";
105 function cbfiinput($name, $colname) {
106 global $firow;
107 $ret = "<input type='checkbox' name='$name' value='1'";
108 if ($firow[$colname]) $ret .= " checked";
109 $ret .= " />";
110 return $ret;
113 function cbficell($name, $desc, $colname) {
114 return "<td width='25%' nowrap>" . cbfiinput($name, $colname) . "$desc</td>\n";
117 function issue_football_injury_newtype() {
118 echo " var fiadisp = (aitypes[index] == 2) ? '' : 'none';\n";
119 echo " document.getElementById('football_injury').style.display = fiadisp;\n";
122 function issue_football_injury_save($issue) {
123 $query = "REPLACE INTO lists_football_injury ( " .
124 "id, fiinjmin, fiinjtime, fimatchtype, " .
125 "fimech_tackling, fimech_tackled, fimech_collision, " .
126 "fimech_kicked, fimech_elbow, fimech_nofoul, fimech_oppfoul, " .
127 "fimech_ownfoul, fimech_yellow, fimech_red, fimech_passing, " .
128 "fimech_shooting, fimech_running, fimech_dribbling, fimech_heading, " .
129 "fimech_jumping, fimech_landing, fimech_fall, fimech_stretching, " .
130 "fimech_turning, fimech_throwing, fimech_diving, fimech_overuse, " .
131 "fimech_othercon, fimech_othernon, fisurface, fiposition, fifootwear, " .
132 "fiside, firemoved " .
133 ") VALUES ( " .
134 $issue . ", " .
135 invalue('form_injmin') . ", " .
136 rbvalue('form_injtime') . ", " .
137 rbvalue('form_matchtype') . ", " .
138 cbvalue('form_mech_tackling') . ", " .
139 cbvalue('form_mech_tackled') . ", " .
140 cbvalue('form_mech_collision') . ", " .
141 cbvalue('form_mech_kicked') . ", " .
142 cbvalue('form_mech_elbow') . ", " .
143 cbvalue('form_mech_nofoul') . ", " .
144 cbvalue('form_mech_oppfoul') . ", " .
145 cbvalue('form_mech_ownfoul') . ", " .
146 cbvalue('form_mech_yellow') . ", " .
147 cbvalue('form_mech_red') . ", " .
148 cbvalue('form_mech_passing') . ", " .
149 cbvalue('form_mech_shooting') . ", " .
150 cbvalue('form_mech_running') . ", " .
151 cbvalue('form_mech_dribbling') . ", " .
152 cbvalue('form_mech_heading') . ", " .
153 cbvalue('form_mech_jumping') . ", " .
154 cbvalue('form_mech_landing') . ", " .
155 cbvalue('form_mech_fall') . ", " .
156 cbvalue('form_mech_stretching') . ", " .
157 cbvalue('form_mech_turning') . ", " .
158 cbvalue('form_mech_throwing') . ", " .
159 cbvalue('form_mech_diving') . ", " .
160 cbvalue('form_mech_overuse') . ", " .
161 txvalue('form_mech_othercon') . ", " .
162 txvalue('form_mech_othernon') . ", " .
163 rbvalue('form_surface') . ", " .
164 rbvalue('form_position') . ", " .
165 rbvalue('form_footwear') . ", " .
166 rbvalue('form_side') . ", " .
167 rbvalue('form_removed') . " " .
168 ")";
169 sqlStatement($query);
172 function issue_football_injury_form($issue) {
173 global $firow, $arr_match_type;
174 if ($issue) {
175 $firow = sqlQuery ("SELECT * FROM lists_football_injury WHERE id = '$issue'");
176 } else {
177 $firow = array();
181 <table border='1' width='98%' id='football_injury' style='display:none;margin-top:6pt;'>
183 <tr bgcolor='#dddddd'>
184 <td colspan='2' align='center'><b>Time of Injury</b></td>
185 </tr>
187 <tr>
188 <td nowrap>Match Play</td>
189 <td nowrap>
190 <table width='100%'>
191 <tr>
192 <td nowrap>
193 Min of Injury
194 <input type='text' name='form_injmin' size='4'
195 value='<? echo addslashes($firow['fiinjmin']) ?>' />
196 </td>
197 <? echo rbficell('form_injtime', '1', 'Warm Up' , 'fiinjtime') ?>
198 <? echo rbficell('form_injtime', '2', 'Extra Time', 'fiinjtime') ?>
199 <? echo rbficell('form_injtime', '3', 'Cool Down' , 'fiinjtime') ?>
200 </tr>
201 </table>
202 </td>
203 </tr>
205 <tr>
206 <td nowrap>Training</td>
207 <td nowrap>
208 <table width='100%'>
209 <tr>
210 <? echo rbficell('form_injtime', '4', 'Warm Up' , 'fiinjtime') ?>
211 <? echo rbficell('form_injtime', '5', 'During Session', 'fiinjtime') ?>
212 <? echo rbficell('form_injtime', '6', 'Cool Down' , 'fiinjtime') ?>
213 <? echo rbficell('form_injtime', '7', 'Rehabilitation', 'fiinjtime') ?>
214 </tr>
215 </table>
216 </td>
217 </tr>
219 <tr>
220 <td nowrap>Match Type</td>
221 <td nowrap>
222 <table width='100%'>
223 <?php
224 $i = 0;
225 foreach ($arr_match_type as $key => $value) {
226 if ($i % 4 == 0) echo " <tr>\n";
227 echo " " . rbficell('form_matchtype', $key, $value, 'fimatchtype');
228 ++$i;
229 if ($i % 4 == 0) echo " </tr>\n";
231 while ($i % 4 > 0) {
232 echo " <td width='25%'>&nbsp;</td>\n";
233 ++$i;
234 if ($i % 4 == 0) echo " </tr>\n";
237 </table>
238 </td>
239 </tr>
241 <tr bgcolor='#dddddd'>
242 <td colspan='2' align='center'><b>Mechanism of Injury</b></td>
243 </tr>
245 <tr>
246 <td nowrap>Contact</td>
247 <td nowrap>
248 <table width='100%'>
249 <tr>
250 <? echo cbficell('form_mech_tackling' , 'Tackling' , 'fimech_tackling' ) ?>
251 <? echo cbficell('form_mech_tackled' , 'Tackled' , 'fimech_tackled' ) ?>
252 <? echo cbficell('form_mech_collision', 'Collision', 'fimech_collision') ?>
253 <? echo cbficell('form_mech_kicked' , 'Kicked' , 'fimech_kicked' ) ?>
254 </tr>
255 <tr>
256 <? echo cbficell('form_mech_elbow' , 'Use of Elbow' , 'fimech_elbow' ) ?>
257 <td colspan='3' nowrap>
258 Other:
259 <input type='text' name='form_mech_othercon' size='10'
260 title='Describe other'
261 value='<? echo addslashes($firow['fimech_othercon']) ?>' />
262 </td>
263 </tr>
264 </table>
265 </td>
266 </tr>
268 <tr>
269 <td nowrap>Referee's Sanction</td>
270 <td nowrap>
271 <table width='100%'>
272 <tr>
273 <? echo cbficell('form_mech_nofoul' , 'No Foul' , 'fimech_nofoul' ) ?>
274 <? echo cbficell('form_mech_oppfoul', 'Opponent Foul', 'fimech_oppfoul') ?>
275 <? echo cbficell('form_mech_ownfoul', 'Own Foul' , 'fimech_ownfoul') ?>
276 <td width='25%'>&nbsp;</td>
277 </tr>
278 <tr>
279 <? echo cbficell('form_mech_yellow' , 'Yellow Card' , 'fimech_yellow' ) ?>
280 <? echo cbficell('form_mech_red' , 'Red Card' , 'fimech_red' ) ?>
281 <td width='25%'>&nbsp;</td>
282 <td width='25%'>&nbsp;</td>
283 </tr>
284 </table>
285 </td>
286 </tr>
288 <tr>
289 <td nowrap>Non Contact</td>
290 <td nowrap>
291 <table width='100%'>
292 <tr>
293 <? echo cbficell('form_mech_passing' , 'Passing' , 'fimech_passing' ) ?>
294 <? echo cbficell('form_mech_shooting' , 'Shooting' , 'fimech_shooting' ) ?>
295 <? echo cbficell('form_mech_running' , 'Running' , 'fimech_running' ) ?>
296 <? echo cbficell('form_mech_dribbling', 'Dribbling', 'fimech_dribbling') ?>
297 </tr>
298 <tr>
299 <? echo cbficell('form_mech_heading' , 'Heading' , 'fimech_heading' ) ?>
300 <? echo cbficell('form_mech_jumping' , 'Jumping' , 'fimech_jumping' ) ?>
301 <? echo cbficell('form_mech_landing' , 'Landing' , 'fimech_landing' ) ?>
302 <? echo cbficell('form_mech_fall' , 'Fall' , 'fimech_fall' ) ?>
303 </tr>
304 <tr>
305 <? echo cbficell('form_mech_stretching', 'Stretching' , 'fimech_stretching') ?>
306 <? echo cbficell('form_mech_turning' , 'Twisting/Turning', 'fimech_turning' ) ?>
307 <? echo cbficell('form_mech_throwing' , 'Throwing' , 'fimech_throwing' ) ?>
308 <? echo cbficell('form_mech_diving' , 'Diving' , 'fimech_diving' ) ?>
309 </tr>
310 <tr>
311 <? echo cbficell('form_mech_overuse', 'Overuse', 'fimech_overuse' ) ?>
312 <td colspan='3' nowrap>
313 Other:
314 <input type='text' name='form_mech_othernon' size='10'
315 title='Describe other'
316 value='<? echo addslashes($firow['fimech_othernon']) ?>' />
317 </td>
318 </tr>
319 </table>
320 </td>
321 </tr>
323 <tr bgcolor='#dddddd'>
324 <td colspan='2' align='center'><b>Conditions</b></td>
325 </tr>
327 <tr>
328 <td nowrap>Surface</td>
329 <td nowrap>
330 <table width='100%'>
331 <tr>
332 <? echo rbficell('form_surface', '1', 'Pitch' , 'fisurface') ?>
333 <? echo rbficell('form_surface', '2', 'Training' , 'fisurface') ?>
334 <? echo rbficell('form_surface', '3', 'Artificial' , 'fisurface') ?>
335 <? echo rbficell('form_surface', '4', 'Indoor' , 'fisurface') ?>
336 </tr>
337 <tr>
338 <? echo rbficell('form_surface', '5', 'Gym' , 'fisurface') ?>
339 <? echo rbficell('form_surface', '6', 'Other' , 'fisurface') ?>
340 <td width='25%'>&nbsp;</td>
341 <td width='25%'>&nbsp;</td>
342 </tr>
343 </table>
344 </td>
345 </tr>
347 <tr>
348 <td nowrap>Position</td>
349 <td nowrap>
350 <table width='100%'>
351 <tr>
352 <? echo rbficell('form_position', '1', 'Defender' , 'fiposition') ?>
353 <? echo rbficell('form_position', '2', 'Midfield Offensive', 'fiposition') ?>
354 <? echo rbficell('form_position', '3', 'Midfield Defensive', 'fiposition') ?>
355 <? echo rbficell('form_position', '4', 'Forward' , 'fiposition') ?>
356 </tr>
357 <tr>
358 <? echo rbficell('form_position', '5', 'Goal Keeper' , 'fiposition') ?>
359 <? echo rbficell('form_position', '6', 'Substitute' , 'fiposition') ?>
360 <td width='25%'>&nbsp;</td>
361 <td width='25%'>&nbsp;</td>
362 </tr>
363 </table>
364 </td>
365 </tr>
367 <tr>
368 <td nowrap>Footwear</td>
369 <td nowrap>
370 <table width='100%'>
371 <tr>
372 <? echo rbficell('form_footwear', '1', 'Molded Stud' , 'fifootwear') ?>
373 <? echo rbficell('form_footwear', '2', 'Detachable Stud', 'fifootwear') ?>
374 <? echo rbficell('form_footwear', '3', 'Indoor Shoes' , 'fifootwear') ?>
375 <? echo rbficell('form_footwear', '4', 'Blades' , 'fifootwear') ?>
376 </tr>
377 </table>
378 </td>
379 </tr>
381 <tr>
382 <td nowrap>Side of Injury</td>
383 <td nowrap>
384 <table width='100%'>
385 <tr>
386 <? echo rbficell('form_side', '1', 'Left' , 'fiside') ?>
387 <? echo rbficell('form_side', '2', 'Right' , 'fiside') ?>
388 <? echo rbficell('form_side', '3', 'Bilateral' , 'fiside') ?>
389 <? echo rbficell('form_side', '4', 'Not Applicable', 'fiside') ?>
390 </tr>
391 </table>
392 </td>
393 </tr>
395 <tr bgcolor='#dddddd'>
396 <td colspan='2' align='center'><b>Post Injury Sequelae</b></td>
397 </tr>
399 <tr>
400 <td nowrap>Removed from<br>Play/Training<br>after Injury</td>
401 <td nowrap>
402 <table width='100%'>
403 <tr>
404 <? echo rbficell('form_removed', '1', 'Immediately', 'firemoved') ?>
405 <? echo rbficell('form_removed', '2', 'Later' , 'firemoved') ?>
406 <? echo rbficell('form_removed', '3', 'Not at All' , 'firemoved') ?>
407 <td width='25%'>&nbsp;</td>
408 </tr>
409 </table>
410 </td>
411 </tr>
413 </table>
415 <?php