function display() { $db = DBManagerFactory::getInstance(); $sql = "SELECT pc.mrn_c pmrn, p.id patid, (SELECT p1b.name provname from reg_provider p1b, reg_provider_reg_patient_c p2b WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id AND p2b.reg_provider_reg_patientreg_patient_idb = patid) provname, last_name,first_name FROM reg_patient p, reg_patient_cstm pc WHERE p.id=pc.id_c "; $resultb = $db->query($sql, true); $final = array(); while ($row = $db->fetchByAssoc($resultb)) { $final[] = $row; } $sugarSmarty = new Sugar_Smarty(); //$sugarSmarty->assign("duration",$duration); $sugarSmarty->assign("mydata", $final); $sugarSmarty->assign("title", "UTS Entry"); $snip = new REG_PatientViewTestMed(); //echo $snip->snippy(); $sugarSmarty->assign("snippet", $snip->snippet()); $sugarSmarty->display('custom/modules/REG_Patient/tpls/utsentryREG_Patient.tpl'); // parent::display(); }
if ($rowuts['amph'] != null) { $mydatauts[$utsctr - 1]['amph'] = $rowuts['amph']; } } else { $mydatauts[] = $rowuts; $utsctr = $utsctr + 1; } //generate new row $ctr = $ctr + 1; $prevdate = $rowuts['thisdate1']; //$mydatauts[]=$rowuts; } $this->dv3->ss->assign("mydatauts", $mydatauts); $this->dv3->ss->assign("lastuts", $lastuts); /*** MEDS TEST ****/ $snip = new REG_PatientViewTestMed(); //echo $snip->snippy(); //$GLOBALS['log']->fatal("test refill"); $this->dv3->ss->assign("snippet", $snip->snippet($this->bean->id)); /**** ALL SMARTY assignments must be done above *****/ $this->dv->process(); // echo $this->dv->display(); $this->dv3->process(); echo "<table width='100%'><tr><td width='70%' style='border-color: rgb( 100, 100, 255); border-style: ridge;border-width: 2px;margin-top: 0;vertical-align: top;' >"; echo '<div id="tabs"> <ul id ="tablist"> <li><a href="#tabs-1"><b>New</b></a></li> </ul> <div style="margin: 0 auto;display: table-footer-group;" id="tabs-1">'; echo "<input type='hidden' id ='patient_name' value='" . $this->bean->name . "'></input>";