3 require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
4 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
5 require_once("FormROS.class.php");
7 class C_FormROS
extends Controller
{
11 function C_FormROS($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/ros/";
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() {
23 $this->assign("form",$ros);
24 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
27 function view_action($form_id) {
29 if (is_numeric($form_id)) {
30 $ros = new FormROS($form_id);
36 $this->assign("form",$ros);
37 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
41 function default_action_process() {
42 if ($_POST['process'] != "true"){
46 $this->ros
= new FormROS($_POST['id']);
48 parent
::populate_object($this->ros
);
49 $this->ros
->persist();
51 if ($GLOBALS['encounter'] == "") {
52 $GLOBALS['encounter'] = date("Ymd");
54 if(empty($_POST['id']))
56 addForm($GLOBALS['encounter'], "Review Of Systems", $this->ros
->id
, "ros", $GLOBALS['pid'], $_SESSION['userauthorized']);
57 $_POST['process'] = "";