Exemple #1
0
	public function getReportResultsForm($form_name, $form_id)
	{
		$specimen_list = Specimen::getUnreported();
		if($specimen_list == null || count($specimen_list) == 0)
			return;
		?>
		<table class='tablesorter'>
			<thead>
				<tr valign='top'>
					<?php
					if($_SESSION['pid'] != 0)
					{
						?>
						<th><?php echo LangUtil::$generalTerms['PATIENT_ID']; ?></th>
						<?php
					}
					if($_SESSION['dnum'] != 0)
					{
						?>
						<th><?php echo LangUtil::$generalTerms['PATIENT_DAILYNUM']; ?></th>
						<?php
					}
					if($_SESSION['s_addl'] != 0)
					{
						?>
						<th><?php echo LangUtil::$generalTerms['SPECIMEN_ID']; ?></th>
						<?php
					}
					?>
					<th><?php echo LangUtil::$generalTerms['PATIENT_NAME']; ?></th>
					<th><?php echo LangUtil::$generalTerms['SPECIMEN_TYPE']; ?></th>
					<th><?php echo LangUtil::$generalTerms['C_DATE']; ?></th>
					<th><?php echo LangUtil::$generalTerms['TESTS']; ?></th>
					<th><?php echo LangUtil::$generalTerms['REPORT_TO']; ?></th>
					<th>
						<?php echo LangUtil::$generalTerms['REPORTED']; ?>?
						<input type='checkbox' name='check_all' id='check_all' onclick='checkoruncheckall();'>
						</input>
					</th>
				</tr>
			</thead>
			<tbody>
			<?php
			foreach($specimen_list as $specimen)
			{
				$test_list = get_tests_by_specimen_id($specimen->specimenId);
				$patient = Patient::getById($specimen->patientId);
				?>
				<tr valign='top'>
					<input type='hidden' name='sid[]' value='<?php echo $specimen->specimenId; ?>'></input>
					<?php
					if($_SESSION['pid'] != 0)
					{
						?>
						<td><?php echo $specimen->getSurrogateId(); ?></td>
						<?php
					}
					if($_SESSION['dnum'] != 0)
					{
						?>
						<td><?php $specimen->getDailyNum(); ?></td>
						<?php
					}
					if($_SESSION['s_addl'] != 0)
					{
						?>
						<td><?php $specimen->getAuxId(); ?></td>
						<?php
					}
					?>
					<td><?php echo $patient->getName(); ?></td>
					<td><?php echo get_specimen_name_by_id($specimen->specimenTypeId); ?></td>
					<td><?php echo DateLib::mysqlToString($specimen->dateCollected)." ".$specimen->timeCollected; ?></td>
					<td>
						<?php 
						foreach($test_list as $test)
						{
							echo get_test_name_by_id($test->testTypeId);
							echo "<br>";
						}
						?>
					</td>
					<td><?php echo $specimen->getReportTo(); ?></td>
					<td>
						<center>
							<input type='checkbox' class='report_flag' name='mark_<?php echo $specimen->specimenId; ?>'></input>
						</center>
					</td>
				</tr>
				<?php
			}
			?>
			</tbody>
		</table>
		<?php
	}
<?php

#
# Fetches form containing unreportes specimens
# Called via Ajax from results_entry.php
#
include "../includes/db_lib.php";
include "../includes/page_elems.php";
LangUtil::setPageId("results_entry");
$page_elems = new PageElems();
$form_name = 'report_results_form';
$form_id = $form_name;
$specimen_list = Specimen::getUnreported();
if ($specimen_list == null || count($specimen_list) == 0) {
    ?>
	<div class='sidetip_nopos'>
	<?php 
    echo $pageTerms['TIPS_NOUNREPORTEDFOUND'];
    ?>
	</div>
	<?php 
} else {
    ?>
	<div id='report_results_form_div'>
	<form name='<?php 
    echo $form_name;
    ?>
' id='<?php 
    echo $form_id;
    ?>
'