3 require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
4 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
5 require_once("FormReviewOfSystems.class.php");
7 class C_FormReviewOfSystems
extends Controller
{
11 function C_FormReviewOfSystems($template_mod = "general") {
13 $this->template_mod
= $template_mod;
14 $this->template_dir
= dirname(__FILE__
) . "/templates/review_of_systems/";
15 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
16 $this->assign("DONT_SAVE_LINK", $GLOBALS['form_exit_url']);
17 $this->assign("STYLE", $GLOBALS['style']);
20 function default_action() {
21 $review_of_systems = new FormReviewOfSystems();
22 $this->assign("review_of_systems",$review_of_systems);
23 $this->assign("checks",$review_of_systems->_form_layout());
24 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
27 function view_action($form_id) {
28 if (is_numeric($form_id)) {
29 $review_of_systems = new FormReviewOfSystems($form_id);
32 $review_of_systems = new FormReviewOfSystems();
34 $this->assign("VIEW",true);
35 $this->assign("review_of_systems",$review_of_systems);
36 $this->assign("checks",$review_of_systems->_form_layout());
37 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
41 function default_action_process() {
42 if ($_POST['process'] != "true")
44 $this->review_of_systems
= new FormReviewOfSystems($_POST['id']);
45 parent
::populate_object($this->review_of_systems
);
46 $this->review_of_systems
->persist();
47 if ($GLOBALS['encounter'] == "") {
48 $GLOBALS['encounter'] = date("Ymd");
50 addForm($GLOBALS['encounter'], "Review Of Systems", $this->review_of_systems
->id
, "review_of_systems", $GLOBALS['pid'], $_SESSION['userauthorized']);
52 if (!empty($_POST['cpt_code'])) {
53 $sql = "select * from codes where code ='" . add_escape_custom($_POST['cpt_code']) . "' order by id";
55 $results = sqlQ($sql);
57 $row = sqlFetchArray($results);
59 addBilling( date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'],$row['modifier'],$row['units'],$row['fee']);
63 $_POST['process'] = "";