Exemplo n.º 1
0
		}
	});
	}
        
        
        
</script>

<?php 
#
# This is the footer file to display at the end of the file.
# Closes any open database connections, and-
# displays footer so the users know the page is done loading.
#
include "db_close.php";
LangUtil::setPageId("footer");
?>


</div><!-- end of center_pane-->

<div id='bottom_pane'>
	<br>
	<hr>
	<div class='footer_message'>
		<small>
		
		<?php 
if ($_SESSION['locale'] == "en") {
    echo "<a href='userguide/BLIS_User_Guide.pdf' target='_blank' >User Guide |</a>";
} else {
Exemplo n.º 2
0
<?php

#
# Returns <option> tags for list of test types by category (section) and site
# Called via Ajax from reports.php
#
include "../includes/db_lib.php";
include "../includes/page_elems.php";
LangUtil::setPageId("general");
$page_elems = new PageElems();
$selvalue = $_REQUEST['type'];
?>
<option value='0'><?php 
echo LangUtil::$generalTerms['ALL'];
//
?>
</option>
                           <?php 
$lab_config = LabConfig::getById($_SESSION['lab_config_id']);
if ($selvalue == "p") {
    $custom_field_list = $lab_config->getPatientCustomFields();
    foreach ($custom_field_list as $custom_field) {
        echo "<option value='p_" . $custom_field->id . "'>" . $custom_field->fieldName . "</option>";
    }
} elseif ($selvalue == "s") {
    $custom_field_list = $lab_config->getSpecimenCustomFields();
    foreach ($custom_field_list as $custom_field) {
        echo "<option value='s_" . $custom_field->id . "'>" . $custom_field->fieldName . "</option>";
    }
}
Exemplo n.º 3
0
<?php

#
# Main page for showing patient profile, test history,
# and options like updating profile, registering new specimen
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("patient_profile");
$pid = $_REQUEST['pid'];
$script_elems->enableJQueryForm();
$script_elems->enableDatePicker();
$script_elems->enableTableSorter();
$script_elems->enableLatencyRecord();
$admin = 0;
if (is_admin_check(get_user_by_id($_SESSION['user_id']))) {
    $admin = 1;
}
$rem_recs = get_removed_specimens($_SESSION['lab_config_id'], "test");
foreach ($rem_recs as $rem_rec) {
    $rem_specs[] = $rem_rec['r_id'];
    $rem_remarks[] = $rem_rec['remarks'];
}
$labsection = 0;
if (isset($_REQUEST['labsection'])) {
    $labsection = $_REQUEST['labsection'];
}
//print_r($rem_specs);
?>
<script type='text/javascript'>
function toggle_profile_divs()
Exemplo n.º 4
0
<?php

include "redirect.php";
include "includes/header.php";
include "includes/random.php";
include "includes/stats_lib.php";
LangUtil::setPageId("blis_help_page");
$script_elems->enableTableSorter();
$script_elems->enableJQueryForm();
?>
<br>
<style type='text/css'>
label
{
	width: 10em;
	float: left;
	text-align: right;
	margin-right: 0.5em;
	display: block
}
</style>
<script>

function labconfig_disp()
{
if(document.getElementById('labconfig_disp').style.display =='none')
$('#labconfig_disp').show();
else
$('#labconfig_disp').hide();
//$('.right_pane').hide();
}
Exemplo n.º 5
0
<?php

#
# Main page for registering new specimen(s) in a single session/accession
#
/*
$load_time = microtime(); 
$load_time = explode(' ',$load_time); 
$load_time = $load_time[1] + $load_time[0]; 
$page_start = $load_time; 
*/
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("new_specimen");
$script_elems->enableDatePicker();
$script_elems->enableLatencyRecord();
$script_elems->enableJQueryForm();
$script_elems->enableAutocomplete();
$pid = $_REQUEST['pid'];
if (isset($_REQUEST['dnum'])) {
    $dnum = (string) $_REQUEST['dnum'];
} else {
    $dnum = get_daily_number();
}
if (isset($_REQUEST['session_num'])) {
    $session_num = $_REQUEST['session_num'];
} else {
    $session_num = get_session_number();
}
/* check discrepancy between dnum and session number and correct 
if ( substr($session_num,strpos($session_num, "-")+1 ) )
Exemplo n.º 6
0
<?php

#
# Returns a list of similar patient names
# To aid/help during new patient registration
#
include "../includes/db_lib.php";
LangUtil::setPageId("new_patient");
$q = $_REQUEST['q'];
$query_string = "SELECT * FROM patient " . "WHERE name LIKE '%{$q}%' ";
$resultset = query_associative_all($query_string, $row_count);
if (count($resultset) == 0 || $resultset == null) {
    return;
}
$patient_list = array();
foreach ($resultset as $record) {
    $patient_list[] = Patient::getObject($record);
}
?>
<table class='hor-minimalist-c' style='width:450px;'>
	<thead>
		<tr valign='top'>
			<th>
				<span style='background-color:#FFCC66'><?php 
echo LangUtil::$pageTerms['SIMILAR_NAMES'];
?>
</span>
			</th>
			<?php 
if ($_SESSION['pid'] != 0) {
    ?>
Exemplo n.º 7
0
#
# (c) C4G, Santosh Vempala, Ruban Monu and Amol Shintre
# Main file for updating to new version
# Calls ajax/update.php which actually performs the update operations

/*include("../users/accesslist.php");
if( !(isCountryDir(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $countryDirPageList)) 
	&& !(isSuperAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $superAdminPageList)) &&
	!(isAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $adminPageList)) )
	header( 'Location: home.php' );
*/
include("redirect.php");
include("../includes/db_lib.php");
include("../includes/user_lib.php");

LangUtil::setPageId("update");

$user = get_user_by_id($_SESSION['user_id']);

$def = '';

if ( is_super_admin($user) || is_country_dir($user) ) {
	//$labConfigList = get_lab_configs($user->userId);
	//foreach($labConfigList as $labConfig) {
		//$labConfigId = $labConfig->id;
		//runUpdate($labConfigId);
//          }
	//runGlobalUpdate();
    $db_name = "blis_revamp";
        $ufile = "db_update_revamp";
        blis_db_update($lab_config_id, $db_name, $ufile);
Exemplo n.º 8
0
# Start session if not already started
if (session_id() == "") {
    session_start();
}
$TRACK_LOADTIME = false;
$TRACK_LOADTIMEJS = false;
if ($TRACK_LOADTIME) {
    $starttime = microtime();
    $startarray = explode(" ", $starttime);
    $starttime = $startarray[1] + $startarray[0];
}
# Include required libraries
require_once "includes/db_lib.php";
require_once "includes/page_elems.php";
require_once "includes/script_elems.php";
LangUtil::setPageId("header");
require_once "includes/perms_check.php";
# Perform system updates to portable version , if any
/*
if
(
	$SERVER == $ON_PORTABLE && 
	strpos($_SERVER['PHP_SELF'], "/home.php") !== false &&
	$_SESSION['user_level'] != $LIS_SUPERADMIN &&
	$_SESSION['user_level'] != $LIS_COUNTRYDIR
)
{
	if
	(
		$_SESSION['user_level'] == $LIS_ADMIN && 
		! User::onlyOneLabConfig($_SESSION['user_id'], $_SESSION['user_level'])
Exemplo n.º 9
0
<?php
#
# Main page for editting lad admin account
#
include("redirect.php");
include("includes/header.php"); 
LangUtil::setPageId("lab_admins");

$saved_session = SessionUtil::save();

$user_id = $_REQUEST['id'];
$user = get_user_by_id($user_id);
?>
<script type='text/javascript'>
function toggle_and_clear(div_id)
{
	$('#password_row').toggle();
	$('#admin_pwd').attr("value", "");
}

function update_lab_admin()
{
	var username = $('#username').attr('value');
	var pwd = $('#admin_pwd').attr('value');
	var email = $('#email').attr('value');
	var phone = $('#phone').attr('value');
	var fullname = $('#fullname').attr('value');
	var lang_id = $('#lang_id').attr('value');
	var url_string = 'ajax/lab_admin_update.php';
	var data_string = 'id=<?php echo $user_id; ?>&un='+username+'&p='+pwd+'&fn='+fullname+'&em='+email+'&ph='+phone+'&lang='+lang_id;
	$('#edit_admin_progress').show();
Exemplo n.º 10
0
	function getNewSpecimenForm($form_num, $pid, $dnum, $session_num, $doc="" ,$title ="Dr.", $refTo="")
	{
		# Returns HTML for new specimen form
		LangUtil::setPageId("new_specimen");
		$form_name = 'specimenform_'.$form_num;
		$form_id = $form_name;
		$form_class = 'specimenform_class';
		$testbox_id = $form_id.'_testbox';
		$stype_id = $form_id.'_stype';
		$dnum_id = $form_id.'_dnum';
		$time_id = $form_id.'_ctime';
		$div_id = 'specimen_form_container_'.$form_num;
		$dialog_id = $div_id."_dialog";
		$specimen_id_div_id = 'specimen-id_'.$form_num;
		$specimen_err_div_id = 'specimen_msg_'.$form_num;
		$doc_row_id = 'doc_row_'.$form_num;
		$refTo_row_id = 'refTo_row_'.$form_num;
		$ref_out_row_id = 'ref_out_row_'.$form_num;
		$ref_out_check_id = 'ref_out_'.$form_num;
		
		$ref_from_row_id = 'ref_from_row_'.$form_num;
		$ref_from_check_id = 'ref_out_'.$form_num;
		
		$lab_config = LabConfig::getById($_SESSION['lab_config_id']);
		?>
		<div id='<?php echo $div_id; ?>'>
		<div class='pretty_box' style='width:530px;'>
		<form name='<?php echo $form_name; ?>' id='<?php echo $form_id; ?>' action='ajax/specimen_add.php?session_num=<?php echo $session_num ?>' method='post'>
			<input type='hidden' name='pid' value='<?php echo $pid; ?>' class='uniform_width'></input>
			<?php /*<input type='hidden' name='session_num' value='<?php echo get_session_number(); ?>' class='uniform_width'></input> */ ?>
			<table class='regn_form_table'>
			<tbody>
			
			<?php $this->generate_patient_Number($dnum);?>
			<?php $this->generate_specimen_type($stype_id, $testbox_id);?>
			<?php $this->generate_test($testbox_id);?>
			
			<?php 
					$specimenFieldOrder = $_SESSION['specimenFieldOrder'];
					$custom_field_list = get_custom_fields_specimen();
					$custFieldArray = array();
					foreach($custom_field_list as $custom_field)
					{	
						if(($custom_field->flag)==NULL)
						{
							array_push($custFieldArray, $custom_field->fieldName);
						}
					}
					if(sizeOf($specimenFieldOrder) > 0){
						foreach($specimenFieldOrder as $field){
							
							if(in_array($field, $custFieldArray)){
								// custom field generation
								$custom_field = null;
								foreach($custom_field_list as $custField){
									if($custField->fieldName == $field){
										$custom_field = $custField;
									}
								}
								$this->generate_customFields($custom_field); 
							}
							else if($field == "Specimen ID"){
								 $this->generate_specimen_addId($lab_config);
							} /*else if($field == "Specimen Additional ID"){
								<?php $this->generate_specimen_addId($lab_config);?>
							}*/ else if($field == "Comments"){
								$this->generate_comments(); 
							} else if($field == "Lab Reciept Date"){
								 $this->generate_reciept_date($lab_config, $form_id);
							} else if($field == "Referred Out"){
								$this->generate_refOut($ref_out_check_id, $ref_out_row_id, $refTo_row_id, $ref_from_row_id, $refTo); 
							} else if($field == "Physician"){
								$this->generate_doctors($doc_row_id, $doc);
							} 
						}
					}
					
					
				?>
				
				
			
			
			
			
			<tr valign='top'<?php
			//if($_SESSION['sid'] == 0)
			if(true)
				echo " style='display:none;' ";
			?>>
				<td>
					<label for='sid'>DB Key
					<?php if($_SESSION['sid'] == 2) $this->getAsterisk(); ?></label>
				</td>
				<td>   </td>
				<td>
					<!--
					<input type="text" name="specimen_id" id="<?php echo $specimen_id_div_id; ?>" value="" onblur="javascript:check_specimen_id('<?php echo $specimen_id_div_id; ?>', '<?php echo $specimen_err_div_id; ?>');" size="20" class='uniform_width'>
					</input>
					-->
					<input type='text' name='specimen_id' id='specimen_id' value="<?php echo $form_num; ?>" readonly="readonly" class='uniform_width'>
					</input>
					<br><span id='<?php echo $specimen_err_div_id; ?>'></span>
				</td>
			</tr>
			
			
			
			
			
			<tr valign='top' style='display:none;'>
				<td>
					<label><?php echo LangUtil::$generalTerms['C_DATE']; ?></label>
				</td>
				<td>  </td>
				<td>
					<?php
					$today = date("Y-m-d");
					$today_array = explode("-", $today);
					$name_list = array("collect_yyyy", "collect_mm", "collect_dd");
					$id_list = array($form_id."_collect_yyyy", $form_id."_collect_mm", $form_id."_collect_dd");
					$value_list = array($today_array[0], $today_array[1], $today_array[2]);
					$this->getDatePicker($name_list, $id_list, $value_list, false);
					?>
				</td>
			</tr>
			<tr valign='top' style='display:none;'>
				<td>
					<label><?php echo LangUtil::$generalTerms['C_TIME']; ?></label>
				</td>
				<td>
					<select name='ctime_hh' autocomplete="OFF">
					<?php
					$time = date("H:i");
					$time_parts = explode(":", $time);
					for($i = 0; $i < 24; $i++)
					{
						if($i < 10)
							$option = '0'.$i;
						else
							$option = $i;
						echo "<option value='$option' ";
						if($option == $time_parts[0])
						//if($option == 9)
							echo "selected ";
						echo ">$option</option>";
						
						
					}
					?>
					</select>
					:
					<select name='ctime_mm' autocomplete="OFF">
					<?php
					for($i = 0; $i < 60; $i++)
					{
						if($i < 10)
							$option = '0'.$i;
						else
							$option = $i;
						echo "<option value='$option' ";
						if($option == $time_parts[1])
						//if($option == "00")
							echo "selected ";
						echo ">$option</option>";
					}
					?>
					</select>
					&nbsp;&nbsp;hrs
				</td>
			</tr>
			
			
			<tr valign='top' style='display:none' <?php ## Disabled for now ?>>
				<td>
					<label for='report_to' valign='top'>Report To</label>
				</td>
				<td>  </td>
				<td>
					<select name='report_to' class='uniform_width'>
					<?php
					# Enable the following line if this field is to be used:
					echo " onchange=\"javascript:checkandtoggle(this, '$doc_row_id');\" ";
					?>
						<option value='1'>Patient</option>
						<option value='2'>Doctor/Hospital</option>
					</select>
				</td>
			</tr>
			
			
			
			
			<?php
			/*$custom_field_list = get_custom_fields_specimen();
			foreach($custom_field_list as $custom_field)
			{	if(($custom_field->flag)==NULL)
				{
				?>
				<tr valign='top'>
					<td><?php echo $custom_field->fieldName; ?></td>
					<td></td>
					<td><?php $this->getCustomFormField($custom_field); ?></td>
				</tr>
				<?php
				}
			}*/
			?>
			
			
			
			<?php
			if($form_num != 1)
			{
				?>
				<tr valign='top'>
					<td>
						<a href="javascript:show_dialog_box('<?php echo $div_id; ?>');"><?php echo LangUtil::$generalTerms['CMD_REMOVE']; ?></a>
					</td>
					<td>
					<?php
					$message = LangUtil::$pageTerms['MSG_SURETO_REMOVE'];
					$ok_function = "remove_specimenbox('$div_id')";
					$cancel_function = "hide_dialog_box('$div_id')";
					$this->getConfirmDialog($dialog_id, $message, $ok_function, $cancel_function, $width=200);
					?>
					</td>
				</tr>
				<?php
			}
			?>
			</tbody>
			</table>
		</form>
		</div>
		<small>
		<span style='float:right'>
			<?php $this->getAsteriskMessage(); ?>
		</span>
		</small>
		<br>
		</div>
		<?php
	}
Exemplo n.º 11
0
<?php

#
# Main page for editting user profile
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("edit_profile");
$pwd_tip = LangUtil::getPageTerm("TIPS_CASEPWD");
$page_elems = new PageElems();
$page_elems->getSideTip(LangUtil::$generalTerms["TIPS"], $pwd_tip);
$user_profile = get_user_by_id($_SESSION['user_id']);
?>
<script type='text/javascript'>
$(document).ready(function(){
	$('#curr_pwd_error').hide();
	$('#new_pwd1_error').hide();
	$('#new_pwd2_error').hide();
	$('#pwd_match_error').hide();
	$('#pwd_len_error').hide();
	$('#lang_id').attr("value", "<?php 
echo $user_profile->langId;
?>
");
});

function right_load1()
{
	$('#change_pwd_div').hide();
	$('#edit_profile_div').show();
	$('#err_msg').hide();
Exemplo n.º 12
0
<?php

#
# Main page for showing specimen addition confirmation
# Called from new_specimen.php
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("specimen_added");
$session_num = $_REQUEST['snum'];
//$session_num = get_session_current_number();
$specimen_list = get_specimens_by_session($session_num);
?>
<br>
<b><?php 
echo LangUtil::getTitle();
?>
</b>
 | <?php 
echo LangUtil::$generalTerms['ACCESSION_NUM'];
?>
 <?php 
echo $session_num;
if (count($specimen_list) > 1) {
    ?>
 | <?php 
    echo LangUtil::$generalTerms['SPECIMEN'];
    ?>
: <?php 
    echo count($specimen_list);
    ?>
Exemplo n.º 13
0
<?php

#
# Main page for reviewing a generated bill, and recieving payment/printing
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("bill_review");
$lab_config_id = $_SESSION['lab_config_id'];
$pid = $_REQUEST['pid'];
$billId = $_REQUEST['bill_id'];
$script_elems->enableTableSorter();
?>
<html>
	<head>
		<script type='text/javascript'>
			function apply_discount(id)
			{
				var selected = $("#selector_for_discount_of_association_" + id).val();
				var amount = $("#discount_amount_for_association_" + id).val();
				$.post('update_discount_for_association.php', {sel : selected, amt : amount, id : id}, function (response) {
					var decoded_resp = JSON.parse(response);
					$("#calculated_cost_for_test_" + id).hide();
					$("#calculated_cost_for_test_" + id).text(decoded_resp["a"]);
					$("#calculated_cost_for_test_" + id).fadeIn('fast');
					$("#bill_total").hide().html(decoded_resp["b"]).fadeIn('fast');
				});
			}
			function print_bill(id, lab_id)
			{
				var url = "reports_billing_specific.php?bill_id=" + id + "&lab_config_id=" + lab_id;
Exemplo n.º 14
0
#
# (c) C4G, Santosh Vempala, Ruban Monu and Amol Shintre
# Main file for updating to new version
# Calls ajax/update.php which actually performs the update operations

/*include("../users/accesslist.php");
if( !(isCountryDir(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $countryDirPageList)) 
	&& !(isSuperAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $superAdminPageList)) &&
	!(isAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $adminPageList)) )
	header( 'Location: home.php' );
*/

include("redirect.php");
include("../includes/script_elems.php");
include("lang/lang_util.php");
LangUtil::setPageId("updateCountryDbAtLocal");

$script_elems = new ScriptElems();
$script_elems->enableJQuery();
$script_elems->enableJQueryForm();

?>
<html>
<head>
<script type="text/javascript">
function performDbUpdate() {
	$.ajax({
		type : 'POST',
		url : 'update/updateCountryDbAtLocal.php',
		success : function (param) {
			$('#updating').hide();
Exemplo n.º 15
0
<?php

include "redirect.php";
include "includes/header.php";
include "includes/random.php";
include "includes/stats_lib.php";
LangUtil::setPageId("help");
$script_elems->enableTableSorter();
$script_elems->enableJQueryForm();
?>
<br>
<style type='text/css'>
label
{
	width: 10em;
	float: left;
	text-align: right;
	margin-right: 0.5em;
	display: block
}
</style>
<script>

function labconfig_disp()
{
if(document.getElementById('labconfig_disp').style.display =='none')
$('#labconfig_disp').show();
else
$('#labconfig_disp').hide();
//$('.right_pane').hide();
}
Exemplo n.º 16
0
<?php

#
# (c) C4G, Santosh Vempala, Ruban Monu and Amol Shintre
# Main page for showing lab configuration status
# Called via Ajax from lab_configs.php
#
include "../users/accesslist.php";
if (!(isCountryDir(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $countryDirPageList)) && !(isSuperAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $superAdminPageList))) {
    header('Location: home.php');
}
include "redirect.php";
include "includes/page_elems.php";
LangUtil::setPageId("lab_configs");
$page_elems = new PageElems();
$lab_config_id = $_REQUEST['id'];
$page_elems->getLabConfigStatus($lab_config_id);
Exemplo n.º 17
0
<?php

#
#
# Main page for modifying an existing test type
#
include "redirect.php";
include "includes/header.php";
include "includes/ajax_lib.php";
LangUtil::setPageId("catalog");
$script_elems->enableJQueryForm();
$script_elems->enableTokenInput();
?>
<br>
<?php 
//$tips_string=LangUtil::$pageTerms['TIPS_MEASURES'];
//$tips_string = LangUtil::$pageTerms['TIPS_CATALOG'];
$tips_string = "To know more about a particular field select on the [?] next to the field name.";
//$page_elems->getSideTip("Tips", $tips_string);
?>
<b><?php 
echo LangUtil::$pageTerms['EDIT_TEST_TYPE'];
?>
</b>
| <a href="country_catalog.php?show_t=1"><?php 
echo LangUtil::$generalTerms['CMD_CANCEL'];
?>
</a>
<br><br>

<?php 
Exemplo n.º 18
0
<?php

/*
Buea : cameroon : 129
bamenda : cameroon : 128
nphrel:ghana : 1006
kaneshie: ghana : 153
*/
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("home");
//echo "hi";
db_analysis_ratings(153);
//echo "<br>count=".$count;
?>

<?php 
include "includes/footer.php";
Exemplo n.º 19
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="Refresh"
CONTENT="1; URL=http://{$_SERVER['SERVER_ADDR']}:4001/login.php">
</head>
</html>
content;
file_put_contents($file, $content);
session_start();
# If already logged in, redirect to home page
if (isset($_SESSION['user_id'])) {
    header("Location: home.php");
}
include "includes/header.php";
LangUtil::setPageId("login");
$page_elems = new PageElems();
//$login_tip = LangUtil::getPageTerm("TIPS_NEWPWD");
$login_tip = "If you have forgotten your password then please send an email to '*****@*****.**' with the subject 'Password'.<br> New password will be sent to you.";
$page_elems->getSideTip(LangUtil::getGeneralTerm("TIPS"), $login_tip);
?>
<style type="text/css"> 
	.btn {
		color:white; 
		background-color:#3B5998; 
		border-style:none; 
		font-weight:bold; 
		font-size:14px; 
		height:28px; 
		width:65px;
		cursor:pointer;
Exemplo n.º 20
0
<?php

#
# (c) C4G, Santosh Vempala, Ruban Monu and Amol Shintre
# Main file for updating to new version
# Calls ajax/update.php which actually performs the update operations
/*include("../users/accesslist.php");
if( !(isCountryDir(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $countryDirPageList)) 
	&& !(isSuperAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $superAdminPageList)) &&
	!(isAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $adminPageList)) )
	header( 'Location: home.php' );
*/
include "redirect.php";
include "../includes/script_elems.php";
include "lang/lang_util.php";
LangUtil::setPageId("exportNationalDbUI");
$script_elems = new ScriptElems();
$script_elems->enableJQuery();
$script_elems->enableJQueryForm();
?>
<html>
<head>
<script type="text/javascript">
function exportDb() {
	$.ajax({
		type : 'POST',
		url : 'export/exportNationalDatabase.php',
		success : function (param) {
			$('#exporting').hide();
			if ( param != false ) {
				$('#exportSuccess').html(param);
Exemplo n.º 21
0
'></input>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type='button' onclick="javascript:export_as_word('export_content');" value='<?php 
echo LangUtil::$generalTerms['CMD_EXPORTWORD'];
?>
'></input>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type='button' onclick="javascript:window.close();" value='<?php 
echo LangUtil::$generalTerms['CMD_CLOSEPAGE'];
?>
'></input>
&nbsp;&nbsp;&nbsp;&nbsp;
<?php 
LangUtil::setPageId("reports");
$page_elems->getTableSortTip();
LangUtil::setPageId("results_entry");
?>
<hr>
<div id='export_content'>
<link rel='stylesheet' type='text/css' href='css/table_print.css' />
<style type='text/css'>
	<?php 
$page_elems->getReportConfigCss($margin_list, false);
?>
</style>
<div id='report_config_content'>
<h3>
	<?php 
echo $report_config->headerText;
?>
 | 
Exemplo n.º 22
0
<?php

#
# Main page for editing an existing locale's strings/terms
#
//include("redirect.php");
//include("includes/header.php");
LangUtil::setPageId("lang_modify");
//$locale = $_REQUEST['locale'];
//$lab_config_id = $_REQUEST['id'];
$user = get_user_by_id($_SESSION['user_id']);
if ($locale === "default") {
    if (is_super_admin($user) || is_country_dir($user)) {
        //Do nothing
    } else {
        $locale = "en";
    }
}
$LANGDATA_PATH = $LOCAL_PATH . "langdata_revamp/";
if ($SERVER == $ON_PORTABLE) {
    $LANGDATA_PATH = $LOCAL_PATH . "langdata_" . $lab_config_id . "/";
}
$script_elems->enableJQueryForm();
//$script_elems->enableAutogrowTextarea();
function get_locale_page_select()
{
    global $DEFAULT_LANG, $LANGDATA_PATH;
    $default_lang_pages = simplexml_load_file($LANGDATA_PATH . $DEFAULT_LANG . ".xml");
    /*$utf_encoded_content = utf8_encode(file_get_contents($LANGDATA_PATH.$DEFAULT_LANG.".xml"));
    	$default_lang_pages = simplexml_load_string($utf_encoded_content);*/
    foreach ($default_lang_pages as $default_lang_page) {
Exemplo n.º 23
0
#
# (c) C4G, Santosh Vempala, Ruban Monu, Amol Shintre and Naomi Chopra
# Admin Stock Management Page to add new stock
# Sends POST request to stock_details.php
#
include "../users/accesslist.php";
/*if( !(isAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $adminPageList)) 
     && !(isCountryDir(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $countryDirPageList)) 
	 && !(isSuperAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $superAdminPageList)) ) {
		header( 'Location: home.php' );
}*/
include "redirect.php";
include "includes/header.php";
include "includes/stats_lib.php";
LangUtil::setPageId("stocks");
$script_elems->enableTableSorter();
$script_elems->enableDatePicker();
$lid = $_SESSION['lab_config_id'];
$selected_id = $_REQUEST['id'];
$selected_lot = $_REQUEST['lot'];
putUILog('use_stock', 'X', basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X');
?>
 
<script type='text/javascript'>
$(document).ready(function() {
//$("#changeText").click(function() {
    $('#quant_u_error').hide();
    $('#quant_e_error').hide();
val = $('select').val();
    var url_string = "../inventory/get_reagent_unit.php?lid="+"<?php 
Exemplo n.º 24
0
	function getNewSpecimenForm($form_num, $pid, $dnum, $session_num, $doc="" ,$title ="Dr.")
	{
		# Returns HTML for new specimen form
		LangUtil::setPageId("new_specimen");
		$form_name = 'specimenform_'.$form_num;
		$form_id = $form_name; 
		$form_class = 'specimenform_class';
		$testbox_id = $form_id.'_testbox';
		$stype_id = $form_id.'_stype';
		$dnum_id = $form_id.'_dnum';
		$time_id = $form_id.'_ctime';
		$div_id = 'specimen_form_container_'.$form_num;
		$dialog_id = $div_id."_dialog";
		$specimen_id_div_id = 'specimen-id_'.$form_num;
		$specimen_err_div_id = 'specimen_msg_'.$form_num;
		$doc_row_id = 'doc_row_'.$form_num;
		$ref_out_row_id = 'ref_out_row_'.$form_num;
		$ref_out_check_id = 'ref_out_'.$form_num;
		$lab_config = LabConfig::getById($_SESSION['lab_config_id']);
		?>
		<div id='<?php echo $div_id; ?>'>
		<div class='pretty_box' style='width:530px;'>
		<form name='<?php echo $form_name; ?>' id='<?php echo $form_id; ?>' action='ajax/specimen_add.php?session_num=<?php echo $session_num ?>' method='post'>
			<input type='hidden' name='pid' value='<?php echo $pid; ?>' class='uniform_width'></input>
			<?php /*<input type='hidden' name='session_num' value='<?php echo get_session_number(); ?>' class='uniform_width'></input> */ ?>
			<table class='regn_form_table'>
			<tbody>
			<tr valign='top' <?php
				if(is_numeric($_SESSION['dnum']) && $_SESSION['dnum'] == 0)
				{
					# Hide if daily num not in use
					echo " style='display:none;' ";
				}
				?>
			>
				<td>
					<label for='dnum'><?php echo LangUtil::$generalTerms['PATIENT_DAILYNUM']; ?><?php $this->getAsterisk(); ?></label>
				</td>
				<td>   </td>
				<td>
					<input type="text" name="dnum" id="dnum" value=<?php echo $dnum; ?> size="20" class='uniform_width'> </input>
				</td>
			</tr>
			<tr valign='top'>				
				<td>
					<label for='stype'><?php echo LangUtil::$generalTerms['SPECIMEN_TYPE']; ?><?php $this->getAsterisk(); ?></label>
				</td>
				<td>   </td>
				<td>
					<select 
						name='stype' 
						id='<?php echo $stype_id; ?>' 
						onchange="javascript:get_testbox('<?php echo $testbox_id; ?>', '<?php echo $stype_id; ?>');" 
						class='uniform_width'
					>
						option value="">-<?php echo LangUtil::$generalTerms['CMD_SELECT']; ?>-</option>
						<?php $this->getSpecimenTypesSelect($_SESSION['lab_config_id']); ?>
					</select>
				</td>
			</tr>
			<tr valign='top'>
				<td>
					<label for='tests'><?php echo LangUtil::$generalTerms['TESTS']; ?> <?php $this->getAsterisk(); ?></label>
				</td>
				<td>   </td>
				<td>
					<span id='<?php echo $testbox_id; ?>' class='uniform_width'>
						-<?php echo LangUtil::$pageTerms['MSG_SELECT_STYPE']; ?>-
					</span>
				</td>
			</tr>
			<tr valign='top'<?php
			//if($_SESSION['sid'] == 0)
			if(true)
				echo " style='display:none;' ";
			?>>
				<td>
					<label for='sid'>DB Key 
					<?php if($_SESSION['sid'] == 2) $this->getAsterisk(); ?></label>
				</td>
				<td>   </td>
				<td>
					<!--
					<input type="text" name="specimen_id" id="<?php echo $specimen_id_div_id; ?>" value="" onblur="javascript:check_specimen_id('<?php echo $specimen_id_div_id; ?>', '<?php echo $specimen_err_div_id; ?>');" size="20" class='uniform_width'>
					</input>
					-->
					<input type='text' name='specimen_id' id='specimen_id' value="<?php echo $form_num; ?>" readonly="readonly" class='uniform_width'>
					</input>
					<br><span id='<?php echo $specimen_err_div_id; ?>'></span>
				</td>
			</tr>
			<tr valign='top' <?php
				if($lab_config->specimenAddl == 0)
					echo " style='display:none;' ";
			?>>
				<td>
					<label for='addlid'><?php echo LangUtil::$generalTerms['SPECIMEN_ID']; ?><?php if($_SESSION['s_addl'] == 2) $this->getAsterisk(); ?> </label>
				</td>
				<td>   </td>
				<td>
					<input type="text" name="addl_id" id="addl_id" value="" size="20" class='uniform_width'> </input>
				</td>
			</tr>
			<tr valign='top' <?php
			if($_SESSION['rdate'] == 0)
				echo " style='display:none;' ";
			?>>
				<td>
					<label><?php echo LangUtil::$generalTerms['R_DATE']; ?> <?php if($_SESSION['rdate'] == 2) $this->getAsterisk(); ?></label>
				</td>
				<td>  </td>
				<td>
					<?php
					$today = date("Y-m-d");
					$today_array = explode("-", $today);
					$name_list = array("receipt_yyyy", "receipt_mm", "receipt_dd");
					$id_list = array($form_id."_receipt_yyyy", $form_id."_receipt_mm", $form_id."_receipt_dd");
					$value_list = array($today_array[0], $today_array[1], $today_array[2]);
					$this->getDatePicker($name_list, $id_list, $value_list, true); 
					?>
				</td>
			</tr>
			<tr valign='top' style='display:none;'>
				<td>
					<label><?php echo LangUtil::$generalTerms['C_DATE']; ?></label>
				</td>
				<td>  </td>
				<td>
					<?php
					$today = date("Y-m-d");
					$today_array = explode("-", $today);
					$name_list = array("collect_yyyy", "collect_mm", "collect_dd");
					$id_list = array($form_id."_collect_yyyy", $form_id."_collect_mm", $form_id."_collect_dd");
					$value_list = array($today_array[0], $today_array[1], $today_array[2]);
					$this->getDatePicker($name_list, $id_list, $value_list, false); 
					?>
				</td>
			</tr>
			<tr valign='top' style='display:none;'>
				<td>
					<label><?php echo LangUtil::$generalTerms['C_TIME']; ?></label>
				</td>
				<td>
					<select name='ctime_hh' autocomplete="OFF">
					<?php
					$time = date("H:i");
					$time_parts = explode(":", $time);
					for($i = 0; $i < 24; $i++)
					{
						if($i < 10)
							$option = '0'.$i;
						else
							$option = $i;
						echo "<option value='$option' ";
						if($option == $time_parts[0])
						//if($option == 9)
							echo "selected ";
						echo ">$option</option>";
						
						
					}
					?>
					</select>
					:
					<select name='ctime_mm' autocomplete="OFF">
					<?php
					for($i = 0; $i < 60; $i++)
					{
						if($i < 10)
							$option = '0'.$i;
						else
							$option = $i;
						echo "<option value='$option' ";
						if($option == $time_parts[1])
						//if($option == "00")
							echo "selected ";
						echo ">$option</option>";
					}
					?>
					</select>
					&nbsp;&nbsp;hrs
				</td>
			</tr>
			<tr valign='top'<?php
			if($_SESSION['comm'] == 0)
				echo " style='display:none;' ";
			?>>
				<td>
					<label for='comments' valign='top'><?php echo LangUtil::$generalTerms['COMMENTS']; ?><?php if($_SESSION['comm'] == 2) $this->getAsterisk(); ?></label>
				</td><td>   </td>
				<td>
					<textarea name="comments" id="comments" class='uniform_width'></textarea>
				</td>
			</tr>
			<tr valign='top' style='display:none' <?php ## Disabled for now ?>>
				<td>
					<label for='report_to' valign='top'>Report To</label>
				</td>
				<td>  </td>
				<td>
					<select name='report_to' class='uniform_width'>
					<?php
					# Enable the following line if this field is to be used:
					echo " onchange=\"javascript:checkandtoggle(this, '$doc_row_id');\" ";
					?>
						<option value='1'>Patient</option>
						<option value='2'>Doctor/Hospital</option>
					</select>
				</td>
			</tr>
			<tr valign='top' id='<?php echo $doc_row_id; ?>' <?php
			if($_SESSION['doctor'] == 0)
				echo " style='display:none;' ";
			?>>
				<td><label for='doctor' valign='top'><?php echo LangUtil::$generalTerms['DOCTOR']; ?><?php if($_SESSION['doctor'] == 2) $this->getAsterisk(); ?></label></label>
				</td>
				<td> 
					<SELECT name='title' id='<?php echo $doc_row_id; ?>_title'>
					<?php
					$labtitlefieldoptions = get_custom_fields_labtitle(1);
					$lab_titles = explode("/",$labtitlefieldoptions);
					
					foreach($lab_titles as $option)
					{
						if(trim($option) == "")
							continue;
						echo "<option value='$option'";
						if($option == $field_value)
						{
							echo " selected ";
						}
						echo " >$option</option>";
					}
					?>
					</SELECT>
				</td>
				<td>
					<input type='text' name='doctor' id='<?php echo $doc_row_id."_input"; ?>'  value='<?php echo $doc; ?>' ></input>
				</td>
			</tr>
			<?php
			$custom_field_list = get_custom_fields_specimen();
			foreach($custom_field_list as $custom_field)
			{	if(($custom_field->flag)==NULL)
				{
				?>
				<tr valign='top'>
					<td><?php echo $custom_field->fieldName; ?></td>
					<td></td>
					<td><?php $this->getCustomFormField($custom_field); ?></td>
				</tr>
				<?php
				}
			}
			?>
			<tr valign='top'<?php
			if($_SESSION['refout'] == 0)
				echo " style='display:none;' ";
			?>>
				<td>
					<label for='ref_out' valign='top'><?php echo LangUtil::$generalTerms['REF_OUT']; ?>? <?php if($_SESSION['refout'] == 2) $this->getAsterisk(); ?></label>
				</td>
				<td>   </td>
				<td>
					<INPUT TYPE=RADIO NAME="ref_out" id='<?php echo $ref_out_check_id; ?>' VALUE="Y" onchange="javascript:checkandtoggle_ref('<?php echo $ref_out_check_id; ?>', '<?php echo $ref_out_row_id; ?>');"><?php echo LangUtil::$generalTerms['YES']; ?>
					<INPUT TYPE=RADIO NAME="ref_out" onchange="javascript:checkandtoggle_ref('<?php echo $ref_out_check_id; ?>', '<?php echo $ref_out_row_id; ?>');" VALUE="N" checked><?php echo LangUtil::$generalTerms['NO']; ?>
				</td>
			</tr>
			<tr valign='top' id='<?php echo $ref_out_row_id; ?>' style='display:none'>
				<td><?php echo LangUtil::$generalTerms['REF_TO']; ?></td>
				<td>
					<input name='ref_out_name' class='uniform_width'></input>
				</td>
			</tr>
			<?php
			if($form_num != 1)
			{
				?>
				<tr valign='top'>
					<td>
						<a href="javascript:show_dialog_box('<?php echo $div_id; ?>');"><?php echo LangUtil::$generalTerms['CMD_REMOVE']; ?></a>
					</td>
					<td>
					<?php
					$message = LangUtil::$pageTerms['MSG_SURETO_REMOVE'];
					$ok_function = "remove_specimenbox('$div_id')";
					$cancel_function = "hide_dialog_box('$div_id')";
					$this->getConfirmDialog($dialog_id, $message, $ok_function, $cancel_function, $width=200);
					?>
					</td>
				</tr>
				<?php
			}
			?>
			</tbody>
			</table>
		</form>
		</div>
		<small>
		<span style='float:right'>
			<?php $this->getAsteriskMessage(); ?>
		</span>
		</small>
		<br>
		</div>
		<?php
	}
Exemplo n.º 25
0
<?php

#
# Main page for showing specimen info
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("specimen_info");
$script_elems->enableJQueryForm();
$script_elems->enableJQueryValidate();
$script_elems->enableTableSorter();
$script_elems->enableLatencyRecord();
$script_elems->enableTokenInput();
putUILog('specimen_info', 'X', basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X');
$sid = $_REQUEST['sid'];
$isTestDel = $_REQUEST['del'];
?>
<script type='text/javascript'>
function submit_forms(specimen_id)
{

	var form_id_csv = $('#form_id_list').attr("value");
	var form_id_list = form_id_csv.split(",");
//result_cancel_link').hide();
	$('.result_progress_spinner').show();
	//var target_div_id = "fetched_specimen";
	
	var target_div_id = "result_form_pane_"+specimen_id;
	for(var i = 0; i < form_id_list.length; i++)
	{
		if($('#'+form_id_list[i]+'_skip').is(':checked'))
Exemplo n.º 26
0
<?php 
include "../includes/db_lib.php";
include "../includes/script_elems.php";
LangUtil::setPageId("find_patient");
$script_elems = new ScriptElems();
$dynamic_fetch = 1;
if (!isset($_REQUEST['result_cap'])) {
    $result_cap = 10;
} else {
    $result_cap = $_REQUEST['result_cap'];
}
if (!isset($_REQUEST['result_counter'])) {
    $result_counter = 1;
} else {
    $result_counter = $_REQUEST['result_counter'];
}
$a = $_REQUEST['a'];
$saved_db = "";
$lab_config = null;
$q = $_REQUEST['q'];
$q = strip_tags($q);
if (isset($_REQUEST['l'])) {
    # Save context
    $lab_config = LabConfig::getById($_REQUEST['l']);
    $saved_db = DbUtil::switchToLabConfig($_REQUEST['l']);
} else {
    $lab_config = LabConfig::getById($_SESSION['lab_config_id']);
}
$patient_list = array();
# Fetch list from DB
Exemplo n.º 27
0
# (c) C4G, Santosh Vempala, Ruban Monu and Amol Shintre
# Main page for adding new lab user account
# Called from lab_config_home.php
#

include("../users/accesslist.php");
if( !(isAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $adminPageList)) 
     && !(isCountryDir(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $countryDirPageList)) 
	 && !(isSuperAdmin(get_user_by_id($_SESSION['user_id'])) && in_array(basename($_SERVER['PHP_SELF']), $superAdminPageList)) ) {
		header( 'Location: home.php' );
}

include("redirect.php");
include("includes/page_elems.php");
include("includes/script_elems.php");
LangUtil::setPageId("lab_config_home");

$script_elems = new ScriptElems();
$page_elems = new PageElems();
$reload_url = $_REQUEST['ru']."&show_u=1";
$lab_config_id = $_REQUEST['lid'];
?>
<script type="text/javascript">
function add_lab_user()
{
	var username = $('#lab_user').attr('value');
	var pwd = $('#pwd').attr('value');
	var email = $('#email').attr('value');
	var phone = $('#phone').attr('value');
	var fullname = $('#fullname').attr('value');
	var ut = $('#user_type').attr('value');
Exemplo n.º 28
0
<?php

#
# Main page for patient or specimen search
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("search");
$tips_string = LangUtil::$pageTerms['TIPS_SEARCH'];
$page_elems->getSideTip(LangUtil::$generalTerms['TIPS'], $tips_string);
?>
<script type='text/javascript'>
$(document).ready(function(){
	$('#specimen_search_results').css({"display":"none", "position":"relative", "left":"20px"});
	$('#patient_search_results').css({"display":"none", "position":"relative", "left":"20px"});
	$('#specimen_search_error').hide();
	$('#specimen_notfound_error').hide();
	$('#patient_search_error').hide();
	$('#patient_id').focus();
	$('#specimen_id').focus(function() { $('#patient_search_error').hide(); $('#specimen_notfound_error').hide(); });
	$('#patient_id').focus(function() { $('#specimen_search_error').hide() });
	$('#p_attrib').change(function() {
		$('#patient_id').focus();
	});
	$('#s_attrib').change(function() {
		$('#specimen_id').focus();
	});
});

function specimen_search()
{
Exemplo n.º 29
0
<?php

#
# Main page for showing disease report and options to export
# Called via POST from reports.php
#
include "redirect.php";
include "includes/db_lib.php";
include "includes/stats_lib.php";
include "includes/script_elems.php";
LangUtil::setPageId("reports");
$script_elems = new ScriptElems();
$script_elems->enableJQuery();
?>
<script type='text/javascript'>
function export_as_word()
{
	var html_data = $('#report_content').html();
	$('#word_data').attr("value", html_data);
	//$('#export_word_form').submit();
	$('#word_format_form').submit();
}

function print_content(div_id)
{
	var DocumentContainer = document.getElementById(div_id);
	var WindowObject = window.open("", "PrintWindow", "toolbars=no,scrollbars=yes,status=no,resizable=yes");
	WindowObject.document.writeln(DocumentContainer.innerHTML);
	WindowObject.document.close();
	WindowObject.focus();
	WindowObject.print();
Exemplo n.º 30
0
<?php

#
# (c) C4G, Santosh Vempala, Ruban Monu and Amol Shintre
# Main page for starting patient lookup
# 1st step of specimen registration
#
include "redirect.php";
include "includes/header.php";
LangUtil::setPageId("doctor_register");
putUILog('doctor_register', 'X', basename($_SERVER['REQUEST_URI'], ".php"), 'X', 'X', 'X');
$script_elems->enableDatePicker();
$script_elems->enableJQueryForm();
$lab_config = get_lab_config_by_id($_SESSION['lab_config_id']);
?>
<script type='text/javascript'>
$(document).ready(function() {
	$('#psearch_progress_spinner').hide();
	$('#add_anyway_link').attr("href", "new_patient.php");
	$('#pq').focus();
	$('#p_attrib').change(function() {
		$('#pq').focus();
	});
});

function restrictCharacters(e) {
	
	var alphabets = /[A-Za-z]/g;
	var numbers = /[0-9]/g;
	var specialCharacter = /[_&.]/g;
	if(!e) var e = window.event;