Beispiel #1
0
$page_elems->getSideTip("Tips", $tips_string);
?>
<b><?php 
echo LangUtil::$pageTerms['EDIT_TEST_TYPE'];
?>
</b>
| <a href="catalog.php?show_t=1"><?php 
echo LangUtil::$generalTerms['CMD_CANCEL'];
?>
</a>
<br><br>

<?php 
$test_type = get_test_type_by_id($_REQUEST['tid']);
$lab_config_id = $_SESSION['lab_config_id'];
$costToPatient = get_latest_cost_of_test_type($test_type->testTypeId);
$cost_to_patient_dollars = floor($costToPatient);
$cost_to_patient_cents = $costToPatient - $cost_to_patient_dollars;
if ($test_type == null) {
    ?>
	<div class='sidetip_nopos'>
	<?php 
    echo LangUtil::$generalTerms['MSG_NOTFOUND'];
    ?>
	</div>
<?php 
    include "includes/footer.php";
    return;
}
# Fetch all measures currently on this test type
//$measure_list = $test_type->getMeasureIds();
Beispiel #2
0
	public function getTestTypeInfo($test_name, $show_db_name=false)
	{
		# Returns HTML for displaying test type information
		$test_type = get_test_type_by_name($test_name);
		?>
		<table class='hor-minimalist-b'>
			<tbody>
				<tr>
					<td><?php echo LangUtil::$generalTerms['NAME']; ?></td>
					<td>
						<?php
						if($show_db_name === true)
							echo $test_type->name;
						else
							echo $test_type->getName(); 
						?>
					</td>
				</tr>
				<tr>
					<td><?php echo LangUtil::$generalTerms['LAB_SECTION']; ?></td>
					<td><?php echo get_test_category_name_by_id($test_type->testCategoryId); ?></td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$generalTerms['DESCRIPTION']; ?></td>
					<td><?php echo $test_type->getDescription(); ?></td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$generalTerms['MEASURES']; ?></td>
					<td>
					<?php
						# Fetch all test measures
						$measure_id_list = get_test_type_measures($test_type->testTypeId);
                                                sort($measure_id_list);
                                                //print_r($measure_id_list);
						foreach($measure_id_list as $measure_id)
						{
							$measure = get_measure_by_id($measure_id);
							if($measure==NULL && count($meausre_id_list)==1 )
								{	echo "No Measures Found!";
									break;
								}
							else if($measure!=NULL)
                                                        {
                                                            if(strpos($measure->getName(), "\$sub") !== false)
                                                            {
                                                                $decName = $measure->truncateSubmeasureTag();
                                                                echo "&nbsp&nbsp&nbsp&nbsp;".$decName."<br>";
                                                            }
                                                            else
                                                            {
                                                                echo $measure->getName()."<br>";
                                                            }
                                                        }
						}
					?>
					</td>
				</tr>
				<tr valign='top'>
					<td><?php echo LangUtil::$generalTerms['COMPATIBLE_SPECIMENS']; ?></td>
					<td>
					<?php
						# Fetch list of compatible specimens
						$compatible_specimens = get_compatible_specimens($test_type->testTypeId);
						if(count($compatible_specimens) == 0)
						{
							echo "-";
						}
						else
						{
							foreach($compatible_specimens as $curr_specimen)
							{
								# Show test name
								$specimen_type = get_specimen_type_by_id($curr_specimen);
								echo $specimen_type->getName()."<br>";
							}
						}
					?>
					</td>
				</tr>
		
				<tr valign='top'>
					<td>Hide Patient Name in Report</td>
					<td><?php
						if(	$test_type->hidePatientName == 0) {
							echo "No";
						}
						else {
							echo "Yes";
						}
						?>
					</td>
				</tr> 
				<tr valign='top'>
					<td>Prevalence Threshold</td>
					<td><?php echo $test_type->prevalenceThreshold; ?></td>
				</tr>
				
				<tr valign='top'>
					<td>Target TAT</td>
					<td><?php echo $test_type->targetTat; ?></td>
				</tr>

                                <tr valign='top' <?php is_billing_enabled($_SESSION['lab_config_id']) ? print("") : print("style='display:none;'") ?>>
                                        <td>Cost To Patient</td>
                                        <td><?php print(format_number_to_money(get_latest_cost_of_test_type($test_type->testTypeId))); ?></td>
                                </tr>
			
			</tbody>
		</table>
		<?php

	}
Beispiel #3
0
function get_test_names_and_costs_from_ids($id_array)
{
    $name_array = array();
    $cost_array = array();
    $ids = array();
    if (!empty($id_array)) {
        foreach ($id_array as $id) {
            $test_type_id = get_test_type_id_from_test_id($id);
            $ids[] = $test_type_id;
            $name_array[] = get_test_name_by_id($test_type_id);
            $date = get_test_date_by_id($test_type_id);
            $cost = get_latest_cost_of_test_type($test_type_id);
            $cost_array[] = $cost;
        }
    }
    $ret_array = array();
    $ret_array['costs'] = $cost_array;
    $ret_array['names'] = $name_array;
    return $ret_array;
}