3 require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
4 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
5 require_once("FormPriorAuth.class.php");
7 class C_FormPriorAuth
extends Controller
{
11 function C_FormPriorAuth($template_mod = "general") {
13 $returnurl = $GLOBALS['concurrent_layout'] ?
'encounter_top.php' : 'patient_encounter.php';
14 $this->template_mod
= $template_mod;
15 $this->template_dir
= dirname(__FILE__
) . "/templates/prior_auth/";
16 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
17 $this->assign("DONT_SAVE_LINK",$GLOBALS['webroot'] . "/interface/patient_file/encounter/$returnurl");
18 $this->assign("STYLE", $GLOBALS['style']);
21 function default_action() {
22 $prior_auth = new FormPriorAuth();
23 $this->assign("prior_auth",$prior_auth);
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 $prior_auth = new FormPriorAuth($form_id);
32 $prior_auth = new FormPriorAuth();
34 $this->assign("VIEW",true);
35 $this->assign("prior_auth",$prior_auth);
36 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
40 function default_action_process() {
41 if ($_POST['process'] != "true")
43 $this->prior_auth
= new FormPriorAuth($_POST['id']);
44 parent
::populate_object($this->prior_auth
);
47 $this->prior_auth
->persist();
48 if ($GLOBALS['encounter'] == "") {
49 $GLOBALS['encounter'] = date("Ymd");
51 addForm($GLOBALS['encounter'], "Prior Authorization Form", $this->prior_auth
->id
, "prior_auth", $GLOBALS['pid'], $_SESSION['userauthorized']);
52 $_POST['process'] = "";