function fragment_action($id, $sort = "")
 {
     if (empty($id)) {
         $this->function_argument_error();
         exit;
     }
     if (!empty($sort)) {
         $this->assign("prescriptions", Prescription::prescriptions_factory($id, $sort));
     } else {
         $this->assign("prescriptions", Prescription::prescriptions_factory($id));
     }
     //print_r(Prescription::prescriptions_factory($id));
     $this->display($GLOBALS['template_dir'] . "prescription/" . $this->template_mod . "_fragment.html");
 }
示例#2
0
        $checked = '';
        if ($result['category'] == 'prescriptions' && $count < 4) {
            $count++;
            $checked = 'checked';
        }
        echo "<div>\n";
        echo "<input type=checkbox name='ch_" . $result['id'] . "' {$checked}><span>" . $result['category'] . '</span>:' . $result['subcategory'] . ':' . $result['item'] . "<br/>\n";
        echo "</div>\n";
    }
    echo "</div>\n";
    echo "<div id='log'>\n";
    //temp for debugging
    echo "</div>\n";
    //create Prescription object for the purpose of drawing data from the Prescription
    //table for those who wish to do so
    $rxarray = Prescription::prescriptions_factory($_SESSION['pid']);
    //now give a choice of drugs from the Prescription table
    foreach ($rxarray as $val) {
        echo "<input type=checkbox name='chrx_" . $val->id . "'>" . $val->drug . ':' . $val->start_date . "<br/>\n";
    }
    ?>
	
<?php 
    if ($_GET['letterhead']) {
        ?>
<input type=submit name='print_pdf' value='<?php 
        xl('Print (PDF)', 'e');
        ?>
'>
<?php 
    }