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
8 require_once(dirname(__FILE__
) . "/../../../library/classes/ORDataObject.class.php");
10 define("EVENT_VEHICLE",1);
11 define("EVENT_WORK_RELATED",2);
12 define("EVENT_SLIP_FALL",3);
13 define("EVENT_OTHER",4);
17 * class FormHpTjePrimary
20 class FormHand
extends ORDataObject
{
46 * Constructor sets all Form attributes to their default value
49 function FormHand($id= "", $_prefix = "") {
50 if (is_numeric($id)) {
55 $this->date
= date("Y-m-d H:i:s");
58 $this->_table
= "form_hand";
60 $this->pid
= $GLOBALS['pid'];
63 //$this->date = $this->get_date();
68 //$this->temp_methods = parent::_load_enum("temp_locations",false);
71 function toString($html = false) {
73 ."ID: " . $this->id
. "\n";
76 return nl2br($string);
82 function set_id($id) {
83 if (!empty($id) && is_numeric($id)) {
90 function set_pid($pid) {
91 if (!empty($pid) && is_numeric($pid)) {
102 function set_date($dt) {
107 function get_user() {
110 function set_user($u) {
116 function set_activity($tf) {
117 if (!empty($tf) && is_numeric($tf)) {
118 $this->activity
= $tf;
121 function get_activity() {
122 return $this->activity
;
132 function set_left_1($tf) {
135 function get_left_1() {
136 return $this->left_1
;
139 function set_left_2($tf) {
142 function get_left_2() {
143 return $this->left_2
;
146 function set_left_3($tf) {
149 function get_left_3() {
150 return $this->left_3
;
153 function set_right_1($tf) {
154 $this->right_1
= $tf;
156 function get_right_1() {
157 return $this->right_1
;
160 function set_right_2($tf) {
161 $this->right_2
= $tf;
163 function get_right_2() {
164 return $this->right_2
;
167 function set_right_3($tf) {
168 $this->right_3
= $tf;
170 function get_right_3() {
171 return $this->right_3
;
176 function get_handedness() {
177 return $this->handedness
;
179 function set_handedness($data) {
181 $this->handedness
= $data;
184 function get_handedness_l() {
185 return $this->handedness
== "Left" ?
"CHECKED" : ""; }
186 function get_handedness_r() {
187 return $this->handedness
== "Right" ?
"CHECKED" : ""; }
188 function get_handedness_b() {
189 return $this->handedness
== "Both" ?
"CHECKED" : ""; }
194 function get_notes() {
197 function set_notes($data) {
199 $this->notes
= $data;