0) { $row = @mysqli_fetch_array($result); $saved_ohc_id = $row['ohc_type_id']; if (trim($row['medi_disbursement']) != '') { if (empty($followup_to_opd_flag) && ($followup_id == null || empty($followup_id) || $followup_id == '0')) { $medicine_issued = trim($row['medi_disbursement']); error_log("medicine distributed or not " . $medicine_issued); } else if (!empty($followup_to_opd_flag) && (!empty($followup_id) && $followup_id != null && $followup_id != '0')) { $medicine_issued = trim($row['medi_disbursement']); error_log("medicine distributed or not " . $medicine_issued); } } } error_log("data " . print_r($row, true)); $chronic_days = $row['chronic_day']; $doctor_discussed_id = $row['doctor_discussed_id']; error_log("chronic day " . $chronic_days); if ($_REQUEST['followup_to_opd'] == '' || $_REQUEST['followup_to_opd'] == null || $_REQUEST['followup_to_opd'] == 0) { $sql_for_treatment = "select * from treatment where appointment_id='" . $app_id . "' and is_display!='N' and followup_id='0' "; } else { if ($followup_id == '' || $followup_id == null) { $sql_for_treatment = "select * from treatment where appointment_id='" . $app_id . "' and is_display!='N' and followup_id!='0' "; } else { $sql_for_treatment = "select * from treatment where appointment_id='" . $app_id . "' and is_display!='N' and followup_id='" . $followup_id . "' "; } } error_log('tq' . $sql_for_treatment); $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='" . $app_id . "'"; $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")) { $follow_up_ohc = getFieldFromTable('ohc_type_id', 'employee_appointment', 'appointment_id', $row['followup_to_opd']); if ($follow_up_ohc == $_SESSION['current_ohcttype']) { $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; } } error_log('appp' . $row['appointment_date']); } ?>
Patient Illness >        
SAVE & FORWARD ' id="forward_status" name="forward_status" style="display:none" /> SAVE & CLOSE  BACK
IPD  name="ipd">
 CONSUMABLES   Injury value="" value="" /> value="" value="" />




value="Y" value="N" >
     type="radio" name="doctor_discussed" id="doctor_discussed_yes" value="Y" style="width:50px" onchange="setDoctorDiscussed(this.value)"> Yes    type="radio" name="doctor_discussed" id="doctor_discussed_no" value="N" style="width:50px" onchange="setDoctorDiscussed(this.value)"> No
  
Medicine Frequency Timing Admin. Route Duration Daily Dose Qty Total Qty Available Qty Qty Issued



Half Day  name="half_day">