3 require_once ($GLOBALS['fileroot'] . "/library/classes/Controller.class.php");
4 require_once ($GLOBALS['fileroot'] . "/library/forms.inc");
5 require_once("FormSOAP.class.php");
7 class C_FormSOAP
extends Controller
{
11 function C_FormSOAP($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/";
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 $form = new FormSOAP();
23 $this->assign("data",$form);
25 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
28 function view_action($form_id) {
29 if (is_numeric($form_id)) {
30 $form = new FormSOAP($form_id);
33 $form = new FormSOAP();
35 $dbconn = $GLOBALS['adodb']['db'];
37 $this->assign("data",$form);
39 return $this->fetch($this->template_dir
. $this->template_mod
. "_new.html");
43 function default_action_process() {
44 if ($_POST['process'] != "true")
46 $this->form
= new FormSOAP($_POST['id']);
47 parent
::populate_object($this->form
);
49 $this->form
->persist();
50 if ($GLOBALS['encounter'] == "") {
51 $GLOBALS['encounter'] = date("Ymd");
53 if(empty($_POST['id']))
55 addForm($GLOBALS['encounter'], "SOAP", $this->form
->id
, "soap", $GLOBALS['pid'], $_SESSION['userauthorized']);
56 $_POST['process'] = "";