Add SmartClinicManagementSystem

This commit is contained in:
2025-11-03 18:27:23 +01:00
parent f49be0c3d3
commit f65dc6ccdd
75 changed files with 4380 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
// patientRows.js
export function createPatientRow(patient, appointmentId, doctorId) {
const tr = document.createElement("tr");
console.log("CreatePatientRow :: ", doctorId)
tr.innerHTML = `
<td class="patient-id">${patient.id}</td>
<td>${patient.name}</td>
<td>${patient.phone}</td>
<td>${patient.email}</td>
<td><img src="../assets/images/addPrescriptionIcon/addPrescription.png" alt="addPrescriptionIcon" class="prescription-btn" data-id="${patient.id}"></img></td>
`;
// 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;
}