<td><select name="suspectedTreatmentFailureLastVLDateDay" id="suspectedTreatmentFailureLastVLDateDay" class="search">
                                          <?
											if($suspectedTreatmentFailureLastVLDate) {
												echo "<option value=\"".getFormattedDateDay($suspectedTreatmentFailureLastVLDate)."\" selected=\"selected\">".getFormattedDateDay($suspectedTreatmentFailureLastVLDate)."</option>";
											} else {
	                                            echo "<option value=\"\" selected=\"selected\">Select Date</option>";
											}
											for($j=1;$j<=31;$j++) {
                                                echo "<option value=\"".($j<10?"0$j":$j)."\">$j</option>";
                                            }
                                            ?>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px"><select name="suspectedTreatmentFailureLastVLDateMonth" id="suspectedTreatmentFailureLastVLDateMonth" class="search">
                                          <? 
											if($suspectedTreatmentFailureLastVLDate) {
												echo "<option value=\"".getFormattedDateMonth($suspectedTreatmentFailureLastVLDate)."\" selected=\"selected\">".getFormattedDateMonthname($suspectedTreatmentFailureLastVLDate)."</option>";
											} else {
	                                            echo "<option value=\"\" selected=\"selected\">Select Month</option>"; 
											}
										  ?>
                                          <option value="01">Jan</option>
                                          <option value="02">Feb</option>
                                          <option value="03">Mar</option>
                                          <option value="04">Apr</option>
                                          <option value="05">May</option>
                                          <option value="06">Jun</option>
                                          <option value="07">Jul</option>
                                          <option value="08">Aug</option>
                                          <option value="09">Sept</option>
                                          <option value="10">Oct</option>
                                          <option value="11">Nov</option>
                                          <?
											if($assayDate) {
												echo "<option value=\"".getFormattedDateDay($assayDate)."\" selected=\"selected\">".getFormattedDateDay($assayDate)."</option>";
											} else {
												echo "<option value=\"\" selected=\"selected\">Select Day</option>";
											}
											for($j=1;$j<=31;$j++) {
												echo "<option value=\"".($j<10?"0$j":$j)."\">$j</option>";
											}
                                            ?>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px">
                                        <select name="assayDateMonth" id="assayDateMonth" class="search">
                                          	<? 
											if($assayDate) {
												echo "<option value=\"".getFormattedDateMonth($assayDate)."\" selected=\"selected\">".getFormattedDateMonthname($assayDate)."</option>";
											} else {
												echo "<option value=\"\" selected=\"selected\">Select Month</option>"; 
											}
											?>
                                          <option value="01">Jan</option>
                                          <option value="02">Feb</option>
                                          <option value="03">Mar</option>
                                          <option value="04">Apr</option>
                                          <option value="05">May</option>
                                          <option value="06">Jun</option>
                                          <option value="07">Jul</option>
                                          <option value="08">Aug</option>
                                          <option value="09">Sept</option>
                                          <option value="10">Oct</option>
                                          <option value="11">Nov</option>
Ejemplo n.º 3
0
/**
* function to generate a unique print number for abbott
*/
function generateWorksheetReferenceNumber() {
	global $trailSessionUser,$datetime;
	//get the user's names
	$names=0;
	$names=getDetailedTableInfo2("vl_users","email='$trailSessionUser' limit 1","names");
	$namesArray=array();
	$namesArray=explode(" ",$names);
	$initials=0;
	if(count($namesArray)>1) {
		//get the first letter of each name
		$initials=substr(trim($namesArray[0]),0,1);
		$initials.=substr(trim($namesArray[1]),0,1);
		$initials=strtoupper($initials);
	} else {
		//get the first 2 letters of the email
		$initials=substr(trim($trailSessionUser),0,2);
		$initials=strtoupper($initials);
	}
	
	//variables
	$number=0;
	$number=getDetailedTableInfo3("vl_samples_worksheetcredentials","year(created)='".getCurrentYear()."' and month(created)='".getCurrentMonth()."'","count(id)","num");
	$number+=1;
	
	$reference=0;
	$reference=getFormattedDateYearShort($datetime).getFormattedDateMonth($datetime);
	switch(strlen($number)) {
		case 1:
			$reference.=$initials."00$number";
		break;
		case 2:
			$reference.=$initials."0$number";
		break;
		default:
			$reference.=$initials.$number;
		break;
	}
	return $reference;
}
Ejemplo n.º 4
0
/**
* function to get current month
*/
function getCurrentMonth() {
	global $c,$default_GMTtimezone,$default_country;
	//return gmdate("m");
	return getFormattedDateMonth(getDualInfoWithAlias("now()","datetime"));
}
                      </tr>
                      <tr>
                        <td style="padding:10px 0px 0px 0px">To:</td>
                      </tr>
                      <tr>
                        <td><table width="10%" border="0" cellspacing="0" cellpadding="0" class="vl">
                          <tr>
                            <td><select name="toDay" id="toDay" class="search">
                              <?
								for($j=1;$j<=31;$j++) {
									echo "<option value=\"".($j<10?"0$j":$j)."\" ".($j==getFormattedDateDay(getDualInfoWithAlias("last_day(now())","lastmonth"))?"selected=\"selected\"":"").">$j</option>";
								}
								?>
                              </select></td>
                            <td style="padding:0px 0px 0px 5px"><select name="toMonth" id="toMonth" class="search">
                              <? echo "<option value=\"".getFormattedDateMonth(getDualInfoWithAlias("last_day(now())","lastmonth"))."\" selected=\"selected\">".getFormattedDateMonthname(getDualInfoWithAlias("last_day(now())","lastmonth"))."</option>"; ?>
                              <option value="01">January</option>
                              <option value="02">February</option>
                              <option value="03">March</option>
                              <option value="04">April</option>
                              <option value="05">May</option>
                              <option value="06">June</option>
                              <option value="07">July</option>
                              <option value="08">August</option>
                              <option value="09">September</option>
                              <option value="10">October</option>
                              <option value="11">November</option>
                              <option value="12">December</option>
                              </select></td>
                            <td style="padding:0px 0px 0px 5px"><select name="toYear" id="toYear" class="search">
                              <?
Ejemplo n.º 6
0
                      <table width="100%" border="0" class="vl">
                        <tr>
                          <td width="20%">Date&nbsp;Dispatched&nbsp;<font class="vl_red">*</font></td>
                          <td width="80%">
									<table width="10%" border="0" cellspacing="0" cellpadding="0" class="vl">
                                      <tr>
                                        <td><select name="dispatchedDateDay" id="dispatchedDateDay" class="search">
                                          <?
                                            echo "<option value=\"".getFormattedDateDay($oldDispatchedDate?$oldDispatchedDate:$datetime)."\" selected=\"selected\">".getFormattedDateDay($oldDispatchedDate?$oldDispatchedDate:$datetime)."</option>";
											for($j=1;$j<=31;$j++) {
                                                echo "<option value=\"".($j<10?"0$j":$j)."\">$j</option>";
                                            }
                                            ?>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px"><select name="dispatchedDateMonth" id="dispatchedDateMonth" class="search">
                                          <? echo "<option value=\"".getFormattedDateMonth($oldDispatchedDate?$oldDispatchedDate:$datetime)."\" selected=\"selected\">".getFormattedDateMonthname($oldDispatchedDate?$oldDispatchedDate:$datetime)."</option>"; ?>
                                          <option value="01">Jan</option>
                                          <option value="02">Feb</option>
                                          <option value="03">Mar</option>
                                          <option value="04">Apr</option>
                                          <option value="05">May</option>
                                          <option value="06">Jun</option>
                                          <option value="07">Jul</option>
                                          <option value="08">Aug</option>
                                          <option value="09">Sept</option>
                                          <option value="10">Oct</option>
                                          <option value="11">Nov</option>
                                          <option value="12">Dec</option>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px"><select name="dispatchedDateYear" id="dispatchedDateYear" class="search">
                                          <?
Ejemplo n.º 7
0
                        </tr>
                        <tr>
                          <td>Date&nbsp;Received&nbsp;<font class="vl_red">*</font></td>
                          <td>
<table width="10%" border="0" cellspacing="0" cellpadding="0" class="vl">
                                      <tr>
                                        <td><select name="receivedDateDay" id="receivedDateDay" class="search">
                                          <?
                                            echo "<option value=\"".getFormattedDateDay($created)."\" selected=\"selected\">".getFormattedDateDay($created)."</option>";
											for($j=1;$j<=31;$j++) {
                                                echo "<option value=\"".($j<10?"0$j":$j)."\">$j</option>";
                                            }
                                            ?>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px"><select name="receivedDateMonth" id="receivedDateMonth" class="search">
                                          <? echo "<option value=\"".getFormattedDateMonth($created)."\" selected=\"selected\">".getFormattedDateMonthname($created)."</option>"; ?>
                                          <option value="01">Jan</option>
                                          <option value="02">Feb</option>
                                          <option value="03">Mar</option>
                                          <option value="04">Apr</option>
                                          <option value="05">May</option>
                                          <option value="06">Jun</option>
                                          <option value="07">Jul</option>
                                          <option value="08">Aug</option>
                                          <option value="09">Sept</option>
                                          <option value="10">Oct</option>
                                          <option value="11">Nov</option>
                                          <option value="12">Dec</option>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px"><select name="receivedDateYear" id="receivedDateYear" class="search">
                                          <?
Ejemplo n.º 8
0
$datetime=0;
//$datetime=getDualInfoWithAlias("convert_tz(now(),'$default_GMTtimezone:00','".getDetailedTableInfo2("vl_timezones",($c?"lower(country)='".strtolower($c)."'":"country='$default_country'"),"timezone")."')","datetime");
$datetime=getDualInfoWithAlias("now()","datetime");
$date=0;
$date=getRawFormattedDateLessDay($datetime);
$icurDate=0;
$icurDate=getRawFormattedDateLessDay($datetime);
$curTime=0;
$curTime=getFormattedTime($datetime);

/*
* default envelope number
* added 27/Feb/15 to aid staff in the entry of the Location/Rejection ID
*/
$default_envelopeNumber=0;
$default_envelopeNumber=getFormattedDateYearShort($datetime).getFormattedDateMonth($datetime)."-";

//if the user has been idle for a certain period ($default_systemIdleWait mins), require them to login afresh.
/*
if($_SESSION["VLEMAIL"] && !$directlogin) {
	//get time since last activity hh:mm:ss 00:00:00
	$time=0;
	$time=getDetailedTableInfo2("vl_logs_pagehits","createdby='$trailSessionUser' order by created desc limit 1","timediff(now(),created)");
	//split this variable
	$timeA=array();
	$timeA=explode(":",trim($time));
	$tHour=0;
	$tMinute=0;
	$tSecond=0;
	$tHour=$timeA[0]/1;
	$tMinute=$timeA[1]/1;
												echo "<option value=\"".getFormattedDateDay($dateOfBirth)."\" selected=\"selected\">".getFormattedDateDay($dateOfBirth)."</option>";
											} else {
	                                            echo "<option value=\"\" selected=\"selected\">Select Date</option>";
											}
											for($j=1;$j<=31;$j++) {
                                                echo "<option value=\"".($j<10?"0$j":$j)."\">$j</option>";
                                            }
                                            ?>
                                          </select></td>
                                        <td style="padding:0px 0px 0px 5px"><select name="dateOfBirthMonth" id="dateOfBirthMonth" class="search" <?php 
echo $noDateOfBirthSupplied ? "disabled=\"disabled\"" : "";
?>
>
                                          <? 
										  	if($dateOfBirth) {
												echo "<option value=\"".getFormattedDateMonth($dateOfBirth)."\" selected=\"selected\">".getFormattedDateMonthname($dateOfBirth)."</option>";
											} else {
	                                            echo "<option value=\"\" selected=\"selected\">Select Month</option>"; 
											}
										  ?>
                                          <option value="01">Jan</option>
                                          <option value="02">Feb</option>
                                          <option value="03">Mar</option>
                                          <option value="04">Apr</option>
                                          <option value="05">May</option>
                                          <option value="06">Jun</option>
                                          <option value="07">Jul</option>
                                          <option value="08">Aug</option>
                                          <option value="09">Sept</option>
                                          <option value="10">Oct</option>
                                          <option value="11">Nov</option>
Ejemplo n.º 10
0
/**
* function to generate a credit application reference
*/
function generateFormNumberDeprecated($number,$batch) {
	global $datetime,$trailSessionUser;
	//variables
	$reference=0;
	$reference=getFormattedDateYearShort($datetime).getFormattedDateMonth($datetime)."-";
	switch(strlen($number)) {
		case 1:
			$reference.="000$number";
		break;
		case 2:
			$reference.="00$number";
		break;
		case 3:
			$reference.="0$number";
		break;
		default:
			$reference.=$number;
		break;
	}

	//log this entry into the db
	mysqlquery("insert into vl_forms_clinicalrequest 
						(formNumber,refNumber,created,createdby) 
						values 
						('$reference','$batch','$datetime','$trailSessionUser')");
	return $reference;
}