/** * function to take a given date in the form of mm/dd/yyyy from the excel template and return it as yyyymmdd * @param: $date */ function getFormattedDateCRBExcel($date) { $datearray=array(); $datearray=explode("/",$date); //final date $finalDate=0; $finalDate="$datearray[2]-$datearray[1]-$datearray[0]"; if(isDateAuthentic($finalDate)) { return $finalDate; } }
$suspectedTreatmentFailureSampleTypeID=0; $suspectedTreatmentFailureSampleTypeID=getDetailedTableInfo2("vl_samples","id='$modify' limit 1","suspectedTreatmentFailureSampleTypeID"); //prepopulate patients $artNumber=0; $artNumber=getDetailedTableInfo2("vl_patients","id='$patientID' limit 1","artNumber"); $otherID=0; $otherID=getDetailedTableInfo2("vl_patients","id='$patientID' limit 1","otherID"); $gender=0; $gender=getDetailedTableInfo2("vl_patients","id='$patientID' limit 1","gender"); $dateOfBirth=0; $dateOfBirth=getDetailedTableInfo2("vl_patients","id='$patientID' limit 1","dateOfBirth"); if(!isDateAuthentic($dateOfBirth)) { $noDateOfBirthSupplied=1; } else { $noDateOfBirthSupplied=0; } $patientPhone=0; $patientPhone=getDetailedTableInfo2("vl_patients_phone","patientID='$patientID' order by created desc limit 1","phone"); } ?> <script Language="JavaScript" Type="text/javascript"> <!-- function validate(samples) { //check for missing information if(!document.samples.lrCategory.value) { alert('Missing Mandatory Field: Location/Rejection ID');