<?php 
include_once ("includes/setup.inc.php");

$indicator_Query = "SELECT nama_pemilik, kpbaru_pemilik, nama_pet, desk_haiwan_peliharaan, appointment_date, appointment_time, remarks, check_result, m_vatklinik_appointment.rawatan_fee, total_resit, tkh_resit, resit_number
				  FROM m_vatklinik_appointment
				  LEFT JOIN m_pemilik ON m_pemilik.id_pemilik = m_vatklinik_appointment.id_pemilik
				  LEFT JOIN m_pemilik_pet ON m_pemilik_pet.id_pemilik_pet = m_vatklinik_appointment.id_pemilik_pet
				  LEFT JOIN i_haiwan_peliharaan ON m_pemilik_pet.id_haiwan_peliharaan = i_haiwan_peliharaan.id_haiwan_peliharaan
				  WHERE id_vatklinik_appointment = ?";
$PDO_stmt = $PDO->prepare($indicator_Query);
$PDO_stmt->bindValue(1, $myID, PDO::PARAM_INT);
$PDO_stmt->execute();
$appointment_List = $PDO_stmt->fetch(PDO::FETCH_ASSOC);

createLabels('Nama Pemilik', 'cf_nama', $appointment_List['nama_pemilik'], '', 5, 7, 1, 6);
createLabels('No KP', 'cf_kp', $appointment_List['kpbaru_pemilik'], '', 5, 7, 1, 6);
createLabels('Tarikh Temu Janji', 'cf_tarikh', $appointment_List['appointment_date'], '', 5, 7, 1, 6);
createLabels('Masa Temu Janji', 'cf_masa', $appointment_List['appointment_time'], '', 5, 7, 1, 6);
createLabels('Haiwan Peliharaan', 'cf_pet', $appointment_List['nama_pet'].' ('.$appointment_List['desk_haiwan_peliharaan'].')', '', 5, 7, 1, 6);
createLabels('Remarks', 'cf_remarks', ($appointment_List['remarks']==''?'-':$appointment_List['remarks']), '', 5, 7, 1, 6);

?>