3 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
4 require_once("FormROS.class.php");
6 class C_FormROS
extends Controller
{
10 function __construct($template_mod = "general") {
11 parent
::__construct();
12 $returnurl = 'encounter_top.php';
13 $this->template_mod
= $template_mod;
14 $this->template_dir
= dirname(__FILE__
) . "/templates/ros/";
15 $this->assign("FORM_ACTION", $GLOBALS['web_root']);
16 $this->assign("DONT_SAVE_LINK",$GLOBALS['webroot'] . "/interface/patient_file/encounter/$returnurl");
17 $this->assign("STYLE", $GLOBALS['style']);
20 function default_action() {
22 $this->assign("form",$ros);
23 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
26 function view_action($form_id) {
28 if (is_numeric($form_id)) {
29 $ros = new FormROS($form_id);
35 $this->assign("form",$ros);
36 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
40 function default_action_process() {
41 if ($_POST['process'] != "true"){
45 $this->ros
= new FormROS($_POST['id']);
47 parent
::populate_object($this->ros
);
48 $this->ros
->persist();
50 if ($GLOBALS['encounter'] == "") {
51 $GLOBALS['encounter'] = date("Ymd");
53 if(empty($_POST['id']))
55 addForm($GLOBALS['encounter'], "Review Of Systems", $this->ros
->id
, "ros", $GLOBALS['pid'], $_SESSION['userauthorized']);
56 $_POST['process'] = "";