3 * class definitions for objects used in processing fee sheet related data
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>;.
19 * @author Kevin Yeh <kevin.y@integralemr.com>
20 * @link http://www.open-emr.org
24 * This is an encapsulation of code, code_type and description representing
28 require_once("$srcdir/../custom/code_types.inc.php");
32 function __construct($c,$ct,$desc,$selected=true)
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";
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()
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
);
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);
83 $this->justify
=$justify;
84 $this->modifiers
=$modifiers;
86 $this->mod_size
=$mod_size;
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
107 function __construct($id,$date)