Esempio n. 1
0
 // $form_info = getFormInfoById($iter['id']);
 if (strtolower(substr($iter['form_name'], 0, 5)) == 'camos') {
     //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();
Esempio n. 2
0
            include_once "{$srcdir}/registry.inc";
            $reg = getRegistered();
            if (!empty($reg)) {
                foreach ($reg as $entry) {
                    $option_id = $entry['directory'];
                    $title = trim($entry['nickname']);
                    if ($option_id == 'fee_sheet') {
                        continue;
                    }
                    if ($option_id == 'newpatient') {
                        continue;
                    }
                    if (empty($title)) {
                        $title = $entry['name'];
                    }
                    genMiscLink('RBot', 'cod', '2', xl_form_title($title), "patient_file/encounter/load_form.php?formname=" . urlencode($option_id));
                }
            }
            ?>
        </ul>
      </li>
      <li class="collapsed" ><a class="collapsed_lv2"><span><?php 
            echo xlt('Import');
            ?>
</span></a>
        <ul>
          <?php 
            genMiscLink('RTop', 'ccr', '0', xlt('Upload'), 'patient_file/ccr_import.php');
            ?>
          <?php 
            genMiscLink('RTop', 'apr', '0', xlt('Pending Approval'), 'patient_file/ccr_pending_approval.php');
Esempio n. 3
0
         echo htmlspecialchars(xl_form_title($enc['form_name']), ENT_NOQUOTES);
         echo "<br>";
         echo "<div class='encreport' style='padding-left:10px;'>";
         // Use the form's report.php for display.  Forms with names starting with LBF
         // are list-based forms sharing a single collection of code.
         if (substr($formdir, 0, 3) == 'LBF') {
             include_once $GLOBALS['incdir'] . "/forms/LBF/report.php";
             call_user_func("lbf_report", $pid, $result4['encounter'], 2, $enc['form_id'], $formdir);
         } else {
             include_once $GLOBALS['incdir'] . "/forms/{$formdir}/report.php";
             call_user_func($formdir . "_report", $pid, $result4['encounter'], 2, $enc['form_id']);
         }
         echo "</div>";
     } else {
         echo "<div " . "onmouseover='efmouseover(this,{$pid}," . $result4['encounter'] . ",\"{$formdir}\"," . $enc['form_id'] . ")' " . "onmouseout='ttMouseOut()'>";
         echo htmlspecialchars(xl_form_title($enc['form_name']), ENT_NOQUOTES);
         echo "</div>";
     }
 }
 // end encounter Forms loop
 echo "</div>";
 echo "</td>\n";
 // show user (Provider) for the encounter
 $provname = '&nbsp;';
 if (!empty($result4['lname']) || !empty($result4['fname'])) {
     $provname = htmlspecialchars($result4['lname'], ENT_NOQUOTES);
     if (!empty($result4['fname']) || !empty($result4['mname'])) {
         $provname .= htmlspecialchars(', ' . $result4['fname'] . ' ' . $result4['mname'], ENT_NOQUOTES);
     }
 }
 echo "<td>{$provname}</td>\n";
Esempio n. 4
0
                    $form_name_found_flag = 1;
                }
            }
            // if the form does not match precisely with any names in the registry, now see if any front partial matches
            // and change $form_name appropriately so it will print above in $toprint = $html_strings[$var]
            if (!$form_name_found_flag) {
                foreach ($registry_form_name as $var) {
                    if (strpos($form_name, $var) == 0) {
                        $form_name = $var;
                    }
                }
            }
            if (!is_array($html_strings[$form_name])) {
                $html_strings[$form_name] = array();
            }
            array_push($html_strings[$form_name], "<input type='checkbox' " . " name='" . $result["formdir"] . "_" . $result["form_id"] . "'" . " id='" . $result["formdir"] . "_" . $result["form_id"] . "'" . " value='" . $result["encounter"] . "'" . " class='encounter_form' " . ">" . xl_form_title($result["form_name"]) . "<br>\n");
        }
    }
    foreach ($registry_form_name as $var) {
        if ($toprint = $html_strings[$var]) {
            foreach ($toprint as $var) {
                print $var;
            }
        }
    }
    ?>

<?php 
}
?>
Esempio n. 5
0
                //
                // display encounter forms, encoded as a POST variable
                // in the format: <formdirname_formid>=<encounterID>
                if ($auth_notes_a || $auth_notes || $auth_coding_a || $auth_coding || $auth_med || $auth_relaxed) {
                    $form_encounter = $val;
                    preg_match('/^(.*)_(\\d+)$/', $key, $res);
                    $form_id = $res[2];
                    $formres = getFormNameByFormdirAndFormid($res[1], $form_id);
                    $dateres = getEncounterDateByEncounter($form_encounter);
                    $formId = getFormIdByFormdirAndFormid($res[1], $form_id);
                    if ($res[1] == 'newpatient') {
                        echo "<div class='text encounter'>\n";
                        echo "<h1>" . xl($formres["form_name"]) . "</h1>";
                    } else {
                        echo "<div class='text encounter_form'>";
                        echo "<h1>" . xl_form_title($formres["form_name"]) . "</h1>";
                    }
                    // show the encounter's date
                    echo "(" . oeFormatSDFT(strtotime($dateres["date"])) . ") ";
                    if ($res[1] == 'newpatient') {
                        // display the provider info
                        echo ' ' . xl('Provider') . ': ' . text(getProviderName(getProviderIdOfEncounter($form_encounter)));
                    }
                    echo "<br>\n";
                    // call the report function for the form
                    ?>
                
                <div name="search_div" id="search_div_<?php 
                    echo attr($form_id);
                    ?>
_<?php 
Esempio n. 6
0
            if ($old_category != $new_category) {
                //new category, new menu section
                $new_category_ = $new_category;
                $new_category_ = str_replace(' ', '_', $new_category_);
                if ($old_category != '') {
                    $StringEcho .= "\n                                                </ul>\n                                            </li>\n                                            <li class='dropdown'>\n                                            ";
                }
                $StringEcho .= '
                                      <a class="dropdown-toggle" data-toggle="dropdown" 
                                        id="menu_dropdown_' . attr($new_category_) . '" role="button" 
                                        aria-expanded="false">' . text($new_category) . ' </a>
                                        <ul class="dropdown-menu" role="menu">
                                        ';
                $old_category = $new_category;
            }
            $StringEcho .= "<li>\n                                    <a target='RBot' href='" . $GLOBALS['webroot'] . "/interface/patient_file/encounter/load_form.php?formname=" . urlencode($entry['directory']) . "'>\n                                    <i class='fa fa-angle-double-down' title='" . xla('Opens in Bottom frame') . "'></i>" . xl_form_title($nickname) . "</a></li>";
        }
    }
    $StringEcho .= '
                            </ul>
                          </li>
                          ';
}
echo $StringEcho;
?>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" 
                           id="menu_dropdown_library" role="button" 
                           aria-expanded="true"><?php 
echo xlt("Library");
?>
Esempio n. 7
0
</span>

<form method="post" action="<?php 
echo $rootdir;
?>
/patient_file/encounter/delete_form.php" name="my_form" id="my_form">
<?php 
// output each GET variable as a hidden form input
foreach ($_GET as $key => $value) {
    echo '<input type="hidden" id="' . attr($key) . '" name="' . attr($key) . '" value="' . attr($value) . '"/>' . "\n";
}
?>
<input type="hidden" id="confirm" name="confirm" value="1"/>
<p>
<?php 
echo xlt('You are about to delete the following form from this encounter') . ': ' . text(xl_form_title($_GET['formname']));
?>
</p>
<input type="button" id="confirmbtn" name="confirmbtn" value='<?php 
echo xla('Yes, Delete this form');
?>
'>
<input type="button" id="cancel" name="cancel" value='<?php 
echo xla('Cancel');
?>
'>
</form>

</body>

<script language="javascript">
Esempio n. 8
0
			<span class=text> </span> 
		</td>
		<td bgcolor="<?php 
    echo $color;
    ?>
" width="20%">
	        <?php 
    $form_title_file = @file($GLOBALS['srcdir'] . "/../interface/forms/{$fname}/info.txt");
    if ($form_title_file) {
        $form_title = $form_title_file[0];
    } else {
        $form_title = $fname;
    }
    ?>
			<span class=bold><?php 
    echo xl_form_title($form_title);
    ?>
</span> 
		</td>
		<td bgcolor="<?php 
    echo $color;
    ?>
" width="10%"><?php 
    if ($phpState == "PHP extracted") {
        echo '<a class=link_submit href="./forms_admin.php?name=' . urlencode($fname) . '&method=register">' . xl('register') . '</a>';
    } else {
        echo '<span class=text>' . xl('n/a') . '</span>';
    }
    ?>
</td>
		<td bgcolor="<?php 
Esempio n. 9
0
            $added = "";
        } else {
            $added = "index";
            $modulePath = $GLOBALS['zendModDir'];
        }
        $relative_link = "../../modules/" . $modulePath . "/" . $modulerow['path'];
        $nickname = $modulerow['menu_name'] ? $modulerow['menu_name'] : 'Noname';
        if ($jid == 0 || $modid != $modulerow['mod_id']) {
            if ($modid != '') {
                $StringEcho .= '</table></div></li>';
            }
            $StringEcho .= "<li><a href='JavaScript:void(0);' onClick=\"mopen('{$DivId}');\" >{$new_category}</a><div id='{$DivId}' ><table border='0' cellspacing='0' cellpadding='0'>";
        }
        $jid++;
        $modid = $modulerow['mod_id'];
        $StringEcho .= "<tr><td style='border-top: 1px solid #000000;padding:0px;'><a onclick=\"openNewForm('{$relative_link}')\" href='JavaScript:void(0);'>" . xl_form_title($nickname) . "</a></td></tr>";
    }
}
?>
<!-- DISPLAYING HOOKS ENDS HERE -->
<?php 
if ($StringEcho) {
    $StringEcho .= "</table></div></li></ul>" . $StringEcho2;
}
?>
<table cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td valign="top"><?php 
echo $StringEcho;
?>
</td>
Esempio n. 10
0
</table>-->
<?php 
//$StringEcho='';
// This shows Layout Based Form names just like the above.
//
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'lbfnames' ORDER BY seq, title");
if (sqlNumRows($lres)) {
    if (!$StringEcho) {
        $StringEcho = '<ul id="sddm">';
    }
    $StringEcho .= "<li><a href='JavaScript:void(0);' onClick=\"mopen('lbf');\" >" . xl('Layout Based') . "</a><div id='lbf' ><table border='0'  cellspacing='0' cellpadding='0'>";
    while ($lrow = sqlFetchArray($lres)) {
        $option_id = $lrow['option_id'];
        // should start with LBF
        $title = $lrow['title'];
        $StringEcho .= "<tr><td style='border-top: 1px solid #000000;padding:0px;'><a href='" . $rootdir . '/patient_file/encounter/load_form.php?formname=' . urlencode($option_id) . "' >" . xl_form_title($title) . "</a></td></tr>";
    }
}
if ($StringEcho) {
    $StringEcho .= "</table></div></li></ul>" . $StringEcho2;
}
?>
<table cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td valign="top"><?php 
echo $StringEcho;
?>
</td>
  </tr>
</table>
</dl>
Esempio n. 11
0
function update_visit_forms(&$menu_list)
{
    $baseURL = "/interface/patient_file/encounter/load_form.php?formname=";
    $menu_list->children = array();
    $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
    if (sqlNumRows($lres)) {
        while ($lrow = sqlFetchArray($lres)) {
            $option_id = $lrow['option_id'];
            // should start with LBF
            $title = $lrow['title'];
            $formURL = $baseURL . urlencode($option_id);
            $formEntry = new stdClass();
            $formEntry->label = xl_form_title($title);
            $formEntry->url = $formURL;
            $formEntry->requirement = 2;
            $formEntry->target = 'enc';
            array_push($menu_list->children, $formEntry);
        }
    }
    $reg = getRegistered();
    if (!empty($reg)) {
        foreach ($reg as $entry) {
            $option_id = $entry['directory'];
            $title = trim($entry['nickname']);
            if ($option_id == 'fee_sheet') {
                continue;
            }
            if ($option_id == 'newpatient') {
                continue;
            }
            if (empty($title)) {
                $title = $entry['name'];
            }
            $formURL = $baseURL . urlencode($option_id);
            $formEntry = new stdClass();
            $formEntry->label = xl_form_title($title);
            $formEntry->url = $formURL;
            $formEntry->requirement = 2;
            $formEntry->target = 'enc';
            array_push($menu_list->children, $formEntry);
        }
    }
}
Esempio n. 12
0
                echo "</select>\n";
            }
            echo "<select name=" . $new_category_ . " onchange='openNewForm(this)'>\n";
            echo " <option value=" . $new_category_ . ">" . $new_category . "</option>\n";
            $old_category = $new_category;
        }
        echo " <option value='" . $rootdir . '/patient_file/encounter/load_form.php?formname=' . urlencode($entry['directory']) . "'>" . xl_form_title($nickname) . "</option>\n";
    }
    echo "</select>\n";
}
// This shows Layout Based Form names just like the above.
//
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'lbfnames' ORDER BY seq, title");
if (sqlNumRows($lres)) {
    echo "<select name='lbfnames' onchange='openNewForm(this)'>\n";
    echo "<option value='lbfnames'>" . xl('Layout Based') . "</option>\n";
    while ($lrow = sqlFetchArray($lres)) {
        $option_id = $lrow['option_id'];
        // should start with LBF
        $title = $lrow['title'];
        echo "<option value='{$rootdir}/patient_file/encounter/load_form.php?" . "formname={$option_id}'>" . xl_form_title($title) . "</option>\n";
    }
    echo "</select>\n";
}
echo "</FORM>\n";
?>
</dl>

</body>
</html>
Esempio n. 13
0
                 $frow = sqlQuery("select * from form_" . $enc['formdir'] . " where id = " . $enc['form_id']);
                 foreach ($frow as $fkey => $fvalue) {
                     if (!preg_match('/[A-Za-z]/', $fvalue)) {
                         continue;
                     }
                     if ($title) {
                         $title .= "; ";
                     }
                     $title .= strtoupper($fkey) . ': ' . $fvalue;
                 }
                 $title = htmlspecialchars(strtr($title, "\t\n\r", "   "), ENT_QUOTES);
             }
         }
         // end athletic team
         echo "<span class='form_tt' title=\"{$title}\">";
         echo xl_form_title($enc['form_name']);
         echo "</span><br>";
     }
     // end encounter Forms loop
     echo "</div>";
     echo "</td>\n";
     // show user (Provider) for the encounter
     $provname = '&nbsp;';
     if (!empty($result4['lname']) || !empty($result4['fname'])) {
         $provname = $result4['lname'];
         if (!empty($result4['fname']) || !empty($result4['mname'])) {
             $provname .= ', ' . $result4['fname'] . ' ' . $result4['mname'];
         }
     }
     echo "<td>{$provname}</td>\n";
 }
Esempio n. 14
0
    $option_id = $lrow['option_id']; // should start with LBF
    $title = $lrow['title'];
    genMiscLink('RBot','cod','2',xl_form_title($title),
      "patient_file/encounter/load_form.php?formname=$option_id");
  }
}
include_once("$srcdir/registry.inc");
$reg = getRegistered();
if (!empty($reg)) {
  foreach ($reg as $entry) {
    $option_id = $entry['directory'];
	  $title = trim($entry['nickname']);
    if ($option_id == 'fee_sheet' ) continue;
    if ($option_id == 'newpatient') continue;
	  if (empty($title)) $title = $entry['name'];
    genMiscLink('RBot','cod','2',xl_form_title($title),
      "patient_file/encounter/load_form.php?formname=" .
      urlencode($option_id));
  }
}
?>
        </ul>
      </li>
      <li class="collapsed" ><a class="collapsed_lv2"><span><?php echo xlt('Import') ?></span></a>
        <ul>
          <?php genMiscLink('RTop','ccr','0',xlt('Upload'),'patient_file/ccr_import.php'); ?>
          <?php genMiscLink('RTop','apr','0',xlt('Pending Approval'),'patient_file/ccr_pending_approval.php'); ?>
        </ul>
      </li>
<?php } // end if gbl_nav_visit_forms ?>