0) { $row = @mysqli_fetch_array($result); } $sql_for_treatment = "select * from treatment where appointment_id='" . $_REQUEST['appointmentId'] . "' and is_display!='N'"; $result_for_treatment = @mysqli_query($conn, $sql_for_treatment); $num_rows_treatment = @mysqli_num_rows($result_for_treatment); $sql_for_treatment_external = "select * from treatment_external where appointment_id='" . $_REQUEST['appointmentId'] . "'"; $result_for_treatment_external = @mysqli_query($conn, $sql_for_treatment_external); $num_rows_treatment_external = @mysqli_num_rows($result_for_treatment_external); // If Its a follow up OPD/INJURY case - then add treatment details from the existing $treatment_followup_picked = false; if (($num_rows_treatment == 0 && $num_rows_treatment_external == 0) && ($row['followup_to_opd'] != null && $row['followup_to_opd'] != "0")) { $sql_for_treatment = "select * from treatment where appointment_id='" . $row['followup_to_opd'] . "' and is_display!='N'"; $result_for_treatment = @mysqli_query($conn, $sql_for_treatment); $num_rows_treatment = @mysqli_num_rows($result_for_treatment); $sql_for_treatment_external = "select * from treatment_external where appointment_id='" . $row['followup_to_opd'] . "'"; $result_for_treatment_external = @mysqli_query($conn, $sql_for_treatment_external); $num_rows_treatment_external = @mysqli_num_rows($result_for_treatment_external); $treatment_followup_picked = true; } } else { if ($id == null || $id == '' || empty($id)) { $id = $_REQUEST['direct_patient_id']; error_log("id is inside if " . $id); } error_log("id is " . $id); $sql = "select * from patient_master where id='" . $id . "'"; error_log("query:" . $sql); $result = mysqli_query($conn, $sql); $num_rows = @mysqli_num_rows($result); $row = null; // echo fhfh; if ($num_rows > 0) { $row = @mysqli_fetch_array($result); error_log("in side"); } } ?>
Patient OPD >    

CONSUMABLES Back value="" value="" />



Current
Engagement EMT First Aider Height Work CS Noise Respiratory Wielding HD 1 HD 2
Last Training
Next Training Due Date
Last Examination
Next Due Date - Examination
Provisional Diagnosis
Body System Provisional Diagnosis Associated Hazard
     type="radio" name="doctor_discussed" id="doctor_discussed_yes" value="Y" onchange="setDoctorDiscussed(this.value)"> Yes    type="radio" name="doctor_discussed" id="doctor_discussed_no" value="N" onchange="setDoctorDiscussed(this.value)"> No

Medicine Frequency Timing Admin. Route Duration Dose Qty Total Qty Available Qty Qty Issued

value="" value="" /> value="Y" value="N" >