-- Demo Data for Calendar Page - Inbound Call Requests
-- Insert sample appointments for the calendar
-- Note: Update 'tenant_clinique_la_rive1_bleue1' with your actual tenant database name

-- Clear existing test data (optional - comment out if you want to keep existing data)
-- DELETE FROM tenant_clinique_la_rive1_bleue1.inbound_call_request WHERE call_sid LIKE 'DEMO_%';

-- Insert Demo Appointments for December 2025
INSERT INTO tenant_clinique_la_rive1_bleue1.inbound_call_request 
(call_sid, nom, date_naissance, telephone, maladie, motif_visite, appointment_date_time, doctor_name, appointment_confirmed, sms_sent, provider, duration, created_at, updated_at) 
VALUES 
-- December 7, 2025 - Today
('DEMO_20251207_001', 'Jean Dupont', '1985-03-15', '+33612345678', 'Hypertension', 'Consultation de suivi', '2025-12-07 09:00:00', 'Dr. Martin Leclerc', TRUE, TRUE, 'twilio', 8, NOW(), NOW()),
('DEMO_20251207_002', 'Marie Moreau', '1990-07-22', '+33623456789', 'Diabète', 'Première visite', '2025-12-07 10:30:00', 'Dr. Sophie Bernard', TRUE, TRUE, 'twilio', 12, NOW(), NOW()),
('DEMO_20251207_003', 'Pierre Lefebvre', '1978-11-08', '+33634567890', 'Arthrite', 'Consultation d\'urgence', '2025-12-07 14:00:00', 'Dr. Luc Petit', FALSE, FALSE, 'twilio', 10, NOW(), NOW()),

-- December 8, 2025
('DEMO_20251208_001', 'Catherine Durand', '1988-05-30', '+33645678901', 'Asthme', 'Renouvellement d\'ordonnance', '2025-12-08 08:30:00', 'Dr. Anne Blanc', TRUE, TRUE, 'twilio', 7, NOW(), NOW()),
('DEMO_20251208_002', 'Thomas Laurent', '1995-01-12', '+33656789012', 'Eczéma', 'Suivi dermatologique', '2025-12-08 11:00:00', 'Dr. Marie Rousseau', TRUE, TRUE, 'twilio', 15, NOW(), NOW()),
('DEMO_20251208_003', 'Isabelle Fontaine', '1982-09-25', '+33667890123', 'Migraine', 'Consultation spécialisée', '2025-12-08 15:30:00', 'Dr. Charles Noir', TRUE, TRUE, 'twilio', 20, NOW(), NOW()),

-- December 10, 2025
('DEMO_20251210_001', 'Michel Renaud', '1975-02-14', '+33678901234', 'Sciatique', 'Consultation rhumatologue', '2025-12-10 09:30:00', 'Dr. Philippe Deschamps', TRUE, TRUE, 'twilio', 25, NOW(), NOW()),
('DEMO_20251210_002', 'Nathalie Garnier', '1992-06-19', '+33689012345', 'Gastrite', 'Bilan de santé', '2025-12-10 13:00:00', 'Dr. Véronique Mercier', TRUE, FALSE, 'twilio', 18, NOW(), NOW()),

-- December 12, 2025
('DEMO_20251212_001', 'Robert Marchand', '1970-04-03', '+33690123456', 'Cholestérol', 'Suivi cardiologique', '2025-12-12 10:00:00', 'Dr. François Gérard', TRUE, TRUE, 'twilio', 30, NOW(), NOW()),
('DEMO_20251212_002', 'Claudette Gauthier', '1965-08-17', '+33701234567', 'Ostéoporose', 'Consultation orthopédique', '2025-12-12 14:00:00', 'Dr. Laurent Gautier', FALSE, TRUE, 'twilio', 22, NOW(), NOW()),

-- December 15, 2025
('DEMO_20251215_001', 'François Pelletier', '1980-10-11', '+33712345678', 'Sinusite', 'Consultation ORL', '2025-12-15 09:00:00', 'Dr. Alain Legrand', TRUE, TRUE, 'twilio', 12, NOW(), NOW()),
('DEMO_20251215_002', 'Sophie Vincent', '1993-12-28', '+33723456789', 'Tension', 'Première consultation', '2025-12-15 11:30:00', 'Dr. Dominique Poirier', TRUE, TRUE, 'twilio', 16, NOW(), NOW()),
('DEMO_20251215_003', 'Alain Boulanger', '1972-05-06', '+33734567890', 'Vertiges', 'Suivi neurologique', '2025-12-15 15:00:00', 'Dr. Evelyne Normand', TRUE, FALSE, 'twilio', 28, NOW(), NOW()),

-- December 17, 2025
('DEMO_20251217_001', 'Élisabeth Robichaud', '1968-03-22', '+33745678901', 'Insomnie', 'Consultation somno', '2025-12-17 09:00:00', 'Dr. Gérard Beaumont', FALSE, TRUE, 'twilio', 35, NOW(), NOW()),
('DEMO_20251217_002', 'Denis Cloutier', '1986-07-14', '+33756789012', 'Mal de dos', 'Massothérapie + consultation', '2025-12-17 13:30:00', 'Dr. Hélène Talbot', TRUE, TRUE, 'twilio', 45, NOW(), NOW()),

-- December 20, 2025
('DEMO_20251220_001', 'Francine Tremblay', '1960-11-30', '+33767890123', 'Arthrose', 'Suivi rhumatologie', '2025-12-20 10:00:00', 'Dr. Igor Novikov', TRUE, TRUE, 'twilio', 20, NOW(), NOW()),
('DEMO_20251220_002', 'Yves Chamberland', '1981-02-09', '+33778901234', 'Allergie', 'Bilan allergologique', '2025-12-20 14:30:00', 'Dr. Josette Leblanc', TRUE, FALSE, 'twilio', 25, NOW(), NOW()),

-- December 22, 2025
('DEMO_20251222_001', 'Monique Lavigne', '1963-06-05', '+33789012345', 'Fatigue chronique', 'Consultation généraliste', '2025-12-22 08:30:00', 'Dr. Karine Sanchez', FALSE, TRUE, 'twilio', 40, NOW(), NOW()),
('DEMO_20251222_002', 'Guy Archambault', '1977-09-18', '+33790123456', 'Infection urinaire', 'Consultation urgence', '2025-12-22 16:00:00', 'Dr. Laurent Gauthier', TRUE, TRUE, 'twilio', 10, NOW(), NOW()),

-- December 24, 2025
('DEMO_20251224_001', 'Andrée Lavallée', '1974-04-12', '+33701234567', 'Dépression', 'Psychiatrie', '2025-12-24 11:00:00', 'Dr. Michèle Renault', TRUE, TRUE, 'twilio', 50, NOW(), NOW()),

-- December 26, 2025
('DEMO_20251226_001', 'Christiane Breton', '1961-10-08', '+33712345678', 'Reflux gastrique', 'Consultation gastro', '2025-12-26 09:00:00', 'Dr. Natalie Moreau', TRUE, TRUE, 'twilio', 18, NOW(), NOW()),
('DEMO_20251226_002', 'Armand Côté', '1979-01-25', '+33723456789', 'Hernie discale', 'Imagerie + consultation', '2025-12-26 14:00:00', 'Dr. Olivier Leduc', FALSE, FALSE, 'twilio', 30, NOW(), NOW()),

-- December 29, 2025
('DEMO_20251229_001', 'Ginette Blais', '1966-08-03', '+33734567890', 'Hypertension', 'Suivi mensuel', '2025-12-29 10:30:00', 'Dr. Pauline Côté', TRUE, TRUE, 'twilio', 15, NOW(), NOW()),

-- December 31, 2025
('DEMO_20251231_001', 'Fernand Bonin', '1957-12-15', '+33745678901', 'Fibrillation', 'Suivi cardiaque urgent', '2025-12-31 08:00:00', 'Dr. Quentin Mercier', TRUE, TRUE, 'twilio', 40, NOW(), NOW());

-- Verify the insert
SELECT COUNT(*) as total_appointments, 
       MIN(appointment_date_time) as first_appointment, 
       MAX(appointment_date_time) as last_appointment
FROM tenant_clinique_la_rive1_bleue1.inbound_call_request 
WHERE call_sid LIKE 'DEMO_%';
