Ejemplo n.º 1
0
;
    var enc=<?php 
    echo $encounter;
    ?>
;
    var review_tag="<?php 
    echo xls('Review');
    ?>
";
    var justify_click_title="<?php 
    echo xls('Click to choose diagnoses to justify.');
    ?>
";
    var fee_sheet_options=[];
    var diag_code_types=<?php 
    echo diag_code_types('json');
    ?>
;  // This is a list of diagnosis code types to present for as options in the justify dialog, for now, only "internal codes" included.
</script>
<script type="text/javascript" src="<?php 
    echo $web_root;
    ?>
/library/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<?php 
    echo $web_root;
    ?>
/library/js/knockout/knockout-2.2.1.js"></script>
<script>
    function fee_sheet_option(code,code_type,description,fee)
    {
        this.code=code;
Ejemplo n.º 2
0
/**
 * retrieve the most common diagnoses
 * 
 * queries the billing table for the most frequently used diagnosis codes.
 * 
 * @param int   $limit               the max number of rows to return
 * @return array - returns an array of the diagnoses
 */
function common_diagnoses($limit = 10)
{
    $retval = array();
    $parameters = array($limit);
    $sql = "SELECT code_type, code, code_text,count(code) as num " . " FROM billing WHERE code_type in (" . diag_code_types('keylist', true) . ")" . " GROUP BY code_type,code,code_text ORDER BY num desc LIMIT ?";
    $results = sqlStatement($sql, $parameters);
    while ($res = sqlFetchArray($results)) {
        $title = $res['code_text'];
        $code = $res['code'];
        $code_type = $res['code_type'];
        $retval[] = new code_info($code, $code_type, $title, 0);
    }
    return $retval;
}