Highway to PSR2
[openemr.git] / interface / forms / prior_auth / FormPriorAuth.class.php
blobeeb412ce314d2c782e2057a0722786003104edeb
1 <?php
6 /**
7 * class PriorAuth
9 */
10 class FormPriorAuth extends ORDataObject
13 /**
15 * @access public
20 /**
22 * @access private
25 var $id;
26 var $date;
27 var $pid;
28 var $activity;
29 var $prior_auth_number;
30 var $comments;
33 /**
34 * Constructor sets all Form attributes to their default value
37 function FormPriorAuth($id = "", $_prefix = "")
39 if (is_numeric($id)) {
40 $this->id = $id;
41 } else {
42 $id = "";
45 $this->_table = "form_prior_auth";
46 $this->date = date("Y-m-d H:i:s");
47 $this->activity = 1;
48 $this->pid = $GLOBALS['pid'];
49 $this->prior_auth_number = "";
50 if ($id != "") {
51 $this->populate();
55 function toString($html = false)
57 $string .= "\n"
58 ."ID: " . $this->id . "\n";
60 if ($html) {
61 return nl2br($string);
62 } else {
63 return $string;
66 function set_id($id)
68 if (!empty($id) && is_numeric($id)) {
69 $this->id = $id;
72 function get_id()
74 return $this->id;
76 function set_pid($pid)
78 if (!empty($pid) && is_numeric($pid)) {
79 $this->pid = $pid;
82 function get_pid()
84 return $this->pid;
86 function set_activity($tf)
88 if (!empty($tf) && is_numeric($tf)) {
89 $this->activity = $tf;
92 function get_activity()
94 return $this->activity;
98 function set_comments($string)
100 $this->comments = $string;
103 function get_comments()
105 return $this->comments;
108 function set_prior_auth_number($string)
110 $this->prior_auth_number = $string;
113 function get_prior_auth_number()
115 return $this->prior_auth_number;
119 function get_date()
121 return $this->date;
123 } // end of Form