forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
C_FormReviewOfSystems.class.php
69 lines (56 loc) · 2.38 KB
/
C_FormReviewOfSystems.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
require_once ($GLOBALS['fileroot'] . "/library/sql.inc");
require_once("FormReviewOfSystems.class.php");
class C_FormReviewOfSystems extends Controller {
var $template_dir;
function C_FormReviewOfSystems($template_mod = "general") {
parent::Controller();
$this->template_mod = $template_mod;
$this->template_dir = dirname(__FILE__) . "/templates/review_of_systems/";
$this->assign("FORM_ACTION", $GLOBALS['web_root']);
$this->assign("DONT_SAVE_LINK", $GLOBALS['form_exit_url']);
$this->assign("STYLE", $GLOBALS['style']);
}
function default_action() {
$review_of_systems = new FormReviewOfSystems();
$this->assign("review_of_systems",$review_of_systems);
$this->assign("checks",$review_of_systems->_form_layout());
return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
}
function view_action($form_id) {
if (is_numeric($form_id)) {
$review_of_systems = new FormReviewOfSystems($form_id);
}
else {
$review_of_systems = new FormReviewOfSystems();
}
$this->assign("VIEW",true);
$this->assign("review_of_systems",$review_of_systems);
$this->assign("checks",$review_of_systems->_form_layout());
return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
}
function default_action_process() {
if ($_POST['process'] != "true")
return;
$this->review_of_systems = new FormReviewOfSystems($_POST['id']);
parent::populate_object($this->review_of_systems);
$this->review_of_systems->persist();
if ($GLOBALS['encounter'] == "") {
$GLOBALS['encounter'] = date("Ymd");
}
addForm($GLOBALS['encounter'], "Review Of Systems", $this->review_of_systems->id, "review_of_systems", $GLOBALS['pid'], $_SESSION['userauthorized']);
if (!empty($_POST['cpt_code'])) {
$sql = "select * from codes where code ='" . add_escape_custom($_POST['cpt_code']) . "' order by id";
$results = sqlQ($sql);
$row = mysql_fetch_array($results);
if (!empty($row)) {
addBilling( date("Ymd"), 'CPT4', $row['code'], $row['code_text'], $_SESSION['pid'], $_SESSION['userauthorized'], $_SESSION['authUserID'],$row['modifier'],$row['units'],$row['fee']);
}
}
$_POST['process'] = "";
return;
}
}
?>