added ending dates of service
[openemr.git] / library / football_injury.inc.php
blob1601f264e5ea2c5c8cff9cf59ce27cb7732d7900
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;
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 <tr>
224 <? echo rbficell('form_matchtype', '1', 'Premiership' , 'fimatchtype') ?>
225 <? echo rbficell('form_matchtype', '2', 'FA Cup' , 'fimatchtype') ?>
226 <? echo rbficell('form_matchtype', '3', 'League Cup' , 'fimatchtype') ?>
227 <? echo rbficell('form_matchtype', '4', 'Champions League Cup', 'fimatchtype') ?>
228 </tr>
229 <tr>
230 <? echo rbficell('form_matchtype', '5', 'Championship Match' , 'fimatchtype') ?>
231 <? echo rbficell('form_matchtype', '6', 'League One Match' , 'fimatchtype') ?>
232 <? echo rbficell('form_matchtype', '7', 'League Two Match' , 'fimatchtype') ?>
233 <? echo rbficell('form_matchtype', '8', 'International Match' , 'fimatchtype') ?>
234 </tr>
235 <tr>
236 <? echo rbficell('form_matchtype', '9', 'Friendly' , 'fimatchtype') ?>
237 <td width='25%'>&nbsp;</td>
238 <td width='25%'>&nbsp;</td>
239 <td width='25%'>&nbsp;</td>
240 </tr>
241 </table>
242 </td>
243 </tr>
245 <tr bgcolor='#dddddd'>
246 <td colspan='2' align='center'><b>Mechanism of Injury</b></td>
247 </tr>
249 <tr>
250 <td nowrap>Contact</td>
251 <td nowrap>
252 <table width='100%'>
253 <tr>
254 <? echo cbficell('form_mech_tackling' , 'Tackling' , 'fimech_tackling' ) ?>
255 <? echo cbficell('form_mech_tackled' , 'Tackled' , 'fimech_tackled' ) ?>
256 <? echo cbficell('form_mech_collision', 'Collision', 'fimech_collision') ?>
257 <? echo cbficell('form_mech_kicked' , 'Kicked' , 'fimech_kicked' ) ?>
258 </tr>
259 <tr>
260 <? echo cbficell('form_mech_elbow' , 'Use of Elbow' , 'fimech_elbow' ) ?>
261 <td colspan='3' nowrap>
262 Other:
263 <input type='text' name='form_mech_othercon' size='10'
264 title='Describe other'
265 value='<? echo addslashes($firow['fimech_othercon']) ?>' />
266 </td>
267 </tr>
268 </table>
269 </td>
270 </tr>
272 <tr>
273 <td nowrap>Referee's Sanction</td>
274 <td nowrap>
275 <table width='100%'>
276 <tr>
277 <? echo cbficell('form_mech_nofoul' , 'No Foul' , 'fimech_nofoul' ) ?>
278 <? echo cbficell('form_mech_oppfoul', 'Opponent Foul', 'fimech_oppfoul') ?>
279 <? echo cbficell('form_mech_ownfoul', 'Own Foul' , 'fimech_ownfoul') ?>
280 <td width='25%'>&nbsp;</td>
281 </tr>
282 <tr>
283 <? echo cbficell('form_mech_yellow' , 'Yellow Card' , 'fimech_yellow' ) ?>
284 <? echo cbficell('form_mech_red' , 'Red Card' , 'fimech_red' ) ?>
285 <td width='25%'>&nbsp;</td>
286 <td width='25%'>&nbsp;</td>
287 </tr>
288 </table>
289 </td>
290 </tr>
292 <tr>
293 <td nowrap>Non Contact</td>
294 <td nowrap>
295 <table width='100%'>
296 <tr>
297 <? echo cbficell('form_mech_passing' , 'Passing' , 'fimech_passing' ) ?>
298 <? echo cbficell('form_mech_shooting' , 'Shooting' , 'fimech_shooting' ) ?>
299 <? echo cbficell('form_mech_running' , 'Running' , 'fimech_running' ) ?>
300 <? echo cbficell('form_mech_dribbling', 'Dribbling', 'fimech_dribbling') ?>
301 </tr>
302 <tr>
303 <? echo cbficell('form_mech_heading' , 'Heading' , 'fimech_heading' ) ?>
304 <? echo cbficell('form_mech_jumping' , 'Jumping' , 'fimech_jumping' ) ?>
305 <? echo cbficell('form_mech_landing' , 'Landing' , 'fimech_landing' ) ?>
306 <? echo cbficell('form_mech_fall' , 'Fall' , 'fimech_fall' ) ?>
307 </tr>
308 <tr>
309 <? echo cbficell('form_mech_stretching', 'Stretching' , 'fimech_stretching') ?>
310 <? echo cbficell('form_mech_turning' , 'Twisting/Turning', 'fimech_turning' ) ?>
311 <? echo cbficell('form_mech_throwing' , 'Throwing' , 'fimech_throwing' ) ?>
312 <? echo cbficell('form_mech_diving' , 'Diving' , 'fimech_diving' ) ?>
313 </tr>
314 <tr>
315 <? echo cbficell('form_mech_overuse', 'Overuse', 'fimech_overuse' ) ?>
316 <td colspan='3' nowrap>
317 Other:
318 <input type='text' name='form_mech_othernon' size='10'
319 title='Describe other'
320 value='<? echo addslashes($firow['fimech_othernon']) ?>' />
321 </td>
322 </tr>
323 </table>
324 </td>
325 </tr>
327 <tr bgcolor='#dddddd'>
328 <td colspan='2' align='center'><b>Conditions</b></td>
329 </tr>
331 <tr>
332 <td nowrap>Surface</td>
333 <td nowrap>
334 <table width='100%'>
335 <tr>
336 <? echo rbficell('form_surface', '1', 'Pitch' , 'fisurface') ?>
337 <? echo rbficell('form_surface', '2', 'Training' , 'fisurface') ?>
338 <? echo rbficell('form_surface', '3', 'Artificial' , 'fisurface') ?>
339 <? echo rbficell('form_surface', '4', 'Indoor' , 'fisurface') ?>
340 </tr>
341 <tr>
342 <? echo rbficell('form_surface', '5', 'Gym' , 'fisurface') ?>
343 <? echo rbficell('form_surface', '6', 'Other' , 'fisurface') ?>
344 <td width='25%'>&nbsp;</td>
345 <td width='25%'>&nbsp;</td>
346 </tr>
347 </table>
348 </td>
349 </tr>
351 <tr>
352 <td nowrap>Position</td>
353 <td nowrap>
354 <table width='100%'>
355 <tr>
356 <? echo rbficell('form_position', '1', 'Defender' , 'fiposition') ?>
357 <? echo rbficell('form_position', '2', 'Midfield Offensive', 'fiposition') ?>
358 <? echo rbficell('form_position', '3', 'Midfield Defensive', 'fiposition') ?>
359 <? echo rbficell('form_position', '4', 'Forward' , 'fiposition') ?>
360 </tr>
361 <tr>
362 <? echo rbficell('form_position', '5', 'Goal Keeper' , 'fiposition') ?>
363 <? echo rbficell('form_position', '6', 'Substitute' , 'fiposition') ?>
364 <td width='25%'>&nbsp;</td>
365 <td width='25%'>&nbsp;</td>
366 </tr>
367 </table>
368 </td>
369 </tr>
371 <tr>
372 <td nowrap>Footwear</td>
373 <td nowrap>
374 <table width='100%'>
375 <tr>
376 <? echo rbficell('form_footwear', '1', 'Molded Stud' , 'fifootwear') ?>
377 <? echo rbficell('form_footwear', '2', 'Detachable Stud', 'fifootwear') ?>
378 <? echo rbficell('form_footwear', '3', 'Indoor Shoes' , 'fifootwear') ?>
379 <? echo rbficell('form_footwear', '4', 'Blades' , 'fifootwear') ?>
380 </tr>
381 </table>
382 </td>
383 </tr>
385 <tr>
386 <td nowrap>Side of Injury</td>
387 <td nowrap>
388 <table width='100%'>
389 <tr>
390 <? echo rbficell('form_side', '1', 'Left' , 'fiside') ?>
391 <? echo rbficell('form_side', '2', 'Right' , 'fiside') ?>
392 <? echo rbficell('form_side', '3', 'Bilateral' , 'fiside') ?>
393 <? echo rbficell('form_side', '4', 'Not Applicable', 'fiside') ?>
394 </tr>
395 </table>
396 </td>
397 </tr>
399 <tr bgcolor='#dddddd'>
400 <td colspan='2' align='center'><b>Post Injury Sequelae</b></td>
401 </tr>
403 <tr>
404 <td nowrap>Removed from<br>Play/Training<br>after Injury</td>
405 <td nowrap>
406 <table width='100%'>
407 <tr>
408 <? echo rbficell('form_removed', '1', 'Immediately', 'firemoved') ?>
409 <? echo rbficell('form_removed', '2', 'Later' , 'firemoved') ?>
410 <? echo rbficell('form_removed', '3', 'Not at All' , 'firemoved') ?>
411 <td width='25%'>&nbsp;</td>
412 </tr>
413 </table>
414 </td>
415 </tr>
417 </table>
419 <?php