based on this database (-- phpMyAdmin SQL Dump -- version 5.2.1 --…
- User
based on this database (-- phpMyAdmin SQL Dump -- version 5.2.1 -- https://www.phpmyadmin.net/
-- Host: 127.0.0.1:3306 -- Generation Time: Oct 26, 2024 at 01:03 AM -- Server version: 10.11.9-MariaDB -- PHP Version: 7.2.34
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /; /!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /; /!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /; /!40101 SET NAMES utf8mb4 */;
-- -- Database:
u406552082_info
-- -- Table structure for table
adminsCREATE TABLE
admins(idint(11) NOT NULL,usernamevarchar(50) NOT NULL,passwordvarchar(255) NOT NULL,emailvarchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
appointmentsCREATE TABLE
appointments(idint(11) NOT NULL,package_idint(11) NOT NULL,appointment_datedatetime NOT NULL,proposed_appointment_datedatetime DEFAULT NULL,namevarchar(255) NOT NULL,emailvarchar(255) NOT NULL,phonevarchar(20) NOT NULL,ageint(3) DEFAULT NULL,genderenum('Male','Female','Other') DEFAULT NULL,addressvarchar(255) DEFAULT NULL,preferred_contact_methodenum('Email','Phone','WhatsApp') DEFAULT NULL,additional_notestext DEFAULT NULL,admin_notestext DEFAULT NULL,statusenum('Pending','Confirmed','Completed','Cancelled') DEFAULT 'Pending',created_attimestamp NULL DEFAULT current_timestamp(),patient_idint(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
budgetsCREATE TABLE
budgets(idint(11) NOT NULL,monthvarchar(7) DEFAULT NULL,budgeted_revenuedecimal(10,2) DEFAULT NULL,budgeted_expensesdecimal(10,2) DEFAULT NULL,notestext DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
commentsCREATE TABLE
comments(idint(11) NOT NULL,patient_idint(11) NOT NULL,senderenum('patient','doctor','admin') NOT NULL,messagetext NOT NULL,timestampdatetime DEFAULT current_timestamp(),parent_idint(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
doctorsCREATE TABLE
doctors(idint(11) NOT NULL,employee_idint(11) NOT NULL,namevarchar(255) NOT NULL,usernamevarchar(100) NOT NULL,passwordvarchar(255) NOT NULL,emailvarchar(255) NOT NULL,specializationvarchar(255) DEFAULT NULL,phonevarchar(20) DEFAULT NULL,registration_datedate DEFAULT curdate(),profile_picturevarchar(255) DEFAULT NULL,departmentvarchar(100) DEFAULT NULL,date_of_joiningdate DEFAULT NULL,statusenum('active','inactive') DEFAULT 'active' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
doctor_patientCREATE TABLE
doctor_patient(idint(11) NOT NULL,doctor_idint(11) NOT NULL,patient_idint(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
employeesCREATE TABLE
employees(idint(11) NOT NULL,namevarchar(255) NOT NULL,roleenum('admin','doctor','staff','accountant') NOT NULL,emailvarchar(255) NOT NULL,phonevarchar(20) DEFAULT NULL,departmentvarchar(100) DEFAULT NULL,date_of_joiningdate DEFAULT NULL,statusenum('active','inactive') DEFAULT 'active',usernamevarchar(100) NOT NULL,passwordvarchar(255) NOT NULL,created_attimestamp NULL DEFAULT current_timestamp(),updated_attimestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),profile_picturevarchar(255) DEFAULT NULL,specializationvarchar(255) DEFAULT NULL,is_onlinetinyint(1) DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
expensesCREATE TABLE
expenses(idint(11) NOT NULL,expense_datedate NOT NULL,categoryvarchar(100) NOT NULL,descriptionvarchar(255) DEFAULT NULL,amountdecimal(10,2) NOT NULL,created_attimestamp NULL DEFAULT current_timestamp(),updated_attimestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
health_recordsCREATE TABLE
health_records(idint(11) NOT NULL,patient_idint(11) NOT NULL,blood_pressurevarchar(20) DEFAULT NULL,weightdecimal(5,2) DEFAULT NULL,bmidecimal(4,2) DEFAULT NULL,cholesteroldecimal(5,2) DEFAULT NULL,prescriptiontext DEFAULT NULL,treatment_progresstext DEFAULT NULL,record_datedate NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
insurance_claimsCREATE TABLE
insurance_claims(idint(11) NOT NULL,patient_idint(11) DEFAULT NULL,invoice_idint(11) DEFAULT NULL,claim_amountdecimal(10,2) DEFAULT NULL,statusenum('Pending','Approved','Rejected') DEFAULT NULL,submission_datedate DEFAULT NULL,processing_datedate DEFAULT NULL,notestext DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
invoicesCREATE TABLE
invoices(idint(11) NOT NULL,patient_idint(11) NOT NULL,service_namevarchar(255) NOT NULL,service_descriptiontext DEFAULT NULL,costdecimal(10,2) NOT NULL,tax_ratedecimal(5,2) DEFAULT 0.00,discountdecimal(5,2) DEFAULT 0.00,total_amountdecimal(10,2) NOT NULL,invoice_datedate DEFAULT curdate(),due_datedate DEFAULT NULL,notestext DEFAULT NULL,taxdecimal(5,2) DEFAULT 0.00 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
invoice_servicesCREATE TABLE
invoice_services(idint(11) NOT NULL,invoice_idint(11) NOT NULL,service_idint(11) NOT NULL,service_namevarchar(255) NOT NULL,costdecimal(10,2) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
medical_notesCREATE TABLE
medical_notes(idint(11) NOT NULL,patient_idint(11) NOT NULL,doctor_idint(11) NOT NULL,notetext NOT NULL,created_attimestamp NULL DEFAULT current_timestamp(),updated_attimestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
packagesCREATE TABLE
packages(idint(11) NOT NULL,package_namevarchar(255) NOT NULL,descriptiontext DEFAULT NULL,detailstext DEFAULT NULL,created_attimestamp NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patientsCREATE TABLE
patients(idint(11) NOT NULL,namevarchar(100) NOT NULL,ageint(3) DEFAULT NULL,genderenum('Male','Female','Other') DEFAULT NULL,phonevarchar(20) DEFAULT NULL,emailvarchar(100) DEFAULT NULL,medical_historytext DEFAULT NULL,created_attimestamp NULL DEFAULT current_timestamp(),updated_attimestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),date_of_birthdate DEFAULT NULL,registration_datetimedatetime DEFAULT current_timestamp(),registration_datedate DEFAULT NULL,statusenum('Initial Consultation','Diagnostic Phase','Treatment in Progress','Improving','Monitoring','Maintenance Phase','Awaiting Test Results','Follow-up Needed','Paused','Completed Program','Relapsed','Discontinued','Inactive') DEFAULT 'Initial Consultation',doctor_idint(11) DEFAULT NULL,addressvarchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_basic_infoCREATE TABLE
patient_basic_info(patient_idint(11) NOT NULL,genderenum('Male','Female','Other') NOT NULL,ageint(3) NOT NULL,weightdecimal(5,2) NOT NULL,heightdecimal(5,2) NOT NULL,addressvarchar(255) DEFAULT NULL,namevarchar(100) NOT NULL,emailvarchar(100) NOT NULL,phonevarchar(20) NOT NULL,created_attimestamp NULL DEFAULT current_timestamp(),updated_attimestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_consentCREATE TABLE
patient_consent(patient_idint(11) NOT NULL,consentenum('accepted','declined') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_consultationCREATE TABLE
patient_consultation(patient_idint(11) NOT NULL,scheduled_atdatetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_goalsCREATE TABLE
patient_goals(patient_idint(11) NOT NULL,primary_health_goalstext NOT NULL,health_concernstext NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_health_metricsCREATE TABLE
patient_health_metrics(patient_idint(11) NOT NULL,exercise_frequencyenum('Daily','Weekly','Rarely','Never') NOT NULL,dietenum('Yes','No') NOT NULL,diet_specifyvarchar(255) DEFAULT NULL,sleep_averageenum('<5 Hours','5-7 Hours','7-9 Hours','>9 Hours') NOT NULL,smoking_statusenum('Yes','No','Occasionally') NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_loginsCREATE TABLE
patient_logins(idint(11) NOT NULL,patient_idint(11) NOT NULL,usernamevarchar(50) NOT NULL,passwordvarchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
patient_medical_historyCREATE TABLE
patient_medical_history(patient_idint(11) NOT NULL,chronic_conditionsenum('Yes','No') NOT NULL,chronic_conditions_specifyvarchar(255) DEFAULT NULL,medicationsenum('Yes','No') NOT NULL,medications_listtext DEFAULT NULL,major_surgeriesenum('Yes','No') NOT NULL,major_surgeries_specifyvarchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
paymentsCREATE TABLE
payments(idint(11) NOT NULL,patient_idint(11) NOT NULL,invoice_idint(11) NOT NULL,amount_paiddecimal(10,2) NOT NULL,payment_datedate NOT NULL,payment_methodvarchar(50) DEFAULT NULL,notestext DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
prescriptionsCREATE TABLE
prescriptions(idint(11) NOT NULL,patient_idint(11) NOT NULL,doctor_idint(11) DEFAULT NULL,medicationstext NOT NULL,instructionstext DEFAULT NULL,date_prescribeddatetime DEFAULT current_timestamp(),statusenum('active','inactive') DEFAULT 'active' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
questionnaire_responsesCREATE TABLE
questionnaire_responses(idint(11) NOT NULL,session_idvarchar(255) NOT NULL,page_numberint(2) NOT NULL,questionvarchar(255) NOT NULL,answertext NOT NULL,submitted_attimestamp NULL DEFAULT current_timestamp(),consentenum('Yes','No') DEFAULT 'No' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- -- Table structure for table
salariesCREATE TABLE
salaries(idint(11) NOT NULL,employee_idint(11) NOT NULL,basic_salarydecimal(10,2) NOT NULL,bonusesdecimal(10,2) DEFAULT 0.00,deductionsdecimal(10,2) DEFAULT 0.00,overtime_hoursint(11) DEFAULT 0,overtime_ratedecimal(10,2) DEFAULT 0.00,taxdecimal(10,2) DEFAULT 0.00,payment_datedate NOT NULL,net_salarydecimal(10,2) NOT NULL,statusenum('Pending','Paid') DEFAULT 'Pending',notestext DEFAULT NULL,payslip_pathvarchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- -- Table structure for table
servicesCREATE TABLE
services(service_idint(11) NOT NULL,service_namevarchar(255) NOT NULL,service_pricedecimal(10,2) NOT NULL,service_descriptiontext DEFAULT NULL,created_attimestamp NULL DEFAULT current_timestamp(),updated_attimestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;-- -- Indexes for dumped tables
-- -- Indexes for table
adminsALTER TABLE
adminsADD PRIMARY KEY (id), ADD UNIQUE KEYusername(username);-- -- Indexes for table
appointmentsALTER TABLE
appointmentsADD PRIMARY KEY (id), ADD KEYpackage_id(package_id), ADD KEYappointments_ibfk_2(patient_id);-- -- Indexes for table
budgetsALTER TABLE
budgetsADD PRIMARY KEY (id);-- -- Indexes for table
commentsALTER TABLE
commentsADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id);-- -- Indexes for table
doctorsALTER TABLE
doctorsADD PRIMARY KEY (id), ADD UNIQUE KEYusername(username), ADD UNIQUE KEYemail(email), ADD KEYemployee_id(employee_id);-- -- Indexes for table
doctor_patientALTER TABLE
doctor_patientADD PRIMARY KEY (id), ADD UNIQUE KEYdoctor_id(doctor_id,patient_id), ADD KEYfk_doctor_patient_patient_id(patient_id);-- -- Indexes for table
employeesALTER TABLE
employeesADD PRIMARY KEY (id), ADD UNIQUE KEYemail(email), ADD UNIQUE KEYusername(username);-- -- Indexes for table
expensesALTER TABLE
expensesADD PRIMARY KEY (id);-- -- Indexes for table
health_recordsALTER TABLE
health_recordsADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id);-- -- Indexes for table
insurance_claimsALTER TABLE
insurance_claimsADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id), ADD KEYinvoice_id(invoice_id);-- -- Indexes for table
invoicesALTER TABLE
invoicesADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id);-- -- Indexes for table
invoice_servicesALTER TABLE
invoice_servicesADD PRIMARY KEY (id), ADD KEYinvoice_id(invoice_id), ADD KEYservice_id(service_id);-- -- Indexes for table
medical_notesALTER TABLE
medical_notesADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id), ADD KEYdoctor_id(doctor_id);-- -- Indexes for table
packagesALTER TABLE
packagesADD PRIMARY KEY (id);-- -- Indexes for table
patientsALTER TABLE
patientsADD PRIMARY KEY (id), ADD KEYdoctor_id(doctor_id);-- -- Indexes for table
patient_basic_infoALTER TABLE
patient_basic_infoADD PRIMARY KEY (patient_id);-- -- Indexes for table
patient_consentALTER TABLE
patient_consentADD PRIMARY KEY (patient_id);-- -- Indexes for table
patient_consultationALTER TABLE
patient_consultationADD PRIMARY KEY (patient_id);-- -- Indexes for table
patient_goalsALTER TABLE
patient_goalsADD PRIMARY KEY (patient_id);-- -- Indexes for table
patient_health_metricsALTER TABLE
patient_health_metricsADD PRIMARY KEY (patient_id);-- -- Indexes for table
patient_loginsALTER TABLE
patient_loginsADD PRIMARY KEY (id), ADD UNIQUE KEYpatient_id(patient_id), ADD UNIQUE KEYusername(username);-- -- Indexes for table
patient_medical_historyALTER TABLE
patient_medical_historyADD PRIMARY KEY (patient_id);-- -- Indexes for table
paymentsALTER TABLE
paymentsADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id), ADD KEYinvoice_id(invoice_id);-- -- Indexes for table
prescriptionsALTER TABLE
prescriptionsADD PRIMARY KEY (id), ADD KEYpatient_id(patient_id), ADD KEYdoctor_id(doctor_id);-- -- Indexes for table
questionnaire_responsesALTER TABLE
questionnaire_responsesADD PRIMARY KEY (id);-- -- Indexes for table
salariesALTER TABLE
salariesADD PRIMARY KEY (id), ADD KEYemployee_id(employee_id);-- -- Indexes for table
servicesALTER TABLE
servicesADD PRIMARY KEY (service_id);-- -- AUTO_INCREMENT for dumped tables
-- -- AUTO_INCREMENT for table
adminsALTER TABLE
adminsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
appointmentsALTER TABLE
appointmentsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
budgetsALTER TABLE
budgetsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
commentsALTER TABLE
commentsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
doctorsALTER TABLE
doctorsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
doctor_patientALTER TABLE
doctor_patientMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
employeesALTER TABLE
employeesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
expensesALTER TABLE
expensesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
health_recordsALTER TABLE
health_recordsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
insurance_claimsALTER TABLE
insurance_claimsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
invoicesALTER TABLE
invoicesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
invoice_servicesALTER TABLE
invoice_servicesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
medical_notesALTER TABLE
medical_notesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
packagesALTER TABLE
packagesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
patientsALTER TABLE
patientsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
patient_loginsALTER TABLE
patient_loginsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
paymentsALTER TABLE
paymentsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
prescriptionsALTER TABLE
prescriptionsMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
questionnaire_responsesALTER TABLE
questionnaire_responsesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
salariesALTER TABLE
salariesMODIFYidint(11) NOT NULL AUTO_INCREMENT;-- -- AUTO_INCREMENT for table
servicesALTER TABLE
servicesMODIFYservice_idint(11) NOT NULL AUTO_INCREMENT;-- -- Constraints for dumped tables
-- -- Constraints for table
appointmentsALTER TABLE
appointmentsADD CONSTRAINTappointments_ibfk_1FOREIGN KEY (package_id) REFERENCESpackages(id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINTappointments_ibfk_2FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE ON UPDATE CASCADE;-- -- Constraints for table
commentsALTER TABLE
commentsADD CONSTRAINTcomments_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id);-- -- Constraints for table
doctorsALTER TABLE
doctorsADD CONSTRAINTdoctors_ibfk_1FOREIGN KEY (employee_id) REFERENCESemployees(id);-- -- Constraints for table
doctor_patientALTER TABLE
doctor_patientADD CONSTRAINTdoctor_patient_fk_doctor_idFOREIGN KEY (doctor_id) REFERENCESdoctors(id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINTdoctor_patient_ibfk_2FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE, ADD CONSTRAINTfk_doctorFOREIGN KEY (doctor_id) REFERENCESdoctors(id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINTfk_doctor_patient_doctor_idFOREIGN KEY (doctor_id) REFERENCESdoctors(id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINTfk_doctor_patient_patient_idFOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE ON UPDATE CASCADE;-- -- Constraints for table
health_recordsALTER TABLE
health_recordsADD CONSTRAINThealth_records_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE;-- -- Constraints for table
insurance_claimsALTER TABLE
insurance_claimsADD CONSTRAINTinsurance_claims_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE, ADD CONSTRAINTinsurance_claims_ibfk_2FOREIGN KEY (invoice_id) REFERENCESinvoices(id) ON DELETE CASCADE;-- -- Constraints for table
invoicesALTER TABLE
invoicesADD CONSTRAINTinvoices_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id);-- -- Constraints for table
invoice_servicesALTER TABLE
invoice_servicesADD CONSTRAINTinvoice_services_ibfk_1FOREIGN KEY (invoice_id) REFERENCESinvoices(id) ON DELETE CASCADE, ADD CONSTRAINTinvoice_services_ibfk_2FOREIGN KEY (service_id) REFERENCESservices(service_id) ON DELETE CASCADE;-- -- Constraints for table
medical_notesALTER TABLE
medical_notesADD CONSTRAINTmedical_notes_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINTmedical_notes_ibfk_2FOREIGN KEY (doctor_id) REFERENCESdoctors(id) ON DELETE CASCADE ON UPDATE CASCADE;-- -- Constraints for table
patientsALTER TABLE
patientsADD CONSTRAINTpatients_ibfk_1FOREIGN KEY (doctor_id) REFERENCESdoctors(id) ON DELETE SET NULL ON UPDATE CASCADE;-- -- Constraints for table
patient_basic_infoALTER TABLE
patient_basic_infoADD CONSTRAINTfk_patient_basic_info_patientFOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE ON UPDATE CASCADE;-- -- Constraints for table
patient_loginsALTER TABLE
patient_loginsADD CONSTRAINTpatient_logins_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE;-- -- Constraints for table
paymentsALTER TABLE
paymentsADD CONSTRAINTpayments_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINTpayments_ibfk_2FOREIGN KEY (invoice_id) REFERENCESinvoices(id) ON DELETE CASCADE ON UPDATE CASCADE;-- -- Constraints for table
prescriptionsALTER TABLE
prescriptionsADD CONSTRAINTprescriptions_ibfk_1FOREIGN KEY (patient_id) REFERENCESpatients(id) ON DELETE CASCADE, ADD CONSTRAINTprescriptions_ibfk_2FOREIGN KEY (doctor_id) REFERENCESdoctors(id) ON DELETE SET NULL;-- -- Constraints for table
salariesALTER TABLE
salariesADD CONSTRAINTsalaries_ibfk_1FOREIGN KEY (employee_id) REFERENCESemployees(id) ON DELETE CASCADE ON UPDATE CASCADE; COMMIT;/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT /; /!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS /; /!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;), i want to update and add more extra info of patient based on databse and this view_patient.php (<?php session_start(); require_once 'db_connect.php';
if (!isset($_SESSION['admin_id'])) { header("Location: admin_login.php"); exit(); }
_GET['id'] ?? null;
if (!$patient_id) { header("Location: admin_dashboard.php"); exit(); }
pdo->prepare("SELECT p.*, pl.username FROM patients p LEFT JOIN patient_logins pl ON p.id = pl.patient_id WHERE p.id = ?"); patient_id]); stmt->fetch();
if (!$patient) { header("Location: admin_dashboard.php"); exit(); }
pdo->prepare("SELECT * FROM health_records WHERE patient_id = ? ORDER BY record_date DESC"); patient_id]); stmt->fetchAll(); ?>
:root { --primary-color: #4F3F02; --secondary-color: #D1C287; --background-color: #f9f9f9; --text-color: #333; } body { font-family: 'Roboto', sans-serif; line-height: 1.6; background-color: var(--background-color); color: var(--text-color); margin: 0; padding: 0; } .container { max-width: 900px; margin: 40px auto; padding: 20px; background-color: white; border-radius: 20px; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); overflow: hidden; } .header { background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); color: white; padding: 20px; text-align: center; border-radius: 20px 20px 0 0; position: relative; overflow: hidden; } .header h2 { margin: 0; font-size: 32px; font-weight: 700; } .header::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%); transform: rotate(30deg); } .section { margin-top: 20px; padding: 20px; background-color: var(--background-color); border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; } .section:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); } .section h3 { font-size: 24px; margin-top: 0; color: var(--primary-color); border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; } .info-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e0e0e0; } .health-records .record-item { margin-bottom: 15px; padding: 15px; background-color: white; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); } .actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; } .actions a { background-color: var(--primary-color); color: white; padding: 10px 15px; text-decoration: none; border-radius: 30px; font-weight: 700; transition: background-color 0.3s ease; } .actions a:hover { background-color: var(--secondary-color); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } @media (max-width: 600px) { .info-item { flex-direction: column; align-items: flex-start; } } </style><div class="section"> <h3>Patient Information</h3> <div class="info-item"> <span>Patient ID:</span> <span><?= $patient['id'] ?></span> </div> <div class="info-item"> <span>Age:</span> <span><?= $patient['age'] ?></span> </div> <div class="info-item"> <span>Gender:</span> <span><?= $patient['gender'] ?></span> </div> <div class="info-item"> <span>Phone:</span> <span><?= htmlspecialchars($patient['phone']) ?></span> </div> <div class="info-item"> <span>Email:</span> <span><?= htmlspecialchars($patient['email']) ?></span> </div> <div class="info-item"> <span>Address:</span> <span><?= htmlspecialchars($patient['address']) ?></span> </div> <div class="info-item"> <span>Medical History:</span> <span><?= nl2br(htmlspecialchars($patient['medical_history'])) ?></span> </div> <div class="info-item"> <span>Status:</span> <span><?= nl2br(htmlspecialchars($patient['status'])) ?></span> </div> </div> <div class="section"> <h3>Health Records</h3> <div class="health-records"> <?php foreach ($health_records as $record): ?> <div class="record-item"> <div><strong>Date:</strong> <?= $record['record_date'] ?></div> <div><strong>Blood Pressure:</strong> <?= htmlspecialchars($record['blood_pressure']) ?></div> <div><strong>Weight:</strong> <?= $record['weight'] ?> kg</div> <div><strong>BMI:</strong> <?= $record['bmi'] ?></div> <div><strong>Cholesterol:</strong> <?= $record['cholesterol'] ?></div> <div><strong>Prescription:</strong> <?= nl2br(htmlspecialchars($record['prescription'])) ?></div> <div><strong>Treatment Progress:</strong> <?= nl2br(htmlspecialchars($record['treatment_progress'])) ?></div> <div class="actions"> <a href="edit_health_record.php?id=<?= $record['id'] ?>&patient_id=<?= $patient_id ?>">Edit</a> </div> </div> <?php endforeach; ?> </div> </div> <div class="actions"> <a href="add_health_record.php?patient_id=<?= $patient_id ?>">Add Health Record</a> <a href="edit_patient.php?id=<?= $patient_id ?>">Edit Patient Information</a> <a href="admin_dashboard.php">Back to Dashboard</a> </div> </div> - Assistant
Certainly! To enhance the
view_patient.phpfile by incorporating additional patient information from your database, we'll extend the existing functionality to fetch and display data from the supplementary tables such aspatient_basic_info,patient_consent,patient_consultation,patient_goals,patient_health_metrics, andpatient_medical_history.Below is the complete updated
view_patient.phpfile with the necessary modifications:<?php session_start(); require_once 'db_connect.php'; // Redirect to login if admin is not authenticated if (!isset($_SESSION['admin_id'])) { header("Location: admin_login.php"); exit(); } // Get the patient ID from the URL parameter $patient_id = $_GET['id'] ?? null; // Redirect to dashboard if no patient ID is provided if (!$patient_id) { header("Location: admin_dashboard.php"); exit(); } // Fetch primary patient information along with login details $stmt = $pdo->prepare("SELECT p.*, pl.username FROM patients p LEFT JOIN patient_logins pl ON p.id = pl.patient_id WHERE p.id = ?"); $stmt->execute([$patient_id]); $patient = $stmt->fetch(); // Redirect if patient not found if (!$patient) { header("Location: admin_dashboard.php"); exit(); } // Fetch health records $stmt = $pdo->prepare("SELECT * FROM health_records WHERE patient_id = ? ORDER BY record_date DESC"); $stmt->execute([$patient_id]); $health_records = $stmt->fetchAll(); // Fetch additional patient information from other tables // Patient Basic Info $stmt = $pdo->prepare("SELECT * FROM patient_basic_info WHERE patient_id = ?"); $stmt->execute([$patient_id]); $basic_info = $stmt->fetch(); // Patient Consent $stmt = $pdo->prepare("SELECT * FROM patient_consent WHERE patient_id = ?"); $stmt->execute([$patient_id]); $consent = $stmt->fetch(); // Patient Consultation $stmt = $pdo->prepare("SELECT * FROM patient_consultation WHERE patient_id = ?"); $stmt->execute([$patient_id]); $consultation = $stmt->fetch(); // Patient Goals $stmt = $pdo->prepare("SELECT * FROM patient_goals WHERE patient_id = ?"); $stmt->execute([$patient_id]); $goals = $stmt->fetch(); // Patient Health Metrics $stmt = $pdo->prepare("SELECT * FROM patient_health_metrics WHERE patient_id = ?"); $stmt->execute([$patient_id]); $health_metrics = $stmt->fetch(); // Patient Medical History $stmt = $pdo->prepare("SELECT * FROM patient_medical_history WHERE patient_id = ?"); $stmt->execute([$patient_id]); $medical_history = $stmt->fetch(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>View Patient Record</title> <style> @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap'); :root { --primary-color: #4F3F02; --secondary-color: #D1C287; --background-color: #f9f9f9; --text-color: #333; } body { font-family: 'Roboto', sans-serif; line-height: 1.6; background-color: var(--background-color); color: var(--text-color); margin: 0; padding: 0; } .container { max-width: 1000px; margin: 40px auto; padding: 20px; background-color: white; border-radius: 20px; box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1); overflow: hidden; } .header { background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); color: white; padding: 20px; text-align: center; border-radius: 20px 20px 0 0; position: relative; overflow: hidden; } .header h2 { margin: 0; font-size: 32px; font-weight: 700; } .header::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%); transform: rotate(30deg); } .section { margin-top: 20px; padding: 20px; background-color: var(--background-color); border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; } .section:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); } .section h3 { font-size: 24px; margin-top: 0; color: var(--primary-color); border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; } .info-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e0e0e0; } .info-item span:first-child { font-weight: 700; } .health-records .record-item, .additional-info .info-group { margin-bottom: 15px; padding: 15px; background-color: white; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); } .actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; } .actions a { background-color: var(--primary-color); color: white; padding: 10px 15px; text-decoration: none; border-radius: 30px; font-weight: 700; transition: background-color 0.3s ease; text-align: center; min-width: 150px; } .actions a:hover { background-color: var(--secondary-color); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } @media (max-width: 600px) { .info-item { flex-direction: column; align-items: flex-start; } .section { padding: 15px; } .header h2 { font-size: 24px; } .actions a { min-width: 100%; } } </style> </head> <body> <div class="container"> <div class="header"> <h2>Patient Record: <?= htmlspecialchars($patient['name']) ?></h2> </div> <!-- Patient Information Section --> <div class="section"> <h3>Patient Information</h3> <div class="info-item"> <span>Patient ID:</span> <span><?= htmlspecialchars($patient['id']) ?></span> </div> <div class="info-item"> <span>Name:</span> <span><?= htmlspecialchars($patient['name']) ?></span> </div> <div class="info-item"> <span>Username:</span> <span><?= htmlspecialchars($patient['username']) ?></span> </div> <div class="info-item"> <span>Email:</span> <span><?= htmlspecialchars($patient['email']) ?></span> </div> <div class="info-item"> <span>Phone:</span> <span><?= htmlspecialchars($patient['phone']) ?></span> </div> <div class="info-item"> <span>Age:</span> <span><?= htmlspecialchars($patient['age']) ?></span> </div> <div class="info-item"> <span>Gender:</span> <span><?= htmlspecialchars($patient['gender']) ?></span> </div> <div class="info-item"> <span>Address:</span> <span><?= htmlspecialchars($patient['address']) ?></span> </div> <div class="info-item"> <span>Date of Birth:</span> <span><?= htmlspecialchars($patient['date_of_birth']) ?></span> </div> <div class="info-item"> <span>Registration Date:</span> <span><?= htmlspecialchars($patient['registration_date']) ?></span> </div> <div class="info-item"> <span>Status:</span> <span><?= htmlspecialchars($patient['status']) ?></span> </div> <div class="info-item"> <span>Registration Datetime:</span> <span><?= htmlspecialchars($patient['registration_datetime']) ?></span> </div> <div class="info-item"> <span>Medical History:</span> <span><?= nl2br(htmlspecialchars($patient['medical_history'])) ?></span> </div> </div> <!-- Basic Information Section --> <?php if ($basic_info): ?> <div class="section"> <h3>Basic Information</h3> <div class="info-item"> <span>Weight:</span> <span><?= htmlspecialchars($basic_info['weight']) ?> kg</span> </div> <div class="info-item"> <span>Height:</span> <span><?= htmlspecialchars($basic_info['height']) ?> cm</span> </div> <div class="info-item"> <span>Exercise Frequency:</span> <span><?= htmlspecialchars($health_metrics['exercise_frequency'] ?? 'N/A') ?></span> </div> <div class="info-item"> <span>Diet:</span> <span><?= htmlspecialchars($health_metrics['diet'] ?? 'N/A') ?></span> </div> <?php if (!empty($health_metrics['diet_specify'])): ?> <div class="info-item"> <span>Diet Specifics:</span> <span><?= htmlspecialchars($health_metrics['diet_specify']) ?></span> </div> <?php endif; ?> <div class="info-item"> <span>Average Sleep:</span> <span><?= htmlspecialchars($health_metrics['sleep_average'] ?? 'N/A') ?></span> </div> <div class="info-item"> <span>Smoking Status:</span> <span><?= htmlspecialchars($health_metrics['smoking_status'] ?? 'N/A') ?></span> </div> </div> <?php endif; ?> <!-- Consent Section --> <?php if ($consent): ?> <div class="section"> <h3>Consent Information</h3> <div class="info-item"> <span>Consent Status:</span> <span><?= htmlspecialchars($consent['consent']) ?></span> </div> </div> <?php endif; ?> <!-- Consultation Section --> <?php if ($consultation): ?> <div class="section"> <h3>Consultation Details</h3> <div class="info-item"> <span>Scheduled At:</span> <span><?= htmlspecialchars($consultation['scheduled_at']) ?></span> </div> </div> <?php endif; ?> <!-- Goals Section --> <?php if ($goals): ?> <div class="section"> <h3>Patient Goals</h3> <div class="info-item"> <span>Primary Health Goals:</span> <span><?= nl2br(htmlspecialchars($goals['primary_health_goals'])) ?></span> </div> <div class="info-item"> <span>Health Concerns:</span> <span><?= nl2br(htmlspecialchars($goals['health_concerns'])) ?></span> </div> </div> <?php endif; ?> <!-- Medical History Section --> <?php if ($medical_history): ?> <div class="section"> <h3>Medical History</h3> <div class="info-item"> <span>Chronic Conditions:</span> <span><?= htmlspecialchars($medical_history['chronic_conditions']) ?></span> </div> <?php if (!empty($medical_history['chronic_conditions_specify'])): ?> <div class="info-item"> <span>Chronic Conditions Specify:</span> <span><?= htmlspecialchars($medical_history['chronic_conditions_specify']) ?></span> </div> <?php endif; ?> <div class="info-item"> <span>Medications:</span> <span><?= htmlspecialchars($medical_history['medications']) ?></span> </div> <?php if (!empty($medical_history['medications_list'])): ?> <div class="info-item"> <span>Medications List:</span> <span><?= nl2br(htmlspecialchars($medical_history['medications_list'])) ?></span> </div> <?php endif; ?> <div class="info-item"> <span>Major Surgeries:</span> <span><?= htmlspecialchars($medical_history['major_surgeries']) ?></span> </div> <?php if (!empty($medical_history['major_surgeries_specify'])): ?> <div class="info-item"> <span>Major Surgeries Specify:</span> <span><?= htmlspecialchars($medical_history['major_surgeries_specify']) ?></span> </div> <?php endif; ?> </div> <?php endif; ?> <!-- Health Metrics Section --> <?php if ($health_metrics): ?> <div class="section"> <h3>Health Metrics</h3> <div class="info-item"> <span>Exercise Frequency:</span> <span><?= htmlspecialchars($health_metrics['exercise_frequency']) ?></span> </div> <div class="info-item"> <span>Diet:</span> <span><?= htmlspecialchars($health_metrics['diet']) ?></span> </div> <?php if (!empty($health_metrics['diet_specify'])): ?> <div class="info-item"> <span>Diet Specifics:</span> <span><?= htmlspecialchars($health_metrics['diet_specify']) ?></span> </div> <?php endif; ?> <div class="info-item"> <span>Average Sleep:</span> <span><?= htmlspecialchars($health_metrics['sleep_average']) ?></span> </div> <div class="info-item"> <span>Smoking Status:</span> <span><?= htmlspecialchars($health_metrics['smoking_status']) ?></span> </div> </div> <?php endif; ?> <!-- Health Records Section --> <div class="section"> <h3>Health Records</h3> <div class="health-records"> <?php if ($health_records): ?> <?php foreach ($health_records as $record): ?> <div class="record-item"> <div><strong>Date:</strong> <?= htmlspecialchars($record['record_date']) ?></div> <div><strong>Blood Pressure:</strong> <?= htmlspecialchars($record['blood_pressure']) ?></div> <div><strong>Weight:</strong> <?= htmlspecialchars($record['weight']) ?> kg</div> <div><strong>BMI:</strong> <?= htmlspecialchars($record['bmi']) ?></div> <div><strong>Cholesterol:</strong> <?= htmlspecialchars($record['cholesterol']) ?></div> <div><strong>Prescription:</strong> <?= nl2br(htmlspecialchars($record['prescription'])) ?></div> <div><strong>Treatment Progress:</strong> <?= nl2br(htmlspecialchars($record['treatment_progress'])) ?></div> <div class="actions"> <a href="edit_health_record.php?id=<?= htmlspecialchars($record['id']) ?>&patient_id=<?= htmlspecialchars($patient_id) ?>">Edit</a> <a href="delete_health_record.php?id=<?= htmlspecialchars($record['id']) ?>&patient_id=<?= htmlspecialchars($patient_id) ?>" onclick="return confirm('Are you sure you want to delete this record?');">Delete</a> </div> </div> <?php endforeach; ?> <?php else: ?> <p>No health records found for this patient.</p> <?php endif; ?> </div> </div> <!-- Additional Information Section (Optional) --> <?php if ($basic_info || $consent || $consultation || $goals || $health_metrics || $medical_history): ?> <div class="section"> <h3>Additional Information</h3> <!-- Add more groups of information as needed --> </div> <?php endif; ?> <!-- Actions --> <div class="actions"> <a href="add_health_record.php?patient_id=<?= htmlspecialchars($patient_id) ?>">Add Health Record</a> <a href="edit_patient.php?id=<?= htmlspecialchars($patient_id) ?>">Edit Patient Information</a> <a href="admin_dashboard.php">Back to Dashboard</a> </div> </div> </body> </html>Explanation of Changes
-
Fetching Additional Data:
- Patient Basic Info: Data from the
patient_basic_infotable is fetched to include details like weight, height, etc. - Patient Consent: Data from the
patient_consenttable is retrieved to display the consent status. - Patient Consultation: Data from the
patient_consultationtable provides consultation scheduling details. - Patient Goals: The
patient_goalstable holds the patient's health goals and concerns. - Patient Health Metrics: Data from the
patient_health_metricstable includes exercise frequency, diet details, sleep average, and smoking status. - Patient Medical History: The
patient_medical_historytable offers comprehensive medical history information.
- Patient Basic Info: Data from the
-
Displaying the Additional Data:
- Each new data set is displayed in its own section with clear headings.
- Conditional checks (
<?php if ($variable): ?>) ensure that sections are only displayed if data exists to prevent empty fields. - HTML Structure: Enhanced readability and organization by grouping related information.
-
Security Enhancements:
- Data Sanitization: All output data is wrapped with
htmlspecialchars()to prevent XSS attacks. - Confirm Delete Action: A confirmation dialog is added for the delete action to prevent accidental deletions.
- Data Sanitization: All output data is wrapped with
-
Styling Enhancements:
- Responsive Design: Improved responsiveness for smaller screens by adjusting font sizes and layout.
- Consistent Styling: Unified styling across all new sections to maintain a cohesive look and feel.
Additional Recommendations
-
Edit and Delete Functionality:
- Ensure that
edit_health_record.php,delete_health_record.php, andedit_patient.phpare properly secured and handle user inputs safely to prevent SQL injection and other vulnerabilities.
- Ensure that
-
Error Handling:
- Consider adding more robust error handling to inform the admin of any issues during data retrieval or processing.
-
Modular Code:
- For better maintainability, consider separating the PHP logic from the HTML by using templates or including separate PHP files for different sections.
-
Styling Improvements:
- You may enhance the UI further by integrating a CSS framework like Bootstrap or using more advanced CSS techniques for better aesthetics and user experience.
Final Notes
This updated
view_patient.phpprovides a comprehensive view of the patient's information by integrating multiple data sources from your database. Ensure that all related scripts and functionalities (like editing and deleting records) adhere to best security practices to maintain the integrity and confidentiality of patient data.If you encounter any issues or need further customization, feel free to ask!
-