Highway to PSR2
[openemr.git] / contrib / forms / leg_length / FormLegLength.class.php
blobdcf27f74a4c60a2d460993f0136c805fbf75fb2b
1 <?php
2 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
9 define("EVENT_VEHICLE", 1);
10 define("EVENT_WORK_RELATED", 2);
11 define("EVENT_SLIP_FALL", 3);
12 define("EVENT_OTHER", 4);
15 /**
16 * class FormHpTjePrimary
19 class FormLegLength extends ORDataObject
22 /**
24 * @access public
28 /**
30 * static
32 var $id;
33 var $date;
34 var $pid;
35 var $user;
36 var $groupname;
37 var $activity;
39 var $AE_left;
40 var $AE_right;
41 var $BE_left;
42 var $BE_right;
43 var $AK_left;
44 var $AK_right;
45 var $K_left;
46 var $K_right;
47 var $BK_left;
48 var $BK_right;
49 var $ASIS_left;
50 var $ASIS_right;
51 var $UMB_left;
52 var $UMB_right;
54 /**
55 * Constructor sets all Form attributes to their default value
58 function FormLegLength($id = "", $_prefix = "")
60 if (is_numeric($id)) {
61 $this->id = $id;
62 } else {
63 $id = "";
64 $this->date = date("Y-m-d H:i:s");
67 $this->_table = "form_leg_length";
68 $this->activity = 1;
69 $this->pid = $GLOBALS['pid'];
70 if ($id != "") {
71 $this->populate();
72 //$this->date = $this->get_date();
75 function populate()
77 parent::populate();
78 //$this->temp_methods = parent::_load_enum("temp_locations",false);
81 function toString($html = false)
83 $string .= "\n"
84 ."ID: " . $this->id . "\n";
86 if ($html) {
87 return nl2br($string);
88 } else {
89 return $string;
92 function set_id($id)
94 if (!empty($id) && is_numeric($id)) {
95 $this->id = $id;
98 function get_id()
100 return $this->id;
102 function set_pid($pid)
104 if (!empty($pid) && is_numeric($pid)) {
105 $this->pid = $pid;
108 function get_pid()
110 return $this->pid;
113 function get_date()
115 return $this->date;
117 function set_date($dt)
119 if (!empty($dt)) {
120 $this->date = $dt;
123 function get_user()
125 return $this->user;
127 function set_user($u)
129 if (!empty($u)) {
130 $this->user = $u;
134 function set_activity($tf)
136 if (!empty($tf) && is_numeric($tf)) {
137 $this->activity = $tf;
140 function get_activity()
142 return $this->activity;
145 function persist()
147 parent::persist();
152 function get_AE_left()
154 return $this->AE_left;
156 function set_AE_left($tf)
158 if (true) {
159 $this->AE_left = $tf;
162 function get_AE_right()
164 return $this->AE_right;
167 function set_AE_right($tf)
169 if (true) {
170 $this->AE_right = $tf;
173 function get_BE_left()
175 return $this->BE_left;
178 function set_BE_left($tf)
180 if (true) {
181 $this->BE_left = $tf;
184 function get_BE_right()
186 return $this->BE_right;
189 function set_BE_right($tf)
191 if (true) {
192 $this->BE_right = $tf;
195 function get_AK_left()
197 return $this->AK_left;
199 function set_AK_left($tf)
201 if (true) {
202 $this->AK_left = $tf;
205 function get_AK_right()
207 return $this->AK_right;
209 function set_AK_right($tf)
211 if (true) {
212 $this->AK_right = $tf;
215 function get_K_left()
217 return $this->K_left;
220 function set_K_left($tf)
222 if (true) {
223 $this->K_left = $tf;
226 function get_K_right()
228 return $this->K_right;
231 function set_K_right($tf)
233 if (true) {
234 $this->K_right = $tf;
237 function get_BK_left()
239 return $this->BK_left;
242 function set_BK_left($tf)
244 if (true) {
245 $this->BK_left = $tf;
248 function get_BK_right()
250 return $this->BK_right;
253 function set_BK_right($tf)
255 if (true) {
256 $this->BK_right = $tf;
259 function get_ASIS_left()
261 return $this->ASIS_left;
264 function set_ASIS_left($tf)
266 if (true) {
267 $this->ASIS_left = $tf;
270 function get_ASIS_right()
272 return $this->ASIS_right;
275 function set_ASIS_right($tf)
277 if (true) {
278 $this->ASIS_right = $tf;
281 function get_UMB_left()
283 return $this->UMB_left;
286 function set_UMB_left($tf)
288 if (true) {
289 $this->UMB_left = $tf;
292 function get_UMB_right()
294 return $this->UMB_right;
297 function set_UMB_right($tf)
299 if (true) {
300 $this->UMB_right = $tf;
304 // ----- notes -----
306 var $notes;
307 function get_notes()
309 return $this->notes;
311 function set_notes($data)
313 if (!empty($data)) {
314 $this->notes = $data;
317 } // end of Form