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(); }
} 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>"; if ($rftype == "refill") { echo "<div class='col-md-12' ><font style='font-size: 15px; font-weight: bold'>Prescription Refill : " . $this->bean->name . " " . $mrn . "</font> <!--b>Indication for Pain Medication</b><input type='text' id = 'indication' size='15' onblur'='set_session(this.id,this.value);' value='" . $value . "'> </input--> <b>Patient Active</b> <input type='checkbox' name='pt_active_dummy' id='pt_active_dummy' onclick='javascript: \$(\"#pt_active_c\").prop(\"checked\", this.checked);' checked style='vertical-align:middle;'> <span style='white-space: nowrap;'><b>PCP Name</b> <input type='text' size='35' id='pcp_dummy' width onblur='javascript:document.getElementById(\"pcp_name_c\").value=this.value' value='" . $provrow['provname'] . "' disabled></input></span></div>"; } else {