// patientRows.js export function createPatientRow(patient, appointmentId, doctorId) { const tr = document.createElement("tr"); console.log("CreatePatientRow :: ", doctorId) tr.innerHTML = ` ${patient.id} ${patient.name} ${patient.phone} ${patient.email} addPrescriptionIcon `; // Attach event listeners tr.querySelector(".patient-id").addEventListener("click", () => { window.location.href = `/pages/patientRecord.html?id=${patient.id}&doctorId=${doctorId}`; }); tr.querySelector(".prescription-btn").addEventListener("click", () => { window.location.href = `/pages/addPrescription.html?appointmentId=${appointmentId}&patientName=${patient.name}`; }); return tr; }