2 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
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);
16 * class FormHpTjePrimary
19 class FormHPI
extends ORDataObject
50 * Constructor sets all Form attributes to their default value
53 function FormHPI($id = "", $_prefix = "")
55 if (is_numeric($id)) {
59 $this->date
= date("Y-m-d H:i:s");
62 $this->_table
= "form_hpi";
64 $this->pid
= $GLOBALS['pid'];
67 //$this->date = $this->get_date();
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)) {
112 function set_date($dt)
122 function set_user($u)
129 function set_activity($tf)
131 if (!empty($tf) && is_numeric($tf)) {
132 $this->activity
= $tf;
135 function get_activity()
137 return $this->activity
;
140 function get_complaint()
142 return $this->complaint
;
144 function set_complaint($data)
147 $this->complaint
= $data;
151 function get_location()
153 return $this->location
;
155 function set_location($data)
158 $this->location
= $data;
162 function get_quality()
164 return $this->quality
;
166 function set_quality($data)
169 $this->quality
= $data;
173 function get_severity()
175 return $this->severity
;
177 function set_severity($data)
180 $this->severity
= $data;
184 function get_duration()
186 return $this->duration
;
188 function set_duration($data)
191 $this->duration
= $data;
195 function get_timing()
197 return $this->timing
;
199 function set_timing($data)
202 $this->timing
= $data;
206 function get_context()
208 return $this->context
;
210 function set_context($data)
213 $this->context
= $data;
217 function get_factors()
219 return $this->factors
;
221 function set_factors($data)
224 $this->factors
= $data;
232 function set_signs($data)
235 $this->signs
= $data;