psr12 fixes for new PHP_CodeSniffer (#4795)
[openemr.git] / contrib / forms / nursing_notes / FormNursingNotes.class.php
blobfef1edaa1d37db68dcd353e844ba3ba11f793f38
1 <?php
3 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
9 use OpenEMR\Common\ORDataObject\ORDataObject;
11 define("EVENT_VEHICLE", 1);
12 define("EVENT_WORK_RELATED", 2);
13 define("EVENT_SLIP_FALL", 3);
14 define("EVENT_OTHER", 4);
17 /**
18 * class FormHpTjePrimary
21 class FormNursingNotes extends ORDataObject
23 /**
25 * @access public
29 /**
31 * static
33 var $id;
34 var $date;
35 var $pid;
36 var $user;
37 var $groupname;
38 var $activity;
39 var $assessment;
40 var $procedures;
41 var $discharge;
43 /**
44 * Constructor sets all Form attributes to their default value
47 function __construct($id = "", $_prefix = "")
49 parent::__construct();
51 if (is_numeric($id)) {
52 $this->id = $id;
53 } else {
54 $id = "";
55 $this->date = date("Y-m-d H:i:s");
58 $this->_table = "form_nursing_notes";
59 $this->activity = 1;
60 $this->pid = $GLOBALS['pid'];
61 if ($id != "") {
62 $this->populate();
63 //$this->date = $this->get_date();
66 function populate()
68 parent::populate();
69 //$this->temp_methods = parent::_load_enum("temp_locations",false);
72 function __toString()
74 return "ID: " . $this->id . "\n";
77 function set_id($id)
79 if (!empty($id) && is_numeric($id)) {
80 $this->id = $id;
84 function get_id()
86 return $this->id;
89 function set_pid($pid)
91 if (!empty($pid) && is_numeric($pid)) {
92 $this->pid = $pid;
96 function get_pid()
98 return $this->pid;
101 function get_date()
103 return $this->date;
106 function set_date($dt)
108 if (!empty($dt)) {
109 $this->date = $dt;
113 function get_user()
115 return $this->user;
118 function set_user($u)
120 if (!empty($u)) {
121 $this->user = $u;
125 function set_activity($tf)
127 if (!empty($tf) && is_numeric($tf)) {
128 $this->activity = $tf;
132 function get_activity()
134 return $this->activity;
137 function get_assessment()
139 return $this->assessment;
142 function set_assessment($data)
144 if (!empty($data)) {
145 $this->assessment = $data;
149 function get_procedures()
151 return $this->procedures;
154 function set_procedures($data)
156 if (!empty($data)) {
157 $this->procedures = $data;
161 function get_discharge()
163 return $this->discharge;
166 function set_discharge($data)
168 if (!empty($data)) {
169 $this->discharge = $data;
173 function persist()
175 parent::persist();
177 } // end of Form