Пример #1
1
function generate_list_payment_category($tag_name, $list_id, $currvalue, $title, $empty_name = ' ', $class = '', $onchange = '', $PaymentType = 'insurance', $screen = 'new_payment')
{
    $s = '';
    $tag_name_esc = htmlspecialchars($tag_name, ENT_QUOTES);
    $s .= "<select name='{$tag_name_esc}' id='{$tag_name_esc}'";
    if ($class) {
        $s .= " class='{$class}'";
    }
    if ($onchange) {
        $s .= " onchange='{$onchange}'";
    }
    $selectTitle = htmlspecialchars($title, ENT_QUOTES);
    $s .= " title='{$selectTitle}'>";
    $selectEmptyName = htmlspecialchars(xl($empty_name), ENT_QUOTES);
    if ($empty_name) {
        $s .= "<option value=''>" . $selectEmptyName . "</option>";
    }
    $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
    $got_selected = FALSE;
    while ($lrow = sqlFetchArray($lres)) {
        $optionValue = htmlspecialchars($lrow['option_id'], ENT_QUOTES);
        $s .= "<option   id='option_" . $lrow['option_id'] . "'" . " value='{$optionValue}'";
        if (strlen($currvalue) == 0 && $lrow['is_default'] || strlen($currvalue) > 0 && $lrow['option_id'] == $currvalue || $lrow['option_id'] == 'insurance_payment' && $screen == 'new_payment') {
            $s .= " selected";
            $got_selected = TRUE;
        }
        if (($PaymentType == 'insurance' || $screen == 'new_payment') && ($lrow['option_id'] == 'family_payment' || $lrow['option_id'] == 'patient_payment')) {
            $s .= " style='background-color:#DEDEDE' ";
        }
        if ($PaymentType == 'patient' && $lrow['option_id'] == 'insurance_payment') {
            $s .= " style='background-color:#DEDEDE' ";
        }
        $optionLabel = htmlspecialchars(xl_list_label($lrow['title']), ENT_QUOTES);
        $s .= ">{$optionLabel}</option>\n";
    }
    if (!$got_selected && strlen($currvalue) > 0) {
        $currescaped = htmlspecialchars($currvalue, ENT_QUOTES);
        $s .= "<option value='{$currescaped}' selected>* {$currescaped} *</option>";
        $s .= "</select>";
        $fontTitle = htmlspecialchars(xl('Please choose a valid selection from the list.'), ENT_QUOTES);
        $fontText = htmlspecialchars(xl('Fix this'), ENT_QUOTES);
        $s .= " <font color='red' title='{$fontTitle}'>{$fontText}!</font>";
    } else {
        $s .= "</select>";
    }
    return $s;
}
Пример #2
0
function getListOptions($list_id)
{
    $options = array();
    $sql = sqlStatement("SELECT option_id, title from list_options WHERE list_id = ?", array($list_id));
    for ($iter = 0; $row = sqlFetchArray($sql); $iter++) {
        $options[] = new Option(out($row['option_id']), out(xl_list_label($row['title'])));
    }
    return $options;
}
Пример #3
0
function getListItem($listid, $value)
{
    $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($listid, $value));
    $tmp = xl_list_label($lrow['title']);
    if (empty($tmp)) {
        $tmp = "({$value})";
    }
    return $tmp;
}
Пример #4
0
  <td class='text' >
   <?php 
    echo xlt('Payment Method');
    ?>
:
  </td>
  <td colspan='2' >
  <select name="form_method" id="form_method"  class="text" onChange='CheckVisible("yes")'>
  <?php 
    $query1112 = "SELECT * FROM list_options where list_id=?  ORDER BY seq, title ";
    $bres1112 = sqlStatement($query1112, array('payment_method'));
    while ($brow1112 = sqlFetchArray($bres1112)) {
        if ($brow1112['option_id'] == 'electronic' || $brow1112['option_id'] == 'bank_draft') {
            continue;
        }
        echo "<option value='" . htmlspecialchars($brow1112['option_id'], ENT_QUOTES) . "'>" . htmlspecialchars(xl_list_label($brow1112['title']), ENT_QUOTES) . "</option>";
    }
    ?>
  </select>
  </td>
 </tr>
 
 <tr height="5"><td colspan='3'></td></tr>

 <tr>
  <td class='text' >
   <?php 
    echo xla('Check/Ref Number');
    ?>
:
  </td>
Пример #5
0
function getListItemTitle($list, $option)
{
    $row = sqlQuery("SELECT title FROM list_options WHERE " . "list_id = ? AND option_id = ?", array($list, $option));
    if (empty($row['title'])) {
        return $option;
    }
    return xl_list_label($row['title']);
}
Пример #6
0
  <td><span class='bold'><?php 
echo xlt('Short Description');
?>
</span></td>
<?php 
if (related_codes_are_used()) {
    ?>
  <td><span class='bold'><?php 
    echo xlt('Related');
    ?>
</span></td>
<?php 
}
$pres = sqlStatement("SELECT title FROM list_options " . "WHERE list_id = 'pricelevel' ORDER BY seq");
while ($prow = sqlFetchArray($pres)) {
    echo "  <td class='bold' align='right' nowrap>" . text(xl_list_label($prow['title'])) . "</td>\n";
}
?>
  <td></td>
  <td></td>
 </tr>
<?php 
if (isset($_REQUEST['filter'])) {
    $res = main_code_set_search($filter_key, $search, NULL, NULL, false, NULL, false, $fstart, $fend - $fstart, $filter_elements);
}
for ($i = 0; $row = sqlFetchArray($res); $i++) {
    $all[$i] = $row;
}
if (!empty($all)) {
    $count = 0;
    foreach ($all as $iter) {
Пример #7
0
    echo "<input type='checkbox' name='form_cb_prices' value='1' />\n";
    echo " " . xl('Prices') . "<br />\n";
    echo "<input type='checkbox' name='form_cb_categories' value='1' />\n";
    echo " " . xl('Document Categories') . "<br />\n";
    echo "<input type='checkbox' name='form_cb_feesheet' value='1' />\n";
    echo " " . xl('Fee Sheet Options') . "<br />\n";
    echo "<input type='checkbox' name='form_cb_lang' value='1' />\n";
    echo " " . xl('Translations') . "<br />\n";
    // Multi-select for lists.
    echo "</td><td valign='top'>\n";
    echo "<b>" . xlt('Lists') . "</b><br />\n";
    echo "<select multiple name='form_sel_lists[]' size='15'>";
    $lres = sqlStatement("SELECT option_id, title FROM list_options WHERE " . "list_id = 'lists' ORDER BY title, seq");
    while ($lrow = sqlFetchArray($lres)) {
        echo "<option value='" . attr($lrow['option_id']) . "'";
        echo ">" . text(xl_list_label($lrow['title'])) . "</option>\n";
    }
    echo "</select>\n";
    // Multi-select for layouts.
    echo "</td><td valign='top'>\n";
    echo "<b>" . xlt('Layouts') . "</b><br />\n";
    echo "<select multiple name='form_sel_layouts[]' size='15'>";
    $lres = sqlStatement("SELECT option_id, title FROM list_options WHERE " . "list_id = 'lbfnames' ORDER BY title, seq");
    while ($lrow = sqlFetchArray($lres)) {
        echo "<option value='" . attr($lrow['option_id']) . "'";
        echo ">" . text(xl_layout_label($lrow['title'])) . "</option>\n";
    }
    echo "</select>\n";
    echo "</td>\n</tr>\n</table>\n";
    echo "&nbsp;<br /><input type='submit' value='" . xl('Continue') . "' />\n";
}
Пример #8
0
function List_Look($thisData, $thisList)
{
    if ($thisList == 'occurrence') {
        if (!$thisData || $thisData == '') {
            return xl('Unknown or N/A');
        }
    }
    if ($thisData == '') {
        return '';
    }
    $fres = sqlStatement("SELECT title FROM list_options WHERE list_id = ? " . "AND option_id = ? AND activity = 1", array($thisList, $thisData));
    if ($fres) {
        $rret = sqlFetchArray($fres);
        $dispValue = xl_list_label($rret['title']);
        if ($thisList == 'occurrence' && $dispValue == '') {
            $dispValue = xl('Unknown or N/A');
        }
    } else {
        $dispValue = xl('Not Found');
    }
    return $dispValue;
}
 $category = $row['title'] ? $row['title'] : 'Uncategorized';
 $disp_category = '&nbsp';
 if ($category !== $last_category) {
     $last_category = $category;
     $disp_category = $category;
     ++$irow;
 }
 foreach ($code_types as $key => $value) {
     if ($value['id'] == $row['code_type']) {
         break;
     }
 }
 $bgcolor = $irow & 1 ? "#ffdddd" : "#ddddff";
 echo "  <tr bgcolor='{$bgcolor}'>\n";
 // Added 5-09 by BM - Translate label if applicable
 echo "   <td class='text'>" . xl_list_label($disp_category) . "</td>\n";
 echo "   <td class='text'>{$key}</td>\n";
 echo "   <td class='text'>" . $row['code'] . "</td>\n";
 echo "   <td class='text'>" . $row['modifier'] . "</td>\n";
 echo "   <td class='text'>" . $row['units'] . "</td>\n";
 echo "   <td class='text'>" . $row['code_text'] . "</td>\n";
 if (related_codes_are_used()) {
     // Show related codes.
     echo "   <td class='text'>";
     $arel = explode(';', $row['related_code']);
     foreach ($arel as $tmp) {
         list($reltype, $relcode) = explode(':', $tmp);
         $reltype = $code_types[$reltype]['id'];
         $relrow = sqlQuery("SELECT code_text FROM codes WHERE " . "code_type = '{$reltype}' AND code = '{$relcode}' LIMIT 1");
         echo $relcode . ' ' . trim($relrow['code_text']) . '<br />';
     }
Пример #10
0
</table>

<p>
<?php 
$procedure_order_type = getListOptions('order_type', array('option_id', 'title'));
?>
<select name="procedure_type_names" id="procedure_type_names">
	<?php 
foreach ($procedure_order_type as $ordered_types) {
    ?>
	<option value="<?php 
    echo attr($ordered_types['option_id']);
    ?>
" ><?php 
    echo text(xl_list_label($ordered_types['title']));
    ?>
</option>
	<?php 
}
?>
    
</select> 
<input type='button' value='<?php 
echo xla('Add Procedure');
?>
' onclick="addProcLine()" />
&nbsp;
<input type='submit' name='bn_save' value='<?php 
echo xla('Save');
?>
Пример #11
0
//
$sanitize_all_escapes = true;
$fake_register_globals = false;
require_once "../../globals.php";
require_once "{$srcdir}/formdata.inc.php";
$popup = empty($_REQUEST['popup']) ? 0 : 1;
// Generate some code based on the list of columns.
//
$colcount = 0;
$header0 = "";
$header = "";
$coljson = "";
$res = sqlStatement("SELECT option_id, title FROM list_options WHERE " . "list_id = 'ptlistcols' ORDER BY seq, title");
while ($row = sqlFetchArray($res)) {
    $colname = $row['option_id'];
    $title = xl_list_label($row['title']);
    $header .= "   <th>";
    $header .= text($title);
    $header .= "</th>\n";
    $header0 .= "   <td align='center'><input type='text' size='10' ";
    $header0 .= "value='' class='search_init' /></td>\n";
    if ($coljson) {
        $coljson .= ", ";
    }
    $coljson .= "{\"sName\": \"" . addcslashes($colname, "\t\r\n\"\\") . "\"}";
    ++$colcount;
}
?>
<html>
<head>
<?php 
Пример #12
0
 public function generatePriceLevelSelector($tagname = 'pricelevel', $disabled = false)
 {
     $s = "<select name='" . attr($tagname) . "'";
     if ($disabled) {
         $s .= " disabled";
     }
     $s .= ">";
     $pricelevel = $this->getPriceLevel();
     $plres = sqlStatement("SELECT option_id, title FROM list_options " . "WHERE list_id = 'pricelevel' AND activity = 1 ORDER BY seq");
     while ($plrow = sqlFetchArray($plres)) {
         $key = $plrow['option_id'];
         $val = $plrow['title'];
         $s .= "<option value='" . attr($key) . "'";
         if ($key == $pricelevel) {
             $s .= ' selected';
         }
         $s .= ">" . text(xl_list_label($val)) . "</option>";
     }
     $s .= "</select>";
     return $s;
 }
Пример #13
0
function load_drug_attributes($id)
{
    $res = sqlStatement("SELECT * FROM list_options WHERE list_id = '{$id}' ORDER BY seq");
    while ($row = sqlFetchArray($res)) {
        if ($row['title'] == '') {
            $arr[$row['option_id']] = ' ';
        } else {
            $arr[$row['option_id']] = xl_list_label($row['title']);
        }
    }
    return $arr;
}
Пример #14
0
function fetch_rule_txt($list_id, $option_id)
{
    $rs = sqlQuery('SELECT title, seq from list_options WHERE list_id=? AND option_id=?', array($list_id, $option_id));
    $rs['title'] = xl_list_label($rs['title']);
    return $rs;
}
Пример #15
0
 public function getListtitle($listId, $listOptionId)
 {
     $appTable = new ApplicationTable();
     $sql = "SELECT title FROM list_options WHERE list_id = ? AND option_id = ? ";
     $result = $appTable->zQuery($sql, array($listId, $listOptionId));
     $row = $result->current();
     $return = xl_list_label($row['title']);
     return $return;
 }
Пример #16
0
 var mypcc = '<?php 
echo $GLOBALS['phone_country_code'];
?>
';

 var aitypes = new Array(); // issue type attributes
 var aopts   = new Array(); // Option objects
<?php 
$i = 0;
foreach ($ISSUE_TYPES as $key => $value) {
    echo " aitypes[{$i}] = " . attr($value[3]) . ";\n";
    echo " aopts[{$i}] = new Array();\n";
    $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = ?", array($key . "_issue_list"));
    while ($res = sqlFetchArray($qry)) {
        echo " aopts[{$i}][aopts[{$i}].length] = new Option('" . attr(trim($res['option_id'])) . "', '" . attr(xl_list_label(trim($res['title']))) . "', false, false);\n";
        if ($res['codes']) {
            echo " aopts[{$i}][aopts[{$i}].length-1].setAttribute('data-code','" . attr(trim($res['codes'])) . "');\n";
        }
    }
    ++$i;
}
///////////
ActiveIssueCodeRecycleFn($thispid, $ISSUE_TYPES);
///////////
?>

<?php 
require $GLOBALS['srcdir'] . "/restoreSession.php";
?>
Пример #17
0
 function getRequirements()
 {
     return xl_list_label($this->value, ENT_NOQUOTES);
 }
Пример #18
0
function generate_display_field($frow, $currvalue)
{
    $data_type = $frow['data_type'];
    $field_id = $frow['field_id'];
    $list_id = $frow['list_id'];
    $s = '';
    // generic selection list or the generic selection list with add on the fly
    // feature, or radio buttons
    if ($data_type == 1 || $data_type == 26 || $data_type == 27) {
        $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($list_id, $currvalue));
        $s = htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
    } else {
        if ($data_type == 2) {
            $s = htmlspecialchars($currvalue, ENT_NOQUOTES);
        } else {
            if ($data_type == 3) {
                $s = nl2br(htmlspecialchars($currvalue, ENT_NOQUOTES));
            } else {
                if ($data_type == 4) {
                    $s = htmlspecialchars(oeFormatShortDate($currvalue), ENT_NOQUOTES);
                } else {
                    if ($data_type == 10 || $data_type == 11) {
                        $urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
                        $s = htmlspecialchars(ucwords($urow['fname'] . " " . $urow['lname']), ENT_NOQUOTES);
                    } else {
                        if ($data_type == 12) {
                            $pres = get_pharmacies();
                            while ($prow = sqlFetchArray($pres)) {
                                $key = $prow['id'];
                                if ($currvalue == $key) {
                                    $s .= htmlspecialchars($prow['name'] . ' ' . $prow['area_code'] . '-' . $prow['prefix'] . '-' . $prow['number'] . ' / ' . $prow['line1'] . ' / ' . $prow['city'], ENT_NOQUOTES);
                                }
                            }
                        } else {
                            if ($data_type == 13) {
                                $squads = acl_get_squads();
                                if ($squads) {
                                    foreach ($squads as $key => $value) {
                                        if ($currvalue == $key) {
                                            $s .= htmlspecialchars($value[3], ENT_NOQUOTES);
                                        }
                                    }
                                }
                            } else {
                                if ($data_type == 14) {
                                    $urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
                                    $uname = $urow['lname'];
                                    if ($urow['fname']) {
                                        $uname .= ", " . $urow['fname'];
                                    }
                                    $s = htmlspecialchars($uname, ENT_NOQUOTES);
                                } else {
                                    if ($data_type == 15) {
                                        $s = htmlspecialchars($currvalue, ENT_NOQUOTES);
                                    } else {
                                        if ($data_type == 21) {
                                            $avalue = explode('|', $currvalue);
                                            $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                            $count = 0;
                                            while ($lrow = sqlFetchArray($lres)) {
                                                $option_id = $lrow['option_id'];
                                                if (in_array($option_id, $avalue)) {
                                                    if ($count++) {
                                                        $s .= "<br />";
                                                    }
                                                    // Added 5-09 by BM - Translate label if applicable
                                                    $s .= htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
                                                }
                                            }
                                        } else {
                                            if ($data_type == 22) {
                                                $tmp = explode('|', $currvalue);
                                                $avalue = array();
                                                foreach ($tmp as $value) {
                                                    if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                        $avalue[$matches[1]] = $matches[2];
                                                    }
                                                }
                                                $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                $s .= "<table cellpadding='0' cellspacing='0'>";
                                                while ($lrow = sqlFetchArray($lres)) {
                                                    $option_id = $lrow['option_id'];
                                                    if (empty($avalue[$option_id])) {
                                                        continue;
                                                    }
                                                    // Added 5-09 by BM - Translate label if applicable
                                                    $s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . ":&nbsp;</td>";
                                                    $s .= "<td class='text' valign='top'>" . htmlspecialchars($avalue[$option_id], ENT_NOQUOTES) . "</td></tr>";
                                                }
                                                $s .= "</table>";
                                            } else {
                                                if ($data_type == 23) {
                                                    $tmp = explode('|', $currvalue);
                                                    $avalue = array();
                                                    foreach ($tmp as $value) {
                                                        if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                            $avalue[$matches[1]] = $matches[2];
                                                        }
                                                    }
                                                    $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                    $s .= "<table cellpadding='0' cellspacing='0'>";
                                                    while ($lrow = sqlFetchArray($lres)) {
                                                        $option_id = $lrow['option_id'];
                                                        $restype = substr($avalue[$option_id], 0, 1);
                                                        $resnote = substr($avalue[$option_id], 2);
                                                        if (empty($restype) && empty($resnote)) {
                                                            continue;
                                                        }
                                                        // Added 5-09 by BM - Translate label if applicable
                                                        $s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                        $restype = $restype == '1' ? xl('Normal') : ($restype == '2' ? xl('Abnormal') : xl('N/A'));
                                                        // $s .= "<td class='text' valign='top'>$restype</td></tr>";
                                                        // $s .= "<td class='text' valign='top'>$resnote</td></tr>";
                                                        $s .= "<td class='text' valign='top'>" . htmlspecialchars($restype, ENT_NOQUOTES) . "&nbsp;</td>";
                                                        $s .= "<td class='text' valign='top'>" . htmlspecialchars($resnote, ENT_NOQUOTES) . "</td>";
                                                        $s .= "</tr>";
                                                    }
                                                    $s .= "</table>";
                                                } else {
                                                    if ($data_type == 24) {
                                                        $query = "SELECT title, comments FROM lists WHERE " . "pid = ? AND type = 'allergy' AND enddate IS NULL " . "ORDER BY begdate";
                                                        // echo "<!-- $query -->\n"; // debugging
                                                        $lres = sqlStatement($query, array($GLOBALS['pid']));
                                                        $count = 0;
                                                        while ($lrow = sqlFetchArray($lres)) {
                                                            if ($count++) {
                                                                $s .= "<br />";
                                                            }
                                                            $s .= htmlspecialchars($lrow['title'], ENT_NOQUOTES);
                                                            if ($lrow['comments']) {
                                                                $s .= ' (' . htmlspecialchars($lrow['comments'], ENT_NOQUOTES) . ')';
                                                            }
                                                        }
                                                    } else {
                                                        if ($data_type == 25) {
                                                            $tmp = explode('|', $currvalue);
                                                            $avalue = array();
                                                            foreach ($tmp as $value) {
                                                                if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                                    $avalue[$matches[1]] = $matches[2];
                                                                }
                                                            }
                                                            $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                            $s .= "<table cellpadding='0' cellspacing='0'>";
                                                            while ($lrow = sqlFetchArray($lres)) {
                                                                $option_id = $lrow['option_id'];
                                                                $restype = substr($avalue[$option_id], 0, 1);
                                                                $resnote = substr($avalue[$option_id], 2);
                                                                if (empty($restype) && empty($resnote)) {
                                                                    continue;
                                                                }
                                                                // Added 5-09 by BM - Translate label if applicable
                                                                $s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                $restype = $restype ? xl('Yes') : xl('No');
                                                                $s .= "<td class='text' valign='top'>" . htmlspecialchars($restype, ENT_NOQUOTES) . "</td></tr>";
                                                                $s .= "<td class='text' valign='top'>" . htmlspecialchars($resnote, ENT_NOQUOTES) . "</td></tr>";
                                                                $s .= "</tr>";
                                                            }
                                                            $s .= "</table>";
                                                        } else {
                                                            if ($data_type == 28) {
                                                                $tmp = explode('|', $currvalue);
                                                                switch (count($tmp)) {
                                                                    case "3":
                                                                        $resnote = $tmp[0];
                                                                        $restype = $tmp[1];
                                                                        $resdate = $tmp[2];
                                                                        break;
                                                                    case "2":
                                                                        $resnote = $tmp[0];
                                                                        $restype = $tmp[1];
                                                                        $resdate = "";
                                                                        break;
                                                                    case "1":
                                                                        $resnote = $tmp[0];
                                                                        $resdate = $restype = "";
                                                                        break;
                                                                    default:
                                                                        $restype = $resdate = $resnote = "";
                                                                        break;
                                                                }
                                                                $s .= "<table cellpadding='0' cellspacing='0'>";
                                                                $s .= "<tr>";
                                                                $res = "";
                                                                if ($restype == "current" . $field_id) {
                                                                    $res = xl('Current');
                                                                }
                                                                if ($restype == "quit" . $field_id) {
                                                                    $res = xl('Quit');
                                                                }
                                                                if ($restype == "never" . $field_id) {
                                                                    $res = xl('Never');
                                                                }
                                                                if ($restype == "not_applicable" . $field_id) {
                                                                    $res = xl('N/A');
                                                                }
                                                                // $s .= "<td class='text' valign='top'>$restype</td></tr>";
                                                                // $s .= "<td class='text' valign='top'>$resnote</td></tr>";
                                                                if (!empty($resnote)) {
                                                                    $s .= "<td class='text' valign='top'>" . htmlspecialchars($resnote, ENT_NOQUOTES) . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>";
                                                                }
                                                                if (!empty($res)) {
                                                                    $s .= "<td class='text' valign='top'><b>" . htmlspecialchars(xl('Status'), ENT_NOQUOTES) . "</b>:&nbsp;" . htmlspecialchars($res, ENT_NOQUOTES) . "&nbsp;</td>";
                                                                }
                                                                if ($restype == "quit" . $field_id) {
                                                                    $s .= "<td class='text' valign='top'>" . htmlspecialchars($resdate, ENT_NOQUOTES) . "&nbsp;</td>";
                                                                }
                                                                $s .= "</tr>";
                                                                $s .= "</table>";
                                                            } else {
                                                                if ($data_type == 31) {
                                                                    $s .= nl2br($frow['description']);
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return $s;
}
Пример #19
0
 // Create entries based on the fee_sheet_options table.
 $res = sqlStatement("SELECT * FROM fee_sheet_options " . "ORDER BY fs_category, fs_option");
 while ($row = sqlFetchArray($res)) {
     $fs_category = $row['fs_category'];
     $fs_option = $row['fs_option'];
     $fs_codes = $row['fs_codes'];
     if ($fs_category !== $last_category) {
         $last_category = $fs_category;
         $SBCODES[] = '*G|' . substr($fs_category, 1);
     }
     $SBCODES[] = " |" . substr($fs_option, 1);
 }
 // Create entries based on categories defined within the codes.
 $pres = sqlStatement("SELECT option_id, title FROM list_options " . "WHERE list_id = 'superbill' ORDER BY seq");
 while ($prow = sqlFetchArray($pres)) {
     $SBCODES[] = '*G|' . xl_list_label($prow['title']);
     $res = sqlStatement("SELECT code_type, code, code_text FROM codes " . "WHERE superbill = '" . $prow['option_id'] . "' AND active = 1 " . "ORDER BY code_text");
     while ($row = sqlFetchArray($res)) {
         $SBCODES[] = $row['code'] . '|' . $row['code_text'];
     }
 }
 // Create one more group, for Products.
 if ($GLOBALS['sell_non_drug_products']) {
     $SBCODES[] = '*G|' . xl('Products');
     $tres = sqlStatement("SELECT " . "dt.drug_id, dt.selector, d.name, d.ndc_number " . "FROM drug_templates AS dt, drugs AS d WHERE " . "d.drug_id = dt.drug_id AND d.active = 1 " . "ORDER BY d.name, dt.selector, dt.drug_id");
     while ($trow = sqlFetchArray($tres)) {
         $tmp = $trow['selector'];
         if ($trow['name'] !== $trow['selector']) {
             $tmp .= ' ' . $trow['name'];
         }
         $prodcode = empty($trow['ndc_number']) ? '(' . $trow['drug_id'] . ')' : $trow['ndc_number'];
Пример #20
0
}
// Include Layout Based Transaction Forms.
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'transactions' AND activity = 1 ORDER BY seq, title");
while ($lrow = sqlFetchArray($lres)) {
    $layouts[$lrow['option_id']] = xl_list_label($lrow['title']);
}
// Include Layout Based Encounter Forms.
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'lbfnames' AND activity = 1 ORDER BY seq, title");
while ($lrow = sqlFetchArray($lres)) {
    $layouts[$lrow['option_id']] = xl_list_label($lrow['title']);
}
// Include predefined Validation Rules from list
$validations = array();
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'LBF_Validations' AND activity = 1 ORDER BY seq, title");
while ($lrow = sqlFetchArray($lres)) {
    $validations[$lrow['option_id']] = xl_list_label($lrow['title']);
}
// array of the data_types of the fields
$datatypes = array("1" => xl("List box"), "2" => xl("Textbox"), "3" => xl("Textarea"), "4" => xl("Text-date"), "10" => xl("Providers"), "11" => xl("Providers NPI"), "12" => xl("Pharmacies"), "13" => xl("Squads"), "14" => xl("Organizations"), "15" => xl("Billing codes"), "16" => xl("Insurances"), "18" => xl("Visit Categories"), "21" => xl("Checkbox list"), "22" => xl("Textbox list"), "23" => xl("Exam results"), "24" => xl("Patient allergies"), "25" => xl("Checkbox w/text"), "26" => xl("List box w/add"), "27" => xl("Radio buttons"), "28" => xl("Lifestyle status"), "31" => xl("Static Text"), "32" => xl("Smoking Status"), "33" => xl("Race and Ethnicity"), "34" => xl("NationNotes"), "35" => xl("Facilities"), "36" => xl("Multiple Select List"), "40" => xl("Image canvas"));
$sources = array('F' => xl('Form'), 'D' => xl('Patient'), 'H' => xl('History'), 'E' => xl('Visit'), 'V' => xl('VisForm'));
function nextGroupOrder($order)
{
    if ($order == '9') {
        $order = 'A';
    } else {
        if ($order == 'Z') {
            $order = 'a';
        } else {
            $order = chr(ord($order) + 1);
        }
    }
Пример #21
0
   </td>
 </tr>
</table>
<?php 
}
?>

<table border='0' cellpadding='1' cellspacing='2' width='100%'>
 <tr>
     <td colspan="12">
         <b><small>
             <?php 
$statuses_output = xlt('Total patients') . ':' . text($appointments_status['count_all']);
unset($appointments_status['count_all']);
foreach ($appointments_status as $status_symbol => $count) {
    $statuses_output .= " | " . text(xl_list_label($statuses_list[$status_symbol])) . ":" . $count;
}
echo $statuses_output;
?>
         </small></b>
     </td>
 </tr>
 <tr bgcolor="#cccff">
  <?php 
if ($GLOBALS['ptkr_show_pid']) {
    ?>
   <td class="dehead" align="center">
   <?php 
    echo xlt('PID');
    ?>
  </td>
Пример #22
0
require_once "{$srcdir}/log.inc";
require_once "{$srcdir}/formdata.inc.php";
$layouts = array('DEM' => xl('Demographics'), 'HIS' => xl('History'), 'FACUSR' => xl('Facility Specific User Information'));
if ($GLOBALS['ippf_specific']) {
    $layouts['GCA'] = xl('Abortion Issues');
    $layouts['CON'] = xl('Contraception Issues');
}
// Include Layout Based Transaction Forms.
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'transactions' ORDER BY seq, title");
while ($lrow = sqlFetchArray($lres)) {
    $layouts[$lrow['option_id']] = xl_list_label($lrow['title']);
}
// Include Layout Based Encounter Forms.
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = 'lbfnames' ORDER BY seq, title");
while ($lrow = sqlFetchArray($lres)) {
    $layouts[$lrow['option_id']] = xl_list_label($lrow['title']);
}
// array of the data_types of the fields
$datatypes = array("1" => xl("List box"), "2" => xl("Textbox"), "3" => xl("Textarea"), "4" => xl("Text-date"), "10" => xl("Providers"), "11" => xl("Providers NPI"), "12" => xl("Pharmacies"), "13" => xl("Squads"), "14" => xl("Organizations"), "15" => xl("Billing codes"), "16" => xl("Insurances"), "18" => xl("Visit Categories"), "21" => xl("Checkbox list"), "22" => xl("Textbox list"), "23" => xl("Exam results"), "24" => xl("Patient allergies"), "25" => xl("Checkbox w/text"), "26" => xl("List box w/add"), "27" => xl("Radio buttons"), "28" => xl("Lifestyle status"), "31" => xl("Static Text"), "32" => xl("Smoking Status"), "33" => xl("Race and Ethnicity"), "34" => xl("NationNotes"), "35" => xl("Facilities"), "36" => xl("Multiple Select List"));
$sources = array('F' => xl('Form'), 'D' => xl('Patient'), 'H' => xl('History'), 'E' => xl('Visit'), 'V' => xl('VisForm'));
function nextGroupOrder($order)
{
    if ($order == '9') {
        $order = 'A';
    } else {
        if ($order == 'Z') {
            $order = 'a';
        } else {
            $order = chr(ord($order) + 1);
        }
    }
Пример #23
0
if (true) {
    $pricelevel = $fs->getPriceLevel();
    echo "   <span class='billcell'><b>" . xlt('Default Price Level') . ":</b></span>\n";
    echo "   <select name='pricelevel'";
    if ($isBilled) {
        echo " disabled";
    }
    echo ">\n";
    while ($plrow = sqlFetchArray($plres)) {
        $key = $plrow['option_id'];
        $val = $plrow['title'];
        echo "    <option value='" . attr($key) . "'";
        if ($key == $pricelevel) {
            echo ' selected';
        }
        echo ">" . text(xl_list_label($val)) . "</option>\n";
    }
    echo "   </select>\n";
}
?>

&nbsp; &nbsp; &nbsp;

<?php 
if (!$isBilled) {
    // visit is not yet billed
    ?>
<input type='submit' name='bn_save' value='<?php 
    echo xla('Save');
    ?>
' 
Пример #24
0
  <td>
   <?php 
echo xlt('Payment Method');
?>
:
  </td>
  <td>
   <select name='form_method'>
    <?php 
$query1112 = "SELECT * FROM list_options where list_id=?  ORDER BY seq, title ";
$bres1112 = sqlStatement($query1112, array('payment_method'));
while ($brow1112 = sqlFetchArray($bres1112)) {
    if ($brow1112['option_id'] == 'electronic' || $brow1112['option_id'] == 'bank_draft') {
        continue;
    }
    echo "<option value='" . attr($brow1112['option_id']) . "'>" . text(xl_list_label($brow1112['title'])) . "</option>";
}
?>
   </select>
  </td>
 </tr>

 <tr>
  <td>
   <?php 
echo xlt('Check/Reference Number');
?>
:
  </td>
  <td>
   <input type='text' name='form_source' size='10' value=''>
Пример #25
0
 function _action_items()
 {
     $stmts = sqlStatement("SELECT option_id, title FROM list_options WHERE list_id = 'rule_action' AND activity = 1");
     for ($iter = 0; $row = sqlFetchArray($stmts); $iter++) {
         $columns[] = array("code" => $row['option_id'], "lbl" => xl_list_label($row['title']));
     }
     $this->emit_json($columns);
 }