Ejemplo n.º 1
0
     //CAMOS generates links from report.php and these links should
     //be clickable without causing view.php to come up unexpectedly.
     //I feel that the JQuery code in this file leading to a click
     //on the report.php content to bring up view.php steps on a
     //form's autonomy to generate it's own html content in it's report
     //but until any other form has a problem with this, I will just
     //make an exception here for CAMOS and allow it to carry out this
     //functionality for all other forms.  --Mark
     echo '<tr title="' . xl('Edit form') . '" ' . 'id="' . $formdir . '~' . $iter['form_id'] . '">';
 } else {
     echo '<tr title="' . xl('Edit form') . '" ' . 'id="' . $formdir . '~' . $iter['form_id'] . '" class="text onerow">';
 }
 $user = getNameFromUsername($iter['user']);
 $form_name = $formdir == 'newpatient' ? xl('Patient Encounter') : xl_form_title($iter['form_name']);
 // Create the ESign instance for this form
 $esign = $esignApi->createFormESign($iter['id'], $formdir, $encounter);
 echo "<tr>";
 echo "<td style='border-bottom:1px solid'>";
 // a link to edit the form
 echo "<div class='form_header_controls'>";
 // If the form is locked, it is no longer editable
 if ($esign->isLocked()) {
     echo "<a href=# class='css_button_small form-edit-button-locked' id='form-edit-button-" . attr($formdir) . "-" . attr($iter['id']) . "'><span>" . xlt('Locked') . "</span></a>";
 } else {
     echo "<a class='css_button_small form-edit-button' id='form-edit-button-" . attr($formdir) . "-" . attr($iter['id']) . "' target='" . "_parent" . "' href='{$rootdir}/patient_file/encounter/view_form.php?" . "formname=" . attr($formdir) . "&id=" . attr($iter['form_id']) . "' onclick='top.restoreSession()'>";
     echo "<span>" . xlt('Edit') . "</span></a>";
 }
 if ($esign->isButtonViewable()) {
     echo $esign->buttonHtml();
 }
 if (acl_check('admin', 'super')) {
Ejemplo n.º 2
0
                    echo attr($form_id);
                    ?>
_<?php 
                    echo attr($res[1]);
                    ?>
" class="report_search_div class_<?php 
                    echo attr($res[1]);
                    ?>
">
                <?php 
                    if (substr($res[1], 0, 3) == 'LBF') {
                        call_user_func("lbf_report", $pid, $form_encounter, $N, $form_id, $res[1]);
                    } else {
                        call_user_func($res[1] . "_report", $pid, $form_encounter, $N, $form_id);
                    }
                    $esign = $esignApi->createFormESign($formId, $res[1], $form_encounter);
                    if ($esign->isLogViewable("report")) {
                        $esign->renderLog();
                    }
                    ?>
                
                </div>
                <?php 
                    if ($res[1] == 'newpatient') {
                        // display billing info
                        $bres = sqlStatement("SELECT b.date, b.code, b.code_text " . "FROM billing AS b, code_types AS ct WHERE " . "b.pid = ? AND " . "b.encounter = ? AND " . "b.activity = 1 AND " . "b.code_type = ct.ct_key AND " . "ct.ct_diag = 0 " . "ORDER BY b.date", array($pid, $form_encounter));
                        while ($brow = sqlFetchArray($bres)) {
                            echo "<span class='bold'>&nbsp;" . xl('Procedure') . ": </span><span class='text'>" . $brow['code'] . " " . $brow['code_text'] . "</span><br>\n";
                        }
                    }
                    print "</div>";