Exemplo n.º 1
0
?>
 </div>
<form name='theform' id='theform' method='post' action='clinical_reports.php'>
	<div id="report_parameters">
		<input type='hidden' name='form_refresh' id='form_refresh' value=''/>
		<table>
		      <tr>
			<td width='740px'><div style='float:left'>
		 		<table class='text'>
					<tr>
						<td class='label' width="100"><?php 
echo htmlspecialchars(xl('Facility'), ENT_NOQUOTES);
?>
: </td>
						<td width="250"> <?php 
dropdown_facility($facility, 'facility', false);
?>
 </td>
						<td class='label' width="100"><?php 
echo htmlspecialchars(xl('From'), ENT_NOQUOTES);
?>
: </td>
						<td><input type='text' name='date_from' id="date_from" size='10' value='<?php 
echo htmlspecialchars($sql_date_from, ENT_QUOTES);
?>
' onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' title='yyyy-mm-dd'> <img src='../pic/show_calendar.gif' align='absbottom' width='24' height='22' id='img_from_date' border='0' alt='[?]' style='cursor:pointer' title='<?php 
echo htmlspecialchars(xl('Click here to choose a date'), ENT_QUOTES);
?>
'></td>
					</tr>
					<tr>
Exemplo n.º 2
0
<table>
 <tr>
  <td width='660px'>
	<div style='float:left'>

	<table class='text'>
		<tr>
			<td class='label'>
				<?php 
xl('Facility', 'e');
?>
:
			</td>
			<td>
			<?php 
dropdown_facility(strip_escape_custom($form_facility), 'form_facility');
?>
			</td>
			<td class='label'>
			   <?php 
xl('Provider', 'e');
?>
:
			</td>
			<td>
				<?php 
if (acl_check('acct', 'rep_a')) {
    // Build a drop-down list of providers.
    //
    $query = "select id, lname, fname from users where " . "authorized = 1 order by lname, fname";
    $res = sqlStatement($query);
Exemplo n.º 3
0
function generate_print_field($frow, $currvalue)
{
    global $rootdir, $date_init, $ISSUE_TYPES;
    $currescaped = htmlspecialchars($currvalue, ENT_QUOTES);
    $data_type = $frow['data_type'];
    $field_id = $frow['field_id'];
    $list_id = $frow['list_id'];
    $fld_length = $frow['fld_length'];
    $backup_list = $frow['list_backup_id'];
    $description = htmlspecialchars(xl_layout_label($frow['description']), ENT_QUOTES);
    // Can pass $frow['empty_title'] with this variable, otherwise
    //  will default to 'Unassigned'.
    // If it is 'SKIP' then an empty text title is completely skipped.
    $showEmpty = true;
    if (isset($frow['empty_title'])) {
        if ($frow['empty_title'] == "SKIP") {
            //do not display an 'empty' choice
            $showEmpty = false;
            $empty_title = "Unassigned";
        } else {
            $empty_title = $frow['empty_title'];
        }
    } else {
        $empty_title = "Unassigned";
    }
    // generic single-selection list
    //  Supports backup lists.
    if ($data_type == 1 || $data_type == 26 || $data_type == 33) {
        if (empty($fld_length)) {
            if ($list_id == 'titles') {
                $fld_length = 3;
            } else {
                $fld_length = 10;
            }
        }
        $tmp = '';
        if ($currvalue) {
            $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($list_id, $currvalue));
            $tmp = xl_list_label($lrow['title']);
            if ($lrow == 0 && !empty($backup_list)) {
                // since primary list did not map, try to map to backup list
                $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($backup_list, $currvalue));
                $tmp = xl_list_label($lrow['title']);
            }
            if (empty($tmp)) {
                $tmp = "({$currvalue})";
            }
        }
        /*****************************************************************
           echo "<input type='text'" .
             " size='$fld_length'" .
             " value='$tmp'" .
             " class='under'" .
             " />";
           *****************************************************************/
        if ($tmp === '') {
            $tmp = '&nbsp;';
        } else {
            $tmp = htmlspecialchars($tmp, ENT_QUOTES);
        }
        echo $tmp;
    } else {
        if ($data_type == 2 || $data_type == 15) {
            /*****************************************************************
               echo "<input type='text'" .
                 " size='$fld_length'" .
                 " value='$currescaped'" .
                 " class='under'" .
                 " />";
               *****************************************************************/
            if ($currescaped === '') {
                $currescaped = '&nbsp;';
            }
            echo $currescaped;
        } else {
            if ($data_type == 3) {
                $fldlength = htmlspecialchars($fld_length, ENT_QUOTES);
                $maxlength = htmlspecialchars($frow['fld_rows'], ENT_QUOTES);
                echo "<textarea" . " cols='{$fldlength}'" . " rows='{$maxlength}'>" . $currescaped . "</textarea>";
            } else {
                if ($data_type == 4) {
                    $agestr = optionalAge($frow, $currvalue);
                    if ($agestr) {
                        echo "<table cellpadding='0' cellspacing='0'><tr><td class='text'>";
                    }
                    if ($currvalue === '') {
                        echo '&nbsp;';
                    } else {
                        echo text(oeFormatShortDate($currvalue));
                    }
                    // Optional display of age or gestational age.
                    if ($agestr) {
                        echo "</td></tr><tr><td class='text'>" . text($agestr) . "</td></tr></table>";
                    }
                } else {
                    if ($data_type == 10 || $data_type == 11) {
                        $tmp = '';
                        if ($currvalue) {
                            $urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
                            $tmp = ucwords($urow['fname'] . " " . $urow['lname']);
                            if (empty($tmp)) {
                                $tmp = "({$currvalue})";
                            }
                        }
                        /*****************************************************************
                           echo "<input type='text'" .
                             " size='$fld_length'" .
                             " value='$tmp'" .
                             " class='under'" .
                             " />";
                           *****************************************************************/
                        if ($tmp === '') {
                            $tmp = '&nbsp;';
                        } else {
                            $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                        }
                        echo $tmp;
                    } else {
                        if ($data_type == 12) {
                            $tmp = '';
                            if ($currvalue) {
                                $pres = get_pharmacies();
                                while ($prow = sqlFetchArray($pres)) {
                                    $key = $prow['id'];
                                    if ($currvalue == $key) {
                                        $tmp = $prow['name'] . ' ' . $prow['area_code'] . '-' . $prow['prefix'] . '-' . $prow['number'] . ' / ' . $prow['line1'] . ' / ' . $prow['city'];
                                    }
                                }
                                if (empty($tmp)) {
                                    $tmp = "({$currvalue})";
                                }
                            }
                            /*****************************************************************
                               echo "<input type='text'" .
                                 " size='$fld_length'" .
                                 " value='$tmp'" .
                                 " class='under'" .
                                 " />";
                               *****************************************************************/
                            if ($tmp === '') {
                                $tmp = '&nbsp;';
                            } else {
                                $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                            }
                            echo $tmp;
                        } else {
                            if ($data_type == 13) {
                                $tmp = '';
                                if ($currvalue) {
                                    $squads = acl_get_squads();
                                    if ($squads) {
                                        foreach ($squads as $key => $value) {
                                            if ($currvalue == $key) {
                                                $tmp = $value[3];
                                            }
                                        }
                                    }
                                    if (empty($tmp)) {
                                        $tmp = "({$currvalue})";
                                    }
                                }
                                /*****************************************************************
                                   echo "<input type='text'" .
                                     " size='$fld_length'" .
                                     " value='$tmp'" .
                                     " class='under'" .
                                     " />";
                                   *****************************************************************/
                                if ($tmp === '') {
                                    $tmp = '&nbsp;';
                                } else {
                                    $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                                }
                                echo $tmp;
                            } else {
                                if ($data_type == 14) {
                                    $tmp = '';
                                    if ($currvalue) {
                                        $urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
                                        $uname = $urow['lname'];
                                        if ($urow['fname']) {
                                            $uname .= ", " . $urow['fname'];
                                        }
                                        $tmp = $uname;
                                        if (empty($tmp)) {
                                            $tmp = "({$currvalue})";
                                        }
                                    }
                                    /*****************************************************************
                                       echo "<input type='text'" .
                                         " size='$fld_length'" .
                                         " value='$tmp'" .
                                         " class='under'" .
                                         " />";
                                       *****************************************************************/
                                    if ($tmp === '') {
                                        $tmp = '&nbsp;';
                                    } else {
                                        $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                                    }
                                    echo $tmp;
                                } else {
                                    if ($data_type == 16) {
                                        $tmp = '';
                                        if ($currvalue) {
                                            $insprovs = getInsuranceProviders();
                                            foreach ($insprovs as $key => $ipname) {
                                                if ($currvalue == $key) {
                                                    $tmp = $ipname;
                                                }
                                            }
                                            if (empty($tmp)) {
                                                $tmp = "({$currvalue})";
                                            }
                                        }
                                        if ($tmp === '') {
                                            $tmp = '&nbsp;';
                                        } else {
                                            $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                                        }
                                        echo $tmp;
                                    } else {
                                        if ($data_type == 17) {
                                            $tmp = '';
                                            if ($currvalue) {
                                                foreach ($ISSUE_TYPES as $key => $value) {
                                                    if ($currvalue == $key) {
                                                        $tmp = $value[1];
                                                    }
                                                }
                                                if (empty($tmp)) {
                                                    $tmp = "({$currvalue})";
                                                }
                                            }
                                            if ($tmp === '') {
                                                $tmp = '&nbsp;';
                                            } else {
                                                $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                                            }
                                            echo $tmp;
                                        } else {
                                            if ($data_type == 18) {
                                                $tmp = '';
                                                if ($currvalue) {
                                                    $crow = sqlQuery("SELECT pc_catid, pc_catname " . "FROM openemr_postcalendar_categories WHERE pc_catid = ?", array($currvalue));
                                                    $tmp = xl_appt_category($crow['pc_catname']);
                                                    if (empty($tmp)) {
                                                        $tmp = "({$currvalue})";
                                                    }
                                                }
                                                if ($tmp === '') {
                                                    $tmp = '&nbsp;';
                                                } else {
                                                    $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                                                }
                                                echo $tmp;
                                            } else {
                                                if ($data_type == 21) {
                                                    // In this special case, fld_length is the number of columns generated.
                                                    $cols = max(1, $fld_length);
                                                    $avalue = explode('|', $currvalue);
                                                    $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                    echo "<table cellpadding='0' cellspacing='0' width='100%'>";
                                                    $tdpct = (int) (100 / $cols);
                                                    for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) {
                                                        $option_id = $lrow['option_id'];
                                                        if ($count % $cols == 0) {
                                                            if ($count) {
                                                                echo "</tr>";
                                                            }
                                                            echo "<tr>";
                                                        }
                                                        echo "<td width='{$tdpct}%'>";
                                                        echo "<input type='checkbox'";
                                                        if (in_array($option_id, $avalue)) {
                                                            echo " checked";
                                                        }
                                                        echo ">" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
                                                        echo "</td>";
                                                    }
                                                    if ($count) {
                                                        echo "</tr>";
                                                        if ($count > $cols) {
                                                            // Add some space after multiple rows of checkboxes.
                                                            $cols = htmlspecialchars($cols, ENT_QUOTES);
                                                            echo "<tr><td colspan='{$cols}' style='height:0.7em'></td></tr>";
                                                        }
                                                    }
                                                    echo "</table>";
                                                } 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));
                                                        echo "<table cellpadding='0' cellspacing='0'>";
                                                        while ($lrow = sqlFetchArray($lres)) {
                                                            $option_id = $lrow['option_id'];
                                                            $fldlength = empty($fld_length) ? 20 : $fld_length;
                                                            echo "<tr><td>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                            $fldlength = htmlspecialchars($fldlength, ENT_QUOTES);
                                                            $inputValue = htmlspecialchars($avalue[$option_id], ENT_QUOTES);
                                                            echo "<td><input type='text'" . " size='{$fldlength}'" . " value='{$inputValue}'" . " class='under'" . " /></td></tr>";
                                                        }
                                                        echo "</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];
                                                                }
                                                            }
                                                            $fldlength = empty($fld_length) ? 20 : $fld_length;
                                                            $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                            echo "<table cellpadding='0' cellspacing='0'>";
                                                            echo "<tr><td>&nbsp;</td><td class='bold'>" . htmlspecialchars(xl('N/A'), ENT_NOQUOTES) . "&nbsp;</td><td class='bold'>" . htmlspecialchars(xl('Nor'), ENT_NOQUOTES) . "&nbsp;</td>" . "<td class='bold'>" . htmlspecialchars(xl('Abn'), ENT_NOQUOTES) . "&nbsp;</td><td class='bold'>" . htmlspecialchars(xl('Date/Notes'), ENT_NOQUOTES) . "</td></tr>";
                                                            while ($lrow = sqlFetchArray($lres)) {
                                                                $option_id = $lrow['option_id'];
                                                                $restype = substr($avalue[$option_id], 0, 1);
                                                                $resnote = substr($avalue[$option_id], 2);
                                                                echo "<tr><td>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                for ($i = 0; $i < 3; ++$i) {
                                                                    echo "<td><input type='radio'";
                                                                    if ($restype === "{$i}") {
                                                                        echo " checked";
                                                                    }
                                                                    echo " /></td>";
                                                                }
                                                                $resnote = htmlspecialchars($resnote, ENT_QUOTES);
                                                                $fldlength = htmlspecialchars($fldlength, ENT_QUOTES);
                                                                echo "<td><input type='text'" . " size='{$fldlength}'" . " value='{$resnote}'" . " class='under' /></td>" . "</tr>";
                                                            }
                                                            echo "</table>";
                                                        } else {
                                                            if ($data_type == 24) {
                                                                $query = "SELECT title, comments FROM lists WHERE " . "pid = ? AND type = 'allergy' AND enddate IS NULL " . "ORDER BY begdate";
                                                                $lres = sqlStatement($query, array($GLOBALS['pid']));
                                                                $count = 0;
                                                                while ($lrow = sqlFetchArray($lres)) {
                                                                    if ($count++) {
                                                                        echo "<br />";
                                                                    }
                                                                    echo htmlspecialchars($lrow['title'], ENT_QUOTES);
                                                                    if ($lrow['comments']) {
                                                                        echo htmlspecialchars(' (' . $lrow['comments'] . ')', ENT_QUOTES);
                                                                    }
                                                                }
                                                            } else {
                                                                if ($data_type == 25) {
                                                                    $tmp = explode('|', $currvalue);
                                                                    $avalue = array();
                                                                    foreach ($tmp as $value) {
                                                                        if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
                                                                            $avalue[$matches[1]] = $matches[2];
                                                                        }
                                                                    }
                                                                    $fldlength = empty($fld_length) ? 20 : $fld_length;
                                                                    $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                                    echo "<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);
                                                                        echo "<tr><td>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                        echo "<td><input type='checkbox'";
                                                                        if ($restype) {
                                                                            echo " checked";
                                                                        }
                                                                        echo " />&nbsp;</td>";
                                                                        $fldlength = htmlspecialchars($fldlength, ENT_QUOTES);
                                                                        $resnote = htmlspecialchars($resnote, ENT_QUOTES);
                                                                        echo "<td><input type='text'" . " size='{$fldlength}'" . " value='{$resnote}'" . " class='under'" . " /></td>" . "</tr>";
                                                                    }
                                                                    echo "</table>";
                                                                } else {
                                                                    if ($data_type == 27) {
                                                                        // In this special case, fld_length is the number of columns generated.
                                                                        $cols = max(1, $frow['fld_length']);
                                                                        $lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
                                                                        echo "<table cellpadding='0' cellspacing='0' width='100%'>";
                                                                        $tdpct = (int) (100 / $cols);
                                                                        for ($count = 0; $lrow = sqlFetchArray($lres); ++$count) {
                                                                            $option_id = $lrow['option_id'];
                                                                            if ($count % $cols == 0) {
                                                                                if ($count) {
                                                                                    echo "</tr>";
                                                                                }
                                                                                echo "<tr>";
                                                                            }
                                                                            echo "<td width='{$tdpct}%'>";
                                                                            echo "<input type='radio'";
                                                                            if (strlen($currvalue) == 0 && $lrow['is_default'] || strlen($currvalue) > 0 && $option_id == $currvalue) {
                                                                                echo " checked";
                                                                            }
                                                                            echo ">" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
                                                                            echo "</td>";
                                                                        }
                                                                        if ($count) {
                                                                            echo "</tr>";
                                                                            if ($count > $cols) {
                                                                                // Add some space after multiple rows of radio buttons.
                                                                                $cols = htmlspecialchars($cols, ENT_QUOTES);
                                                                                echo "<tr><td colspan='{$cols}' style='height:0.7em'></td></tr>";
                                                                            }
                                                                        }
                                                                        echo "</table>";
                                                                    } else {
                                                                        if ($data_type == 28 || $data_type == 32) {
                                                                            $tmp = explode('|', $currvalue);
                                                                            switch (count($tmp)) {
                                                                                case "4":
                                                                                    $resnote = $tmp[0];
                                                                                    $restype = $tmp[1];
                                                                                    $resdate = $tmp[2];
                                                                                    $reslist = $tmp[3];
                                                                                    break;
                                                                                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;
                                                                            }
                                                                            $fldlength = empty($frow['fld_length']) ? 20 : $frow['fld_length'];
                                                                            echo "<table cellpadding='0' cellspacing='0'>";
                                                                            echo "<tr>";
                                                                            $fldlength = htmlspecialchars($fldlength, ENT_QUOTES);
                                                                            $resnote = htmlspecialchars($resnote, ENT_QUOTES);
                                                                            $resdate = htmlspecialchars($resdate, ENT_QUOTES);
                                                                            if ($data_type == 28) {
                                                                                echo "<td><input type='text'" . " size='{$fldlength}'" . " class='under'" . " value='{$resnote}' /></td>";
                                                                                echo "<td class='bold'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . htmlspecialchars(xl('Status'), ENT_NOQUOTES) . ":&nbsp;</td>";
                                                                            } else {
                                                                                if ($data_type == 32) {
                                                                                    echo "<tr><td><input type='text'" . " size='{$fldlength}'" . " class='under'" . " value='{$resnote}' /></td></tr>";
                                                                                    $fldlength = 30;
                                                                                    $smoking_status_title = generate_display_field(array('data_type' => '1', 'list_id' => $list_id), $reslist);
                                                                                    echo "<td><input type='text'" . " size='{$fldlength}'" . " class='under'" . " value='{$smoking_status_title}' /></td>";
                                                                                    echo "<td class='bold'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . htmlspecialchars(xl('Status'), ENT_NOQUOTES) . ":&nbsp;&nbsp;</td>";
                                                                                }
                                                                            }
                                                                            echo "<td><input type='radio'";
                                                                            if ($restype == "current" . $field_id) {
                                                                                echo " checked";
                                                                            }
                                                                            echo "/>" . htmlspecialchars(xl('Current'), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                            echo "<td><input type='radio'";
                                                                            if ($restype == "current" . $field_id) {
                                                                                echo " checked";
                                                                            }
                                                                            echo "/>" . htmlspecialchars(xl('Quit'), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                            echo "<td><input type='text' size='6'" . " value='{$resdate}'" . " class='under'" . " /></td>";
                                                                            echo "<td><input type='radio'";
                                                                            if ($restype == "current" . $field_id) {
                                                                                echo " checked";
                                                                            }
                                                                            echo " />" . htmlspecialchars(xl('Never'), ENT_NOQUOTES) . "</td>";
                                                                            echo "<td><input type='radio'";
                                                                            if ($restype == "not_applicable" . $field_id) {
                                                                                echo " checked";
                                                                            }
                                                                            echo " />" . htmlspecialchars(xl('N/A'), ENT_NOQUOTES) . "&nbsp;</td>";
                                                                            echo "</tr>";
                                                                            echo "</table>";
                                                                        } else {
                                                                            if ($data_type == 31) {
                                                                                echo nl2br($frow['description']);
                                                                            } else {
                                                                                if ($data_type == 34) {
                                                                                    echo "<a href='../../../library/custom_template/custom_template.php?type=form_{$field_id}&contextName=" . htmlspecialchars($list_id_esc, ENT_QUOTES) . "' class='iframe_medium' style='text-decoration:none;color:black;'>";
                                                                                    echo "<div id='form_{$field_id}_div' class='text-area'></div>";
                                                                                    echo "<div style='display:none'><textarea name='form_{$field_id}' id='form_{$field_id}' stye='display:none'></textarea></div>";
                                                                                    echo "</a>";
                                                                                } else {
                                                                                    if ($data_type == 35) {
                                                                                        if (empty($currvalue)) {
                                                                                            $currvalue = 0;
                                                                                        }
                                                                                        dropdown_facility($selected = $currvalue, $name = "form_{$field_id_esc}", $allow_unspecified = true, $allow_allfacilities = false);
                                                                                    } else {
                                                                                        if ($data_type == 36) {
                                                                                            if (empty($fld_length)) {
                                                                                                if ($list_id == 'titles') {
                                                                                                    $fld_length = 3;
                                                                                                } else {
                                                                                                    $fld_length = 10;
                                                                                                }
                                                                                            }
                                                                                            $tmp = '';
                                                                                            $values_array = explode("|", $currvalue);
                                                                                            $i = 0;
                                                                                            foreach ($values_array as $value) {
                                                                                                if ($value) {
                                                                                                    $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($list_id, $value));
                                                                                                    $tmp = xl_list_label($lrow['title']);
                                                                                                    if ($lrow == 0 && !empty($backup_list)) {
                                                                                                        // since primary list did not map, try to map to backup list
                                                                                                        $lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($backup_list, $currvalue));
                                                                                                        $tmp = xl_list_label($lrow['title']);
                                                                                                    }
                                                                                                    if (empty($tmp)) {
                                                                                                        $tmp = "({$value})";
                                                                                                    }
                                                                                                }
                                                                                                if ($tmp === '') {
                                                                                                    $tmp = '&nbsp;';
                                                                                                } else {
                                                                                                    $tmp = htmlspecialchars($tmp, ENT_QUOTES);
                                                                                                }
                                                                                                if ($i != 0 && $tmp != '&nbsp;') {
                                                                                                    echo ",";
                                                                                                }
                                                                                                echo $tmp;
                                                                                                $i++;
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
<input type='hidden' name='form_csvexport' id='form_csvexport' value=''/>
<table>
 <tr>
  <td width='70%'>
	<div style='float:left'>
	<table class='text'>
		<tr>
			<td class='label'>
				<?php 
    echo xlt('Facility');
    ?>
:
			</td>
			<td>
			<?php 
    dropdown_facility($form_facility, 'form_facility', true);
    ?>
			</td>
                        <td><?php 
    echo xlt('Provider');
    ?>
:</td>
                <td><?php 
    // Build a drop-down list of providers.
    //
    $query = "SELECT id, lname, fname FROM users WHERE " . "authorized = 1 ORDER BY lname, fname";
    //(CHEMED) facility filter
    $ures = sqlStatement($query);
    echo "   <select name='form_provider'>\n";
    echo "    <option value=''>-- " . xlt('All') . " --\n";
    while ($urow = sqlFetchArray($ures)) {
Exemplo n.º 5
0
?>
'>
										</td>
										<td>&nbsp;</td>
									</tr>
									
									<tr>
										<td class='label'>
											<?php 
echo htmlspecialchars(xl('Facility'), ENT_NOQUOTES);
?>
:
										</td>
										<td>
											<?php 
dropdown_facility($form_facility, 'form_facility', false);
?>
										</td>
										<td class='label'>
										   <?php 
echo htmlspecialchars(xl('Provider'), ENT_NOQUOTES);
?>
:
										</td>
										<td>
											<select name='form_users' onchange='form.submit();'>
												<option value=''>-- <?php 
echo htmlspecialchars(xl('All'), ENT_NOQUOTES);
?>
 --</option>
												<?php 
<div id="report_parameters">

<table>
    <tr>
        <td width='650px'>
        <div style='float: left'>

        <table class='text'>
            <tr>
                <td class='label'><?php 
echo xlt('Facility');
?>
:</td>
                <td><?php 
dropdown_facility($facility, 'form_facility');
?>
                </td>
                <td class='label'><?php 
echo xlt('Provider');
?>
:</td>
                <td><?php 
# Build a drop-down list of providers.
#
$query = "SELECT id, lname, fname FROM users WHERE " . "authorized = 1  ORDER BY lname, fname";
#(CHEMED) facility filter
$ures = sqlStatement($query);
echo "   <select name='form_provider'>\n";
echo "    <option value=''>-- " . xlt('All') . " --\n";
while ($urow = sqlFetchArray($ures)) {
<div id="report_parameters_daterange"><?php echo date("d F Y", strtotime($from_date)) ." &nbsp; to &nbsp; ". date("d F Y", strtotime($to_date)); #sets date range for calendars ?>
</div>

<form method='post' name='theform' id='theform' action='patient_flow_board_report.php' onsubmit='return top.restoreSession()'>

<div id="report_parameters">

<table>
    <tr>
        <td width='650px'>
        <div style='float: left'>

        <table class='text'>
            <tr>
                <td class='label'><?php echo xlt('Facility'); ?>:</td>
                <td><?php dropdown_facility($facility, 'form_facility'); ?>
                </td>
                <td class='label'><?php echo xlt('Provider'); ?>:</td>
                <td><?php

                # Build a drop-down list of providers.
                #

                $query = "SELECT id, lname, fname FROM users WHERE ".
                  "authorized = 1  ORDER BY lname, fname"; #(CHEMED) facility filter

                $ures = sqlStatement($query);

                echo "   <select name='form_provider'>\n";
                echo "    <option value=''>-- " . xlt('All') . " --\n";
Exemplo n.º 8
0
<form method='post' name='theform' id='theform' action='encounters_report.php'>

<div id="report_parameters">
<table>
 <tr>
  <td width='550px'>
	<div style='float:left'>

	<table class='text'>
		<tr>
			<td class='label'>
				<?php xl('Facility','e'); ?>:
			</td>
			<td>
			<?php dropdown_facility(strip_escape_custom($form_facility), 'form_facility', true); ?>
			</td>
			<td class='label'>
			   <?php xl('Provider','e'); ?>:
			</td>
			<td>
				<?php

				 // Build a drop-down list of providers.
				 //

				 $query = "SELECT id, lname, fname FROM users WHERE ".
				  "authorized = 1 $provider_facility_filter ORDER BY lname, fname"; //(CHEMED) facility filter

				 $ures = sqlStatement($query);
</span>
        <!-- start of search parameters --> 
        <form method='post' name='report_form' id='report_form' action='' onsubmit='return top.restoreSession()'>
            <div id="report_parameters">
                <table class="tableonly">
                    <tr>
                        <td width='745px'>
                            <div style='float: left'>
                                <table class='text'>
                                    <tr>
                                        <td class='label'><?php 
echo xlt('Facility');
?>
:</td>
                                        <td><?php 
dropdown_facility($selectedFacility, 'form_facility', false);
?>
</td>				
                                        <td class='label'><?php 
echo xlt('From');
?>
:</td>
                                        <td>
                                            <input type='text' name='form_from_date' id="form_from_date"
                                                   size='10' value='<?php 
echo attr($from_date);
?>
'
                                                   onkeyup='datekeyup(this, mypcc)' onblur='dateblur(this, mypcc)'
                                                   title='yyyy-mm-dd'> <img src='../pic/show_calendar.gif'
                                                   align='absbottom' width='24' height='22' id='img_from_date'