Refer

Refer patient to a specialist or lab

Referred to my Company

Click on patient name to see referral details

'; while ($row1 = pg_fetch_row($stmt1)) { $sno = $row1[0]; $refer_to = $row1[1]; $refer_from = $row1[2]; $patient = $row1[3]; $status = $row1[4]; $refer_time = $row1[5]; $date = strtotime($refer_time); $refer_date = date('Y-m-d', $date); $refer_to_name = $row1[6]; $refer_from_name = $row1[7]; $patient_name = $row1[8]; $category = $row1[9]; $category_to_display = $category; $action_class = ''; if ($category == 'inbox') { $action_class = ' call_referral'; $category_to_display = 'Received'; } else if ($category == 'sent') { $action_class = ' view_referral'; $category_to_display = 'Sent'; } else if ($category == 'patient inbox') { $action_class = ' call_patient_referral'; } $pending_since = abs(round((strtotime(date("Y-m-d h:i:sa")) - $date) / 86400)); $completed = ($status != "n"); $pending_col = $completed ? "Completed" : "$pending_since days"; if ($completed) { $pending_since = 0; } echo ' '; } echo '
Patient From To Since Details Actions
' . $patient_name . ' ' . $refer_from_name . ' ' . $refer_to_name . ' ' . $pending_col . ' ' . $category_to_display . " on " . $refer_date . ' View
'; } pg_free_result($stmt1); } ?>