3 require_once(dirname(__FILE__
) . "/../../../library/classes/ORDataObject.class.php");
5 define("EVENT_VEHICLE",1);
6 define("EVENT_WORK_RELATED",2);
7 define("EVENT_SLIP_FALL",3);
8 define("EVENT_OTHER",4);
12 * class FormHpTjePrimary
15 class FormVitals
extends ORDataObject
{
47 var $oxygen_saturation;
51 * Constructor sets all Form attributes to their default value
54 function FormVitals($id= "", $_prefix = "") {
61 $this->date
= $this->get_date();
64 $this->_table
= "form_vitals";
66 $this->pid
= $GLOBALS['pid'];
74 //$this->temp_methods = parent::_load_enum("temp_locations",false);
77 function toString($html = false) {
79 ."ID: " . $this->id
. "\n";
82 return nl2br($string);
88 function set_id($id) {
89 if (!empty($id) && is_numeric($id)) {
96 function set_pid($pid) {
97 if (!empty($pid) && is_numeric($pid)) {
104 function set_activity($tf) {
105 if (!empty($tf) && is_numeric($tf)) {
106 $this->activity
= $tf;
109 function get_activity() {
110 return $this->activity
;
113 function get_date() {
115 $this->date
= date('YmdHis', time());
120 function set_date($dt) {
122 $dt = str_replace('-', '', $dt);
123 $dt = str_replace(':', '', $dt);
124 $dt = str_replace(' ', '', $dt);
125 while (strlen($dt) < 14) $dt .= '0';
130 function get_user() {
133 function set_user($u) {
141 function set_bps($bps) {
149 function set_bpd($bpd) {
154 function get_weight() {
155 return $this->weight
;
157 function set_weight($w) {
158 if(!empty($w) && is_numeric($w)){
162 function display_weight($pounds)
166 if($GLOBALS['us_weight_format']==2)
168 $pounds_int=floor($pounds);
169 return $pounds_int." ".xl('lb') ." " .round(($pounds-$pounds_int)*16)." ".xl('oz');
177 function get_height() {
178 return $this->height
;
180 function set_height($h) {
181 if(!empty($h) && is_numeric($h)){
185 function get_temperature() {
186 return $this->temperature
;
188 function set_temperature($t) {
189 if(!empty($t) && is_numeric($t)){
190 $this->temperature
= $t;
193 function get_temp_method() {
194 return $this->temp_method
;
196 function set_temp_method($tm) {
197 $this->temp_method
= $tm;
199 // function get_temp_methods() {
200 // return $this->temp_methods;
202 function get_pulse() {
205 function set_pulse($p) {
206 if(!empty($p) && is_numeric($p)){
210 function get_respiration() {
211 return $this->respiration
;
213 function set_respiration($r) {
214 if(!empty($r) && is_numeric($r)){
215 $this->respiration
= $r;
218 function get_note() {
221 function set_note($n) {
229 function set_BMI($bmi) {
230 if(!empty($bmi) && is_numeric($bmi)){
234 function get_BMI_status() {
235 return $this->BMI_status
;
237 function set_BMI_status($status) {
238 $this->BMI_status
= $status;
240 function get_waist_circ() {
241 return $this->waist_circ
;
243 function set_waist_circ($w) {
244 if(!empty($w) && is_numeric($w)){
245 $this->waist_circ
= $w;
248 function get_head_circ() {
249 return $this->head_circ
;
251 function set_head_circ($h) {
252 if(!empty($h) && is_numeric($h)){
253 $this->head_circ
= $h;
256 function get_oxygen_saturation() {
257 return $this->oxygen_saturation
;
259 function set_oxygen_saturation($o) {
260 if(!empty($o) && is_numeric($o)){
261 $this->oxygen_saturation
= $o;