Integrating the problem list improvements with the recent fee sheet improvements...
[openemr.git] / interface / forms / fee_sheet / review / fee_sheet_classes.php
blob549b51054e3613ba8149f94e2cf289a242df526b
1 <?php
2 /**
3 * class definitions for objects used in processing fee sheet related data
4 *
5 * Copyright (C) 2013 Kevin Yeh <kevin.y@integralemr.com> and OEMR <www.oemr.org>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Kevin Yeh <kevin.y@integralemr.com>
20 * @link http://www.open-emr.org
23 /**
24 * This is an encapsulation of code, code_type and description representing
25 * a code
28 require_once("$srcdir/../custom/code_types.inc.php");
30 class code_info
32 function __construct($c,$ct,$desc,$selected=true)
34 $this->code=$c;
35 $this->code_type=$ct;
36 $this->description=$desc;
37 $this->selected=$selected;
38 // check if the code type is active and allowed to create medical problems from diagnosis elements
39 $this->allowed_to_create_problem_from_diagnosis="FALSE";
40 if (check_code_set_filters($ct,array("active","problem"))) $this->allowed_to_create_problem_from_diagnosis="TRUE";
41 // check if the code type is active and allowed to create diagnosis elements from medical problems
42 $this->allowed_to_create_diagnosis_from_problem="FALSE";
43 if (check_code_set_filters($ct,array("active","diag"))) $this->allowed_to_create_diagnosis_from_problem="TRUE";
45 public $code;
46 public $code_type;
47 public $description;
48 public $selected;
49 public $db_id;
50 public $allowed_to_create_problem_from_diagnosis;
51 public $allowed_to_create_diagnosis_from_problem;
52 public $create_problem;
54 public function getKey()
56 return $this->code_type."|".$this->code;
59 public function getCode()
61 return $this->code;
63 public function getCode_type()
65 return $this->code_type;
67 public function addArrayParams(&$arr)
69 array_push($arr,$this->code_type,$this->code,$this->description);
73 /**
74 * This is an extension of code_info which supports the additional information
75 * held in a procedure billing entry
77 class procedure extends code_info
79 function __construct($c,$ct,$desc,$fee,$justify,$modifiers,$units,$mod_size,$selected=true)
81 parent::__construct($c,$ct,$desc,$selected);
82 $this->fee=$fee;
83 $this->justify=$justify;
84 $this->modifiers=$modifiers;
85 $this->units=$units;
86 $this->mod_size=$mod_size;
88 public $fee;
89 public $justify;
90 public $modifiers;
91 public $units;
93 //modifier, units, fee, justify
95 public function addProcParameters(&$params)
97 array_push($params,$this->modifiers,$this->units,$this->fee,$this->justify);
103 * This is a class which pairs an encounter's ID with the date of the encounter
105 class encounter_info
107 function __construct($id,$date)
109 $this->id=$id;
110 $this->date=$date;
113 public $id;
114 public $date;
116 function getID()
118 return $this->id;