Highway to PSR2
[openemr.git] / contrib / forms / soap2 / FormSOAP.class.php
blob9b8ef5c59b6f0331030985dcb2f6e3e279e33862
1 <?php
4 define("EVENT_VEHICLE", 1);
5 define("EVENT_WORK_RELATED", 2);
6 define("EVENT_SLIP_FALL", 3);
7 define("EVENT_OTHER", 4);
10 /**
11 * class FormHpTjePrimary
14 class FormSOAP extends ORDataObject
17 /**
19 * @access public
23 /**
25 * static
27 var $id;
28 var $date;
29 var $pid;
30 var $user;
31 var $groupname;
32 var $authorized;
33 var $activity;
34 var $subjective;
35 //var $objective;
36 var $assessment;
37 var $general;
38 var $heent;
39 var $neck;
40 var $cardio;
41 var $respiratory;
42 var $breasts;
43 var $abdomen;
44 var $gastro;
45 var $extremities;
46 var $skin;
47 var $neurological;
48 var $mentalstatus;
49 var $plan;
51 /**
52 * Constructor sets all Form attributes to their default value
55 function __construct($id = "", $_prefix = "")
57 if (is_numeric($id)) {
58 $this->id = $id;
59 } else {
60 $id = "";
61 $this->date = date("Y-m-d H:i:s");
64 $this->_table = "form_soap2";
65 $this->activity = 1;
66 $this->pid = $GLOBALS['pid'];
67 if ($id != "") {
68 $this->populate();
69 //$this->date = $this->get_date();
72 function populate()
74 parent::populate();
75 //$this->temp_methods = parent::_load_enum("temp_locations",false);
78 function toString($html = false)
80 $string .= "\n"
81 ."ID: " . $this->id . "\n";
83 if ($html) {
84 return nl2br($string);
85 } else {
86 return $string;
89 function set_id($id)
91 if (!empty($id) && is_numeric($id)) {
92 $this->id = $id;
95 function get_id()
97 return $this->id;
99 function set_pid($pid)
101 if (!empty($pid) && is_numeric($pid)) {
102 $this->pid = $pid;
105 function get_pid()
107 return $this->pid;
109 function set_activity($tf)
111 if (!empty($tf) && is_numeric($tf)) {
112 $this->activity = $tf;
115 function get_activity()
117 return $this->activity;
120 function get_date()
122 return $this->date;
124 function set_date($dt)
126 if (!empty($dt)) {
127 $this->date = $dt;
130 function get_user()
132 return $this->user;
134 function set_user($u)
136 if (!empty($u)) {
137 $this->user = $u;
140 function get_subjective()
142 return $this->subjective;
144 function set_subjective($data)
146 if (!empty($data)) {
147 $this->subjective = $data;
150 function get_objective()
152 return $this->objective;
154 function set_objective($data)
156 if (!empty($data)) {
157 $this->objective = $data;
161 function get_assessment()
163 return $this->assessment;
165 function set_assessment($data)
167 if (!empty($data)) {
168 $this->assessment = $data;
174 /* The following code replaces assessment. It is
175 part of the SOAP form Dr J has requested.
179 // **** General *****
180 function get_general()
182 return $this->general;
184 function set_general($data)
186 if (!empty($data)) {
187 $this->general = $data;
191 // **** HEENT ******
192 function get_heent()
194 return $this->heent;
196 function set_heent($data)
198 if (!empty($data)) {
199 $this->heent = $data;
203 // **** Neck *****
204 function get_neck()
206 return $this->neck;
208 function set_neck($data)
210 if (!empty($data)) {
211 $this->neck = $data;
215 // **** CV *****
216 function get_cardio()
218 return $this->cardio;
220 function set_cardio($data)
222 if (!empty($data)) {
223 $this->cardio = $data;
227 // **** Lungs *****
228 function get_respiratory()
230 return $this->respiratory;
232 function set_respiratory($data)
234 if (!empty($data)) {
235 $this->respiratory = $data;
239 // **** Breasts *****
240 // * my personal favorite :> ***
241 function get_breasts()
243 return $this->breasts;
245 function set_breasts($data)
247 if (!empty($data)) {
248 $this->breasts = $data;
252 // **** Abdomen *****
253 function get_abdomen()
255 return $this->abdomen;
257 function set_abdomen($data)
259 if (!empty($data)) {
260 $this->abdomen = $data;
264 // **** GU *****
265 function get_gastro()
267 return $this->gastro;
269 function set_gastro($data)
271 if (!empty($data)) {
272 $this->gastro = $data;
276 // **** Bones/Joints/Extremities *****
277 function get_extremities()
279 return $this->extremities;
281 function set_extremities($data)
283 if (!empty($data)) {
284 $this->extremities = $data;
288 // **** Skin *****
289 function get_skin()
291 return $this->skin;
293 function set_skin($data)
295 if (!empty($data)) {
296 $this->skin = $data;
300 // **** Neuro/Psych *****
301 function get_neurological()
303 return $this->neurological;
305 function set_neurological($data)
307 if (!empty($data)) {
308 $this->neurological = $data;
312 // **** Mental Status *****
313 function get_mentalstatus()
315 return $this->mentalstatus;
317 function set_mentalstatus($data)
319 if (!empty($data)) {
320 $this->mentalstatus = $data;
324 function get_plan()
326 return $this->plan;
328 function set_plan($data)
330 if (!empty($data)) {
331 $this->plan = $data;
335 function persist()
337 parent::persist();
339 } // end of Form