<? //security check if(!$GLOBALS['vlDC'] || !$_SESSION["VLEMAIL"]) { die("<font face=arial size=2>You must be logged in to view this page.</font>"); } //validate $patientID=0; if($encryptedSample) { $patientID=validate(vlDecrypt($encryptedSample)); } if($envelopeNumberFrom && $envelopeNumberTo) { $patientID=validate(vlDecrypt($envelopeNumberFrom)); } ?> <table width="100%" border="0" class="vl"> <? if(!getDetailedTableInfo2("vl_patients","id!='' limit 1","id")) { ?> <tr> <td class="vl_error"> There are No Samples on the System!<br /> <a href="/samples/capture/">Click Here to input the First Sample.</a></td> </tr> <tr> <td> </td> </tr> <? } if($modified) { ?>
<? //security check if(!$GLOBALS['vlDC'] || !$_SESSION["VLEMAIL"]) { die("<font face=arial size=2>You must be logged in to view this page.</font>"); } $sampleRef=0; if($sampleReferenceNumber) { $sampleRef=vlDecrypt($sampleReferenceNumber); } ?> <table width="100%" border="0" class="vl"> <? if($success) { ?> <tr> <td colspan="2" class="vl_success">Sample Captured Successfully<?php echo $sampleRef ? " with Sample Reference Number <strong>{$sampleRef}</strong>" : ""; ?> !</td> </tr> <tr> <td colspan="2"> </td> </tr> <? } elseif($modified) { ?> <tr> <td colspan="2" class="vl_success">Sample Modifications Saved!</td> </tr> <tr> <td colspan="2"> </td> </tr> <? } elseif($reviewed) { ?> <tr>
<? //security check if(!$GLOBALS['vlDC'] || !$_SESSION["VLEMAIL"]) { die("<font face=arial size=2>You must be logged in to view this page.</font>"); } //validate $searchQuery=validate($searchQuery); //decrypt if($searchQueryURL) { $searchQuery=vlDecrypt($searchQueryURL); $searchQuery=validate($searchQuery); } ?> <table width="100%" border="0" class="vl"> <? if(!getDetailedTableInfo2("vl_forms_clinicalrequest","id!='' limit 1","id")) { ?> <tr> <td class="vl_error"> There are No Forms on the System!<br /> <a href="/generateforms/capture/">Click Here to input the First Envelope.</a></td> </tr> <tr> <td> </td> </tr> <? } ?> <tr> <td class="toplinks" style="padding:0px 0px 10px 0px"><a class="toplinks" href="/dashboard/">HOME</a> <a class="toplinks" href="/generateforms/">GENERATE FORMS</a></td> </tr> <tr> <td style="padding: 5px 0px 15px 0px; border-bottom: 1px dashed #dfe6e6"><strong>Find Forms</strong></td> </tr>
//validation $sampleID=validate($sampleID); $worksheetID=validate($worksheetID); $facilityID=validate($facilityID); $dispatchedDateDay=validate($dispatchedDateDay); $dispatchedDateMonth=validate($dispatchedDateMonth); $dispatchedDateYear=validate($dispatchedDateYear); $all=validate($all); $sampleIDField=validate($sampleIDField); $machineType=validate($machineType); $rawDecryptedQuery=0; $rawDecryptedQuery=vlDecrypt($rawQuery); $xRawDecryptedQuery=0; $xRawDecryptedQuery=vlDecrypt($xRawQuery); //if all, assign variables to $sampleResultHidden if($all) { $query=0; $query=mysqlquery($xRawDecryptedQuery); if(mysqlnumrows($query)) { $sampleResultHidden=array(); $sampleResultCheckbox=array(); $q=array(); while($q=mysqlfetcharray($query)) { //key variables if($machineType!="rejected") { $worksheetUniqueID=0; $worksheetUniqueID=$q["worksheetID"]; //array assignment
<? //security check if(!$GLOBALS['vlDC'] || !$_SESSION["VLEMAIL"]) { die("<font face=arial size=2>You must be logged in to view this page.</font>"); } //encrypted samples if($encryptedSample) { $searchQuery=validate(vlDecrypt($encryptedSample)); if(!$machineType) { $machineType="abbott"; } } //results $resultsAbbott=0; $resultsAbbott=getDetailedTableInfo3("vl_results_abbott,vl_samples","vl_samples.vlSampleID=vl_results_abbott.sampleID".($showPrinted?" and vl_samples.id in (select sampleID from vl_logs_printedresults)":""),"count(vl_results_abbott.sampleID)","num"); $resultsRoche=0; $resultsRoche=getDetailedTableInfo3("vl_results_roche,vl_samples","vl_samples.vlSampleID=vl_results_roche.SampleID".($showPrinted?" and vl_samples.id in (select sampleID from vl_logs_printedresults)":""),"count(vl_results_roche.SampleID)","num"); $rejectedSamples=0; $rejectedSamples=getDetailedTableInfo3("vl_samples_verify","outcome='Rejected'".($showPrinted?" and sampleID in (select sampleID from vl_logs_printedrejectedresults)":" and sampleID not in (select sampleID from vl_logs_printedrejectedresults)"),"count(id)","num"); $resultsPrinted=0; $resultsPrinted=getDetailedTableInfo3("vl_results_abbott,vl_samples","vl_samples.vlSampleID=vl_results_abbott.sampleID and vl_samples.id in (select sampleID from vl_logs_printedresults)","count(vl_results_abbott.sampleID)","num")+getDetailedTableInfo3("vl_results_roche,vl_samples","vl_samples.vlSampleID=vl_results_roche.SampleID and vl_samples.id in (select sampleID from vl_logs_printedresults)","count(vl_results_roche.SampleID)","num"); $resultsNotPrinted=0; $resultsNotPrinted=getDetailedTableInfo3("vl_results_abbott,vl_samples","vl_samples.vlSampleID=vl_results_abbott.sampleID and vl_samples.id not in (select sampleID from vl_logs_printedresults)","count(vl_results_abbott.sampleID)","num")+getDetailedTableInfo3("vl_results_roche,vl_samples","vl_samples.vlSampleID=vl_results_roche.SampleID and vl_samples.id not in (select sampleID from vl_logs_printedresults)","count(vl_results_roche.SampleID)","num"); //pages if(!$pg) { $pg=1; }
<? //security check if(!$GLOBALS['vlDC'] || !$_SESSION["VLEMAIL"]) { die("<font face=arial size=2>You must be logged in to view this page.</font>"); } ?> <!--<div style="height: 250px; width: 100%; overflow: auto; padding:5px">--> <div style="padding:5px"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <? if($success) { ?> <tr> <td class="vl_success"> <strong>Report Created!</strong><br /> <div class="vls_grey" style="padding:5px 0px 0px 0px"><img src="/images/arrow_right.gif" border="0"> <a href="<?php echo vlDecrypt($pathtofile); ?> " class="vls_grey">Click here to Download the Report.</a></div> </td> </tr> <? } ?> <tr> <td valign="top" style="padding:10px 0px; border-bottom: 1px dashed #CCC"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="vl_tdnoborder" width="5%"><img src="/images/download.excel.gif" width="55" height="55" alt="downloads" border="0" /></td> <td class="vl_tdnoborder" width="95%"> <div style="padding:0px 0px 5px 2px">Cumulative Number of Samples Received</div> <script Language="JavaScript" Type="text/javascript"> <!-- function checkFormMF(searchForm) { if(document.pressed == ' Download Excel ') {
case modifypatients: include "tpl.samples.patients.modify.php"; break; case managepatients: include "tpl.samples.patients.manage.php"; break; case modify: include "tpl.samples.modify.php"; break; case findedit: //validate if($encryptedSample) { $sample=validate(vlDecrypt($encryptedSample)); } elseif($envelopeNumberFrom && $envelopeNumberTo) { $sample=0; $sample=validate(vlDecrypt($envelopeNumberFrom)); /* $sampleTo=0; $sampleTo=validate(vlDecrypt($envelopeNumberTo)); */ } else { $sample=validate($sample); } if(getDetailedTableInfo2("vl_samples","formNumber='$sample' or formNumber='".($sample/1)."' or vlSampleID='$sample' or concat(lrCategory,lrEnvelopeNumber,'/',lrNumericID)='$sample' limit 1","id")) { include "tpl.samples.modify.php"; } else { //redirect accordingly go("/samples/incorrect/"); } break; case capture:
<? //register a globals variable for security $GLOBALS['vlDC']=true; include "conf.php"; //declarations $code="code128"; $o=2; $dpi=50; $t=50; $r=1; $rot=0; $text=vlDecrypt(getValidatedVariable("sampleID")); $f1="Arial.ttf"; $f2=0; $a1=0; $a2="B"; $a3=0; $filename = $system_temp_array2[0]; require("modules.raw/barcodes/BCGColor.php"); require("modules.raw/barcodes/BCGBarcode.php"); require("modules.raw/barcodes/BCGDrawing.php"); require("modules.raw/barcodes/BCGFont.php"); if(include("modules.raw/barcodes/BCG".$code.".barcode.php")) { if($f1 && $f1 !== '-1' && intval($f2) >= 1) { $font = new BCGFont("modules.raw/barcodes/font/".$f1, intval($f2)); } else { $font = 0;
if($encryptedSample) { $searchQuery=validate(vlDecrypt($encryptedSample)); $approvedstatus="search"; } //envelope Number From $searchQueryFrom=0; $searchQueryTo=0; if($envelopeNumberFrom && $envelopeNumberTo) { $searchQueryFrom=validate(vlDecrypt($envelopeNumberFrom)); $searchQueryTo=validate(vlDecrypt($envelopeNumberTo)); $approvedstatus="search"; } if($encryptedSampleUnverified) { $searchQuery=validate(vlDecrypt($encryptedSampleUnverified)); $approvedstatus="reverse"; } //assign approvedstatus if(!$approvedstatus) { $approvedstatus="pending"; } //process reversals if($reverseApprovalRejection) { //were any samples checked if(count($sampleVerifyCheckbox)) { //reverse the approvals/rejections foreach($sampleVerifyCheckbox as $sv) { /*
if($searchQueryCurrentPosition) { //$searchQueryNextPosition=getDetailedTableInfo2("vl_samples","id not in (select sampleID from vl_samples_verify) and (formNumber='$searchQuery' or vlSampleID='$searchQuery' or concat(lrCategory,lrEnvelopeNumber,'/',lrNumericID) like '$searchQuery%') order by if(lrCategory='',1,0),lrCategory, if(lrEnvelopeNumber='',1,0),lrEnvelopeNumber, if(lrNumericID='',1,0),lrNumericID,created desc limit $searchQueryCurrentPosition,1","id"); //if(!$searchQueryNextPosition) { $searchQueryNextPosition=getDetailedTableInfo2("vl_samples","id not in (select sampleID from vl_samples_verify) and id!='$id' and (formNumber='$searchQuery' or vlSampleID='$searchQuery' or concat(lrCategory,lrEnvelopeNumber,'/',lrNumericID) like '$searchQuery%') order by lrNumericID asc limit 1","id"); //} } } //envelope Number From $searchQueryFrom=0; $searchQueryTo=0; //$searchQueryCurrentPosition=0; //$searchQueryNextPosition=0; if($envelopeNumberFrom && $envelopeNumberTo) { $searchQueryFrom=validate(vlDecrypt($envelopeNumberFrom)); $searchQueryTo=validate(vlDecrypt($envelopeNumberTo)); $searchQueryCurrentPosition=getDetailedTableInfo3("vl_samples y","y.vlSampleID='".getDetailedTableInfo2("vl_samples","id='$id'","vlSampleID")."'","(select count(x.id) from vl_samples x where concat(x.lrCategory,x.lrEnvelopeNumber)>='$searchQueryFrom' and concat(x.lrCategory,x.lrEnvelopeNumber)<='$searchQueryTo' and x.vlSampleID<=y.vlSampleID order by if(x.lrCategory='',1,0),x.lrCategory, if(x.lrEnvelopeNumber='',1,0),x.lrEnvelopeNumber, if(x.lrNumericID='',1,0),x.lrNumericID,x.created desc)","position"); if($searchQueryCurrentPosition) { $searchQueryNextPosition=getDetailedTableInfo2("vl_samples","id not in (select sampleID from vl_samples_verify) and concat(lrCategory,lrEnvelopeNumber)>='$searchQueryFrom' and concat(lrCategory,lrEnvelopeNumber)<='$searchQueryTo' order by if(lrCategory='',1,0),lrCategory, if(lrEnvelopeNumber='',1,0),lrEnvelopeNumber, if(lrNumericID='',1,0),lrNumericID,created desc limit $searchQueryCurrentPosition,1","id"); if(!$searchQueryNextPosition) { $searchQueryNextPosition=getDetailedTableInfo2("vl_samples","id not in (select sampleID from vl_samples_verify) and id!='$id' and concat(lrCategory,lrEnvelopeNumber)>='$searchQueryFrom' and concat(lrCategory,lrEnvelopeNumber)<='$searchQueryTo' order by if(lrCategory='',1,0),lrCategory, if(lrEnvelopeNumber='',1,0),lrEnvelopeNumber, if(lrNumericID='',1,0),lrNumericID,created desc limit 1","id"); } } } if($saveChangesReturn || $saveChangesProceed) { //validate data $error=0; $error=checkFormFields("Received_Status::$outcome"); //is gender male and pregnancy set to yes?
echo $thePage; ?> (<?php echo vlDecrypt($action); ?> )</font></strong></td> </tr> <tr> <td><table width="100%" border="1" class="vl"> <tr bgcolor="#ECECFF"> <td width="50%"><strong>Visitor</strong></td> <td width="50%"><strong>Date/Time</strong></td> </tr> <? $squery=0; $squery=mysqlquery("select who,at from vl_logs_pagehits where page='$thePage' and action='".vlDecrypt($action)."' order by created desc"); if(mysqlnumrows($squery)) { $sq=array(); $stotal=0; $scount=1; while($sq=mysqlfetcharray($squery)) { if($scount%2) { $scolor="#FFFFFF"; } else { $scolor="#F4F4F4"; } ?> <tr bgcolor="<?php echo $scolor; ?> ">