if ($dynamic_fetch == 0) {
            $patient_list = search_patients_by_name($q);
        } else {
            $patient_list = search_patients_by_name_dyn($q, $result_cap, $result_counter);
        }
        //DB Merging - Currently Disabled
        # See if there's a patient by the exact same name in another lab
        //$patient = searchPatientByName($q);
        /*if($patient != null) {
        	# See if there's a patient by the exact same name in current lab as well as another lab and if yes automatically add enteries to current database
        		autoImportPatientEntry($patient, $q);
        	}*/
    } else {
        if ($a == 2) {
            # Fetch by additional ID
            $patient_list = search_patients_by_addlid($q);
        } else {
            if ($a == 3) {
                # Fetch by daily number
                $patient_list = search_patients_by_dailynum("-" . $q);
            } else {
                if ((count($patient_list) == 0 || $patient_list[0] == null) && $patient != null) {
                    ?>
	<br>
	<div class='sidetip_nopos'>
	<?php 
                    echo "A record of the patient has been found in another hospital.<br><br>";
                    ?>
            </div>
		<a rel='facebox' href='viewPatientInfo.php?pid=<?php 
                    echo $patient->patientId;
Exemplo n.º 2
0
     } else {
         //echo "Fetch By Name section is ".$lab_section;
         $patient_list = search_patients_by_name_dyn($q, $result_cap, $result_counter, $lab_section, $c);
     }
     //DB Merging - Currently Disabled
     # See if there's a patient by the exact same name in another lab
     //$patient = searchPatientByName($q);
     /*if($patient != null) {
     	# See if there's a patient by the exact same name in current lab as well as another lab and if yes automatically add enteries to current database
     		autoImportPatientEntry($patient, $q);
     	}*/
 } else {
     if ($a == 2) {
         # Fetch by additional ID
         if ($dynamic_fetch == 0) {
             $patient_list = search_patients_by_addlid($q, $lab_section);
         } else {
             $patient_list = search_patients_by_addlid_dyn($q, $result_cap, $result_counter, $lab_section);
         }
     } else {
         if ($a == 3) {
             # Fetch by daily number
             if ($dynamic_fetch == 0) {
                 $patient_list = search_patients_by_dailynum("-" . $q, $lab_section);
             } else {
                 $patient_list = search_patients_by_dailynum_dyn("-" . $q, $result_cap, $result_counter, $lab_section);
             }
         } else {
             if ($a == 9) {
                 # Fetch by db id
                 if ($dynamic_fetch == 0) {