feat: add e2e testing for both menu links. Also fixed some e2e stuff. (#7739)
[openemr.git] / interface / forms / soap / FormSOAP.class.php
blob980b1714029c0158c13852664778b61d58e46029
1 <?php
3 /**
4 * soap form
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 use OpenEMR\Common\ORDataObject\ORDataObject;
15 define("EVENT_VEHICLE", 1);
16 define("EVENT_WORK_RELATED", 2);
17 define("EVENT_SLIP_FALL", 3);
18 define("EVENT_OTHER", 4);
21 /**
22 * class FormHpTjePrimary
25 class FormSOAP extends ORDataObject
27 /**
29 * @access public
33 /**
35 * static
37 var $id;
38 var $date;
39 var $pid;
40 var $user;
41 var $groupname;
42 var $authorized;
43 var $activity;
44 var $subjective;
45 var $objective;
46 var $assessment;
47 var $plan;
49 /**
50 * Constructor sets all Form attributes to their default value
53 function __construct($id = "", $_prefix = "")
55 if (is_numeric($id)) {
56 $this->id = $id;
57 } else {
58 $id = "";
59 $this->date = date("Y-m-d H:i:s");
62 $this->_table = "form_soap";
63 $this->activity = 1;
64 $this->pid = $GLOBALS['pid'];
65 if ($id != "") {
66 $this->populate();
67 //$this->date = $this->get_date();
70 function populate()
72 parent::populate();
73 //$this->temp_methods = parent::_load_enum("temp_locations",false);
76 function toString($html = false)
78 $string .= "\n"
79 . "ID: " . $this->id . "\n";
81 if ($html) {
82 return nl2br($string);
83 } else {
84 return $string;
87 function set_id($id)
89 if (!empty($id) && is_numeric($id)) {
90 $this->id = $id;
93 function get_id()
95 return $this->id;
97 function set_pid($pid)
99 if (!empty($pid) && is_numeric($pid)) {
100 $this->pid = $pid;
103 function get_pid()
105 return $this->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;
118 function get_date()
120 return $this->date;
122 function set_date($dt)
124 if (!empty($dt)) {
125 $this->date = $dt;
128 function get_user()
130 return $this->user;
132 function set_user($u)
134 if (!empty($u)) {
135 $this->user = $u;
138 function get_subjective()
140 return $this->subjective;
142 function set_subjective($data)
144 if (!empty($data)) {
145 $this->subjective = $data;
148 function get_objective()
150 return $this->objective;
152 function set_objective($data)
154 if (!empty($data)) {
155 $this->objective = $data;
158 function get_assessment()
160 return $this->assessment;
162 function set_assessment($data)
164 if (!empty($data)) {
165 $this->assessment = $data;
168 function get_plan()
170 return $this->plan;
172 function set_plan($data)
174 if (!empty($data)) {
175 $this->plan = $data;
179 function persist()
181 parent::persist();
183 } // end of Form