4 define("EVENT_VEHICLE", 1);
5 define("EVENT_WORK_RELATED", 2);
6 define("EVENT_SLIP_FALL", 3);
7 define("EVENT_OTHER", 4);
11 * class FormHpTjePrimary
14 class FormVitals
extends ORDataObject
47 var $oxygen_saturation;
51 * Constructor sets all Form attributes to their default value
54 function __construct($id = "", $_prefix = "")
60 $this->date
= $this->get_date();
63 $this->_table
= "form_vitals";
65 $this->pid
= $GLOBALS['pid'];
73 //$this->temp_methods = parent::_load_enum("temp_locations",false);
76 function toString($html = false)
79 ."ID: " . $this->id
. "\n";
82 return nl2br($string);
89 if (!empty($id) && is_numeric($id)) {
97 function set_pid($pid)
99 if (!empty($pid) && is_numeric($pid)) {
107 function set_activity($tf)
109 if (!empty($tf) && is_numeric($tf)) {
110 $this->activity
= $tf;
113 function get_activity()
115 return $this->activity
;
121 $this->date
= date('YmdHis', time());
127 function set_date($dt)
130 $dt = str_replace('-', '', $dt);
131 $dt = str_replace(':', '', $dt);
132 $dt = str_replace(' ', '', $dt);
133 while (strlen($dt) < 14) {
145 function set_user($u)
155 function set_bps($bps)
165 function set_bpd($bpd)
171 function get_weight()
173 return $this->weight
;
175 function set_weight($w)
177 if (!empty($w) && is_numeric($w)) {
181 function display_weight($pounds)
184 if ($GLOBALS['us_weight_format']==2) {
185 $pounds_int=floor($pounds);
186 return $pounds_int." ".xl('lb') ." " .round(($pounds-$pounds_int)*16)." ".xl('oz');
192 function get_height()
194 return $this->height
;
196 function set_height($h)
198 if (!empty($h) && is_numeric($h)) {
202 function get_temperature()
204 return $this->temperature
;
206 function set_temperature($t)
208 if (!empty($t) && is_numeric($t)) {
209 $this->temperature
= $t;
212 function get_temp_method()
214 return $this->temp_method
;
216 function set_temp_method($tm)
218 $this->temp_method
= $tm;
220 // function get_temp_methods() {
221 // return $this->temp_methods;
227 function set_pulse($p)
229 if (!empty($p) && is_numeric($p)) {
233 function get_respiration()
235 return $this->respiration
;
237 function set_respiration($r)
239 if (!empty($r) && is_numeric($r)) {
240 $this->respiration
= $r;
247 function set_note($n)
257 function set_BMI($bmi)
259 if (!empty($bmi) && is_numeric($bmi)) {
263 function get_BMI_status()
265 return $this->BMI_status
;
267 function set_BMI_status($status)
269 $this->BMI_status
= $status;
271 function get_waist_circ()
273 return $this->waist_circ
;
275 function set_waist_circ($w)
277 if (!empty($w) && is_numeric($w)) {
278 $this->waist_circ
= $w;
281 function get_head_circ()
283 return $this->head_circ
;
285 function set_head_circ($h)
287 if (!empty($h) && is_numeric($h)) {
288 $this->head_circ
= $h;
291 function get_oxygen_saturation()
293 return $this->oxygen_saturation
;
295 function set_oxygen_saturation($o)
297 if (!empty($o) && is_numeric($o)) {
298 $this->oxygen_saturation
= $o;