Feat openemr fix 7480 7494 email prescription (#7495)
[openemr.git] / interface / forms / fee_sheet / review / fee_sheet_classes.php
blob0855f6ee3810d4dd736b8eb65685b39714d33199
1 <?php
3 /**
4 * class definitions for objects used in processing fee sheet related data
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Kevin Yeh <kevin.y@integralemr.com>
9 * @copyright Copyright (c) 2013 Kevin Yeh <kevin.y@integralemr.com> and OEMR <www.oemr.org>
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 /**
14 * This is an encapsulation of code, code_type and description representing
15 * a code
19 require_once("$srcdir/../custom/code_types.inc.php");
21 class code_info
23 function __construct($c, $ct, $desc, $selected = true)
25 $this->code = $c;
26 $this->code_type = $ct;
27 $this->description = $desc;
28 $this->selected = $selected;
29 // check if the code type is active and allowed to create medical problems from diagnosis elements
30 $this->allowed_to_create_problem_from_diagnosis = "FALSE";
31 if (check_code_set_filters($ct, array("active","problem"))) {
32 $this->allowed_to_create_problem_from_diagnosis = "TRUE";
35 // check if the code type is active and allowed to create diagnosis elements from medical problems
36 $this->allowed_to_create_diagnosis_from_problem = "FALSE";
37 if (check_code_set_filters($ct, array("active","diag"))) {
38 $this->allowed_to_create_diagnosis_from_problem = "TRUE";
41 public $code;
42 public $code_type;
43 public $description;
44 public $selected;
45 public $db_id;
46 public $allowed_to_create_problem_from_diagnosis;
47 public $allowed_to_create_diagnosis_from_problem;
48 public $create_problem;
50 public function getKey()
52 return $this->code_type . "|" . $this->code;
55 public function getCode()
57 return $this->code;
59 public function getCode_type()
61 return $this->code_type;
63 public function addArrayParams(&$arr)
65 array_push($arr, $this->code_type, $this->code, $this->description);
69 /**
70 * This is an extension of code_info which supports the additional information
71 * held in a procedure billing entry
73 class procedure extends code_info
75 function __construct($c, $ct, $desc, $fee, $justify, $modifiers, $units, $mod_size, $selected = true)
77 parent::__construct($c, $ct, $desc, $selected);
78 $this->fee = $fee;
79 $this->justify = $justify;
80 $this->modifiers = $modifiers;
81 $this->units = $units;
82 $this->mod_size = $mod_size;
84 public $fee;
85 public $justify;
86 public $modifiers;
87 public $units;
88 public $mod_size;
90 //modifier, units, fee, justify
92 public function addProcParameters(&$params)
94 array_push($params, $this->modifiers, $this->units, $this->fee, $this->justify);
98 /**
99 * This is a class which pairs an encounter's ID with the date of the encounter
101 class encounter_info
103 function __construct($id, $date)
105 $this->id = $id;
106 $this->date = $date;
109 public $id;
110 public $date;
112 function getID()
114 return $this->id;