-- Seed file for patients
-- This file creates sample patients for development and testing

INSERT INTO patients (
    uuid,
    trial_uuid,
    site_uuid,
    subject_id,
    status,
    consent_status,
    data_completeness,
    enrollment_date,
    randomization_group,
    withdrawal_date,
    created_at,
    updated_at
) VALUES 
-- Patients for CARDIO-PROTECT Trial at UMC Amsterdam
('990e8400-e29b-41d4-a716-446655440001', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440001', 'CARDIO-001-001', 'Active', 'Consented', '95.50', '2025-01-20', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440002', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440001', 'CARDIO-001-002', 'Active', 'Consented', '92.30', '2025-01-22', 'Placebo', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440003', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440001', 'CARDIO-001-003', 'Completed', 'Consented', '98.70', '2025-01-25', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440004', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440001', 'CARDIO-001-004', 'Active', 'Consented', '89.20', '2025-01-28', 'Placebo', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440005', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440001', 'CARDIO-001-005', 'Withdrawn', 'Withdrawn', '67.40', '2025-02-01', 'Treatment', '2025-06-15', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),

-- Patients for CARDIO-PROTECT Trial at Charité Berlin
('990e8400-e29b-41d4-a716-446655440006', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440002', 'CARDIO-002-001', 'Active', 'Consented', '96.80', '2025-01-25', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440007', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440002', 'CARDIO-002-002', 'Active', 'Consented', '94.10', '2025-01-30', 'Placebo', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440008', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440002', 'CARDIO-002-003', 'Active', 'Consented', '91.50', '2025-02-05', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440009', '770e8400-e29b-41d4-a716-446655440001', '880e8400-e29b-41d4-a716-446655440002', 'CARDIO-002-004', 'Screening', 'NotConsented', '25.00', '2025-07-10', 'NotAssigned', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),

-- Patients for ONCO-TARGET Trial at Charité Cancer Center
('990e8400-e29b-41d4-a716-446655440010', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440004', 'ONCO-001-001', 'Active', 'Consented', '93.20', '2024-09-15', 'Arm_A', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440011', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440004', 'ONCO-001-002', 'Active', 'Consented', '88.90', '2024-09-20', 'Arm_B', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440012', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440004', 'ONCO-001-003', 'Completed', 'Consented', '97.30', '2024-09-25', 'Arm_A', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440013', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440004', 'ONCO-001-004', 'Discontinued', 'Consented', '76.50', '2024-10-01', 'Arm_B', '2025-03-15', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),

-- Patients for ONCO-TARGET Trial at Netherlands Cancer Institute
('990e8400-e29b-41d4-a716-446655440014', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440005', 'ONCO-002-001', 'Active', 'Consented', '95.80', '2024-09-20', 'Arm_A', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440015', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440005', 'ONCO-002-002', 'Active', 'Consented', '92.10', '2024-09-25', 'Arm_B', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440016', '770e8400-e29b-41d4-a716-446655440002', '880e8400-e29b-41d4-a716-446655440005', 'ONCO-002-003', 'Active', 'Consented', '89.70', '2024-10-01', 'Arm_A', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),

-- Patients for NEURO-SHIELD Trial at Salpêtrière Hospital
('990e8400-e29b-41d4-a716-446655440017', '770e8400-e29b-41d4-a716-446655440003', '880e8400-e29b-41d4-a716-446655440007', 'NEURO-001-001', 'Active', 'Consented', '91.40', '2024-11-15', 'Active_Drug', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440018', '770e8400-e29b-41d4-a716-446655440003', '880e8400-e29b-41d4-a716-446655440007', 'NEURO-001-002', 'Active', 'Consented', '87.20', '2024-11-20', 'Placebo', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440019', '770e8400-e29b-41d4-a716-446655440003', '880e8400-e29b-41d4-a716-446655440007', 'NEURO-001-003', 'Enrolled', 'Consented', '94.60', '2024-12-01', 'Active_Drug', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),

-- Patients for NEURO-SHIELD Trial at VU Medical Center
('990e8400-e29b-41d4-a716-446655440020', '770e8400-e29b-41d4-a716-446655440003', '880e8400-e29b-41d4-a716-446655440008', 'NEURO-002-001', 'Active', 'Consented', '93.80', '2024-11-25', 'Active_Drug', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440021', '770e8400-e29b-41d4-a716-446655440003', '880e8400-e29b-41d4-a716-446655440008', 'NEURO-002-002', 'Active', 'Consented', '90.30', '2024-12-05', 'Placebo', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),

-- Patients for BREATHE-EASY Trial (Completed study)
('990e8400-e29b-41d4-a716-446655440022', '770e8400-e29b-41d4-a716-446655440005', '880e8400-e29b-41d4-a716-446655440010', 'BREATHE-001-001', 'Completed', 'Consented', '98.90', '2023-06-15', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440023', '770e8400-e29b-41d4-a716-446655440005', '880e8400-e29b-41d4-a716-446655440010', 'BREATHE-001-002', 'Completed', 'Consented', '97.20', '2023-06-20', 'Placebo', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440024', '770e8400-e29b-41d4-a716-446655440005', '880e8400-e29b-41d4-a716-446655440010', 'BREATHE-001-003', 'Completed', 'Consented', '99.50', '2023-06-25', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440025', '770e8400-e29b-41d4-a716-446655440005', '880e8400-e29b-41d4-a716-446655440010', 'BREATHE-001-004', 'Withdrawn', 'Withdrawn', '82.10', '2023-07-01', 'Placebo', '2023-12-15', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
('990e8400-e29b-41d4-a716-446655440026', '770e8400-e29b-41d4-a716-446655440005', '880e8400-e29b-41d4-a716-446655440010', 'BREATHE-001-005', 'Completed', 'Consented', '96.80', '2023-07-05', 'Treatment', null, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)

ON CONFLICT (uuid) DO NOTHING;
