stop reporting of a custom error (it is benign) to the php logfile
[openemr.git] / contrib / forms / patient_instruction / FormPatientInstruction.class.php
blobe02b6346a192342b303429d6d19f4248d3408264
1 <?php
2 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
3 //
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);
16 /**
17 * class FormHpTjePrimary
20 class FormPatientInstruction extends ORDataObject {
22 /**
24 * @access public
28 /**
30 * static
32 var $id;
33 var $date;
34 var $pid;
35 var $user;
36 var $groupname;
37 var $activity;
38 var $instruction;
41 /**
42 * Constructor sets all Form attributes to their default value
45 function FormPatientInstruction($id= "", $_prefix = "") {
46 if (is_numeric($id)) {
47 $this->id = $id;
49 else {
50 $id = "";
51 $this->date = date("Y-m-d H:i:s");
54 $this->_table = "form_patient_instruction";
55 $this->activity = 1;
56 $this->pid = $GLOBALS['pid'];
57 if ($id != "") {
58 $this->populate();
59 //$this->date = $this->get_date();
62 function populate() {
63 parent::populate();
64 //$this->temp_methods = parent::_load_enum("temp_locations",false);
67 function toString($html = false) {
68 $string .= "\n"
69 ."ID: " . $this->id . "\n";
71 if ($html) {
72 return nl2br($string);
74 else {
75 return $string;
78 function set_id($id) {
79 if (!empty($id) && is_numeric($id)) {
80 $this->id = $id;
83 function get_id() {
84 return $this->id;
86 function set_pid($pid) {
87 if (!empty($pid) && is_numeric($pid)) {
88 $this->pid = $pid;
91 function get_pid() {
92 return $this->pid;
95 function get_date() {
96 return $this->date;
98 function set_date($dt) {
99 if (!empty($dt)) {
100 $this->date = $dt;
103 function get_user() {
104 return $this->user;
106 function set_user($u) {
107 if(!empty($u)){
108 $this->user = $u;
112 function get_instruction() {
113 return $this->instruction;
115 function set_instruction($data) {
116 if(!empty($data)){
117 $this->instruction = $data;
121 function set_activity($tf) {
122 if (!empty($tf) && is_numeric($tf)) {
123 $this->activity = $tf;
126 function get_activity() {
127 return $this->activity;
130 function persist() {
131 parent::persist();
133 } // end of Form