Example #1
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

	}
Example #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);
        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) {
                    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>
			
			</tbody>
		</table>
		<?php 
    }