# href for help button
$smarty->assign('pbHelp', "javascript:gethelp('quickinfo.php')");
# href for close button
$smarty->assign('breakfile', $breakfile);
# Window bar title
$smarty->assign('sWindowTitle', $LDGeneralSettings);
# Assign prompt if saved
if (isset($save_ok) && $save_ok) {
    $smarty->assign('sMascotImg', '<img ' . createMascot($root_path, 'mascot1_r.gif', '0', 'absmiddle') . '>');
    $smarty->assign('LDDataSaved', $LDDataSaved);
} else {
    # Assign prompt
    $smarty->assign('LDGeneralSettingsHeading', $LDGeneralSettingsHeading);
}
#Radiobuttons
$einstellung = $glob_obj->getConfigValue('identificationNr');
if ($einstellung == 'PID') {
    $smarty->assign('checkPID', 'checked');
    $smarty->assign('checkHospFileNr', '');
} else {
    $smarty->assign('checkPID', '');
    $smarty->assign('checkHospFileNr', 'checked');
}
# Assign form elements
$smarty->assign('LDGeneralSettingsHospFileNr', $LDGeneralSettingsHospFileNr);
$smarty->assign('LDGeneralSettingsPID', $LDGeneralSettingsPID);
# Create and assign save button
$smarty->assign('sSave', '<input type="image" ' . createLDImgSrc($root_path, 'savedisc.gif', '0') . '>
	<input type="hidden" name="sid" value="' . $sid . '">
	<input type="hidden" name="lang" value="' . $lang . '">
	<input type="hidden" name="mode" value="save">');
        if ($LD_Elements[$j][$i]['type'] == 'top') {
            echo '<td bgcolor="#ee6666" colspan="3"><font color="white">&nbsp;<b>' . $LD_Elements[$j][$i]['value'] . '</b></font></td>';
        } else {
            if ($LD_Elements[$j][$i]['value']) {
                echo '<td>';
                if ($edit) {
                    if (isset($stored_param[$LD_Elements[$j][$i]['id']]) && !empty($stored_param[$LD_Elements[$j][$i]['id']])) {
                        echo '<input type="hidden" name="' . $LD_Elements[$j][$i]['id'] . '" value="1">
							<a href="javascript:setM(\'' . $LD_Elements[$j][$i]['id'] . '\')">';
                    } else {
                        echo '<input type="hidden" name="' . $LD_Elements[$j][$i]['id'] . '" value="0">
							<a href="javascript:setM(\'' . $LD_Elements[$j][$i]['id'] . '\')">';
                    }
                }
                //Check if item is billed for outpatient
                if ($glob_obj->getConfigValue("restrict_unbilled_items") === "1" && $h_encounter_class_nr == "2") {
                    //Check the restriction status
                    if ($lab_obj->getLabBillNoByBatch($batch_nr, $LD_Elements[$j][$i]['id']) > 0) {
                        if (isset($stored_param[$LD_Elements[$j][$i]['id']]) && !empty($stored_param[$LD_Elements[$j][$i]['id']])) {
                            echo '<img src="f.gif" border=0 width=18 height=6 id="' . $LD_Elements[$j][$i]['id'] . '">';
                        } else {
                            echo '<img src="b.gif" border=0 width=18 height=6 id="' . $LD_Elements[$j][$i]['id'] . '">';
                        }
                    } else {
                        echo '<img src="b.gif" border=0 width=18 height=6 id="' . $LD_Elements[$j][$i]['id'] . '">';
                    }
                } else {
                    if ($glob_obj->getConfigValue("restrict_unbilled_items") === "1" && $h_encounter_class_nr != "2") {
                        if (isset($stored_param[$LD_Elements[$j][$i]['id']]) && !empty($stored_param[$LD_Elements[$j][$i]['id']])) {
                            echo '<img src="f.gif" border=0 width=18 height=6 id="' . $LD_Elements[$j][$i]['id'] . '">';
                        } else {
            echo "<p>{$sql}<p>{$LDDbNoSave}";
            $mode = '';
        }
        break;
        // end of case 'save'
    default:
        $mode = '';
}
// end of switch($mode)
/* Get the pending test requests */
if (!$mode) {
    //* Get the global config for billing item*/
    include_once $root_path . 'include/care_api_classes/class_globalconfig.php';
    $glob_obj = new GlobalConfig($GLOBAL_CONFIG);
    //Check if item is billed for outpatients
    if ($glob_obj->getConfigValue("restrict_unbilled_items") === "1") {
        //Check the restriction status
        $sql = "SELECT care_encounter.pid as selian_pid,name_first,name_last, batch_nr,care_encounter.encounter_nr,send_date,dept_nr FROM care_test_request_" . $db_request_table . "\r\n\t\t\t\tLEFT JOIN care_encounter ON care_test_request_" . $db_request_table . ".encounter_nr=care_encounter.encounter_nr\r\n\t\t\t\tINNER JOIN care_person on care_encounter.pid=care_person.pid\r\n\tWHERE (care_test_request_" . $db_request_table . ".bill_number > '0' OR care_encounter.encounter_class_nr ='1') AND care_test_request_" . $db_request_table . ".is_disabled='0' AND care_test_request_" . $db_request_table . ".status='pending' " . "OR care_test_request_" . $db_request_table . ".status='received' ORDER BY  send_date ASC";
    } else {
        $sql = "SELECT care_encounter.pid as selian_pid,name_first,name_last, batch_nr,care_encounter.encounter_nr,send_date,dept_nr FROM care_test_request_" . $db_request_table . "\r\n\t\t\t\tLEFT JOIN care_encounter ON care_test_request_" . $db_request_table . ".encounter_nr=care_encounter.encounter_nr\r\n\t\t\t\tLEFT JOIN care_person on care_encounter.pid=care_person.pid\r\n\tWHERE care_test_request_" . $db_request_table . ".status='pending' OR care_test_request_" . $db_request_table . ".status='received' ORDER BY  send_date ASC";
    }
    if ($requests = $db->Execute($sql)) {
        $batchrows = $requests->RecordCount();
        if ($batchrows && (!isset($batch_nr) || !$batch_nr)) {
            $test_request = $requests->FetchRow();
            /* Check for the patietn number = $pn. If available get the patients data */
            $pn = $test_request['encounter_nr'];
            $batch_nr = $test_request['batch_nr'];
        }
    } else {
        echo "<p>{$sql}<p>{$LDDbNoRead}";
示例#4
0
$pcols = COL_MAX / 2;
reset($requestData);
//print_r($requestData);
$collimit = 0;
while (list($group, $pm) = each($requestData)) {
    $gName = $lab_obj->getGroupName($group);
    echo '
	<tr>';
    echo '<td colspan="' . COL_MAX . '" bgcolor="#ffffee" class="a10_a"><b>';
    echo $gName->fields['name'];
    echo '</b></td></tr><tr>';
    while (list($pId, $not) = each($pm)) {
        //        echo $enc_obj->EncounterClass();
        //Get the encounter class
        //Check if item is billed
        if ($glob_obj->getConfigValue("restrict_unbilled_items") === "1" && $enc_obj->EncounterClass() === "2") {
            //Check the restriction status
            if ($lab_obj->getLabBillNoByBatch($job_id, $pId) > 0) {
                $pName = $lab_obj->TestParamsDetails($pId);
                echo '<td bgcolor="#ffffee" class="a10_b"><b>';
                echo $pName->fields['name'] . '</b></td>';
                echo '<td>';
                //it's a dropdown
                if ($pName->fields['field_type'] == 'drop_down') {
                    $inputValue = '<select name="' . $pId . '" size="1">';
                    do {
                        $inputValue .= '<option value=' . $pDropDown['input_value'];
                        if ($pDropDown['input_value'] == $pdata[$pId]['value']) {
                            $inputValue .= ' selected="selected" ';
                        }
                        $inputValue .= '>' . $pDropDown['input_value'] . '</option>';