-- OPIM 5272 hospital / small ACO database rebuild
-- Recreated from recovered Sprint 1 evidence and expanded with synthetic ACO source files.
-- Target: MariaDB/MySQL with InnoDB foreign keys.

SET FOREIGN_KEY_CHECKS = 0;

DROP VIEW IF EXISTS vw_quality_gap_summary;
DROP VIEW IF EXISTS vw_aco_patient_panel;
DROP VIEW IF EXISTS vw_department_resource_profile;
DROP VIEW IF EXISTS vw_doctor_activity_summary;
DROP VIEW IF EXISTS vw_controlled_prescription_history;

DROP TABLE IF EXISTS
  patient_quality_gap,
  patient_attribution,
  quality_measure,
  payer_contract,
  patient_prescription,
  visit_procedure,
  visit_diagnosis,
  treatment_protocol,
  hospital_visit,
  doctor_hospital_privilege,
  emergency_contact,
  medication,
  medical_procedure,
  diagnosis,
  doctor,
  department,
  hospital,
  patient;

SET FOREIGN_KEY_CHECKS = 1;

CREATE TABLE hospital (
  hospital_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  hospital_name VARCHAR(120) NOT NULL,
  network_region VARCHAR(80) NOT NULL DEFAULT 'New England',
  street_address VARCHAR(160) NOT NULL,
  city VARCHAR(80) NOT NULL,
  state CHAR(2) NOT NULL,
  phone_number VARCHAR(25) NOT NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (hospital_id),
  UNIQUE KEY uq_hospital_name_location (hospital_name, city, state),
  CHECK (state = UPPER(state))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE department (
  department_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  hospital_id INT UNSIGNED NOT NULL,
  department_name VARCHAR(120) NOT NULL,
  operating_budget DECIMAL(12,2) NOT NULL DEFAULT 0.00,
  contact_phone VARCHAR(25) NOT NULL,
  department_description VARCHAR(500) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (department_id),
  UNIQUE KEY uq_department_hospital_name (hospital_id, department_name),
  UNIQUE KEY uq_department_hospital_pair (department_id, hospital_id),
  KEY idx_department_hospital (hospital_id),
  CONSTRAINT fk_department_hospital FOREIGN KEY (hospital_id)
    REFERENCES hospital (hospital_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (operating_budget >= 0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE doctor (
  doctor_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  first_name VARCHAR(80) NOT NULL,
  last_name VARCHAR(80) NOT NULL,
  role_title VARCHAR(120) NOT NULL,
  years_practice TINYINT UNSIGNED NOT NULL DEFAULT 0,
  board_certified BOOLEAN NOT NULL DEFAULT FALSE,
  primary_department_id INT UNSIGNED NOT NULL,
  employment_status ENUM('active', 'on_leave', 'inactive') NOT NULL DEFAULT 'active',
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (doctor_id),
  KEY idx_doctor_department (primary_department_id),
  KEY idx_doctor_name (last_name, first_name),
  CONSTRAINT fk_doctor_primary_department FOREIGN KEY (primary_department_id)
    REFERENCES department (department_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (years_practice <= 70)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE patient (
  patient_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  first_name VARCHAR(80) NOT NULL,
  last_name VARCHAR(80) NOT NULL,
  date_of_birth DATE NOT NULL,
  phone_number VARCHAR(25) NOT NULL,
  street_address VARCHAR(160) NOT NULL,
  city VARCHAR(80) NOT NULL,
  state CHAR(2) NOT NULL,
  insurance_member_id VARCHAR(40) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (patient_id),
  KEY idx_patient_name_dob (last_name, first_name, date_of_birth),
  CHECK (state = UPPER(state))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE emergency_contact (
  emergency_contact_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  patient_id INT UNSIGNED NOT NULL,
  linked_patient_id INT UNSIGNED NULL,
  first_name VARCHAR(80) NOT NULL,
  last_name VARCHAR(80) NOT NULL,
  relationship_to_patient VARCHAR(80) NOT NULL,
  phone_number VARCHAR(25) NOT NULL,
  street_address VARCHAR(160) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (emergency_contact_id),
  KEY idx_emergency_contact_patient (patient_id),
  KEY idx_emergency_contact_linked_patient (linked_patient_id),
  CONSTRAINT fk_emergency_contact_patient FOREIGN KEY (patient_id)
    REFERENCES patient (patient_id) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT fk_emergency_contact_linked_patient FOREIGN KEY (linked_patient_id)
    REFERENCES patient (patient_id) ON UPDATE CASCADE ON DELETE SET NULL,
  CHECK (linked_patient_id IS NULL OR linked_patient_id <> patient_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE diagnosis (
  icd10_code VARCHAR(10) NOT NULL,
  diagnosis_name VARCHAR(160) NOT NULL,
  severity ENUM('low', 'moderate', 'high', 'critical') NOT NULL DEFAULT 'moderate',
  diagnosis_description VARCHAR(500) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (icd10_code),
  KEY idx_diagnosis_name (diagnosis_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE medical_procedure (
  procedure_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  procedure_name VARCHAR(140) NOT NULL,
  procedure_description VARCHAR(500) NULL,
  default_inpatient BOOLEAN NOT NULL DEFAULT FALSE,
  standard_cost DECIMAL(12,2) NOT NULL DEFAULT 0.00,
  covered_by_insurance BOOLEAN NOT NULL DEFAULT TRUE,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (procedure_id),
  UNIQUE KEY uq_medical_procedure_name (procedure_name),
  CHECK (standard_cost >= 0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE medication (
  medication_code VARCHAR(20) NOT NULL,
  medication_name VARCHAR(120) NOT NULL,
  brand_name VARCHAR(120) NULL,
  medication_class VARCHAR(120) NOT NULL,
  controlled_substance BOOLEAN NOT NULL DEFAULT FALSE,
  medication_description VARCHAR(500) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (medication_code),
  KEY idx_medication_controlled (controlled_substance, medication_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE doctor_hospital_privilege (
  doctor_id INT UNSIGNED NOT NULL,
  hospital_id INT UNSIGNED NOT NULL,
  privilege_level ENUM('attending', 'consulting', 'resident', 'temporary') NOT NULL,
  start_date DATE NOT NULL,
  end_date DATE NULL,
  PRIMARY KEY (doctor_id, hospital_id),
  KEY idx_privilege_hospital (hospital_id),
  CONSTRAINT fk_privilege_doctor FOREIGN KEY (doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT fk_privilege_hospital FOREIGN KEY (hospital_id)
    REFERENCES hospital (hospital_id) ON UPDATE CASCADE ON DELETE CASCADE,
  CHECK (end_date IS NULL OR end_date >= start_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE hospital_visit (
  visit_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  patient_id INT UNSIGNED NOT NULL,
  hospital_id INT UNSIGNED NOT NULL,
  attending_doctor_id INT UNSIGNED NOT NULL,
  admitting_department_id INT UNSIGNED NOT NULL,
  admitted_at DATETIME NOT NULL,
  discharged_at DATETIME NULL,
  visit_type ENUM('emergency', 'inpatient', 'outpatient', 'telehealth') NOT NULL,
  discharge_disposition ENUM('admitted', 'discharged', 'transferred', 'observation', 'left_without_being_seen') NULL,
  visit_notes VARCHAR(800) NULL,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (visit_id),
  KEY idx_visit_patient_date (patient_id, admitted_at),
  KEY idx_visit_hospital_date (hospital_id, admitted_at),
  KEY idx_visit_doctor_date (attending_doctor_id, admitted_at),
  KEY idx_visit_department_date (admitting_department_id, admitted_at),
  CONSTRAINT fk_visit_patient FOREIGN KEY (patient_id)
    REFERENCES patient (patient_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_visit_hospital FOREIGN KEY (hospital_id)
    REFERENCES hospital (hospital_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_visit_attending_doctor FOREIGN KEY (attending_doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_visit_department FOREIGN KEY (admitting_department_id, hospital_id)
    REFERENCES department (department_id, hospital_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (discharged_at IS NULL OR discharged_at >= admitted_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE visit_diagnosis (
  visit_id BIGINT UNSIGNED NOT NULL,
  icd10_code VARCHAR(10) NOT NULL,
  diagnosing_doctor_id INT UNSIGNED NOT NULL,
  diagnosis_rank TINYINT UNSIGNED NOT NULL DEFAULT 1,
  diagnosed_at DATETIME NOT NULL,
  PRIMARY KEY (visit_id, icd10_code, diagnosing_doctor_id),
  KEY idx_visit_diagnosis_code (icd10_code),
  KEY idx_visit_diagnosis_doctor (diagnosing_doctor_id),
  CONSTRAINT fk_visit_diagnosis_visit FOREIGN KEY (visit_id)
    REFERENCES hospital_visit (visit_id) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT fk_visit_diagnosis_diagnosis FOREIGN KEY (icd10_code)
    REFERENCES diagnosis (icd10_code) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_visit_diagnosis_doctor FOREIGN KEY (diagnosing_doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (diagnosis_rank >= 1)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE visit_procedure (
  visit_procedure_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  visit_id BIGINT UNSIGNED NOT NULL,
  procedure_id INT UNSIGNED NOT NULL,
  performing_doctor_id INT UNSIGNED NOT NULL,
  department_id INT UNSIGNED NOT NULL,
  performed_at DATETIME NOT NULL,
  actual_cost DECIMAL(12,2) NOT NULL DEFAULT 0.00,
  outcome_notes VARCHAR(800) NULL,
  PRIMARY KEY (visit_procedure_id),
  KEY idx_visit_procedure_visit (visit_id),
  KEY idx_visit_procedure_procedure (procedure_id),
  KEY idx_visit_procedure_doctor (performing_doctor_id),
  KEY idx_visit_procedure_department (department_id),
  CONSTRAINT fk_visit_procedure_visit FOREIGN KEY (visit_id)
    REFERENCES hospital_visit (visit_id) ON UPDATE CASCADE ON DELETE CASCADE,
  CONSTRAINT fk_visit_procedure_procedure FOREIGN KEY (procedure_id)
    REFERENCES medical_procedure (procedure_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_visit_procedure_doctor FOREIGN KEY (performing_doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_visit_procedure_department FOREIGN KEY (department_id)
    REFERENCES department (department_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (actual_cost >= 0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE patient_prescription (
  prescription_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  patient_id INT UNSIGNED NOT NULL,
  medication_code VARCHAR(20) NOT NULL,
  prescribing_doctor_id INT UNSIGNED NOT NULL,
  visit_id BIGINT UNSIGNED NULL,
  icd10_code VARCHAR(10) NOT NULL,
  prescribed_at DATETIME NOT NULL,
  days_supply SMALLINT UNSIGNED NOT NULL,
  quantity DECIMAL(8,2) NOT NULL,
  directions VARCHAR(500) NOT NULL,
  is_refill BOOLEAN NOT NULL DEFAULT FALSE,
  PRIMARY KEY (prescription_id),
  KEY idx_prescription_patient_date (patient_id, prescribed_at),
  KEY idx_prescription_medication_date (medication_code, prescribed_at),
  KEY idx_prescription_doctor_date (prescribing_doctor_id, prescribed_at),
  KEY idx_prescription_visit (visit_id),
  KEY idx_prescription_diagnosis (icd10_code),
  CONSTRAINT fk_prescription_patient FOREIGN KEY (patient_id)
    REFERENCES patient (patient_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_prescription_medication FOREIGN KEY (medication_code)
    REFERENCES medication (medication_code) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_prescription_doctor FOREIGN KEY (prescribing_doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_prescription_visit FOREIGN KEY (visit_id)
    REFERENCES hospital_visit (visit_id) ON UPDATE CASCADE ON DELETE SET NULL,
  CONSTRAINT fk_prescription_diagnosis FOREIGN KEY (icd10_code)
    REFERENCES diagnosis (icd10_code) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (days_supply BETWEEN 1 AND 365),
  CHECK (quantity > 0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE treatment_protocol (
  treatment_protocol_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  department_id INT UNSIGNED NOT NULL,
  icd10_code VARCHAR(10) NOT NULL,
  procedure_id INT UNSIGNED NOT NULL,
  protocol_name VARCHAR(160) NOT NULL,
  active BOOLEAN NOT NULL DEFAULT TRUE,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (treatment_protocol_id),
  UNIQUE KEY uq_treatment_protocol (department_id, icd10_code, procedure_id),
  KEY idx_treatment_diagnosis (icd10_code),
  KEY idx_treatment_procedure (procedure_id),
  CONSTRAINT fk_treatment_department FOREIGN KEY (department_id)
    REFERENCES department (department_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_treatment_diagnosis FOREIGN KEY (icd10_code)
    REFERENCES diagnosis (icd10_code) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_treatment_procedure FOREIGN KEY (procedure_id)
    REFERENCES medical_procedure (procedure_id) ON UPDATE CASCADE ON DELETE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE payer_contract (
  contract_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  payer_name VARCHAR(120) NOT NULL,
  contract_name VARCHAR(160) NOT NULL,
  performance_year YEAR NOT NULL,
  risk_model VARCHAR(120) NOT NULL,
  target_pmpm DECIMAL(10,2) NOT NULL,
  PRIMARY KEY (contract_id),
  UNIQUE KEY uq_contract_year (payer_name, contract_name, performance_year),
  CHECK (target_pmpm >= 0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE patient_attribution (
  attribution_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  patient_id INT UNSIGNED NOT NULL,
  contract_id INT UNSIGNED NOT NULL,
  primary_care_doctor_id INT UNSIGNED NOT NULL,
  attributed_start_date DATE NOT NULL,
  risk_score DECIMAL(5,2) NOT NULL,
  active BOOLEAN NOT NULL DEFAULT TRUE,
  PRIMARY KEY (attribution_id),
  UNIQUE KEY uq_active_attribution (patient_id, contract_id, attributed_start_date),
  KEY idx_attribution_contract (contract_id, active),
  KEY idx_attribution_pcp (primary_care_doctor_id),
  KEY idx_attribution_risk (risk_score),
  CONSTRAINT fk_attribution_patient FOREIGN KEY (patient_id)
    REFERENCES patient (patient_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_attribution_contract FOREIGN KEY (contract_id)
    REFERENCES payer_contract (contract_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_attribution_pcp FOREIGN KEY (primary_care_doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (risk_score >= 0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE quality_measure (
  measure_code VARCHAR(30) NOT NULL,
  measure_name VARCHAR(180) NOT NULL,
  measure_domain VARCHAR(80) NOT NULL,
  target_rate DECIMAL(5,4) NOT NULL,
  PRIMARY KEY (measure_code),
  CHECK (target_rate BETWEEN 0 AND 1)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE patient_quality_gap (
  quality_gap_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  patient_id INT UNSIGNED NOT NULL,
  measure_code VARCHAR(30) NOT NULL,
  gap_status ENUM('open', 'scheduled', 'closed') NOT NULL DEFAULT 'open',
  identified_date DATE NOT NULL,
  closed_date DATE NULL,
  responsible_doctor_id INT UNSIGNED NOT NULL,
  notes VARCHAR(500) NULL,
  PRIMARY KEY (quality_gap_id),
  KEY idx_gap_patient_status (patient_id, gap_status),
  KEY idx_gap_measure_status (measure_code, gap_status),
  KEY idx_gap_responsible_doctor (responsible_doctor_id),
  CONSTRAINT fk_gap_patient FOREIGN KEY (patient_id)
    REFERENCES patient (patient_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_gap_measure FOREIGN KEY (measure_code)
    REFERENCES quality_measure (measure_code) ON UPDATE CASCADE ON DELETE RESTRICT,
  CONSTRAINT fk_gap_doctor FOREIGN KEY (responsible_doctor_id)
    REFERENCES doctor (doctor_id) ON UPDATE CASCADE ON DELETE RESTRICT,
  CHECK (closed_date IS NULL OR closed_date >= identified_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



INSERT INTO hospital
  (hospital_id, hospital_name, network_region, street_address, city, state, phone_number)
VALUES
  (1, 'New England General Hospital', 'Greater Hartford', '100 Care Way', 'Hartford', 'CT', '860-555-0100'),
  (2, 'Harborview Community Hospital', 'Rhode Island Coast', '45 Harbor Street', 'Providence', 'RI', '401-555-0145'),
  (3, 'Pioneer Valley Medical Center', 'Western Massachusetts', '18 Valley Road', 'Springfield', 'MA', '413-555-0180');


INSERT INTO department
  (department_id, hospital_id, department_name, operating_budget, contact_phone, department_description)
VALUES
  (1, 1, 'Emergency Medicine', 4200000, '860-555-0200', 'Emergency Medicine services for the accountable care network.'),
  (2, 1, 'Primary Care', 2600000, '860-555-0205', 'Primary Care services for the accountable care network.'),
  (3, 1, 'Cardiology', 3900000, '860-555-0220', 'Cardiology services for the accountable care network.'),
  (4, 1, 'Population Health', 1800000, '860-555-0230', 'Population Health services for the accountable care network.'),
  (5, 2, 'Emergency Medicine', 3100000, '401-555-0300', 'Emergency Medicine services for the accountable care network.'),
  (6, 2, 'Orthopedics', 2800000, '401-555-0310', 'Orthopedics services for the accountable care network.'),
  (7, 2, 'Primary Care', 2250000, '401-555-0320', 'Primary Care services for the accountable care network.'),
  (8, 3, 'Oncology', 5100000, '413-555-0400', 'Oncology services for the accountable care network.'),
  (9, 3, 'Primary Care', 2400000, '413-555-0410', 'Primary Care services for the accountable care network.'),
  (10, 3, 'Endocrinology', 2100000, '413-555-0420', 'Endocrinology services for the accountable care network.');


INSERT INTO doctor
  (doctor_id, first_name, last_name, role_title, years_practice, board_certified, primary_department_id, employment_status)
VALUES
  (1, 'Maya', 'Patel', 'Emergency Physician', 14, 1, 1, 'active'),
  (2, 'Evan', 'Kim', 'Primary Care Physician', 19, 1, 2, 'active'),
  (3, 'Sara', 'Nguyen', 'Cardiologist', 4, 1, 3, 'active'),
  (4, 'Owen', 'Brooks', 'ACO Medical Director', 8, 1, 4, 'active'),
  (5, 'Leah', 'Martinez', 'Emergency Physician', 15, 1, 5, 'active'),
  (6, 'Noah', 'Foster', 'Orthopedic Surgeon', 25, 1, 6, 'active'),
  (7, 'Priya', 'Shah', 'Primary Care Physician', 21, 1, 7, 'active'),
  (8, 'Daniel', 'Miller', 'Oncologist', 4, 0, 8, 'active'),
  (9, 'Elena', 'Costa', 'Primary Care Physician', 4, 1, 9, 'active'),
  (10, 'Grace', 'Turner', 'Endocrinologist', 4, 0, 10, 'active'),
  (11, 'Amir', 'Hassan', 'Emergency Physician', 21, 1, 1, 'active'),
  (12, 'Julia', 'Reed', 'Primary Care Physician', 14, 1, 2, 'active'),
  (13, 'Calvin', 'Walsh', 'Cardiologist', 2, 1, 3, 'active'),
  (14, 'Renee', 'Parker', 'ACO Medical Director', 6, 1, 4, 'active'),
  (15, 'Theo', 'Ibrahim', 'Emergency Physician', 11, 1, 5, 'active'),
  (16, 'Hannah', 'Nolan', 'Orthopedic Surgeon', 21, 1, 6, 'active'),
  (17, 'Marcus', 'Quinn', 'Primary Care Physician', 24, 1, 7, 'active'),
  (18, 'Nina', 'Santos', 'Oncologist', 26, 1, 8, 'active');


INSERT INTO doctor_hospital_privilege
  (doctor_id, hospital_id, privilege_level, start_date, end_date)
VALUES
  (1, 1, 'attending', '2020-01-15', NULL),
  (2, 1, 'attending', '2018-03-04', NULL),
  (3, 1, 'resident', '2022-05-02', NULL),
  (4, 1, 'attending', '2018-12-11', NULL),
  (5, 2, 'attending', '2023-08-10', NULL),
  (6, 2, 'attending', '2017-03-18', NULL),
  (7, 2, 'attending', '2024-09-01', NULL),
  (8, 3, 'resident', '2024-02-23', NULL),
  (9, 3, 'resident', '2023-10-01', NULL),
  (10, 3, 'resident', '2017-09-03', NULL),
  (11, 1, 'attending', '2023-01-05', NULL),
  (12, 1, 'attending', '2022-05-02', NULL),
  (13, 1, 'resident', '2017-04-09', NULL),
  (13, 3, 'consulting', '2020-09-23', NULL),
  (14, 1, 'attending', '2020-08-08', NULL),
  (15, 2, 'attending', '2022-12-22', NULL),
  (16, 2, 'attending', '2018-07-21', NULL),
  (17, 2, 'attending', '2018-10-04', NULL),
  (18, 3, 'attending', '2023-05-20', NULL),
  (18, 2, 'consulting', '2024-02-04', NULL);


INSERT INTO patient
  (patient_id, first_name, last_name, date_of_birth, phone_number, street_address, city, state, insurance_member_id)
VALUES
  (1, 'Riley', 'Rivera-001', '1985-03-06', '413-555-5582', '278 Care Street', 'Springfield', 'MA', 'ACO-3-00001'),
  (2, 'Parker', 'Rivera-002', '1981-11-15', '401-555-7425', '477 Cedar Lane', 'Providence', 'RI', 'ACO-3-00002'),
  (3, 'Finley', 'Price-003', '1976-09-07', '413-555-3341', '359 Cedar Lane', 'Chicopee', 'MA', 'ACO-2-00003'),
  (4, 'Finley', 'Morgan-004', '1980-11-25', '401-555-6193', '607 Pine Road', 'Cranston', 'RI', 'ACO-1-00004'),
  (5, 'Sawyer', 'Carter-005', '2002-06-11', '401-555-7579', '686 Harbor Road', 'Cranston', 'RI', 'ACO-3-00005'),
  (6, 'Finley', 'Bennett-006', '1994-10-04', '413-555-4894', '436 Cedar Street', 'Springfield', 'MA', 'ACO-2-00006'),
  (7, 'Rowan', 'Bailey-007', '1991-02-13', '860-555-1285', '869 Valley Street', 'Hartford', 'CT', 'ACO-3-00007'),
  (8, 'Parker', 'Cooper-008', '1967-04-25', '413-555-8315', '745 Maple Street', 'Springfield', 'MA', 'ACO-2-00008'),
  (9, 'Casey', 'Fleming-009', '1966-06-27', '413-555-3693', '571 Valley Lane', 'Chicopee', 'MA', 'ACO-3-00009'),
  (10, 'Harper', 'Murphy-010', '1953-06-12', '413-555-7080', '725 Valley Street', 'Springfield', 'MA', 'ACO-1-00010'),
  (11, 'Jordan', 'Morgan-011', '1971-02-12', '413-555-4374', '490 Valley Lane', 'Chicopee', 'MA', 'ACO-3-00011'),
  (12, 'Finley', 'James-012', '1979-05-02', '401-555-2405', '683 Valley Road', 'Warwick', 'RI', 'ACO-3-00012'),
  (13, 'Sawyer', 'Hayes-013', '1963-04-27', '413-555-6753', '878 Maple Street', 'Springfield', 'MA', 'ACO-1-00013'),
  (14, 'Alex', 'Ross-014', '1955-09-01', '413-555-2489', '447 Pine Lane', 'Chicopee', 'MA', 'ACO-3-00014'),
  (15, 'Casey', 'Stone-015', '1988-01-07', '413-555-1123', '664 Valley Road', 'Springfield', 'MA', 'ACO-1-00015'),
  (16, 'Morgan', 'Stone-016', '1959-08-01', '401-555-9701', '321 Cedar Street', 'Providence', 'RI', 'ACO-1-00016'),
  (17, 'Parker', 'Davis-017', '1949-02-24', '860-555-1660', '777 Maple Lane', 'West Hartford', 'CT', 'ACO-3-00017'),
  (18, 'Drew', 'Morgan-018', '1953-11-14', '413-555-8095', '121 Pine Lane', 'Chicopee', 'MA', 'ACO-2-00018'),
  (19, 'Emerson', 'Hayes-019', '1981-10-09', '860-555-3102', '134 Maple Lane', 'West Hartford', 'CT', 'ACO-3-00019'),
  (20, 'Blake', 'Allen-020', '1999-02-08', '860-555-7588', '330 Harbor Avenue', 'Manchester', 'CT', 'ACO-3-00020'),
  (21, 'Logan', 'Davis-021', '1992-03-24', '860-555-7809', '651 Pine Lane', 'West Hartford', 'CT', 'ACO-1-00021'),
  (22, 'Kai', 'Rivera-022', '1967-01-19', '860-555-5361', '137 Harbor Road', 'Manchester', 'CT', 'ACO-1-00022'),
  (23, 'Jordan', 'Murphy-023', '1954-07-05', '860-555-7404', '314 Harbor Avenue', 'Hartford', 'CT', 'ACO-2-00023'),
  (24, 'Jordan', 'Cooper-024', '1970-08-19', '401-555-8416', '496 Valley Street', 'Cranston', 'RI', 'ACO-2-00024'),
  (25, 'Parker', 'Bailey-025', '1948-04-21', '860-555-8763', '213 Cedar Lane', 'Hartford', 'CT', 'ACO-3-00025'),
  (26, 'Taylor', 'Carter-026', '1952-12-26', '413-555-6910', '407 Valley Street', 'Holyoke', 'MA', 'ACO-2-00026'),
  (27, 'Cameron', 'Fleming-027', '1967-11-17', '401-555-1804', '870 Care Road', 'Cranston', 'RI', 'ACO-3-00027'),
  (28, 'Emerson', 'Bennett-028', '1986-08-12', '860-555-3903', '887 Harbor Street', 'Hartford', 'CT', 'ACO-2-00028'),
  (29, 'Kai', 'James-029', '1959-01-26', '413-555-4974', '346 Pine Avenue', 'Springfield', 'MA', 'ACO-1-00029'),
  (30, 'Drew', 'Diaz-030', '1959-10-18', '860-555-2676', '769 Maple Lane', 'Hartford', 'CT', 'ACO-2-00030'),
  (31, 'Sawyer', 'Carter-031', '1963-11-05', '860-555-6299', '30 Care Road', 'West Hartford', 'CT', 'ACO-1-00031'),
  (32, 'Cameron', 'Cooper-032', '1981-04-26', '413-555-7768', '300 Harbor Avenue', 'Holyoke', 'MA', 'ACO-3-00032'),
  (33, 'Morgan', 'Collins-033', '1948-11-12', '401-555-2308', '165 Maple Avenue', 'Warwick', 'RI', 'ACO-1-00033'),
  (34, 'Finley', 'Collins-034', '1994-07-17', '413-555-8149', '847 Harbor Street', 'Springfield', 'MA', 'ACO-3-00034'),
  (35, 'Rowan', 'Stone-035', '1949-04-05', '860-555-8639', '755 Harbor Road', 'Manchester', 'CT', 'ACO-2-00035'),
  (36, 'Jordan', 'Davis-036', '1994-10-11', '413-555-5169', '84 Valley Lane', 'Chicopee', 'MA', 'ACO-2-00036'),
  (37, 'Drew', 'Ross-037', '1988-03-11', '413-555-7219', '342 Pine Avenue', 'Holyoke', 'MA', 'ACO-2-00037'),
  (38, 'Morgan', 'Collins-038', '1972-10-15', '413-555-7656', '418 Pine Road', 'Springfield', 'MA', 'ACO-1-00038'),
  (39, 'Taylor', 'Diaz-039', '1953-05-21', '413-555-4000', '323 Harbor Road', 'Springfield', 'MA', 'ACO-3-00039'),
  (40, 'Jordan', 'Carter-040', '1985-09-27', '860-555-7388', '237 Care Road', 'West Hartford', 'CT', 'ACO-2-00040'),
  (41, 'Avery', 'Stone-041', '1992-06-25', '401-555-9800', '717 Care Avenue', 'Cranston', 'RI', 'ACO-1-00041'),
  (42, 'Parker', 'Allen-042', '1943-10-16', '401-555-9179', '723 Maple Lane', 'Cranston', 'RI', 'ACO-2-00042'),
  (43, 'Casey', 'Carter-043', '1946-11-01', '860-555-9836', '341 Pine Lane', 'Manchester', 'CT', 'ACO-3-00043'),
  (44, 'Quinn', 'Sullivan-044', '1970-01-22', '413-555-7752', '631 Cedar Lane', 'Chicopee', 'MA', 'ACO-2-00044'),
  (45, 'Harper', 'James-045', '1966-05-16', '413-555-1687', '90 Harbor Road', 'Chicopee', 'MA', 'ACO-1-00045'),
  (46, 'Finley', 'Diaz-046', '1984-06-08', '401-555-9174', '116 Cedar Street', 'Warwick', 'RI', 'ACO-1-00046'),
  (47, 'Casey', 'Allen-047', '1999-06-15', '401-555-7614', '325 Care Lane', 'Cranston', 'RI', 'ACO-3-00047'),
  (48, 'Cameron', 'Allen-048', '1954-11-05', '860-555-2029', '21 Pine Road', 'West Hartford', 'CT', 'ACO-3-00048'),
  (49, 'Casey', 'Wright-049', '1987-08-07', '860-555-3841', '262 Maple Road', 'Manchester', 'CT', 'ACO-2-00049'),
  (50, 'Parker', 'Ross-050', '1971-10-09', '860-555-4403', '553 Cedar Street', 'West Hartford', 'CT', 'ACO-1-00050'),
  (51, 'Rowan', 'Ross-051', '1981-06-15', '413-555-8303', '45 Pine Street', 'Holyoke', 'MA', 'ACO-2-00051'),
  (52, 'Morgan', 'Stone-052', '1985-07-17', '413-555-9195', '710 Harbor Avenue', 'Springfield', 'MA', 'ACO-3-00052'),
  (53, 'Cameron', 'Collins-053', '1987-06-11', '401-555-8060', '57 Valley Avenue', 'Cranston', 'RI', 'ACO-2-00053'),
  (54, 'Emerson', 'Stone-054', '1956-12-19', '413-555-4920', '893 Care Road', 'Holyoke', 'MA', 'ACO-1-00054'),
  (55, 'Alex', 'Price-055', '1965-07-24', '401-555-4143', '383 Harbor Lane', 'Providence', 'RI', 'ACO-3-00055'),
  (56, 'Casey', 'Reynolds-056', '1991-08-22', '401-555-2749', '772 Maple Road', 'Cranston', 'RI', 'ACO-2-00056'),
  (57, 'Logan', 'James-057', '1946-07-17', '860-555-7111', '802 Cedar Street', 'Manchester', 'CT', 'ACO-3-00057'),
  (58, 'Blake', 'Hayes-058', '1949-01-01', '413-555-2491', '306 Care Lane', 'Holyoke', 'MA', 'ACO-1-00058'),
  (59, 'Rowan', 'Hayes-059', '2001-08-14', '413-555-1685', '64 Maple Road', 'Holyoke', 'MA', 'ACO-3-00059'),
  (60, 'Morgan', 'Wright-060', '1962-11-27', '401-555-3356', '575 Pine Lane', 'Warwick', 'RI', 'ACO-1-00060'),
  (61, 'Rowan', 'Bennett-061', '1992-01-14', '413-555-6607', '741 Valley Street', 'Holyoke', 'MA', 'ACO-1-00061'),
  (62, 'Gray', 'Stone-062', '1967-11-15', '860-555-4209', '539 Harbor Road', 'Hartford', 'CT', 'ACO-1-00062'),
  (63, 'Jordan', 'Carter-063', '1949-12-21', '401-555-3712', '697 Pine Lane', 'Providence', 'RI', 'ACO-2-00063'),
  (64, 'Drew', 'James-064', '1942-10-03', '413-555-6793', '242 Pine Avenue', 'Holyoke', 'MA', 'ACO-1-00064'),
  (65, 'Avery', 'Carter-065', '1988-04-13', '860-555-4498', '214 Pine Street', 'Hartford', 'CT', 'ACO-2-00065'),
  (66, 'Casey', 'Murphy-066', '1994-05-20', '401-555-4521', '856 Maple Street', 'Providence', 'RI', 'ACO-2-00066'),
  (67, 'Cameron', 'Stone-067', '1993-04-22', '860-555-8050', '531 Pine Lane', 'Hartford', 'CT', 'ACO-2-00067'),
  (68, 'Drew', 'Collins-068', '1968-02-13', '413-555-6430', '273 Care Street', 'Springfield', 'MA', 'ACO-3-00068'),
  (69, 'Harper', 'Fleming-069', '1978-08-27', '401-555-6805', '132 Harbor Lane', 'Warwick', 'RI', 'ACO-2-00069'),
  (70, 'Casey', 'Davis-070', '1971-11-19', '413-555-9455', '876 Pine Road', 'Springfield', 'MA', 'ACO-3-00070'),
  (71, 'Gray', 'James-071', '1969-06-25', '401-555-7518', '163 Maple Road', 'Warwick', 'RI', 'ACO-3-00071'),
  (72, 'Emerson', 'Sullivan-072', '1978-02-26', '401-555-6876', '406 Care Lane', 'Warwick', 'RI', 'ACO-3-00072'),
  (73, 'Casey', 'Cooper-073', '1963-11-18', '413-555-7131', '629 Care Avenue', 'Chicopee', 'MA', 'ACO-3-00073'),
  (74, 'Jordan', 'Sullivan-074', '1979-12-21', '413-555-9780', '639 Pine Street', 'Holyoke', 'MA', 'ACO-2-00074'),
  (75, 'Riley', 'Diaz-075', '1948-04-12', '860-555-4737', '562 Harbor Avenue', 'West Hartford', 'CT', 'ACO-2-00075'),
  (76, 'Jordan', 'Reynolds-076', '1969-05-23', '860-555-1682', '100 Valley Lane', 'Hartford', 'CT', 'ACO-1-00076'),
  (77, 'Casey', 'Sullivan-077', '1972-04-11', '401-555-8289', '693 Cedar Avenue', 'Warwick', 'RI', 'ACO-2-00077'),
  (78, 'Kai', 'Stone-078', '1988-11-21', '413-555-9445', '91 Maple Street', 'Holyoke', 'MA', 'ACO-1-00078'),
  (79, 'Avery', 'Morgan-079', '1952-01-02', '860-555-5120', '566 Harbor Avenue', 'West Hartford', 'CT', 'ACO-2-00079'),
  (80, 'Jordan', 'Fleming-080', '1975-12-20', '401-555-3053', '649 Pine Lane', 'Providence', 'RI', 'ACO-1-00080'),
  (81, 'Jordan', 'Wright-081', '1963-10-20', '413-555-9789', '458 Harbor Street', 'Chicopee', 'MA', 'ACO-3-00081'),
  (82, 'Taylor', 'Hayes-082', '1960-10-25', '401-555-1931', '693 Care Avenue', 'Providence', 'RI', 'ACO-2-00082'),
  (83, 'Harper', 'Wright-083', '1993-06-24', '401-555-4526', '836 Care Street', 'Warwick', 'RI', 'ACO-3-00083'),
  (84, 'Sawyer', 'Wright-084', '2004-02-22', '860-555-1559', '603 Care Lane', 'West Hartford', 'CT', 'ACO-2-00084'),
  (85, 'Jordan', 'Hayes-085', '1971-08-03', '401-555-8846', '394 Pine Road', 'Providence', 'RI', 'ACO-2-00085'),
  (86, 'Avery', 'Rivera-086', '1957-10-05', '413-555-1919', '852 Cedar Avenue', 'Springfield', 'MA', 'ACO-1-00086'),
  (87, 'Drew', 'Morgan-087', '1983-01-10', '401-555-9505', '875 Care Lane', 'Providence', 'RI', 'ACO-2-00087'),
  (88, 'Blake', 'James-088', '2000-08-20', '413-555-7382', '578 Pine Road', 'Chicopee', 'MA', 'ACO-2-00088'),
  (89, 'Harper', 'James-089', '2003-11-20', '413-555-3013', '425 Pine Road', 'Chicopee', 'MA', 'ACO-2-00089'),
  (90, 'Rowan', 'Collins-090', '1966-11-04', '860-555-9158', '14 Harbor Lane', 'West Hartford', 'CT', 'ACO-3-00090'),
  (91, 'Cameron', 'Wright-091', '2002-04-16', '401-555-4151', '888 Cedar Street', 'Cranston', 'RI', 'ACO-3-00091'),
  (92, 'Finley', 'Hayes-092', '1996-12-01', '413-555-5548', '542 Harbor Street', 'Chicopee', 'MA', 'ACO-1-00092'),
  (93, 'Logan', 'Carter-093', '1984-11-07', '413-555-4897', '617 Pine Street', 'Holyoke', 'MA', 'ACO-3-00093'),
  (94, 'Kai', 'Allen-094', '1952-04-09', '413-555-4391', '216 Valley Lane', 'Chicopee', 'MA', 'ACO-3-00094'),
  (95, 'Blake', 'Price-095', '1958-11-17', '401-555-4818', '712 Care Avenue', 'Cranston', 'RI', 'ACO-2-00095'),
  (96, 'Riley', 'Carter-096', '1987-11-25', '860-555-6200', '471 Cedar Street', 'Manchester', 'CT', 'ACO-2-00096'),
  (97, 'Rowan', 'James-097', '1974-06-03', '860-555-4085', '304 Pine Road', 'Hartford', 'CT', 'ACO-2-00097'),
  (98, 'Alex', 'Cooper-098', '1978-05-07', '860-555-3847', '269 Cedar Street', 'West Hartford', 'CT', 'ACO-1-00098'),
  (99, 'Riley', 'Cooper-099', '1989-07-17', '860-555-8966', '226 Maple Street', 'Manchester', 'CT', 'ACO-2-00099'),
  (100, 'Taylor', 'Price-100', '1956-11-14', '413-555-9066', '369 Valley Lane', 'Chicopee', 'MA', 'ACO-3-00100'),
  (101, 'Morgan', 'Sullivan-101', '1983-03-07', '413-555-7174', '285 Pine Road', 'Chicopee', 'MA', 'ACO-2-00101'),
  (102, 'Morgan', 'Morgan-102', '1971-06-26', '401-555-4181', '182 Cedar Lane', 'Warwick', 'RI', 'ACO-3-00102'),
  (103, 'Blake', 'Bennett-103', '1947-08-22', '413-555-3643', '708 Maple Street', 'Chicopee', 'MA', 'ACO-1-00103'),
  (104, 'Finley', 'Morgan-104', '1998-08-11', '401-555-7362', '841 Care Road', 'Providence', 'RI', 'ACO-1-00104'),
  (105, 'Casey', 'Reynolds-105', '1997-04-12', '413-555-6731', '616 Valley Road', 'Chicopee', 'MA', 'ACO-1-00105'),
  (106, 'Taylor', 'Allen-106', '1952-07-26', '401-555-1982', '494 Cedar Lane', 'Providence', 'RI', 'ACO-3-00106'),
  (107, 'Jordan', 'James-107', '1991-07-20', '401-555-7232', '152 Maple Lane', 'Warwick', 'RI', 'ACO-2-00107'),
  (108, 'Avery', 'Collins-108', '1968-05-13', '413-555-5534', '29 Cedar Road', 'Holyoke', 'MA', 'ACO-3-00108'),
  (109, 'Jordan', 'Cooper-109', '1999-05-27', '860-555-2968', '415 Harbor Lane', 'Manchester', 'CT', 'ACO-3-00109'),
  (110, 'Blake', 'Hayes-110', '1972-03-17', '860-555-8543', '371 Harbor Lane', 'West Hartford', 'CT', 'ACO-3-00110'),
  (111, 'Jordan', 'Stone-111', '1962-05-24', '413-555-3398', '148 Pine Avenue', 'Springfield', 'MA', 'ACO-3-00111'),
  (112, 'Drew', 'Sullivan-112', '1953-09-11', '413-555-8924', '332 Cedar Road', 'Chicopee', 'MA', 'ACO-3-00112'),
  (113, 'Gray', 'Collins-113', '1982-03-26', '413-555-6716', '474 Harbor Road', 'Springfield', 'MA', 'ACO-1-00113'),
  (114, 'Cameron', 'Sullivan-114', '2004-01-20', '401-555-1008', '513 Cedar Road', 'Providence', 'RI', 'ACO-3-00114'),
  (115, 'Riley', 'Ross-115', '2002-06-01', '860-555-9325', '144 Pine Road', 'West Hartford', 'CT', 'ACO-1-00115'),
  (116, 'Drew', 'Murphy-116', '1954-04-12', '413-555-7775', '840 Valley Lane', 'Chicopee', 'MA', 'ACO-2-00116'),
  (117, 'Blake', 'Fleming-117', '1994-02-24', '401-555-5562', '758 Maple Road', 'Providence', 'RI', 'ACO-2-00117'),
  (118, 'Cameron', 'Stone-118', '1963-12-05', '860-555-5890', '190 Harbor Lane', 'Hartford', 'CT', 'ACO-1-00118'),
  (119, 'Quinn', 'Davis-119', '1970-04-20', '860-555-3624', '162 Pine Road', 'West Hartford', 'CT', 'ACO-1-00119'),
  (120, 'Parker', 'Rivera-120', '1970-06-05', '413-555-5455', '329 Maple Street', 'Springfield', 'MA', 'ACO-3-00120');


INSERT INTO emergency_contact
  (emergency_contact_id, patient_id, linked_patient_id, first_name, last_name, relationship_to_patient, phone_number, street_address)
VALUES
  (1, 1, NULL, 'Logan', 'Rivera', 'Sibling', '860-555-5873', NULL),
  (2, 2, NULL, 'Taylor', 'Rivera', 'Spouse', '401-555-9027', NULL),
  (3, 3, NULL, 'Parker', 'Price', 'Sibling', '860-555-2657', NULL),
  (4, 4, NULL, 'Morgan', 'Morgan', 'Parent', '401-555-9370', NULL),
  (5, 4, NULL, 'Casey', 'Morgan', 'Friend', '401-555-9103', NULL),
  (6, 5, NULL, 'Riley', 'Carter', 'Friend', '401-555-1456', NULL),
  (7, 6, NULL, 'Sawyer', 'Bennett', 'Adult child', '413-555-3400', NULL),
  (8, 7, NULL, 'Finley', 'Bailey', 'Sibling', '860-555-4654', NULL),
  (9, 7, NULL, 'Sawyer', 'Bailey', 'Friend', '401-555-9432', NULL),
  (10, 8, NULL, 'Alex', 'Cooper', 'Friend', '413-555-2708', NULL),
  (11, 9, NULL, 'Drew', 'Fleming', 'Adult child', '413-555-8203', NULL),
  (12, 10, NULL, 'Blake', 'Murphy', 'Friend', '401-555-6109', NULL),
  (13, 11, NULL, 'Cameron', 'Morgan', 'Sibling', '413-555-3108', NULL),
  (14, 12, NULL, 'Gray', 'James', 'Friend', '860-555-2651', NULL),
  (15, 12, NULL, 'Casey', 'James', 'Spouse', '860-555-8166', NULL),
  (16, 13, NULL, 'Riley', 'Hayes', 'Adult child', '413-555-2926', NULL),
  (17, 14, NULL, 'Sawyer', 'Ross', 'Sibling', '860-555-3288', NULL),
  (18, 14, NULL, 'Sawyer', 'Ross', 'Spouse', '401-555-9286', NULL),
  (19, 15, NULL, 'Jordan', 'Stone', 'Parent', '401-555-2632', NULL),
  (20, 15, NULL, 'Logan', 'Stone', 'Friend', '860-555-8674', NULL),
  (21, 16, NULL, 'Jordan', 'Stone', 'Parent', '413-555-6206', NULL),
  (22, 17, NULL, 'Jordan', 'Davis', 'Sibling', '401-555-5030', NULL),
  (23, 18, NULL, 'Avery', 'Morgan', 'Friend', '860-555-9603', NULL),
  (24, 19, NULL, 'Morgan', 'Hayes', 'Friend', '860-555-3944', NULL),
  (25, 20, NULL, 'Harper', 'Allen', 'Adult child', '401-555-1074', NULL),
  (26, 21, NULL, 'Avery', 'Davis', 'Friend', '401-555-4507', NULL),
  (27, 22, NULL, 'Drew', 'Rivera', 'Sibling', '401-555-5923', NULL),
  (28, 22, NULL, 'Alex', 'Rivera', 'Spouse', '413-555-6381', NULL),
  (29, 23, NULL, 'Morgan', 'Murphy', 'Parent', '401-555-7607', NULL),
  (30, 24, NULL, 'Blake', 'Cooper', 'Sibling', '860-555-3047', NULL),
  (31, 24, NULL, 'Blake', 'Cooper', 'Friend', '413-555-2607', NULL),
  (32, 25, NULL, 'Rowan', 'Bailey', 'Friend', '860-555-9521', NULL),
  (33, 26, NULL, 'Cameron', 'Carter', 'Adult child', '413-555-4062', NULL),
  (34, 27, NULL, 'Quinn', 'Fleming', 'Friend', '860-555-5319', NULL),
  (35, 28, NULL, 'Avery', 'Bennett', 'Sibling', '860-555-5345', NULL),
  (36, 29, NULL, 'Casey', 'James', 'Spouse', '413-555-1784', NULL),
  (37, 29, NULL, 'Drew', 'James', 'Adult child', '401-555-3882', NULL),
  (38, 30, NULL, 'Blake', 'Diaz', 'Spouse', '401-555-2144', NULL),
  (39, 30, NULL, 'Cameron', 'Diaz', 'Friend', '860-555-7138', NULL),
  (40, 31, NULL, 'Riley', 'Carter', 'Parent', '401-555-4893', NULL),
  (41, 32, NULL, 'Avery', 'Cooper', 'Spouse', '401-555-8807', NULL),
  (42, 33, NULL, 'Blake', 'Collins', 'Sibling', '860-555-1763', NULL),
  (43, 33, NULL, 'Sawyer', 'Collins', 'Friend', '413-555-1130', NULL),
  (44, 34, NULL, 'Cameron', 'Collins', 'Adult child', '401-555-8738', NULL),
  (45, 35, NULL, 'Quinn', 'Stone', 'Sibling', '401-555-9775', NULL),
  (46, 36, NULL, 'Kai', 'Davis', 'Sibling', '413-555-1592', NULL),
  (47, 37, NULL, 'Emerson', 'Ross', 'Adult child', '860-555-2697', NULL),
  (48, 37, NULL, 'Finley', 'Ross', 'Adult child', '401-555-7230', NULL),
  (49, 38, NULL, 'Logan', 'Collins', 'Sibling', '401-555-1213', NULL),
  (50, 39, NULL, 'Morgan', 'Diaz', 'Parent', '413-555-2509', NULL),
  (51, 40, NULL, 'Parker', 'Carter', 'Sibling', '401-555-5741', NULL),
  (52, 40, NULL, 'Riley', 'Carter', 'Spouse', '860-555-3549', NULL),
  (53, 41, NULL, 'Casey', 'Stone', 'Adult child', '860-555-3732', NULL),
  (54, 42, NULL, 'Blake', 'Allen', 'Parent', '413-555-5188', NULL),
  (55, 43, NULL, 'Parker', 'Carter', 'Parent', '860-555-7451', NULL),
  (56, 44, NULL, 'Cameron', 'Sullivan', 'Sibling', '860-555-9355', NULL),
  (57, 45, NULL, 'Emerson', 'James', 'Friend', '401-555-5427', NULL),
  (58, 45, NULL, 'Taylor', 'James', 'Parent', '413-555-5072', NULL),
  (59, 46, NULL, 'Riley', 'Diaz', 'Friend', '860-555-4174', NULL),
  (60, 46, NULL, 'Alex', 'Diaz', 'Parent', '860-555-3937', NULL),
  (61, 47, NULL, 'Logan', 'Allen', 'Sibling', '413-555-9901', NULL),
  (62, 48, NULL, 'Morgan', 'Allen', 'Adult child', '413-555-2019', NULL),
  (63, 49, NULL, 'Blake', 'Wright', 'Parent', '860-555-1461', NULL),
  (64, 49, NULL, 'Emerson', 'Wright', 'Parent', '401-555-5987', NULL),
  (65, 50, NULL, 'Jordan', 'Ross', 'Adult child', '413-555-1499', NULL),
  (66, 51, NULL, 'Cameron', 'Ross', 'Sibling', '401-555-7011', NULL),
  (67, 51, NULL, 'Rowan', 'Ross', 'Friend', '413-555-3827', NULL),
  (68, 52, NULL, 'Emerson', 'Stone', 'Spouse', '401-555-1884', NULL),
  (69, 53, NULL, 'Gray', 'Collins', 'Sibling', '413-555-3946', NULL),
  (70, 53, NULL, 'Kai', 'Collins', 'Spouse', '860-555-2854', NULL),
  (71, 54, NULL, 'Drew', 'Stone', 'Parent', '413-555-3742', NULL),
  (72, 55, NULL, 'Parker', 'Price', 'Spouse', '860-555-1235', NULL),
  (73, 56, NULL, 'Drew', 'Reynolds', 'Sibling', '401-555-5937', NULL),
  (74, 57, NULL, 'Alex', 'James', 'Parent', '860-555-8874', NULL),
  (75, 58, NULL, 'Drew', 'Hayes', 'Friend', '413-555-3845', NULL),
  (76, 59, NULL, 'Alex', 'Hayes', 'Sibling', '413-555-3542', NULL),
  (77, 60, NULL, 'Avery', 'Wright', 'Friend', '860-555-4335', NULL),
  (78, 61, NULL, 'Avery', 'Bennett', 'Sibling', '401-555-9554', NULL),
  (79, 62, NULL, 'Harper', 'Stone', 'Sibling', '413-555-5760', NULL),
  (80, 62, NULL, 'Parker', 'Stone', 'Spouse', '401-555-6123', NULL),
  (81, 63, NULL, 'Cameron', 'Carter', 'Sibling', '860-555-2864', NULL),
  (82, 64, NULL, 'Casey', 'James', 'Sibling', '401-555-6769', NULL),
  (83, 65, NULL, 'Jordan', 'Carter', 'Sibling', '860-555-9385', NULL),
  (84, 66, NULL, 'Parker', 'Murphy', 'Parent', '413-555-9940', NULL),
  (85, 67, NULL, 'Parker', 'Stone', 'Friend', '860-555-9854', NULL),
  (86, 68, NULL, 'Jordan', 'Collins', 'Adult child', '860-555-8890', NULL),
  (87, 68, NULL, 'Parker', 'Collins', 'Friend', '413-555-9902', NULL),
  (88, 69, NULL, 'Blake', 'Fleming', 'Parent', '860-555-2076', NULL),
  (89, 70, NULL, 'Rowan', 'Davis', 'Friend', '860-555-8814', NULL),
  (90, 71, NULL, 'Gray', 'James', 'Spouse', '413-555-6543', NULL),
  (91, 72, NULL, 'Emerson', 'Sullivan', 'Sibling', '860-555-2101', NULL),
  (92, 73, NULL, 'Blake', 'Cooper', 'Friend', '401-555-7402', NULL),
  (93, 74, NULL, 'Logan', 'Sullivan', 'Parent', '860-555-1921', NULL),
  (94, 75, NULL, 'Drew', 'Diaz', 'Spouse', '413-555-5394', NULL),
  (95, 76, NULL, 'Parker', 'Reynolds', 'Spouse', '401-555-5692', NULL),
  (96, 77, NULL, 'Taylor', 'Sullivan', 'Adult child', '860-555-3351', NULL),
  (97, 77, NULL, 'Avery', 'Sullivan', 'Friend', '401-555-7814', NULL),
  (98, 78, NULL, 'Casey', 'Stone', 'Friend', '413-555-1084', NULL),
  (99, 79, NULL, 'Casey', 'Morgan', 'Parent', '413-555-3787', NULL),
  (100, 80, NULL, 'Taylor', 'Fleming', 'Adult child', '401-555-9795', NULL),
  (101, 81, NULL, 'Kai', 'Wright', 'Adult child', '401-555-6365', NULL),
  (102, 81, NULL, 'Avery', 'Wright', 'Friend', '860-555-9319', NULL),
  (103, 82, NULL, 'Gray', 'Hayes', 'Parent', '401-555-6003', NULL),
  (104, 83, NULL, 'Kai', 'Wright', 'Friend', '860-555-7090', NULL),
  (105, 84, NULL, 'Quinn', 'Wright', 'Friend', '401-555-5533', NULL),
  (106, 85, NULL, 'Gray', 'Hayes', 'Sibling', '401-555-2797', NULL),
  (107, 86, NULL, 'Taylor', 'Rivera', 'Parent', '401-555-1528', NULL),
  (108, 87, NULL, 'Jordan', 'Morgan', 'Sibling', '860-555-6735', NULL),
  (109, 88, NULL, 'Cameron', 'James', 'Friend', '860-555-7230', NULL),
  (110, 89, NULL, 'Avery', 'James', 'Spouse', '401-555-8256', NULL),
  (111, 89, NULL, 'Quinn', 'James', 'Parent', '413-555-3485', NULL),
  (112, 90, NULL, 'Morgan', 'Collins', 'Adult child', '860-555-2069', NULL),
  (113, 91, NULL, 'Taylor', 'Wright', 'Adult child', '413-555-8939', NULL),
  (114, 92, NULL, 'Emerson', 'Hayes', 'Adult child', '413-555-8916', NULL),
  (115, 93, NULL, 'Riley', 'Carter', 'Friend', '401-555-4965', NULL),
  (116, 94, NULL, 'Avery', 'Allen', 'Spouse', '860-555-1582', NULL),
  (117, 95, NULL, 'Cameron', 'Price', 'Adult child', '413-555-5065', NULL),
  (118, 95, NULL, 'Harper', 'Price', 'Parent', '413-555-9223', NULL),
  (119, 96, NULL, 'Emerson', 'Carter', 'Sibling', '401-555-1514', NULL),
  (120, 97, NULL, 'Logan', 'James', 'Adult child', '413-555-4389', NULL),
  (121, 97, NULL, 'Jordan', 'James', 'Adult child', '401-555-9681', NULL),
  (122, 98, NULL, 'Parker', 'Cooper', 'Sibling', '413-555-5522', NULL),
  (123, 99, NULL, 'Blake', 'Cooper', 'Sibling', '413-555-5106', NULL),
  (124, 99, NULL, 'Rowan', 'Cooper', 'Adult child', '860-555-8264', NULL),
  (125, 100, NULL, 'Alex', 'Price', 'Sibling', '401-555-5643', NULL),
  (126, 101, NULL, 'Morgan', 'Sullivan', 'Spouse', '413-555-3063', NULL),
  (127, 102, NULL, 'Morgan', 'Morgan', 'Adult child', '401-555-4918', NULL),
  (128, 103, NULL, 'Taylor', 'Bennett', 'Spouse', '860-555-5188', NULL),
  (129, 104, NULL, 'Avery', 'Morgan', 'Friend', '401-555-7339', NULL),
  (130, 105, NULL, 'Cameron', 'Reynolds', 'Adult child', '401-555-8190', NULL),
  (131, 106, NULL, 'Rowan', 'Allen', 'Friend', '860-555-2186', NULL),
  (132, 107, NULL, 'Alex', 'James', 'Sibling', '413-555-5081', NULL),
  (133, 107, NULL, 'Jordan', 'James', 'Friend', '401-555-7765', NULL),
  (134, 108, NULL, 'Kai', 'Collins', 'Adult child', '860-555-8020', NULL),
  (135, 108, NULL, 'Casey', 'Collins', 'Sibling', '413-555-2815', NULL),
  (136, 109, NULL, 'Harper', 'Cooper', 'Spouse', '413-555-1104', NULL),
  (137, 110, NULL, 'Avery', 'Hayes', 'Sibling', '401-555-7117', NULL),
  (138, 111, NULL, 'Avery', 'Stone', 'Friend', '413-555-6313', NULL),
  (139, 112, NULL, 'Morgan', 'Sullivan', 'Spouse', '860-555-1554', NULL),
  (140, 112, NULL, 'Gray', 'Sullivan', 'Spouse', '413-555-4440', NULL),
  (141, 113, NULL, 'Finley', 'Collins', 'Adult child', '401-555-8767', NULL),
  (142, 114, NULL, 'Gray', 'Sullivan', 'Spouse', '401-555-6342', NULL),
  (143, 115, NULL, 'Taylor', 'Ross', 'Spouse', '860-555-9146', NULL),
  (144, 116, NULL, 'Logan', 'Murphy', 'Parent', '401-555-5123', NULL),
  (145, 117, NULL, 'Alex', 'Fleming', 'Adult child', '860-555-2431', NULL),
  (146, 118, NULL, 'Quinn', 'Stone', 'Adult child', '401-555-5793', NULL),
  (147, 119, NULL, 'Blake', 'Davis', 'Adult child', '413-555-4347', NULL),
  (148, 120, NULL, 'Riley', 'Rivera', 'Parent', '401-555-7453', NULL);


INSERT INTO diagnosis
  (icd10_code, diagnosis_name, severity, diagnosis_description)
VALUES
  ('E11.9', 'Type 2 diabetes mellitus without complications', 'moderate', 'Synthetic ACO diagnosis category for type 2 diabetes mellitus without complications.'),
  ('I10', 'Essential hypertension', 'moderate', 'Synthetic ACO diagnosis category for essential hypertension.'),
  ('I21.9', 'Acute myocardial infarction', 'critical', 'Synthetic ACO diagnosis category for acute myocardial infarction.'),
  ('J44.9', 'Chronic obstructive pulmonary disease', 'high', 'Synthetic ACO diagnosis category for chronic obstructive pulmonary disease.'),
  ('F32.9', 'Major depressive disorder, single episode', 'moderate', 'Synthetic ACO diagnosis category for major depressive disorder, single episode.'),
  ('M25.561', 'Pain in right knee', 'low', 'Synthetic ACO diagnosis category for pain in right knee.'),
  ('S62.609A', 'Finger fracture, initial encounter', 'moderate', 'Synthetic ACO diagnosis category for finger fracture, initial encounter.'),
  ('S01.81XA', 'Facial laceration, initial encounter', 'moderate', 'Synthetic ACO diagnosis category for facial laceration, initial encounter.'),
  ('C50.919', 'Breast cancer, unspecified', 'high', 'Synthetic ACO diagnosis category for breast cancer, unspecified.'),
  ('N18.31', 'Chronic kidney disease, stage 3a', 'high', 'Synthetic ACO diagnosis category for chronic kidney disease, stage 3a.'),
  ('Z00.00', 'General adult medical examination', 'low', 'Synthetic ACO diagnosis category for general adult medical examination.'),
  ('Z12.11', 'Colon cancer screening encounter', 'low', 'Synthetic ACO diagnosis category for colon cancer screening encounter.'),
  ('Z23', 'Immunization encounter', 'low', 'Synthetic ACO diagnosis category for immunization encounter.'),
  ('E78.5', 'Hyperlipidemia', 'moderate', 'Synthetic ACO diagnosis category for hyperlipidemia.'),
  ('I50.9', 'Heart failure', 'high', 'Synthetic ACO diagnosis category for heart failure.'),
  ('G89.29', 'Other chronic pain', 'moderate', 'Synthetic ACO diagnosis category for other chronic pain.');


INSERT INTO medical_procedure
  (procedure_id, procedure_name, procedure_description, default_inpatient, standard_cost, covered_by_insurance)
VALUES
  (1, 'Annual wellness visit', 'Preventive primary care visit', 0, 175, 1),
  (2, 'HbA1c lab panel', 'Diabetes monitoring lab panel', 0, 85, 1),
  (3, 'Blood pressure follow-up', 'Hypertension follow-up visit', 0, 140, 1),
  (4, 'Cardiac catheterization', 'Cardiac diagnostic procedure', 1, 9200, 1),
  (5, 'COPD spirometry', 'Pulmonary function testing', 0, 430, 1),
  (6, 'Depression screening', 'Behavioral health screening', 0, 95, 1),
  (7, 'Knee imaging series', 'Orthopedic diagnostic imaging', 0, 680, 1),
  (8, 'Finger splinting', 'Fracture stabilization', 0, 410, 1),
  (9, 'Laceration repair', 'Emergency wound closure', 0, 725, 1),
  (10, 'Chemotherapy infusion', 'Oncology infusion treatment', 1, 4800, 1),
  (11, 'Kidney function panel', 'Renal monitoring lab panel', 0, 110, 1),
  (12, 'Colonoscopy referral', 'Preventive screening referral', 0, 1200, 1);


INSERT INTO medication
  (medication_code, medication_name, brand_name, medication_class, controlled_substance, medication_description)
VALUES
  ('MED-MET-500', 'Metformin 500mg', 'Generic', 'Antidiabetic', 0, 'Synthetic medication record for Metformin 500mg.'),
  ('MED-LIS-20', 'Lisinopril 20mg', 'Generic', 'Antihypertensive', 0, 'Synthetic medication record for Lisinopril 20mg.'),
  ('MED-ATO-40', 'Atorvastatin 40mg', 'Lipitor', 'Statin', 0, 'Synthetic medication record for Atorvastatin 40mg.'),
  ('MED-ALB-90', 'Albuterol inhaler', 'Ventolin', 'Bronchodilator', 0, 'Synthetic medication record for Albuterol inhaler.'),
  ('MED-SER-50', 'Sertraline 50mg', 'Zoloft', 'SSRI', 0, 'Synthetic medication record for Sertraline 50mg.'),
  ('MED-ASA-81', 'Aspirin 81mg', 'Bayer', 'Antiplatelet', 0, 'Synthetic medication record for Aspirin 81mg.'),
  ('MED-HYD-5', 'Hydrocodone 5mg', 'Generic', 'Opioid analgesic', 1, 'Synthetic medication record for Hydrocodone 5mg.'),
  ('MED-MOR-10', 'Morphine 10mg', 'Generic', 'Opioid analgesic', 1, 'Synthetic medication record for Morphine 10mg.'),
  ('MED-FEN-25', 'Fentanyl 25mcg', 'Generic', 'Opioid analgesic', 1, 'Synthetic medication record for Fentanyl 25mcg.'),
  ('MED-OND-4', 'Ondansetron 4mg', 'Zofran', 'Antiemetic', 0, 'Synthetic medication record for Ondansetron 4mg.'),
  ('MED-FUR-20', 'Furosemide 20mg', 'Lasix', 'Diuretic', 0, 'Synthetic medication record for Furosemide 20mg.'),
  ('MED-INS-GL', 'Insulin glargine', 'Lantus', 'Insulin', 0, 'Synthetic medication record for Insulin glargine.');


INSERT INTO hospital_visit
  (visit_id, patient_id, hospital_id, attending_doctor_id, admitting_department_id, admitted_at, discharged_at, visit_type, discharge_disposition, visit_notes)
VALUES
  (1, 34, 2, 17, 7, '2026-04-04 14:30:00', '2026-04-07 09:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (2, 46, 3, 9, 9, '2026-03-22 10:00:00', '2026-03-22 11:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (3, 45, 3, 8, 8, '2025-11-21 09:20:00', '2025-11-21 10:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (4, 63, 1, 14, 4, '2026-01-05 07:45:00', '2026-01-09 03:45:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (5, 98, 3, 8, 8, '2026-04-18 10:30:00', '2026-04-20 09:30:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (6, 113, 3, 10, 10, '2026-01-10 16:10:00', '2026-01-11 00:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (7, 52, 3, 18, 8, '2026-05-26 18:45:00', '2026-05-27 00:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (8, 13, 1, 13, 3, '2026-01-14 10:45:00', '2026-01-14 14:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (9, 34, 2, 16, 6, '2026-02-28 16:00:00', '2026-02-28 22:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (10, 104, 2, 6, 6, '2025-11-22 07:00:00', '2025-11-22 12:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (11, 5, 1, 13, 3, '2026-01-30 07:15:00', '2026-01-30 10:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (12, 5, 3, 9, 9, '2025-12-20 14:20:00', '2025-12-20 15:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (13, 4, 2, 16, 6, '2026-05-07 10:30:00', '2026-05-07 13:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (14, 12, 3, 9, 9, '2026-02-03 10:20:00', '2026-02-03 14:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (15, 107, 1, 4, 4, '2026-04-27 14:00:00', '2026-04-27 17:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (16, 26, 1, 12, 2, '2026-05-11 16:10:00', '2026-05-11 19:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (17, 106, 3, 10, 10, '2025-12-19 18:00:00', '2025-12-19 23:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (18, 31, 2, 17, 7, '2026-02-15 13:00:00', '2026-02-15 14:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (19, 90, 1, 13, 3, '2025-12-15 08:15:00', '2025-12-19 01:15:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (20, 104, 1, 3, 3, '2026-02-03 19:00:00', '2026-02-03 22:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (21, 33, 2, 7, 7, '2026-03-27 09:45:00', '2026-03-27 11:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (22, 96, 3, 8, 8, '2026-01-16 08:15:00', '2026-01-17 13:15:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (23, 120, 1, 2, 2, '2025-12-20 19:20:00', '2025-12-20 23:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (24, 100, 3, 9, 9, '2026-01-11 12:00:00', '2026-01-11 13:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (25, 68, 2, 17, 7, '2026-05-09 17:00:00', '2026-05-12 10:00:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (26, 115, 2, 17, 7, '2026-02-20 12:45:00', '2026-02-21 12:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (27, 54, 1, 2, 2, '2025-12-11 15:15:00', '2025-12-11 23:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (28, 119, 3, 8, 8, '2026-02-22 07:20:00', '2026-02-24 01:20:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (29, 17, 1, 11, 1, '2026-04-02 09:00:00', '2026-04-06 04:00:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (30, 2, 1, 12, 2, '2026-04-26 08:15:00', '2026-04-26 15:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (31, 66, 3, 9, 9, '2025-11-02 14:45:00', '2025-11-02 20:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (32, 33, 2, 5, 5, '2025-12-10 16:15:00', '2025-12-14 00:15:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (33, 24, 3, 10, 10, '2026-02-21 12:00:00', '2026-02-24 21:00:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (34, 47, 1, 3, 3, '2026-04-12 17:30:00', '2026-04-12 20:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (35, 96, 1, 11, 1, '2026-05-02 18:30:00', '2026-05-06 00:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (36, 60, 2, 15, 5, '2026-03-20 11:20:00', '2026-03-23 07:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (37, 104, 1, 11, 1, '2025-11-07 13:00:00', '2025-11-09 09:00:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (38, 86, 1, 11, 1, '2026-02-27 12:15:00', '2026-02-27 15:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (39, 85, 3, 9, 9, '2025-11-02 13:00:00', '2025-11-02 21:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (40, 71, 3, 18, 8, '2025-11-26 07:30:00', '2025-11-26 10:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (41, 38, 1, 3, 3, '2025-12-19 07:30:00', '2025-12-19 15:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (42, 75, 2, 17, 7, '2025-11-10 18:10:00', '2025-11-10 21:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (43, 65, 1, 3, 3, '2026-01-17 15:30:00', '2026-01-21 00:30:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (44, 110, 3, 8, 8, '2026-05-04 07:00:00', '2026-05-07 12:00:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (45, 30, 3, 10, 10, '2026-01-24 12:10:00', '2026-01-27 01:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (46, 112, 3, 9, 9, '2025-12-12 07:10:00', '2025-12-12 08:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (47, 43, 1, 1, 1, '2025-12-01 15:30:00', '2025-12-01 23:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (48, 21, 1, 3, 3, '2026-04-23 11:20:00', '2026-04-23 16:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (49, 71, 1, 12, 2, '2025-11-03 09:20:00', '2025-11-03 17:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (50, 63, 3, 9, 9, '2025-12-01 19:00:00', '2025-12-02 03:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (51, 101, 1, 3, 3, '2025-11-10 10:15:00', '2025-11-10 11:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (52, 78, 1, 14, 4, '2026-04-08 07:20:00', '2026-04-08 15:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (53, 49, 1, 2, 2, '2026-04-06 13:10:00', '2026-04-09 10:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (54, 91, 2, 5, 5, '2026-03-21 08:10:00', '2026-03-23 23:10:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (55, 118, 1, 3, 3, '2026-04-02 14:15:00', '2026-04-06 01:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (56, 22, 1, 13, 3, '2026-01-28 09:10:00', '2026-01-28 12:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (57, 13, 3, 8, 8, '2025-12-20 14:20:00', '2025-12-20 17:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (58, 58, 3, 8, 8, '2026-05-31 19:45:00', '2026-06-03 08:45:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (59, 49, 1, 3, 3, '2026-03-13 07:15:00', '2026-03-13 08:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (60, 65, 3, 18, 8, '2025-12-30 07:10:00', '2026-01-02 08:10:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (61, 74, 3, 8, 8, '2025-11-03 11:00:00', '2025-11-03 13:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (62, 40, 1, 13, 3, '2026-01-14 11:00:00', '2026-01-17 07:00:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (63, 13, 2, 7, 7, '2026-01-10 07:30:00', '2026-01-10 14:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (64, 93, 3, 9, 9, '2026-05-01 10:00:00', '2026-05-01 18:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (65, 95, 3, 9, 9, '2026-05-20 11:45:00', '2026-05-20 16:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (66, 8, 2, 5, 5, '2026-02-26 09:30:00', '2026-02-26 13:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (67, 113, 1, 11, 1, '2026-01-05 18:10:00', '2026-01-08 07:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (68, 109, 2, 7, 7, '2025-11-15 14:45:00', '2025-11-15 19:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (69, 12, 2, 7, 7, '2025-12-30 16:15:00', '2026-01-02 01:15:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (70, 109, 1, 12, 2, '2026-05-24 08:00:00', '2026-05-27 06:00:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (71, 71, 2, 17, 7, '2025-11-10 14:10:00', '2025-11-13 08:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (72, 28, 1, 13, 3, '2026-05-08 13:15:00', '2026-05-08 16:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (73, 73, 2, 6, 6, '2026-02-02 14:10:00', '2026-02-02 18:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (74, 53, 2, 7, 7, '2026-02-22 12:30:00', '2026-02-22 18:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (75, 49, 2, 17, 7, '2026-03-08 16:00:00', '2026-03-08 23:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (76, 15, 3, 9, 9, '2025-11-10 08:45:00', '2025-11-10 12:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (77, 56, 1, 3, 3, '2025-11-11 12:30:00', '2025-11-11 16:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (78, 42, 3, 9, 9, '2026-03-09 16:45:00', '2026-03-10 00:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (79, 41, 1, 12, 2, '2026-02-21 09:00:00', '2026-02-21 14:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (80, 78, 3, 9, 9, '2026-03-21 11:20:00', '2026-03-21 18:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (81, 46, 3, 8, 8, '2026-03-07 19:45:00', '2026-03-11 19:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (82, 72, 2, 15, 5, '2025-12-21 09:10:00', '2025-12-21 14:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (83, 41, 1, 13, 3, '2025-12-30 07:30:00', '2025-12-30 14:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (84, 21, 1, 4, 4, '2026-04-21 09:30:00', '2026-04-23 12:30:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (85, 26, 1, 11, 1, '2025-12-26 17:30:00', '2025-12-26 19:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (86, 110, 1, 14, 4, '2026-01-16 18:20:00', '2026-01-17 01:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (87, 42, 2, 7, 7, '2026-02-28 18:15:00', '2026-03-01 02:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (88, 16, 1, 2, 2, '2026-04-16 17:15:00', '2026-04-16 23:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (89, 59, 1, 4, 4, '2026-03-23 12:20:00', '2026-03-26 18:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (90, 16, 1, 13, 3, '2025-11-10 14:15:00', '2025-11-10 18:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (91, 40, 1, 13, 3, '2025-11-07 07:10:00', '2025-11-07 12:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (92, 112, 2, 15, 5, '2025-12-18 14:10:00', '2025-12-22 08:10:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (93, 68, 2, 5, 5, '2025-11-15 17:30:00', '2025-11-15 20:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (94, 92, 1, 13, 3, '2026-02-24 13:10:00', '2026-02-24 16:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (95, 17, 1, 13, 3, '2026-03-14 12:15:00', '2026-03-14 16:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (96, 37, 3, 9, 9, '2025-11-05 15:45:00', '2025-11-05 16:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (97, 120, 1, 12, 2, '2026-02-01 17:15:00', '2026-02-01 20:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (98, 108, 3, 10, 10, '2026-03-19 07:10:00', '2026-03-19 15:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (99, 32, 3, 10, 10, '2025-11-19 18:00:00', '2025-11-19 19:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (100, 51, 3, 9, 9, '2026-04-06 09:00:00', '2026-04-06 12:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (101, 70, 3, 9, 9, '2026-04-09 12:00:00', '2026-04-09 17:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (102, 77, 3, 9, 9, '2025-11-18 07:15:00', '2025-11-22 03:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (103, 85, 3, 9, 9, '2026-01-02 10:15:00', '2026-01-02 14:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (104, 45, 3, 9, 9, '2026-02-05 11:20:00', '2026-02-05 19:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (105, 23, 1, 2, 2, '2026-03-08 15:10:00', '2026-03-12 15:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (106, 20, 1, 2, 2, '2026-04-26 17:20:00', '2026-04-26 23:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (107, 93, 1, 13, 3, '2026-04-19 12:00:00', '2026-04-19 16:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (108, 66, 2, 5, 5, '2026-05-08 09:45:00', '2026-05-08 15:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (109, 84, 3, 10, 10, '2026-02-15 12:30:00', '2026-02-18 02:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (110, 51, 1, 12, 2, '2025-12-29 11:30:00', '2025-12-30 23:30:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (111, 69, 1, 13, 3, '2026-04-05 17:10:00', '2026-04-05 23:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (112, 108, 2, 7, 7, '2026-02-01 11:20:00', '2026-02-01 15:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (113, 14, 3, 18, 8, '2026-01-05 16:20:00', '2026-01-05 19:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (114, 119, 1, 2, 2, '2026-01-15 12:45:00', '2026-01-15 13:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (115, 77, 1, 12, 2, '2026-05-26 14:20:00', '2026-05-26 21:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (116, 16, 1, 2, 2, '2026-02-02 08:00:00', '2026-02-02 10:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (117, 1, 1, 13, 3, '2026-04-25 08:15:00', '2026-04-25 09:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (118, 22, 1, 3, 3, '2025-12-20 13:20:00', '2025-12-20 20:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (119, 45, 2, 17, 7, '2025-12-16 07:10:00', '2025-12-16 09:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (120, 48, 2, 7, 7, '2026-02-10 10:20:00', '2026-02-12 21:20:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (121, 120, 1, 12, 2, '2026-03-10 10:15:00', '2026-03-10 17:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (122, 23, 1, 2, 2, '2026-04-27 17:20:00', '2026-04-27 18:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (123, 49, 3, 9, 9, '2026-03-16 18:15:00', '2026-03-20 08:15:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (124, 46, 2, 17, 7, '2026-01-09 18:20:00', '2026-01-10 02:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (125, 1, 1, 4, 4, '2025-11-09 07:45:00', '2025-11-11 06:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (126, 8, 3, 18, 8, '2025-11-15 11:10:00', '2025-11-15 16:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (127, 35, 1, 13, 3, '2026-03-28 14:30:00', '2026-03-28 19:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (128, 4, 1, 12, 2, '2026-02-03 14:00:00', '2026-02-03 17:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (129, 119, 3, 18, 8, '2026-05-14 11:20:00', '2026-05-14 18:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (130, 4, 3, 8, 8, '2025-12-08 14:20:00', '2025-12-08 16:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (131, 75, 3, 9, 9, '2026-01-01 16:45:00', '2026-01-05 05:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (132, 38, 2, 17, 7, '2025-11-27 15:30:00', '2025-11-27 23:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (133, 57, 1, 3, 3, '2026-04-17 13:30:00', '2026-04-17 16:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (134, 56, 2, 7, 7, '2026-05-12 09:30:00', '2026-05-14 02:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (135, 37, 1, 2, 2, '2026-05-17 13:45:00', '2026-05-18 17:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (136, 77, 1, 14, 4, '2026-05-12 10:45:00', '2026-05-12 18:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (137, 106, 1, 14, 4, '2025-11-16 15:20:00', '2025-11-16 17:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (138, 113, 1, 3, 3, '2025-12-05 15:00:00', '2025-12-05 22:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (139, 16, 1, 3, 3, '2026-04-04 19:45:00', '2026-04-05 00:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (140, 62, 3, 9, 9, '2026-03-03 18:10:00', '2026-03-05 03:10:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (141, 2, 1, 3, 3, '2026-05-04 12:10:00', '2026-05-04 16:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (142, 100, 1, 2, 2, '2026-01-04 19:45:00', '2026-01-04 20:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (143, 22, 1, 13, 3, '2026-01-16 15:30:00', '2026-01-16 17:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (144, 101, 1, 11, 1, '2026-03-15 17:45:00', '2026-03-15 21:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (145, 83, 1, 13, 3, '2026-03-21 19:15:00', '2026-03-24 03:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (146, 2, 3, 9, 9, '2025-12-21 15:20:00', '2025-12-21 19:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (147, 66, 2, 16, 6, '2026-01-01 19:45:00', '2026-01-04 20:45:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (148, 89, 3, 9, 9, '2026-02-04 08:00:00', '2026-02-04 12:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (149, 27, 2, 17, 7, '2026-03-21 16:30:00', '2026-03-21 22:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (150, 18, 1, 12, 2, '2025-11-14 17:45:00', '2025-11-16 07:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (151, 9, 2, 15, 5, '2026-05-12 09:15:00', '2026-05-15 18:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (152, 81, 1, 3, 3, '2026-03-17 18:10:00', '2026-03-17 21:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (153, 41, 1, 2, 2, '2026-03-21 07:15:00', '2026-03-23 09:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (154, 101, 3, 10, 10, '2026-05-31 15:30:00', '2026-05-31 18:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (155, 21, 1, 3, 3, '2026-01-08 17:30:00', '2026-01-09 00:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (156, 49, 1, 3, 3, '2026-02-10 19:00:00', '2026-02-12 05:00:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (157, 14, 1, 3, 3, '2026-04-10 18:20:00', '2026-04-11 00:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (158, 119, 1, 3, 3, '2025-11-02 18:30:00', '2025-11-02 21:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (159, 96, 1, 13, 3, '2026-02-21 10:20:00', '2026-02-22 18:20:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (160, 16, 3, 8, 8, '2025-12-03 16:20:00', '2025-12-03 19:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (161, 29, 3, 18, 8, '2026-05-17 07:30:00', '2026-05-18 10:30:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (162, 13, 2, 17, 7, '2026-03-26 14:45:00', '2026-03-26 17:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (163, 26, 2, 17, 7, '2026-04-17 11:30:00', '2026-04-17 13:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (164, 3, 3, 18, 8, '2026-04-21 07:10:00', '2026-04-21 10:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (165, 13, 3, 9, 9, '2026-05-02 11:15:00', '2026-05-03 12:15:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (166, 8, 1, 12, 2, '2026-05-07 08:45:00', '2026-05-10 00:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (167, 104, 1, 3, 3, '2026-05-03 14:45:00', '2026-05-03 15:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (168, 22, 2, 5, 5, '2026-05-11 11:10:00', '2026-05-11 14:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (169, 101, 2, 17, 7, '2026-05-11 11:20:00', '2026-05-11 13:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (170, 100, 3, 8, 8, '2026-03-02 15:10:00', '2026-03-02 19:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (171, 109, 2, 6, 6, '2026-02-06 08:15:00', '2026-02-06 11:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (172, 8, 1, 3, 3, '2026-05-27 12:10:00', '2026-05-27 20:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (173, 111, 1, 13, 3, '2026-03-22 13:10:00', '2026-03-22 19:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (174, 65, 1, 3, 3, '2026-02-19 17:15:00', '2026-02-22 06:15:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (175, 108, 1, 2, 2, '2026-02-06 10:00:00', '2026-02-06 16:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (176, 81, 1, 2, 2, '2025-11-18 12:00:00', '2025-11-18 15:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (177, 70, 2, 16, 6, '2026-05-09 09:30:00', '2026-05-09 16:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (178, 46, 2, 5, 5, '2026-04-13 16:15:00', '2026-04-14 00:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (179, 41, 1, 3, 3, '2026-01-12 07:45:00', '2026-01-12 12:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (180, 114, 1, 13, 3, '2025-12-28 19:15:00', '2025-12-28 22:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (181, 40, 2, 17, 7, '2026-04-11 07:30:00', '2026-04-12 13:30:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (182, 32, 3, 18, 8, '2026-01-13 14:20:00', '2026-01-13 17:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (183, 85, 2, 7, 7, '2025-11-05 11:15:00', '2025-11-08 02:15:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (184, 106, 1, 2, 2, '2025-11-24 16:45:00', '2025-11-27 04:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (185, 71, 1, 11, 1, '2026-04-14 19:10:00', '2026-04-15 23:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (186, 108, 2, 7, 7, '2026-02-01 18:10:00', '2026-02-02 00:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (187, 54, 2, 6, 6, '2026-05-30 13:30:00', '2026-06-01 11:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (188, 98, 2, 16, 6, '2025-12-18 13:30:00', '2025-12-22 09:30:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (189, 54, 2, 6, 6, '2026-04-01 10:10:00', '2026-04-01 18:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (190, 3, 1, 12, 2, '2026-02-05 09:45:00', '2026-02-05 12:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (191, 110, 2, 7, 7, '2025-11-10 12:10:00', '2025-11-10 19:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (192, 93, 1, 2, 2, '2026-03-02 17:30:00', '2026-03-02 21:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (193, 2, 1, 3, 3, '2025-11-27 18:20:00', '2025-11-30 22:20:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (194, 70, 1, 3, 3, '2026-01-01 11:15:00', '2026-01-03 21:15:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (195, 30, 3, 9, 9, '2026-01-23 10:10:00', '2026-01-23 18:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (196, 38, 3, 10, 10, '2026-02-03 14:20:00', '2026-02-03 15:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (197, 42, 1, 12, 2, '2026-01-30 15:15:00', '2026-02-01 22:15:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (198, 30, 2, 7, 7, '2026-01-23 13:00:00', '2026-01-23 18:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (199, 49, 3, 18, 8, '2025-11-25 15:10:00', '2025-11-26 19:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (200, 74, 1, 13, 3, '2025-11-14 11:10:00', '2025-11-14 12:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (201, 98, 3, 18, 8, '2026-03-30 16:20:00', '2026-04-02 03:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (202, 35, 3, 8, 8, '2026-03-23 11:45:00', '2026-03-23 17:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (203, 1, 2, 7, 7, '2026-02-18 07:45:00', '2026-02-18 14:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (204, 38, 1, 1, 1, '2026-05-27 10:10:00', '2026-05-30 15:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (205, 54, 3, 8, 8, '2025-11-15 08:15:00', '2025-11-15 13:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (206, 90, 2, 17, 7, '2026-02-14 15:10:00', '2026-02-14 20:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (207, 104, 2, 7, 7, '2025-11-21 09:10:00', '2025-11-21 12:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (208, 35, 1, 13, 3, '2026-04-18 13:15:00', '2026-04-21 04:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (209, 25, 3, 10, 10, '2026-05-01 16:10:00', '2026-05-01 18:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (210, 35, 1, 3, 3, '2025-11-27 19:15:00', '2025-11-28 00:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (211, 88, 1, 3, 3, '2026-03-30 10:10:00', '2026-04-01 13:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (212, 45, 1, 13, 3, '2025-11-21 15:00:00', '2025-11-21 19:00:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (213, 17, 1, 11, 1, '2026-01-05 13:20:00', '2026-01-05 18:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (214, 6, 1, 13, 3, '2026-01-23 10:30:00', '2026-01-23 11:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (215, 25, 1, 3, 3, '2026-04-29 13:15:00', '2026-04-29 14:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (216, 20, 3, 10, 10, '2026-01-20 12:00:00', '2026-01-20 16:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (217, 117, 1, 13, 3, '2026-01-01 18:30:00', '2026-01-02 01:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (218, 4, 1, 3, 3, '2025-12-29 15:00:00', '2025-12-29 18:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (219, 12, 1, 3, 3, '2026-04-28 12:15:00', '2026-05-01 23:15:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (220, 7, 3, 9, 9, '2026-02-16 16:00:00', '2026-02-18 06:00:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (221, 104, 3, 18, 8, '2026-02-13 10:10:00', '2026-02-15 23:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (222, 62, 1, 2, 2, '2026-04-11 15:10:00', '2026-04-14 16:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (223, 120, 1, 13, 3, '2026-02-07 14:45:00', '2026-02-07 16:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (224, 70, 2, 17, 7, '2025-11-05 12:15:00', '2025-11-05 17:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (225, 92, 3, 8, 8, '2026-05-11 18:45:00', '2026-05-12 01:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (226, 83, 1, 3, 3, '2026-04-02 12:45:00', '2026-04-04 08:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (227, 3, 1, 12, 2, '2026-02-07 11:10:00', '2026-02-07 15:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (228, 68, 3, 8, 8, '2026-04-07 19:30:00', '2026-04-10 08:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (229, 112, 1, 3, 3, '2026-03-24 11:00:00', '2026-03-24 19:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (230, 63, 1, 14, 4, '2025-12-25 19:00:00', '2025-12-25 21:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (231, 67, 3, 9, 9, '2025-12-12 16:10:00', '2025-12-12 19:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (232, 30, 2, 15, 5, '2026-05-15 11:20:00', '2026-05-15 17:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (233, 63, 2, 7, 7, '2026-02-28 12:20:00', '2026-03-02 06:20:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (234, 32, 1, 1, 1, '2026-04-04 08:10:00', '2026-04-06 23:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (235, 92, 3, 8, 8, '2025-12-30 15:10:00', '2026-01-02 13:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (236, 19, 3, 9, 9, '2025-11-14 07:45:00', '2025-11-16 12:45:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (237, 62, 3, 9, 9, '2026-03-21 10:30:00', '2026-03-21 12:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (238, 77, 1, 2, 2, '2025-12-31 14:30:00', '2025-12-31 19:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (239, 41, 3, 18, 8, '2025-12-12 13:15:00', '2025-12-12 14:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (240, 24, 3, 9, 9, '2026-04-16 12:45:00', '2026-04-20 10:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (241, 99, 1, 12, 2, '2025-12-26 10:30:00', '2025-12-27 16:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (242, 56, 3, 9, 9, '2026-01-29 16:45:00', '2026-01-29 19:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (243, 57, 3, 18, 8, '2026-04-18 08:45:00', '2026-04-20 12:45:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (244, 57, 2, 17, 7, '2026-05-16 10:20:00', '2026-05-19 14:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (245, 7, 3, 9, 9, '2026-03-19 08:10:00', '2026-03-22 04:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (246, 118, 2, 17, 7, '2026-04-14 14:20:00', '2026-04-15 23:20:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (247, 53, 1, 1, 1, '2026-02-22 16:20:00', '2026-02-22 17:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (248, 98, 1, 14, 4, '2026-04-27 11:00:00', '2026-05-01 06:00:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (249, 112, 1, 4, 4, '2026-04-16 16:10:00', '2026-04-16 21:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (250, 32, 1, 1, 1, '2025-12-19 12:10:00', '2025-12-21 19:10:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (251, 102, 1, 12, 2, '2025-12-23 07:20:00', '2025-12-23 09:20:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (252, 91, 1, 13, 3, '2025-11-20 16:10:00', '2025-11-21 00:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (253, 52, 1, 3, 3, '2026-04-15 18:45:00', '2026-04-19 03:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (254, 64, 1, 3, 3, '2026-01-09 11:00:00', '2026-01-09 19:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (255, 96, 3, 9, 9, '2025-12-14 17:45:00', '2025-12-14 18:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (256, 83, 2, 5, 5, '2026-02-02 15:30:00', '2026-02-02 20:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (257, 37, 2, 7, 7, '2025-11-22 19:20:00', '2025-11-23 01:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (258, 102, 1, 12, 2, '2026-04-27 18:45:00', '2026-04-27 21:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (259, 85, 3, 9, 9, '2026-02-03 12:15:00', '2026-02-03 17:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (260, 120, 1, 14, 4, '2026-04-23 09:30:00', '2026-04-26 20:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (261, 7, 3, 18, 8, '2025-11-29 15:15:00', '2025-12-01 11:15:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (262, 9, 3, 8, 8, '2026-03-08 13:30:00', '2026-03-10 15:30:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (263, 79, 1, 3, 3, '2025-11-14 08:15:00', '2025-11-14 11:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (264, 30, 3, 18, 8, '2026-01-31 14:00:00', '2026-02-03 07:00:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (265, 87, 3, 18, 8, '2026-01-27 13:10:00', '2026-01-30 21:10:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (266, 6, 2, 16, 6, '2026-02-13 14:15:00', '2026-02-16 07:15:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (267, 48, 1, 12, 2, '2026-04-05 16:45:00', '2026-04-09 12:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (268, 32, 1, 12, 2, '2026-05-01 17:45:00', '2026-05-02 00:45:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (269, 101, 1, 13, 3, '2026-03-08 16:20:00', '2026-03-08 20:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (270, 103, 3, 9, 9, '2025-11-02 17:30:00', '2025-11-02 21:30:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (271, 55, 3, 18, 8, '2025-12-06 07:10:00', '2025-12-10 03:10:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (272, 82, 3, 9, 9, '2025-12-27 14:10:00', '2025-12-27 20:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (273, 56, 3, 18, 8, '2025-11-02 08:45:00', '2025-11-02 09:45:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (274, 17, 2, 17, 7, '2025-12-26 16:20:00', '2025-12-28 23:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (275, 7, 3, 9, 9, '2026-02-24 14:30:00', '2026-02-24 21:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (276, 43, 3, 10, 10, '2026-05-02 10:20:00', '2026-05-02 11:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (277, 22, 1, 2, 2, '2026-04-02 11:30:00', '2026-04-02 16:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (278, 67, 3, 8, 8, '2025-11-07 13:20:00', '2025-11-09 21:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (279, 75, 1, 4, 4, '2026-05-09 13:00:00', '2026-05-09 14:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (280, 48, 3, 18, 8, '2026-05-20 11:15:00', '2026-05-23 13:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (281, 40, 1, 2, 2, '2026-05-08 17:10:00', '2026-05-08 20:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (282, 18, 2, 17, 7, '2025-11-22 14:10:00', '2025-11-22 19:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (283, 65, 2, 6, 6, '2025-11-02 16:00:00', '2025-11-03 00:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (284, 30, 2, 6, 6, '2026-03-15 18:30:00', '2026-03-17 19:30:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (285, 86, 1, 14, 4, '2026-03-15 19:20:00', '2026-03-18 21:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (286, 54, 3, 9, 9, '2026-04-04 07:30:00', '2026-04-04 15:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (287, 45, 1, 13, 3, '2025-11-10 18:10:00', '2025-11-11 00:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (288, 94, 2, 5, 5, '2026-05-14 12:30:00', '2026-05-14 15:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (289, 97, 2, 17, 7, '2026-01-21 19:20:00', '2026-01-23 11:20:00', 'inpatient', 'observation', 'Synthetic inpatient encounter for ACO reporting.'),
  (290, 13, 3, 8, 8, '2026-05-26 08:20:00', '2026-05-26 14:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (291, 12, 1, 2, 2, '2026-01-26 09:00:00', '2026-01-26 13:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (292, 64, 3, 9, 9, '2026-02-02 08:00:00', '2026-02-02 12:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (293, 87, 3, 8, 8, '2025-12-26 13:30:00', '2025-12-26 17:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (294, 117, 2, 7, 7, '2026-04-09 15:10:00', '2026-04-09 16:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (295, 109, 1, 2, 2, '2026-03-13 11:10:00', '2026-03-16 19:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (296, 25, 2, 17, 7, '2025-12-26 10:20:00', '2025-12-26 18:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (297, 7, 2, 17, 7, '2026-01-06 08:45:00', '2026-01-08 23:45:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (298, 17, 3, 9, 9, '2026-04-11 09:20:00', '2026-04-11 14:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (299, 55, 1, 11, 1, '2026-01-26 07:15:00', '2026-01-26 15:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (300, 40, 2, 7, 7, '2026-04-16 14:20:00', '2026-04-16 22:20:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (301, 85, 2, 7, 7, '2025-12-06 18:15:00', '2025-12-06 23:15:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (302, 85, 1, 3, 3, '2025-12-29 14:00:00', '2025-12-30 23:00:00', 'inpatient', 'discharged', 'Synthetic inpatient encounter for ACO reporting.'),
  (303, 68, 1, 12, 2, '2026-04-29 17:15:00', '2026-04-29 22:15:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (304, 41, 3, 8, 8, '2026-01-22 19:10:00', '2026-01-25 19:10:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (305, 62, 1, 13, 3, '2026-04-15 12:30:00', '2026-04-15 16:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (306, 61, 1, 3, 3, '2026-02-11 11:00:00', '2026-02-11 12:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (307, 31, 2, 7, 7, '2026-05-23 15:10:00', '2026-05-23 20:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (308, 58, 3, 18, 8, '2026-04-19 13:15:00', '2026-04-21 07:15:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (309, 110, 1, 4, 4, '2025-12-19 10:30:00', '2025-12-22 12:30:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (310, 46, 3, 9, 9, '2025-11-04 17:10:00', '2025-11-05 00:10:00', 'emergency', 'discharged', 'Synthetic emergency encounter for ACO reporting.'),
  (311, 116, 3, 9, 9, '2025-12-11 07:20:00', '2025-12-14 06:20:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.'),
  (312, 43, 3, 18, 8, '2026-04-28 07:30:00', '2026-04-28 14:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (313, 90, 1, 2, 2, '2026-02-19 18:00:00', '2026-02-19 19:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (314, 14, 1, 14, 4, '2025-12-27 07:10:00', '2025-12-30 00:10:00', 'inpatient', 'transferred', 'Synthetic inpatient encounter for ACO reporting.'),
  (315, 43, 2, 17, 7, '2026-04-10 18:10:00', '2026-04-11 01:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (316, 100, 3, 9, 9, '2026-03-16 09:00:00', '2026-03-16 11:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (317, 37, 1, 2, 2, '2025-12-02 14:10:00', '2025-12-02 17:10:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (318, 39, 1, 3, 3, '2026-02-28 09:00:00', '2026-02-28 11:00:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (319, 119, 2, 17, 7, '2026-03-25 12:30:00', '2026-03-25 13:30:00', 'outpatient', 'discharged', 'Synthetic outpatient encounter for ACO reporting.'),
  (320, 116, 2, 6, 6, '2025-11-15 10:15:00', '2025-11-18 03:15:00', 'telehealth', 'discharged', 'Synthetic telehealth encounter for ACO reporting.');


INSERT INTO visit_diagnosis
  (visit_id, icd10_code, diagnosing_doctor_id, diagnosis_rank, diagnosed_at)
VALUES
  (1, 'Z00.00', 17, 1, '2026-04-04 15:05:00'),
  (1, 'E11.9', 17, 2, '2026-04-04 15:20:00'),
  (2, 'Z23', 9, 1, '2026-03-22 10:35:00'),
  (3, 'J44.9', 8, 1, '2025-11-21 09:55:00'),
  (4, 'S62.609A', 14, 1, '2026-01-05 08:20:00'),
  (5, 'S62.609A', 8, 1, '2026-04-18 11:05:00'),
  (6, 'J44.9', 10, 1, '2026-01-10 16:45:00'),
  (7, 'J44.9', 18, 1, '2026-05-26 19:20:00'),
  (8, 'G89.29', 13, 1, '2026-01-14 11:20:00'),
  (9, 'G89.29', 16, 1, '2026-02-28 16:35:00'),
  (9, 'F32.9', 16, 2, '2026-02-28 16:50:00'),
  (10, 'S01.81XA', 6, 1, '2025-11-22 07:35:00'),
  (11, 'I50.9', 13, 1, '2026-01-30 07:50:00'),
  (12, 'I10', 9, 1, '2025-12-20 14:55:00'),
  (12, 'C50.919', 9, 2, '2025-12-20 15:10:00'),
  (13, 'M25.561', 16, 1, '2026-05-07 11:05:00'),
  (14, 'E11.9', 9, 1, '2026-02-03 10:55:00'),
  (15, 'M25.561', 4, 1, '2026-04-27 14:35:00'),
  (16, 'Z12.11', 12, 1, '2026-05-11 16:45:00'),
  (16, 'I21.9', 12, 2, '2026-05-11 17:00:00'),
  (17, 'F32.9', 10, 1, '2025-12-19 18:35:00'),
  (18, 'J44.9', 17, 1, '2026-02-15 13:35:00'),
  (19, 'I21.9', 13, 1, '2025-12-15 08:50:00'),
  (20, 'I50.9', 3, 1, '2026-02-03 19:35:00'),
  (20, 'N18.31', 3, 2, '2026-02-03 19:50:00'),
  (21, 'Z00.00', 7, 1, '2026-03-27 10:20:00'),
  (22, 'C50.919', 8, 1, '2026-01-16 08:50:00'),
  (23, 'E11.9', 2, 1, '2025-12-20 19:55:00'),
  (24, 'E78.5', 9, 1, '2026-01-11 12:35:00'),
  (25, 'I10', 17, 1, '2026-05-09 17:35:00'),
  (26, 'Z12.11', 17, 1, '2026-02-20 13:20:00'),
  (26, 'I10', 17, 2, '2026-02-20 13:35:00'),
  (27, 'Z00.00', 2, 1, '2025-12-11 15:50:00'),
  (27, 'Z12.11', 2, 2, '2025-12-11 16:05:00'),
  (28, 'J44.9', 8, 1, '2026-02-22 07:55:00'),
  (29, 'F32.9', 11, 1, '2026-04-02 09:35:00'),
  (29, 'I50.9', 11, 2, '2026-04-02 09:50:00'),
  (30, 'E78.5', 12, 1, '2026-04-26 08:50:00'),
  (31, 'Z00.00', 9, 1, '2025-11-02 15:20:00'),
  (32, 'G89.29', 5, 1, '2025-12-10 16:50:00'),
  (33, 'S62.609A', 10, 1, '2026-02-21 12:35:00'),
  (34, 'I21.9', 3, 1, '2026-04-12 18:05:00'),
  (35, 'M25.561', 11, 1, '2026-05-02 19:05:00'),
  (36, 'G89.29', 15, 1, '2026-03-20 11:55:00'),
  (37, 'Z23', 11, 1, '2025-11-07 13:35:00'),
  (38, 'N18.31', 11, 1, '2026-02-27 12:50:00'),
  (39, 'Z00.00', 9, 1, '2025-11-02 13:35:00'),
  (40, 'Z23', 18, 1, '2025-11-26 08:05:00'),
  (41, 'I50.9', 3, 1, '2025-12-19 08:05:00'),
  (42, 'N18.31', 17, 1, '2025-11-10 18:45:00'),
  (43, 'I21.9', 3, 1, '2026-01-17 16:05:00'),
  (44, 'C50.919', 8, 1, '2026-05-04 07:35:00'),
  (44, 'Z00.00', 8, 2, '2026-05-04 07:50:00'),
  (45, 'F32.9', 10, 1, '2026-01-24 12:45:00'),
  (46, 'E78.5', 9, 1, '2025-12-12 07:45:00'),
  (46, 'I10', 9, 2, '2025-12-12 08:00:00'),
  (47, 'Z23', 1, 1, '2025-12-01 16:05:00'),
  (48, 'I50.9', 3, 1, '2026-04-23 11:55:00'),
  (49, 'I10', 12, 1, '2025-11-03 09:55:00'),
  (50, 'Z00.00', 9, 1, '2025-12-01 19:35:00'),
  (51, 'I21.9', 3, 1, '2025-11-10 10:50:00'),
  (52, 'F32.9', 14, 1, '2026-04-08 07:55:00'),
  (53, 'F32.9', 2, 1, '2026-04-06 13:45:00'),
  (54, 'Z23', 5, 1, '2026-03-21 08:45:00'),
  (54, 'E11.9', 5, 2, '2026-03-21 09:00:00'),
  (55, 'I21.9', 3, 1, '2026-04-02 14:50:00'),
  (55, 'I10', 3, 2, '2026-04-02 15:05:00'),
  (56, 'I50.9', 13, 1, '2026-01-28 09:45:00'),
  (56, 'E78.5', 13, 2, '2026-01-28 10:00:00'),
  (57, 'C50.919', 8, 1, '2025-12-20 14:55:00'),
  (58, 'S01.81XA', 8, 1, '2026-05-31 20:20:00'),
  (58, 'J44.9', 8, 2, '2026-05-31 20:35:00'),
  (59, 'I50.9', 3, 1, '2026-03-13 07:50:00'),
  (60, 'J44.9', 18, 1, '2025-12-30 07:45:00'),
  (61, 'G89.29', 8, 1, '2025-11-03 11:35:00'),
  (62, 'I50.9', 13, 1, '2026-01-14 11:35:00'),
  (62, 'E78.5', 13, 2, '2026-01-14 11:50:00'),
  (63, 'S01.81XA', 7, 1, '2026-01-10 08:05:00'),
  (64, 'Z12.11', 9, 1, '2026-05-01 10:35:00'),
  (65, 'I10', 9, 1, '2026-05-20 12:20:00'),
  (66, 'G89.29', 5, 1, '2026-02-26 10:05:00'),
  (67, 'J44.9', 11, 1, '2026-01-05 18:45:00'),
  (68, 'Z23', 7, 1, '2025-11-15 15:20:00'),
  (69, 'Z00.00', 7, 1, '2025-12-30 16:50:00'),
  (70, 'I10', 12, 1, '2026-05-24 08:35:00'),
  (71, 'N18.31', 17, 1, '2025-11-10 14:45:00'),
  (72, 'I50.9', 13, 1, '2026-05-08 13:50:00'),
  (72, 'N18.31', 13, 2, '2026-05-08 14:05:00'),
  (73, 'S01.81XA', 6, 1, '2026-02-02 14:45:00'),
  (74, 'E11.9', 7, 1, '2026-02-22 13:05:00'),
  (74, 'M25.561', 7, 2, '2026-02-22 13:20:00'),
  (75, 'E11.9', 17, 1, '2026-03-08 16:35:00'),
  (75, 'I50.9', 17, 2, '2026-03-08 16:50:00'),
  (76, 'I10', 9, 1, '2025-11-10 09:20:00'),
  (76, 'J44.9', 9, 2, '2025-11-10 09:35:00'),
  (77, 'I21.9', 3, 1, '2025-11-11 13:05:00'),
  (78, 'F32.9', 9, 1, '2026-03-09 17:20:00'),
  (79, 'Z12.11', 12, 1, '2026-02-21 09:35:00'),
  (80, 'S62.609A', 9, 1, '2026-03-21 11:55:00'),
  (81, 'C50.919', 8, 1, '2026-03-07 20:20:00'),
  (82, 'J44.9', 15, 1, '2025-12-21 09:45:00'),
  (82, 'E11.9', 15, 2, '2025-12-21 10:00:00'),
  (83, 'I50.9', 13, 1, '2025-12-30 08:05:00'),
  (84, 'F32.9', 4, 1, '2026-04-21 10:05:00'),
  (84, 'C50.919', 4, 2, '2026-04-21 10:20:00'),
  (85, 'S01.81XA', 11, 1, '2025-12-26 18:05:00'),
  (86, 'S62.609A', 14, 1, '2026-01-16 18:55:00'),
  (87, 'E78.5', 7, 1, '2026-02-28 18:50:00'),
  (88, 'I10', 2, 1, '2026-04-16 17:50:00'),
  (89, 'N18.31', 4, 1, '2026-03-23 12:55:00'),
  (89, 'S01.81XA', 4, 2, '2026-03-23 13:10:00'),
  (90, 'J44.9', 13, 1, '2025-11-10 14:50:00'),
  (91, 'I21.9', 13, 1, '2025-11-07 07:45:00'),
  (92, 'F32.9', 15, 1, '2025-12-18 14:45:00'),
  (93, 'J44.9', 5, 1, '2025-11-15 18:05:00'),
  (94, 'I21.9', 13, 1, '2026-02-24 13:45:00'),
  (95, 'I50.9', 13, 1, '2026-03-14 12:50:00'),
  (96, 'N18.31', 9, 1, '2025-11-05 16:20:00'),
  (97, 'I10', 12, 1, '2026-02-01 17:50:00'),
  (97, 'Z23', 12, 2, '2026-02-01 18:05:00'),
  (98, 'G89.29', 10, 1, '2026-03-19 07:45:00'),
  (99, 'G89.29', 10, 1, '2025-11-19 18:35:00'),
  (100, 'E11.9', 9, 1, '2026-04-06 09:35:00'),
  (101, 'E78.5', 9, 1, '2026-04-09 12:35:00'),
  (102, 'I10', 9, 1, '2025-11-18 07:50:00'),
  (103, 'Z00.00', 9, 1, '2026-01-02 10:50:00'),
  (104, 'Z00.00', 9, 1, '2026-02-05 11:55:00'),
  (104, 'C50.919', 9, 2, '2026-02-05 12:10:00'),
  (105, 'N18.31', 2, 1, '2026-03-08 15:45:00'),
  (106, 'I10', 2, 1, '2026-04-26 17:55:00'),
  (107, 'I50.9', 13, 1, '2026-04-19 12:35:00'),
  (107, 'M25.561', 13, 2, '2026-04-19 12:50:00'),
  (108, 'S62.609A', 5, 1, '2026-05-08 10:20:00'),
  (109, 'S01.81XA', 10, 1, '2026-02-15 13:05:00'),
  (109, 'I21.9', 10, 2, '2026-02-15 13:20:00'),
  (110, 'E11.9', 12, 1, '2025-12-29 12:05:00'),
  (111, 'I21.9', 13, 1, '2026-04-05 17:45:00'),
  (111, 'I50.9', 13, 2, '2026-04-05 18:00:00'),
  (112, 'Z00.00', 7, 1, '2026-02-01 11:55:00'),
  (112, 'I10', 7, 2, '2026-02-01 12:10:00'),
  (113, 'C50.919', 18, 1, '2026-01-05 16:55:00'),
  (114, 'E78.5', 2, 1, '2026-01-15 13:20:00'),
  (114, 'E11.9', 2, 2, '2026-01-15 13:35:00'),
  (115, 'J44.9', 12, 1, '2026-05-26 14:55:00'),
  (116, 'Z12.11', 2, 1, '2026-02-02 08:35:00'),
  (116, 'Z23', 2, 2, '2026-02-02 08:50:00'),
  (117, 'I50.9', 13, 1, '2026-04-25 08:50:00'),
  (118, 'I21.9', 3, 1, '2025-12-20 13:55:00'),
  (119, 'S01.81XA', 17, 1, '2025-12-16 07:45:00'),
  (120, 'G89.29', 7, 1, '2026-02-10 10:55:00'),
  (120, 'E11.9', 7, 2, '2026-02-10 11:10:00'),
  (121, 'Z00.00', 12, 1, '2026-03-10 10:50:00'),
  (122, 'J44.9', 2, 1, '2026-04-27 17:55:00'),
  (122, 'Z12.11', 2, 2, '2026-04-27 18:10:00'),
  (123, 'Z00.00', 9, 1, '2026-03-16 18:50:00'),
  (123, 'E78.5', 9, 2, '2026-03-16 19:05:00'),
  (124, 'I10', 17, 1, '2026-01-09 18:55:00'),
  (124, 'C50.919', 17, 2, '2026-01-09 19:10:00'),
  (125, 'N18.31', 4, 1, '2025-11-09 08:20:00'),
  (126, 'C50.919', 18, 1, '2025-11-15 11:45:00'),
  (126, 'I10', 18, 2, '2025-11-15 12:00:00'),
  (127, 'I21.9', 13, 1, '2026-03-28 15:05:00'),
  (128, 'F32.9', 12, 1, '2026-02-03 14:35:00'),
  (129, 'C50.919', 18, 1, '2026-05-14 11:55:00'),
  (130, 'C50.919', 8, 1, '2025-12-08 14:55:00'),
  (131, 'S01.81XA', 9, 1, '2026-01-01 17:20:00'),
  (132, 'E11.9', 17, 1, '2025-11-27 16:05:00'),
  (132, 'G89.29', 17, 2, '2025-11-27 16:20:00'),
  (133, 'I50.9', 3, 1, '2026-04-17 14:05:00'),
  (133, 'E78.5', 3, 2, '2026-04-17 14:20:00'),
  (134, 'Z00.00', 7, 1, '2026-05-12 10:05:00'),
  (134, 'G89.29', 7, 2, '2026-05-12 10:20:00'),
  (135, 'S01.81XA', 2, 1, '2026-05-17 14:20:00'),
  (136, 'S01.81XA', 14, 1, '2026-05-12 11:20:00'),
  (137, 'N18.31', 14, 1, '2025-11-16 15:55:00'),
  (137, 'I10', 14, 2, '2025-11-16 16:10:00'),
  (138, 'I50.9', 3, 1, '2025-12-05 15:35:00'),
  (139, 'I50.9', 3, 1, '2026-04-04 20:20:00'),
  (140, 'I10', 9, 1, '2026-03-03 18:45:00'),
  (141, 'I50.9', 3, 1, '2026-05-04 12:45:00'),
  (142, 'E78.5', 2, 1, '2026-01-04 20:20:00'),
  (143, 'I50.9', 13, 1, '2026-01-16 16:05:00'),
  (144, 'N18.31', 11, 1, '2026-03-15 18:20:00'),
  (145, 'I21.9', 13, 1, '2026-03-21 19:50:00'),
  (146, 'G89.29', 9, 1, '2025-12-21 15:55:00'),
  (146, 'Z23', 9, 2, '2025-12-21 16:10:00'),
  (147, 'N18.31', 16, 1, '2026-01-01 20:20:00'),
  (148, 'I10', 9, 1, '2026-02-04 08:35:00'),
  (149, 'I10', 17, 1, '2026-03-21 17:05:00'),
  (150, 'Z12.11', 12, 1, '2025-11-14 18:20:00'),
  (151, 'F32.9', 15, 1, '2026-05-12 09:50:00'),
  (152, 'J44.9', 3, 1, '2026-03-17 18:45:00'),
  (152, 'E78.5', 3, 2, '2026-03-17 19:00:00'),
  (153, 'Z12.11', 2, 1, '2026-03-21 07:50:00'),
  (154, 'S62.609A', 10, 1, '2026-05-31 16:05:00'),
  (154, 'E78.5', 10, 2, '2026-05-31 16:20:00'),
  (155, 'I21.9', 3, 1, '2026-01-08 18:05:00'),
  (156, 'I50.9', 3, 1, '2026-02-10 19:35:00'),
  (157, 'N18.31', 3, 1, '2026-04-10 18:55:00'),
  (158, 'M25.561', 3, 1, '2025-11-02 19:05:00'),
  (159, 'S01.81XA', 13, 1, '2026-02-21 10:55:00'),
  (160, 'F32.9', 8, 1, '2025-12-03 16:55:00'),
  (161, 'N18.31', 18, 1, '2026-05-17 08:05:00'),
  (162, 'Z00.00', 17, 1, '2026-03-26 15:20:00'),
  (162, 'S62.609A', 17, 2, '2026-03-26 15:35:00'),
  (163, 'I10', 17, 1, '2026-04-17 12:05:00'),
  (164, 'C50.919', 18, 1, '2026-04-21 07:45:00'),
  (165, 'Z12.11', 9, 1, '2026-05-02 11:50:00'),
  (165, 'E11.9', 9, 2, '2026-05-02 12:05:00'),
  (166, 'E78.5', 12, 1, '2026-05-07 09:20:00'),
  (167, 'I21.9', 3, 1, '2026-05-03 15:20:00'),
  (168, 'N18.31', 5, 1, '2026-05-11 11:45:00'),
  (169, 'J44.9', 17, 1, '2026-05-11 11:55:00'),
  (170, 'C50.919', 8, 1, '2026-03-02 15:45:00'),
  (171, 'S62.609A', 6, 1, '2026-02-06 08:50:00'),
  (172, 'I21.9', 3, 1, '2026-05-27 12:45:00'),
  (173, 'I50.9', 13, 1, '2026-03-22 13:45:00'),
  (173, 'E78.5', 13, 2, '2026-03-22 14:00:00'),
  (174, 'G89.29', 3, 1, '2026-02-19 17:50:00'),
  (175, 'E78.5', 2, 1, '2026-02-06 10:35:00'),
  (176, 'J44.9', 2, 1, '2025-11-18 12:35:00'),
  (177, 'Z23', 16, 1, '2026-05-09 10:05:00'),
  (178, 'S62.609A', 5, 1, '2026-04-13 16:50:00'),
  (179, 'I50.9', 3, 1, '2026-01-12 08:20:00'),
  (179, 'E78.5', 3, 2, '2026-01-12 08:35:00'),
  (180, 'I21.9', 13, 1, '2025-12-28 19:50:00'),
  (181, 'Z12.11', 17, 1, '2026-04-11 08:05:00'),
  (182, 'M25.561', 18, 1, '2026-01-13 14:55:00'),
  (183, 'E78.5', 7, 1, '2025-11-05 11:50:00'),
  (184, 'E78.5', 2, 1, '2025-11-24 17:20:00'),
  (185, 'Z23', 11, 1, '2026-04-14 19:45:00'),
  (186, 'N18.31', 7, 1, '2026-02-01 18:45:00'),
  (187, 'J44.9', 6, 1, '2026-05-30 14:05:00'),
  (187, 'G89.29', 6, 2, '2026-05-30 14:20:00'),
  (188, 'G89.29', 16, 1, '2025-12-18 14:05:00'),
  (188, 'I21.9', 16, 2, '2025-12-18 14:20:00'),
  (189, 'N18.31', 6, 1, '2026-04-01 10:45:00'),
  (190, 'M25.561', 12, 1, '2026-02-05 10:20:00'),
  (190, 'C50.919', 12, 2, '2026-02-05 10:35:00'),
  (191, 'E78.5', 7, 1, '2025-11-10 12:45:00'),
  (192, 'M25.561', 2, 1, '2026-03-02 18:05:00'),
  (193, 'I50.9', 3, 1, '2025-11-27 18:55:00'),
  (194, 'I21.9', 3, 1, '2026-01-01 11:50:00'),
  (195, 'E11.9', 9, 1, '2026-01-23 10:45:00'),
  (196, 'S62.609A', 10, 1, '2026-02-03 14:55:00'),
  (197, 'E11.9', 12, 1, '2026-01-30 15:50:00'),
  (198, 'E11.9', 7, 1, '2026-01-23 13:35:00'),
  (199, 'C50.919', 18, 1, '2025-11-25 15:45:00'),
  (200, 'I50.9', 13, 1, '2025-11-14 11:45:00'),
  (201, 'C50.919', 18, 1, '2026-03-30 16:55:00'),
  (202, 'C50.919', 8, 1, '2026-03-23 12:20:00'),
  (203, 'E78.5', 7, 1, '2026-02-18 08:20:00'),
  (204, 'M25.561', 1, 1, '2026-05-27 10:45:00'),
  (204, 'Z23', 1, 2, '2026-05-27 11:00:00'),
  (205, 'C50.919', 8, 1, '2025-11-15 08:50:00'),
  (206, 'I10', 17, 1, '2026-02-14 15:45:00'),
  (206, 'F32.9', 17, 2, '2026-02-14 16:00:00'),
  (207, 'E78.5', 7, 1, '2025-11-21 09:45:00'),
  (207, 'M25.561', 7, 2, '2025-11-21 10:00:00'),
  (208, 'Z23', 13, 1, '2026-04-18 13:50:00'),
  (209, 'S01.81XA', 10, 1, '2026-05-01 16:45:00'),
  (210, 'M25.561', 3, 1, '2025-11-27 19:50:00'),
  (211, 'I50.9', 3, 1, '2026-03-30 10:45:00'),
  (212, 'G89.29', 13, 1, '2025-11-21 15:35:00'),
  (212, 'E11.9', 13, 2, '2025-11-21 15:50:00'),
  (213, 'G89.29', 11, 1, '2026-01-05 13:55:00'),
  (214, 'I21.9', 13, 1, '2026-01-23 11:05:00'),
  (215, 'I50.9', 3, 1, '2026-04-29 13:50:00'),
  (216, 'F32.9', 10, 1, '2026-01-20 12:35:00'),
  (217, 'G89.29', 13, 1, '2026-01-01 19:05:00'),
  (217, 'Z00.00', 13, 2, '2026-01-01 19:20:00'),
  (218, 'I50.9', 3, 1, '2025-12-29 15:35:00'),
  (219, 'I50.9', 3, 1, '2026-04-28 12:50:00'),
  (219, 'I21.9', 3, 2, '2026-04-28 13:05:00'),
  (220, 'I10', 9, 1, '2026-02-16 16:35:00'),
  (221, 'G89.29', 18, 1, '2026-02-13 10:45:00'),
  (222, 'J44.9', 2, 1, '2026-04-11 15:45:00'),
  (223, 'I21.9', 13, 1, '2026-02-07 15:20:00'),
  (224, 'E78.5', 17, 1, '2025-11-05 12:50:00'),
  (224, 'Z12.11', 17, 2, '2025-11-05 13:05:00'),
  (225, 'C50.919', 8, 1, '2026-05-11 19:20:00'),
  (226, 'I50.9', 3, 1, '2026-04-02 13:20:00'),
  (226, 'Z00.00', 3, 2, '2026-04-02 13:35:00'),
  (227, 'E11.9', 12, 1, '2026-02-07 11:45:00'),
  (228, 'C50.919', 8, 1, '2026-04-07 20:05:00'),
  (229, 'I50.9', 3, 1, '2026-03-24 11:35:00'),
  (230, 'S01.81XA', 14, 1, '2025-12-25 19:35:00'),
  (230, 'Z12.11', 14, 2, '2025-12-25 19:50:00'),
  (231, 'N18.31', 9, 1, '2025-12-12 16:45:00'),
  (232, 'G89.29', 15, 1, '2026-05-15 11:55:00'),
  (233, 'E78.5', 7, 1, '2026-02-28 12:55:00'),
  (234, 'J44.9', 1, 1, '2026-04-04 08:45:00'),
  (235, 'C50.919', 8, 1, '2025-12-30 15:45:00'),
  (236, 'I10', 9, 1, '2025-11-14 08:20:00'),
  (237, 'E78.5', 9, 1, '2026-03-21 11:05:00'),
  (238, 'Z12.11', 2, 1, '2025-12-31 15:05:00'),
  (238, 'G89.29', 2, 2, '2025-12-31 15:20:00'),
  (239, 'G89.29', 18, 1, '2025-12-12 13:50:00'),
  (240, 'G89.29', 9, 1, '2026-04-16 13:20:00'),
  (241, 'E11.9', 12, 1, '2025-12-26 11:05:00'),
  (242, 'Z00.00', 9, 1, '2026-01-29 17:20:00'),
  (243, 'S62.609A', 18, 1, '2026-04-18 09:20:00'),
  (244, 'S62.609A', 17, 1, '2026-05-16 10:55:00'),
  (245, 'I10', 9, 1, '2026-03-19 08:45:00'),
  (246, 'N18.31', 17, 1, '2026-04-14 14:55:00'),
  (246, 'Z23', 17, 2, '2026-04-14 15:10:00'),
  (247, 'S62.609A', 1, 1, '2026-02-22 16:55:00'),
  (247, 'C50.919', 1, 2, '2026-02-22 17:10:00'),
  (248, 'M25.561', 14, 1, '2026-04-27 11:35:00'),
  (248, 'E11.9', 14, 2, '2026-04-27 11:50:00'),
  (249, 'M25.561', 4, 1, '2026-04-16 16:45:00'),
  (250, 'N18.31', 1, 1, '2025-12-19 12:45:00'),
  (250, 'I10', 1, 2, '2025-12-19 13:00:00'),
  (251, 'Z12.11', 12, 1, '2025-12-23 07:55:00'),
  (252, 'I50.9', 13, 1, '2025-11-20 16:45:00'),
  (253, 'I21.9', 3, 1, '2026-04-15 19:20:00'),
  (254, 'I50.9', 3, 1, '2026-01-09 11:35:00'),
  (254, 'E78.5', 3, 2, '2026-01-09 11:50:00'),
  (255, 'Z12.11', 9, 1, '2025-12-14 18:20:00'),
  (256, 'G89.29', 5, 1, '2026-02-02 16:05:00'),
  (257, 'S01.81XA', 7, 1, '2025-11-22 19:55:00'),
  (258, 'Z00.00', 12, 1, '2026-04-27 19:20:00'),
  (259, 'S01.81XA', 9, 1, '2026-02-03 12:50:00'),
  (260, 'Z23', 14, 1, '2026-04-23 10:05:00'),
  (261, 'C50.919', 18, 1, '2025-11-29 15:50:00'),
  (262, 'C50.919', 8, 1, '2026-03-08 14:05:00'),
  (263, 'I21.9', 3, 1, '2025-11-14 08:50:00'),
  (264, 'S62.609A', 18, 1, '2026-01-31 14:35:00'),
  (264, 'E78.5', 18, 2, '2026-01-31 14:50:00'),
  (265, 'N18.31', 18, 1, '2026-01-27 13:45:00'),
  (266, 'N18.31', 16, 1, '2026-02-13 14:50:00'),
  (266, 'G89.29', 16, 2, '2026-02-13 15:05:00'),
  (267, 'S01.81XA', 12, 1, '2026-04-05 17:20:00'),
  (268, 'M25.561', 12, 1, '2026-05-01 18:20:00'),
  (269, 'I21.9', 13, 1, '2026-03-08 16:55:00'),
  (269, 'I50.9', 13, 2, '2026-03-08 17:10:00'),
  (270, 'E11.9', 9, 1, '2025-11-02 18:05:00'),
  (271, 'C50.919', 18, 1, '2025-12-06 07:45:00'),
  (272, 'G89.29', 9, 1, '2025-12-27 14:45:00'),
  (273, 'M25.561', 18, 1, '2025-11-02 09:20:00'),
  (274, 'F32.9', 17, 1, '2025-12-26 16:55:00'),
  (275, 'E78.5', 9, 1, '2026-02-24 15:05:00'),
  (275, 'Z12.11', 9, 2, '2026-02-24 15:20:00'),
  (276, 'S62.609A', 10, 1, '2026-05-02 10:55:00'),
  (277, 'Z00.00', 2, 1, '2026-04-02 12:05:00'),
  (278, 'J44.9', 8, 1, '2025-11-07 13:55:00'),
  (278, 'E78.5', 8, 2, '2025-11-07 14:10:00'),
  (279, 'N18.31', 4, 1, '2026-05-09 13:35:00'),
  (280, 'C50.919', 18, 1, '2026-05-20 11:50:00'),
  (280, 'Z12.11', 18, 2, '2026-05-20 12:05:00'),
  (281, 'E11.9', 2, 1, '2026-05-08 17:45:00'),
  (282, 'I10', 17, 1, '2025-11-22 14:45:00'),
  (283, 'F32.9', 6, 1, '2025-11-02 16:35:00'),
  (284, 'N18.31', 6, 1, '2026-03-15 19:05:00'),
  (285, 'G89.29', 14, 1, '2026-03-15 19:55:00'),
  (286, 'I10', 9, 1, '2026-04-04 08:05:00'),
  (287, 'I21.9', 13, 1, '2025-11-10 18:45:00'),
  (288, 'J44.9', 5, 1, '2026-05-14 13:05:00'),
  (289, 'Z12.11', 17, 1, '2026-01-21 19:55:00'),
  (290, 'C50.919', 8, 1, '2026-05-26 08:55:00'),
  (291, 'I10', 2, 1, '2026-01-26 09:35:00'),
  (292, 'I10', 9, 1, '2026-02-02 08:35:00'),
  (293, 'C50.919', 8, 1, '2025-12-26 14:05:00'),
  (294, 'F32.9', 7, 1, '2026-04-09 15:45:00'),
  (295, 'E11.9', 2, 1, '2026-03-13 11:45:00'),
  (296, 'N18.31', 17, 1, '2025-12-26 10:55:00'),
  (297, 'E78.5', 17, 1, '2026-01-06 09:20:00'),
  (298, 'Z12.11', 9, 1, '2026-04-11 09:55:00'),
  (299, 'N18.31', 11, 1, '2026-01-26 07:50:00'),
  (300, 'G89.29', 7, 1, '2026-04-16 14:55:00'),
  (301, 'Z12.11', 7, 1, '2025-12-06 18:50:00'),
  (302, 'I21.9', 3, 1, '2025-12-29 14:35:00'),
  (303, 'Z12.11', 12, 1, '2026-04-29 17:50:00'),
  (304, 'C50.919', 8, 1, '2026-01-22 19:45:00'),
  (305, 'S62.609A', 13, 1, '2026-04-15 13:05:00'),
  (306, 'I21.9', 3, 1, '2026-02-11 11:35:00'),
  (307, 'Z12.11', 7, 1, '2026-05-23 15:45:00'),
  (307, 'J44.9', 7, 2, '2026-05-23 16:00:00'),
  (308, 'J44.9', 18, 1, '2026-04-19 13:50:00'),
  (309, 'M25.561', 4, 1, '2025-12-19 11:05:00'),
  (309, 'Z23', 4, 2, '2025-12-19 11:20:00'),
  (310, 'S62.609A', 9, 1, '2025-11-04 17:45:00'),
  (310, 'F32.9', 9, 2, '2025-11-04 18:00:00'),
  (311, 'Z12.11', 9, 1, '2025-12-11 07:55:00'),
  (312, 'C50.919', 18, 1, '2026-04-28 08:05:00'),
  (313, 'G89.29', 2, 1, '2026-02-19 18:35:00'),
  (314, 'S01.81XA', 14, 1, '2025-12-27 07:45:00'),
  (315, 'E11.9', 17, 1, '2026-04-10 18:45:00'),
  (316, 'E78.5', 9, 1, '2026-03-16 09:35:00'),
  (317, 'E78.5', 2, 1, '2025-12-02 14:45:00'),
  (318, 'I50.9', 3, 1, '2026-02-28 09:35:00'),
  (319, 'I10', 17, 1, '2026-03-25 13:05:00'),
  (320, 'S62.609A', 6, 1, '2025-11-15 10:50:00');


INSERT INTO visit_procedure
  (visit_procedure_id, visit_id, procedure_id, performing_doctor_id, department_id, performed_at, actual_cost, outcome_notes)
VALUES
  (1, 1, 1, 17, 7, '2026-04-04 15:40:00', 171.37, 'Synthetic procedure record for reporting.'),
  (2, 2, 1, 9, 9, '2026-03-22 11:10:00', 200.73, 'Synthetic procedure record for reporting.'),
  (3, 3, 5, 8, 8, '2025-11-21 10:30:00', 469.07, 'Synthetic procedure record for reporting.'),
  (4, 4, 8, 14, 4, '2026-01-05 08:55:00', 417.8, 'Synthetic procedure record for reporting.'),
  (5, 5, 8, 8, 8, '2026-04-18 11:40:00', 401.81, 'Synthetic procedure record for reporting.'),
  (6, 6, 5, 10, 10, '2026-01-10 17:20:00', 385.57, 'Synthetic procedure record for reporting.'),
  (7, 7, 5, 18, 8, '2026-05-26 19:55:00', 429.02, 'Synthetic procedure record for reporting.'),
  (8, 8, 7, 13, 3, '2026-01-14 11:55:00', 692.85, 'Synthetic procedure record for reporting.'),
  (9, 9, 7, 16, 6, '2026-02-28 17:10:00', 705.24, 'Synthetic procedure record for reporting.'),
  (10, 10, 9, 6, 6, '2025-11-22 08:10:00', 727.69, 'Synthetic procedure record for reporting.'),
  (11, 11, 3, 13, 3, '2026-01-30 08:25:00', 138.77, 'Synthetic procedure record for reporting.'),
  (12, 12, 3, 9, 9, '2025-12-20 15:30:00', 162.9, 'Synthetic procedure record for reporting.'),
  (13, 13, 7, 16, 6, '2026-05-07 11:40:00', 700.9, 'Synthetic procedure record for reporting.'),
  (14, 14, 2, 9, 9, '2026-02-03 11:30:00', 79.13, 'Synthetic procedure record for reporting.'),
  (15, 15, 7, 4, 4, '2026-04-27 15:10:00', 707.47, 'Synthetic procedure record for reporting.'),
  (16, 16, 12, 12, 2, '2026-05-11 17:20:00', 1270.31, 'Synthetic procedure record for reporting.'),
  (17, 17, 6, 10, 10, '2025-12-19 19:10:00', 95.52, 'Synthetic procedure record for reporting.'),
  (18, 18, 5, 17, 7, '2026-02-15 14:10:00', 375.37, 'Synthetic procedure record for reporting.'),
  (19, 19, 4, 13, 3, '2025-12-15 09:25:00', 9464.88, 'Synthetic procedure record for reporting.'),
  (20, 20, 3, 3, 3, '2026-02-03 20:10:00', 134.28, 'Synthetic procedure record for reporting.'),
  (21, 21, 1, 7, 7, '2026-03-27 10:55:00', 175.49, 'Synthetic procedure record for reporting.'),
  (22, 22, 10, 8, 8, '2026-01-16 09:25:00', 5473.96, 'Synthetic procedure record for reporting.'),
  (23, 23, 2, 2, 2, '2025-12-20 20:30:00', 83.07, 'Synthetic procedure record for reporting.'),
  (24, 24, 1, 9, 9, '2026-01-11 13:10:00', 203.42, 'Synthetic procedure record for reporting.'),
  (25, 25, 3, 17, 7, '2026-05-09 18:10:00', 158.56, 'Synthetic procedure record for reporting.'),
  (26, 26, 12, 17, 7, '2026-02-20 13:55:00', 1171.63, 'Synthetic procedure record for reporting.'),
  (27, 27, 1, 2, 2, '2025-12-11 16:25:00', 156.68, 'Synthetic procedure record for reporting.'),
  (28, 28, 5, 8, 8, '2026-02-22 08:30:00', 498.41, 'Synthetic procedure record for reporting.'),
  (29, 29, 6, 11, 1, '2026-04-02 10:10:00', 90.06, 'Synthetic procedure record for reporting.'),
  (30, 30, 1, 12, 2, '2026-04-26 09:25:00', 200.21, 'Synthetic procedure record for reporting.'),
  (31, 31, 1, 9, 9, '2025-11-02 15:55:00', 185.07, 'Synthetic procedure record for reporting.'),
  (32, 32, 7, 5, 5, '2025-12-10 17:25:00', 771.21, 'Synthetic procedure record for reporting.'),
  (33, 33, 8, 10, 10, '2026-02-21 13:10:00', 438.46, 'Synthetic procedure record for reporting.'),
  (34, 34, 4, 3, 3, '2026-04-12 18:40:00', 10228.57, 'Synthetic procedure record for reporting.'),
  (35, 35, 7, 11, 1, '2026-05-02 19:40:00', 584.87, 'Synthetic procedure record for reporting.'),
  (36, 36, 7, 15, 5, '2026-03-20 12:30:00', 762.43, 'Synthetic procedure record for reporting.'),
  (37, 37, 1, 11, 1, '2025-11-07 14:10:00', 205.02, 'Synthetic procedure record for reporting.'),
  (38, 38, 11, 11, 1, '2026-02-27 13:25:00', 112.01, 'Synthetic procedure record for reporting.'),
  (39, 39, 1, 9, 9, '2025-11-02 14:10:00', 164.02, 'Synthetic procedure record for reporting.'),
  (40, 40, 1, 18, 8, '2025-11-26 08:40:00', 158.87, 'Synthetic procedure record for reporting.'),
  (41, 41, 3, 3, 3, '2025-12-19 08:40:00', 127.91, 'Synthetic procedure record for reporting.'),
  (42, 42, 11, 17, 7, '2025-11-10 19:20:00', 128.93, 'Synthetic procedure record for reporting.'),
  (43, 43, 4, 3, 3, '2026-01-17 16:40:00', 9780.88, 'Synthetic procedure record for reporting.'),
  (44, 44, 10, 8, 8, '2026-05-04 08:10:00', 4602.74, 'Synthetic procedure record for reporting.'),
  (45, 45, 6, 10, 10, '2026-01-24 13:20:00', 95.24, 'Synthetic procedure record for reporting.'),
  (46, 46, 1, 9, 9, '2025-12-12 08:20:00', 206.44, 'Synthetic procedure record for reporting.'),
  (47, 47, 1, 1, 1, '2025-12-01 16:40:00', 182.21, 'Synthetic procedure record for reporting.'),
  (48, 48, 3, 3, 3, '2026-04-23 12:30:00', 125.5, 'Synthetic procedure record for reporting.'),
  (49, 49, 3, 12, 2, '2025-11-03 10:30:00', 155.0, 'Synthetic procedure record for reporting.'),
  (50, 50, 1, 9, 9, '2025-12-01 20:10:00', 190.71, 'Synthetic procedure record for reporting.'),
  (51, 51, 4, 3, 3, '2025-11-10 11:25:00', 10137.01, 'Synthetic procedure record for reporting.'),
  (52, 52, 6, 14, 4, '2026-04-08 08:30:00', 107.21, 'Synthetic procedure record for reporting.'),
  (53, 53, 6, 2, 2, '2026-04-06 14:20:00', 83.06, 'Synthetic procedure record for reporting.'),
  (54, 54, 1, 5, 5, '2026-03-21 09:20:00', 200.06, 'Synthetic procedure record for reporting.'),
  (55, 55, 4, 3, 3, '2026-04-02 15:25:00', 8904.88, 'Synthetic procedure record for reporting.'),
  (56, 56, 3, 13, 3, '2026-01-28 10:20:00', 127.79, 'Synthetic procedure record for reporting.'),
  (57, 57, 10, 8, 8, '2025-12-20 15:30:00', 4418.39, 'Synthetic procedure record for reporting.'),
  (58, 58, 9, 8, 8, '2026-05-31 20:55:00', 821.49, 'Synthetic procedure record for reporting.'),
  (59, 59, 3, 3, 3, '2026-03-13 08:25:00', 139.08, 'Synthetic procedure record for reporting.'),
  (60, 60, 5, 18, 8, '2025-12-30 08:20:00', 467.92, 'Synthetic procedure record for reporting.'),
  (61, 61, 7, 8, 8, '2025-11-03 12:10:00', 595.26, 'Synthetic procedure record for reporting.'),
  (62, 62, 3, 13, 3, '2026-01-14 12:10:00', 138.27, 'Synthetic procedure record for reporting.'),
  (63, 63, 9, 7, 7, '2026-01-10 08:40:00', 833.11, 'Synthetic procedure record for reporting.'),
  (64, 64, 12, 9, 9, '2026-05-01 11:10:00', 1230.13, 'Synthetic procedure record for reporting.'),
  (65, 65, 3, 9, 9, '2026-05-20 12:55:00', 155.75, 'Synthetic procedure record for reporting.'),
  (66, 66, 7, 5, 5, '2026-02-26 10:40:00', 684.84, 'Synthetic procedure record for reporting.'),
  (67, 67, 5, 11, 1, '2026-01-05 19:20:00', 453.92, 'Synthetic procedure record for reporting.'),
  (68, 68, 1, 7, 7, '2025-11-15 15:55:00', 200.32, 'Synthetic procedure record for reporting.'),
  (69, 69, 1, 7, 7, '2025-12-30 17:25:00', 156.41, 'Synthetic procedure record for reporting.'),
  (70, 70, 3, 12, 2, '2026-05-24 09:10:00', 149.38, 'Synthetic procedure record for reporting.'),
  (71, 71, 11, 17, 7, '2025-11-10 15:20:00', 122.82, 'Synthetic procedure record for reporting.'),
  (72, 72, 3, 13, 3, '2026-05-08 14:25:00', 157.03, 'Synthetic procedure record for reporting.'),
  (73, 73, 9, 6, 6, '2026-02-02 15:20:00', 637.9, 'Synthetic procedure record for reporting.'),
  (74, 74, 2, 7, 7, '2026-02-22 13:40:00', 77.82, 'Synthetic procedure record for reporting.'),
  (75, 75, 2, 17, 7, '2026-03-08 17:10:00', 76.99, 'Synthetic procedure record for reporting.'),
  (76, 76, 3, 9, 9, '2025-11-10 09:55:00', 164.74, 'Synthetic procedure record for reporting.'),
  (77, 77, 4, 3, 3, '2025-11-11 13:40:00', 8000.79, 'Synthetic procedure record for reporting.'),
  (78, 78, 6, 9, 9, '2026-03-09 17:55:00', 107.75, 'Synthetic procedure record for reporting.'),
  (79, 79, 12, 12, 2, '2026-02-21 10:10:00', 1277.08, 'Synthetic procedure record for reporting.'),
  (80, 80, 8, 9, 9, '2026-03-21 12:30:00', 477.44, 'Synthetic procedure record for reporting.'),
  (81, 81, 10, 8, 8, '2026-03-07 20:55:00', 4974.64, 'Synthetic procedure record for reporting.'),
  (82, 82, 5, 15, 5, '2025-12-21 10:20:00', 486.82, 'Synthetic procedure record for reporting.'),
  (83, 83, 3, 13, 3, '2025-12-30 08:40:00', 127.08, 'Synthetic procedure record for reporting.'),
  (84, 84, 6, 4, 4, '2026-04-21 10:40:00', 103.4, 'Synthetic procedure record for reporting.'),
  (85, 85, 9, 11, 1, '2025-12-26 18:40:00', 736.36, 'Synthetic procedure record for reporting.'),
  (86, 86, 8, 14, 4, '2026-01-16 19:30:00', 373.04, 'Synthetic procedure record for reporting.'),
  (87, 87, 1, 7, 7, '2026-02-28 19:25:00', 195.03, 'Synthetic procedure record for reporting.'),
  (88, 88, 3, 2, 2, '2026-04-16 18:25:00', 159.99, 'Synthetic procedure record for reporting.'),
  (89, 89, 11, 4, 4, '2026-03-23 13:30:00', 101.12, 'Synthetic procedure record for reporting.'),
  (90, 90, 5, 13, 3, '2025-11-10 15:25:00', 484.88, 'Synthetic procedure record for reporting.'),
  (91, 91, 4, 13, 3, '2025-11-07 08:20:00', 8874.58, 'Synthetic procedure record for reporting.'),
  (92, 92, 6, 15, 5, '2025-12-18 15:20:00', 101.02, 'Synthetic procedure record for reporting.'),
  (93, 93, 5, 5, 5, '2025-11-15 18:40:00', 373.83, 'Synthetic procedure record for reporting.'),
  (94, 94, 4, 13, 3, '2026-02-24 14:20:00', 10312.77, 'Synthetic procedure record for reporting.'),
  (95, 95, 3, 13, 3, '2026-03-14 13:25:00', 153.43, 'Synthetic procedure record for reporting.'),
  (96, 96, 11, 9, 9, '2025-11-05 16:55:00', 128.05, 'Synthetic procedure record for reporting.'),
  (97, 97, 3, 12, 2, '2026-02-01 18:25:00', 147.77, 'Synthetic procedure record for reporting.'),
  (98, 98, 7, 10, 10, '2026-03-19 08:20:00', 625.58, 'Synthetic procedure record for reporting.'),
  (99, 99, 7, 10, 10, '2025-11-19 19:10:00', 633.35, 'Synthetic procedure record for reporting.'),
  (100, 100, 2, 9, 9, '2026-04-06 10:10:00', 76.45, 'Synthetic procedure record for reporting.'),
  (101, 101, 1, 9, 9, '2026-04-09 13:10:00', 167.81, 'Synthetic procedure record for reporting.'),
  (102, 102, 3, 9, 9, '2025-11-18 08:25:00', 129.73, 'Synthetic procedure record for reporting.'),
  (103, 103, 1, 9, 9, '2026-01-02 11:25:00', 184.62, 'Synthetic procedure record for reporting.'),
  (104, 104, 1, 9, 9, '2026-02-05 12:30:00', 166.81, 'Synthetic procedure record for reporting.'),
  (105, 105, 11, 2, 2, '2026-03-08 16:20:00', 109.18, 'Synthetic procedure record for reporting.'),
  (106, 106, 3, 2, 2, '2026-04-26 18:30:00', 122.04, 'Synthetic procedure record for reporting.'),
  (107, 107, 3, 13, 3, '2026-04-19 13:10:00', 124.64, 'Synthetic procedure record for reporting.'),
  (108, 108, 8, 5, 5, '2026-05-08 10:55:00', 480.19, 'Synthetic procedure record for reporting.'),
  (109, 109, 9, 10, 10, '2026-02-15 13:40:00', 827.45, 'Synthetic procedure record for reporting.'),
  (110, 110, 2, 12, 2, '2025-12-29 12:40:00', 89.87, 'Synthetic procedure record for reporting.'),
  (111, 111, 4, 13, 3, '2026-04-05 18:20:00', 9644.28, 'Synthetic procedure record for reporting.'),
  (112, 112, 1, 7, 7, '2026-02-01 12:30:00', 164.65, 'Synthetic procedure record for reporting.'),
  (113, 113, 10, 18, 8, '2026-01-05 17:30:00', 5131.03, 'Synthetic procedure record for reporting.'),
  (114, 114, 1, 2, 2, '2026-01-15 13:55:00', 150.83, 'Synthetic procedure record for reporting.'),
  (115, 115, 5, 12, 2, '2026-05-26 15:30:00', 411.23, 'Synthetic procedure record for reporting.'),
  (116, 116, 12, 2, 2, '2026-02-02 09:10:00', 1355.8, 'Synthetic procedure record for reporting.'),
  (117, 117, 3, 13, 3, '2026-04-25 09:25:00', 120.42, 'Synthetic procedure record for reporting.'),
  (118, 118, 4, 3, 3, '2025-12-20 14:30:00', 10518.44, 'Synthetic procedure record for reporting.'),
  (119, 119, 9, 17, 7, '2025-12-16 08:20:00', 680.52, 'Synthetic procedure record for reporting.'),
  (120, 120, 7, 7, 7, '2026-02-10 11:30:00', 606.83, 'Synthetic procedure record for reporting.'),
  (121, 121, 1, 12, 2, '2026-03-10 11:25:00', 195.22, 'Synthetic procedure record for reporting.'),
  (122, 122, 5, 2, 2, '2026-04-27 18:30:00', 430.12, 'Synthetic procedure record for reporting.'),
  (123, 123, 1, 9, 9, '2026-03-16 19:25:00', 196.84, 'Synthetic procedure record for reporting.'),
  (124, 124, 3, 17, 7, '2026-01-09 19:30:00', 163.53, 'Synthetic procedure record for reporting.'),
  (125, 125, 11, 4, 4, '2025-11-09 08:55:00', 103.83, 'Synthetic procedure record for reporting.'),
  (126, 126, 10, 18, 8, '2025-11-15 12:20:00', 4406.81, 'Synthetic procedure record for reporting.'),
  (127, 127, 4, 13, 3, '2026-03-28 15:40:00', 10528.71, 'Synthetic procedure record for reporting.'),
  (128, 128, 6, 12, 2, '2026-02-03 15:10:00', 105.84, 'Synthetic procedure record for reporting.'),
  (129, 129, 10, 18, 8, '2026-05-14 12:30:00', 4315.57, 'Synthetic procedure record for reporting.'),
  (130, 130, 10, 8, 8, '2025-12-08 15:30:00', 4183.05, 'Synthetic procedure record for reporting.'),
  (131, 131, 9, 9, 9, '2026-01-01 17:55:00', 700.43, 'Synthetic procedure record for reporting.'),
  (132, 132, 2, 17, 7, '2025-11-27 16:40:00', 89.89, 'Synthetic procedure record for reporting.'),
  (133, 133, 3, 3, 3, '2026-04-17 14:40:00', 146.62, 'Synthetic procedure record for reporting.'),
  (134, 134, 1, 7, 7, '2026-05-12 10:40:00', 196.51, 'Synthetic procedure record for reporting.'),
  (135, 135, 9, 2, 2, '2026-05-17 14:55:00', 832.79, 'Synthetic procedure record for reporting.'),
  (136, 136, 9, 14, 4, '2026-05-12 11:55:00', 712.93, 'Synthetic procedure record for reporting.'),
  (137, 137, 11, 14, 4, '2025-11-16 16:30:00', 105.65, 'Synthetic procedure record for reporting.'),
  (138, 138, 3, 3, 3, '2025-12-05 16:10:00', 124.51, 'Synthetic procedure record for reporting.'),
  (139, 139, 3, 3, 3, '2026-04-04 20:55:00', 151.77, 'Synthetic procedure record for reporting.'),
  (140, 140, 3, 9, 9, '2026-03-03 19:20:00', 141.57, 'Synthetic procedure record for reporting.'),
  (141, 141, 3, 3, 3, '2026-05-04 13:20:00', 140.29, 'Synthetic procedure record for reporting.'),
  (142, 142, 1, 2, 2, '2026-01-04 20:55:00', 192.56, 'Synthetic procedure record for reporting.'),
  (143, 143, 3, 13, 3, '2026-01-16 16:40:00', 137.84, 'Synthetic procedure record for reporting.'),
  (144, 144, 11, 11, 1, '2026-03-15 18:55:00', 96.93, 'Synthetic procedure record for reporting.'),
  (145, 145, 4, 13, 3, '2026-03-21 20:25:00', 10505.12, 'Synthetic procedure record for reporting.'),
  (146, 146, 7, 9, 9, '2025-12-21 16:30:00', 593.49, 'Synthetic procedure record for reporting.'),
  (147, 147, 11, 16, 6, '2026-01-01 20:55:00', 98.7, 'Synthetic procedure record for reporting.'),
  (148, 148, 3, 9, 9, '2026-02-04 09:10:00', 149.14, 'Synthetic procedure record for reporting.'),
  (149, 149, 3, 17, 7, '2026-03-21 17:40:00', 123.24, 'Synthetic procedure record for reporting.'),
  (150, 150, 12, 12, 2, '2025-11-14 18:55:00', 1319.62, 'Synthetic procedure record for reporting.'),
  (151, 151, 6, 15, 5, '2026-05-12 10:25:00', 103.95, 'Synthetic procedure record for reporting.'),
  (152, 152, 5, 3, 3, '2026-03-17 19:20:00', 447.48, 'Synthetic procedure record for reporting.'),
  (153, 153, 12, 2, 2, '2026-03-21 08:25:00', 1037.07, 'Synthetic procedure record for reporting.'),
  (154, 154, 8, 10, 10, '2026-05-31 16:40:00', 422.72, 'Synthetic procedure record for reporting.'),
  (155, 155, 4, 3, 3, '2026-01-08 18:40:00', 8991.52, 'Synthetic procedure record for reporting.'),
  (156, 156, 3, 3, 3, '2026-02-10 20:10:00', 148.03, 'Synthetic procedure record for reporting.'),
  (157, 157, 11, 3, 3, '2026-04-10 19:30:00', 104.51, 'Synthetic procedure record for reporting.'),
  (158, 158, 7, 3, 3, '2025-11-02 19:40:00', 704.79, 'Synthetic procedure record for reporting.'),
  (159, 159, 9, 13, 3, '2026-02-21 11:30:00', 649.88, 'Synthetic procedure record for reporting.'),
  (160, 160, 6, 8, 8, '2025-12-03 17:30:00', 104.46, 'Synthetic procedure record for reporting.'),
  (161, 161, 11, 18, 8, '2026-05-17 08:40:00', 113.01, 'Synthetic procedure record for reporting.'),
  (162, 162, 1, 17, 7, '2026-03-26 15:55:00', 167.0, 'Synthetic procedure record for reporting.'),
  (163, 163, 3, 17, 7, '2026-04-17 12:40:00', 124.47, 'Synthetic procedure record for reporting.'),
  (164, 164, 10, 18, 8, '2026-04-21 08:20:00', 5348.56, 'Synthetic procedure record for reporting.'),
  (165, 165, 12, 9, 9, '2026-05-02 12:25:00', 1279.57, 'Synthetic procedure record for reporting.'),
  (166, 166, 1, 12, 2, '2026-05-07 09:55:00', 178.82, 'Synthetic procedure record for reporting.'),
  (167, 167, 4, 3, 3, '2026-05-03 15:55:00', 9306.8, 'Synthetic procedure record for reporting.'),
  (168, 168, 11, 5, 5, '2026-05-11 12:20:00', 96.57, 'Synthetic procedure record for reporting.'),
  (169, 169, 5, 17, 7, '2026-05-11 12:30:00', 376.91, 'Synthetic procedure record for reporting.'),
  (170, 170, 10, 8, 8, '2026-03-02 16:20:00', 5604.77, 'Synthetic procedure record for reporting.'),
  (171, 171, 8, 6, 6, '2026-02-06 09:25:00', 434.34, 'Synthetic procedure record for reporting.'),
  (172, 172, 4, 3, 3, '2026-05-27 13:20:00', 9477.19, 'Synthetic procedure record for reporting.'),
  (173, 173, 3, 13, 3, '2026-03-22 14:20:00', 132.83, 'Synthetic procedure record for reporting.'),
  (174, 174, 7, 3, 3, '2026-02-19 18:25:00', 631.93, 'Synthetic procedure record for reporting.'),
  (175, 175, 1, 2, 2, '2026-02-06 11:10:00', 188.0, 'Synthetic procedure record for reporting.'),
  (176, 176, 5, 2, 2, '2025-11-18 13:10:00', 391.75, 'Synthetic procedure record for reporting.'),
  (177, 177, 1, 16, 6, '2026-05-09 10:40:00', 189.86, 'Synthetic procedure record for reporting.'),
  (178, 178, 8, 5, 5, '2026-04-13 17:25:00', 465.81, 'Synthetic procedure record for reporting.'),
  (179, 179, 3, 3, 3, '2026-01-12 08:55:00', 156.3, 'Synthetic procedure record for reporting.'),
  (180, 180, 4, 13, 3, '2025-12-28 20:25:00', 10182.98, 'Synthetic procedure record for reporting.'),
  (181, 181, 12, 17, 7, '2026-04-11 08:40:00', 1126.63, 'Synthetic procedure record for reporting.'),
  (182, 182, 7, 18, 8, '2026-01-13 15:30:00', 721.35, 'Synthetic procedure record for reporting.'),
  (183, 183, 1, 7, 7, '2025-11-05 12:25:00', 181.11, 'Synthetic procedure record for reporting.'),
  (184, 184, 1, 2, 2, '2025-11-24 17:55:00', 199.11, 'Synthetic procedure record for reporting.'),
  (185, 185, 1, 11, 1, '2026-04-14 20:20:00', 198.82, 'Synthetic procedure record for reporting.'),
  (186, 186, 11, 7, 7, '2026-02-01 19:20:00', 107.71, 'Synthetic procedure record for reporting.'),
  (187, 187, 5, 6, 6, '2026-05-30 14:40:00', 477.0, 'Synthetic procedure record for reporting.'),
  (188, 188, 7, 16, 6, '2025-12-18 14:40:00', 749.71, 'Synthetic procedure record for reporting.'),
  (189, 189, 11, 6, 6, '2026-04-01 11:20:00', 115.86, 'Synthetic procedure record for reporting.'),
  (190, 190, 7, 12, 2, '2026-02-05 10:55:00', 595.73, 'Synthetic procedure record for reporting.'),
  (191, 191, 1, 7, 7, '2025-11-10 13:20:00', 202.24, 'Synthetic procedure record for reporting.'),
  (192, 192, 7, 2, 2, '2026-03-02 18:40:00', 763.4, 'Synthetic procedure record for reporting.'),
  (193, 193, 3, 3, 3, '2025-11-27 19:30:00', 126.46, 'Synthetic procedure record for reporting.'),
  (194, 194, 4, 3, 3, '2026-01-01 12:25:00', 9067.59, 'Synthetic procedure record for reporting.'),
  (195, 195, 2, 9, 9, '2026-01-23 11:20:00', 92.94, 'Synthetic procedure record for reporting.'),
  (196, 196, 8, 10, 10, '2026-02-03 15:30:00', 371.82, 'Synthetic procedure record for reporting.'),
  (197, 197, 2, 12, 2, '2026-01-30 16:25:00', 98.43, 'Synthetic procedure record for reporting.'),
  (198, 198, 2, 7, 7, '2026-01-23 14:10:00', 74.65, 'Synthetic procedure record for reporting.'),
  (199, 199, 10, 18, 8, '2025-11-25 16:20:00', 4531.48, 'Synthetic procedure record for reporting.'),
  (200, 200, 3, 13, 3, '2025-11-14 12:20:00', 144.32, 'Synthetic procedure record for reporting.'),
  (201, 201, 10, 18, 8, '2026-03-30 17:30:00', 4182.13, 'Synthetic procedure record for reporting.'),
  (202, 202, 10, 8, 8, '2026-03-23 12:55:00', 5643.6, 'Synthetic procedure record for reporting.'),
  (203, 203, 1, 7, 7, '2026-02-18 08:55:00', 174.3, 'Synthetic procedure record for reporting.'),
  (204, 204, 7, 1, 1, '2026-05-27 11:20:00', 603.34, 'Synthetic procedure record for reporting.'),
  (205, 205, 10, 8, 8, '2025-11-15 09:25:00', 5411.9, 'Synthetic procedure record for reporting.'),
  (206, 206, 3, 17, 7, '2026-02-14 16:20:00', 162.2, 'Synthetic procedure record for reporting.'),
  (207, 207, 1, 7, 7, '2025-11-21 10:20:00', 191.39, 'Synthetic procedure record for reporting.'),
  (208, 208, 1, 13, 3, '2026-04-18 14:25:00', 188.64, 'Synthetic procedure record for reporting.'),
  (209, 209, 9, 10, 10, '2026-05-01 17:20:00', 785.14, 'Synthetic procedure record for reporting.'),
  (210, 210, 7, 3, 3, '2025-11-27 20:25:00', 785.78, 'Synthetic procedure record for reporting.'),
  (211, 211, 3, 3, 3, '2026-03-30 11:20:00', 152.96, 'Synthetic procedure record for reporting.'),
  (212, 212, 7, 13, 3, '2025-11-21 16:10:00', 606.46, 'Synthetic procedure record for reporting.'),
  (213, 213, 7, 11, 1, '2026-01-05 14:30:00', 698.06, 'Synthetic procedure record for reporting.'),
  (214, 214, 4, 13, 3, '2026-01-23 11:40:00', 7975.15, 'Synthetic procedure record for reporting.'),
  (215, 215, 3, 3, 3, '2026-04-29 14:25:00', 162.37, 'Synthetic procedure record for reporting.'),
  (216, 216, 6, 10, 10, '2026-01-20 13:10:00', 94.01, 'Synthetic procedure record for reporting.'),
  (217, 217, 7, 13, 3, '2026-01-01 19:40:00', 747.63, 'Synthetic procedure record for reporting.'),
  (218, 218, 3, 3, 3, '2025-12-29 16:10:00', 149.42, 'Synthetic procedure record for reporting.'),
  (219, 219, 3, 3, 3, '2026-04-28 13:25:00', 149.34, 'Synthetic procedure record for reporting.'),
  (220, 220, 3, 9, 9, '2026-02-16 17:10:00', 129.15, 'Synthetic procedure record for reporting.'),
  (221, 221, 7, 18, 8, '2026-02-13 11:20:00', 615.87, 'Synthetic procedure record for reporting.'),
  (222, 222, 5, 2, 2, '2026-04-11 16:20:00', 414.09, 'Synthetic procedure record for reporting.'),
  (223, 223, 4, 13, 3, '2026-02-07 15:55:00', 8697.54, 'Synthetic procedure record for reporting.'),
  (224, 224, 1, 17, 7, '2025-11-05 13:25:00', 168.5, 'Synthetic procedure record for reporting.'),
  (225, 225, 10, 8, 8, '2026-05-11 19:55:00', 4970.94, 'Synthetic procedure record for reporting.'),
  (226, 226, 3, 3, 3, '2026-04-02 13:55:00', 162.7, 'Synthetic procedure record for reporting.'),
  (227, 227, 2, 12, 2, '2026-02-07 12:20:00', 88.26, 'Synthetic procedure record for reporting.'),
  (228, 228, 10, 8, 8, '2026-04-07 20:40:00', 5041.43, 'Synthetic procedure record for reporting.'),
  (229, 229, 3, 3, 3, '2026-03-24 12:10:00', 153.54, 'Synthetic procedure record for reporting.'),
  (230, 230, 9, 14, 4, '2025-12-25 20:10:00', 793.39, 'Synthetic procedure record for reporting.'),
  (231, 231, 11, 9, 9, '2025-12-12 17:20:00', 118.82, 'Synthetic procedure record for reporting.'),
  (232, 232, 7, 15, 5, '2026-05-15 12:30:00', 712.85, 'Synthetic procedure record for reporting.'),
  (233, 233, 1, 7, 7, '2026-02-28 13:30:00', 188.45, 'Synthetic procedure record for reporting.'),
  (234, 234, 5, 1, 1, '2026-04-04 09:20:00', 460.85, 'Synthetic procedure record for reporting.'),
  (235, 235, 10, 8, 8, '2025-12-30 16:20:00', 4327.03, 'Synthetic procedure record for reporting.'),
  (236, 236, 3, 9, 9, '2025-11-14 08:55:00', 150.22, 'Synthetic procedure record for reporting.'),
  (237, 237, 1, 9, 9, '2026-03-21 11:40:00', 173.95, 'Synthetic procedure record for reporting.'),
  (238, 238, 12, 2, 2, '2025-12-31 15:40:00', 1190.67, 'Synthetic procedure record for reporting.'),
  (239, 239, 7, 18, 8, '2025-12-12 14:25:00', 679.78, 'Synthetic procedure record for reporting.'),
  (240, 240, 7, 9, 9, '2026-04-16 13:55:00', 605.04, 'Synthetic procedure record for reporting.'),
  (241, 241, 2, 12, 2, '2025-12-26 11:40:00', 75.08, 'Synthetic procedure record for reporting.'),
  (242, 242, 1, 9, 9, '2026-01-29 17:55:00', 156.31, 'Synthetic procedure record for reporting.'),
  (243, 243, 8, 18, 8, '2026-04-18 09:55:00', 435.28, 'Synthetic procedure record for reporting.'),
  (244, 244, 8, 17, 7, '2026-05-16 11:30:00', 411.57, 'Synthetic procedure record for reporting.'),
  (245, 245, 3, 9, 9, '2026-03-19 09:20:00', 145.89, 'Synthetic procedure record for reporting.'),
  (246, 246, 11, 17, 7, '2026-04-14 15:30:00', 104.12, 'Synthetic procedure record for reporting.'),
  (247, 247, 8, 1, 1, '2026-02-22 17:30:00', 411.15, 'Synthetic procedure record for reporting.'),
  (248, 248, 7, 14, 4, '2026-04-27 12:10:00', 644.15, 'Synthetic procedure record for reporting.'),
  (249, 249, 7, 4, 4, '2026-04-16 17:20:00', 712.55, 'Synthetic procedure record for reporting.'),
  (250, 250, 11, 1, 1, '2025-12-19 13:20:00', 126.15, 'Synthetic procedure record for reporting.'),
  (251, 251, 12, 12, 2, '2025-12-23 08:30:00', 1390.28, 'Synthetic procedure record for reporting.'),
  (252, 252, 3, 13, 3, '2025-11-20 17:20:00', 165.18, 'Synthetic procedure record for reporting.'),
  (253, 253, 4, 3, 3, '2026-04-15 19:55:00', 8054.8, 'Synthetic procedure record for reporting.'),
  (254, 254, 3, 3, 3, '2026-01-09 12:10:00', 158.94, 'Synthetic procedure record for reporting.'),
  (255, 255, 12, 9, 9, '2025-12-14 18:55:00', 1095.67, 'Synthetic procedure record for reporting.'),
  (256, 256, 7, 5, 5, '2026-02-02 16:40:00', 729.39, 'Synthetic procedure record for reporting.'),
  (257, 257, 9, 7, 7, '2025-11-22 20:30:00', 749.9, 'Synthetic procedure record for reporting.'),
  (258, 258, 1, 12, 2, '2026-04-27 19:55:00', 158.3, 'Synthetic procedure record for reporting.'),
  (259, 259, 9, 9, 9, '2026-02-03 13:25:00', 664.22, 'Synthetic procedure record for reporting.'),
  (260, 260, 1, 14, 4, '2026-04-23 10:40:00', 160.59, 'Synthetic procedure record for reporting.'),
  (261, 261, 10, 18, 8, '2025-11-29 16:25:00', 5264.81, 'Synthetic procedure record for reporting.'),
  (262, 262, 10, 8, 8, '2026-03-08 14:40:00', 4260.1, 'Synthetic procedure record for reporting.'),
  (263, 263, 4, 3, 3, '2025-11-14 09:25:00', 8009.47, 'Synthetic procedure record for reporting.'),
  (264, 264, 8, 18, 8, '2026-01-31 15:10:00', 420.31, 'Synthetic procedure record for reporting.'),
  (265, 265, 11, 18, 8, '2026-01-27 14:20:00', 107.13, 'Synthetic procedure record for reporting.'),
  (266, 266, 11, 16, 6, '2026-02-13 15:25:00', 115.47, 'Synthetic procedure record for reporting.'),
  (267, 267, 9, 12, 2, '2026-04-05 17:55:00', 781.32, 'Synthetic procedure record for reporting.'),
  (268, 268, 7, 12, 2, '2026-05-01 18:55:00', 642.4, 'Synthetic procedure record for reporting.'),
  (269, 269, 4, 13, 3, '2026-03-08 17:30:00', 10726.77, 'Synthetic procedure record for reporting.'),
  (270, 270, 2, 9, 9, '2025-11-02 18:40:00', 92.91, 'Synthetic procedure record for reporting.'),
  (271, 271, 10, 18, 8, '2025-12-06 08:20:00', 5133.73, 'Synthetic procedure record for reporting.'),
  (272, 272, 7, 9, 9, '2025-12-27 15:20:00', 684.98, 'Synthetic procedure record for reporting.'),
  (273, 273, 7, 18, 8, '2025-11-02 09:55:00', 721.84, 'Synthetic procedure record for reporting.'),
  (274, 274, 6, 17, 7, '2025-12-26 17:30:00', 107.9, 'Synthetic procedure record for reporting.'),
  (275, 275, 1, 9, 9, '2026-02-24 15:40:00', 167.64, 'Synthetic procedure record for reporting.'),
  (276, 276, 8, 10, 10, '2026-05-02 11:30:00', 480.65, 'Synthetic procedure record for reporting.'),
  (277, 277, 1, 2, 2, '2026-04-02 12:40:00', 152.27, 'Synthetic procedure record for reporting.'),
  (278, 278, 5, 8, 8, '2025-11-07 14:30:00', 459.1, 'Synthetic procedure record for reporting.'),
  (279, 279, 11, 4, 4, '2026-05-09 14:10:00', 123.05, 'Synthetic procedure record for reporting.'),
  (280, 280, 10, 18, 8, '2026-05-20 12:25:00', 5624.11, 'Synthetic procedure record for reporting.'),
  (281, 281, 2, 2, 2, '2026-05-08 18:20:00', 77.42, 'Synthetic procedure record for reporting.'),
  (282, 282, 3, 17, 7, '2025-11-22 15:20:00', 132.95, 'Synthetic procedure record for reporting.'),
  (283, 283, 6, 6, 6, '2025-11-02 17:10:00', 88.73, 'Synthetic procedure record for reporting.'),
  (284, 284, 11, 6, 6, '2026-03-15 19:40:00', 119.58, 'Synthetic procedure record for reporting.'),
  (285, 285, 7, 14, 4, '2026-03-15 20:30:00', 722.85, 'Synthetic procedure record for reporting.'),
  (286, 286, 3, 9, 9, '2026-04-04 08:40:00', 132.97, 'Synthetic procedure record for reporting.'),
  (287, 287, 4, 13, 3, '2025-11-10 19:20:00', 10378.47, 'Synthetic procedure record for reporting.'),
  (288, 288, 5, 5, 5, '2026-05-14 13:40:00', 487.99, 'Synthetic procedure record for reporting.'),
  (289, 289, 12, 17, 7, '2026-01-21 20:30:00', 1313.52, 'Synthetic procedure record for reporting.'),
  (290, 290, 10, 8, 8, '2026-05-26 09:30:00', 4796.55, 'Synthetic procedure record for reporting.'),
  (291, 291, 3, 2, 2, '2026-01-26 10:10:00', 134.85, 'Synthetic procedure record for reporting.'),
  (292, 292, 3, 9, 9, '2026-02-02 09:10:00', 125.82, 'Synthetic procedure record for reporting.'),
  (293, 293, 10, 8, 8, '2025-12-26 14:40:00', 4623.95, 'Synthetic procedure record for reporting.'),
  (294, 294, 6, 7, 7, '2026-04-09 16:20:00', 89.35, 'Synthetic procedure record for reporting.'),
  (295, 295, 2, 2, 2, '2026-03-13 12:20:00', 76.68, 'Synthetic procedure record for reporting.'),
  (296, 296, 11, 17, 7, '2025-12-26 11:30:00', 124.28, 'Synthetic procedure record for reporting.'),
  (297, 297, 1, 17, 7, '2026-01-06 09:55:00', 168.18, 'Synthetic procedure record for reporting.'),
  (298, 298, 12, 9, 9, '2026-04-11 10:30:00', 1283.86, 'Synthetic procedure record for reporting.'),
  (299, 299, 11, 11, 1, '2026-01-26 08:25:00', 102.43, 'Synthetic procedure record for reporting.'),
  (300, 300, 7, 7, 7, '2026-04-16 15:30:00', 670.96, 'Synthetic procedure record for reporting.'),
  (301, 301, 12, 7, 7, '2025-12-06 19:25:00', 1218.1, 'Synthetic procedure record for reporting.'),
  (302, 302, 4, 3, 3, '2025-12-29 15:10:00', 10258.15, 'Synthetic procedure record for reporting.'),
  (303, 303, 12, 12, 2, '2026-04-29 18:25:00', 1411.68, 'Synthetic procedure record for reporting.'),
  (304, 304, 10, 8, 8, '2026-01-22 20:20:00', 4640.21, 'Synthetic procedure record for reporting.'),
  (305, 305, 8, 13, 3, '2026-04-15 13:40:00', 457.13, 'Synthetic procedure record for reporting.'),
  (306, 306, 4, 3, 3, '2026-02-11 12:10:00', 9985.53, 'Synthetic procedure record for reporting.'),
  (307, 307, 12, 7, 7, '2026-05-23 16:20:00', 1298.93, 'Synthetic procedure record for reporting.'),
  (308, 308, 5, 18, 8, '2026-04-19 14:25:00', 489.16, 'Synthetic procedure record for reporting.'),
  (309, 309, 7, 4, 4, '2025-12-19 11:40:00', 638.67, 'Synthetic procedure record for reporting.'),
  (310, 310, 8, 9, 9, '2025-11-04 18:20:00', 385.51, 'Synthetic procedure record for reporting.'),
  (311, 311, 12, 9, 9, '2025-12-11 08:30:00', 1246.86, 'Synthetic procedure record for reporting.'),
  (312, 312, 10, 18, 8, '2026-04-28 08:40:00', 5328.98, 'Synthetic procedure record for reporting.'),
  (313, 313, 7, 2, 2, '2026-02-19 19:10:00', 782.74, 'Synthetic procedure record for reporting.'),
  (314, 314, 9, 14, 4, '2025-12-27 08:20:00', 756.4, 'Synthetic procedure record for reporting.'),
  (315, 315, 2, 17, 7, '2026-04-10 19:20:00', 77.18, 'Synthetic procedure record for reporting.'),
  (316, 316, 1, 9, 9, '2026-03-16 10:10:00', 152.18, 'Synthetic procedure record for reporting.'),
  (317, 317, 1, 2, 2, '2025-12-02 15:20:00', 205.29, 'Synthetic procedure record for reporting.'),
  (318, 318, 3, 3, 3, '2026-02-28 10:10:00', 125.08, 'Synthetic procedure record for reporting.'),
  (319, 319, 3, 17, 7, '2026-03-25 13:40:00', 135.57, 'Synthetic procedure record for reporting.'),
  (320, 320, 8, 6, 6, '2025-11-15 11:25:00', 457.75, 'Synthetic procedure record for reporting.');


INSERT INTO patient_prescription
  (prescription_id, patient_id, medication_code, prescribing_doctor_id, visit_id, icd10_code, prescribed_at, days_supply, quantity, directions, is_refill)
VALUES
  (1, 45, 'MED-ALB-90', 8, 3, 'J44.9', '2025-11-21 10:55:00', 7, 14, 'Use as directed by clinician.', 0),
  (2, 113, 'MED-ALB-90', 10, 6, 'J44.9', '2026-01-10 17:45:00', 14, 90, 'Use as directed by clinician.', 0),
  (3, 52, 'MED-ALB-90', 18, 7, 'J44.9', '2026-05-26 20:20:00', 5, 90, 'Use as directed by clinician.', 0),
  (4, 13, 'MED-HYD-5', 13, 8, 'G89.29', '2026-01-14 12:20:00', 5, 10, 'Use as directed by clinician.', 1),
  (5, 34, 'MED-HYD-5', 16, 9, 'G89.29', '2026-02-28 17:35:00', 5, 30, 'Use as directed by clinician.', 1),
  (6, 104, 'MED-HYD-5', 6, 10, 'S01.81XA', '2025-11-22 08:35:00', 4, 12, 'Use as directed by clinician.', 1),
  (7, 5, 'MED-LIS-20', 9, 12, 'I10', '2025-12-20 15:55:00', 5, 12, 'Use as directed by clinician.', 1),
  (8, 12, 'MED-MET-500', 9, 14, 'E11.9', '2026-02-03 11:55:00', 3, 90, 'Use as directed by clinician.', 0),
  (9, 12, 'MED-INS-GL', 9, 14, 'E11.9', '2026-02-03 11:55:00', 7, 90, 'Use as directed by clinician.', 0),
  (10, 106, 'MED-SER-50', 10, 17, 'F32.9', '2025-12-19 19:35:00', 3, 6, 'Use as directed by clinician.', 0),
  (11, 90, 'MED-ASA-81', 13, 19, 'I21.9', '2025-12-15 09:50:00', 30, 90, 'Use as directed by clinician.', 0),
  (12, 104, 'MED-FUR-20', 3, 20, 'I50.9', '2026-02-03 20:35:00', 90, 10, 'Use as directed by clinician.', 0),
  (13, 96, 'MED-OND-4', 8, 22, 'C50.919', '2026-01-16 09:50:00', 90, 12, 'Use as directed by clinician.', 0),
  (14, 120, 'MED-MET-500', 2, 23, 'E11.9', '2025-12-20 20:55:00', 5, 10, 'Use as directed by clinician.', 0),
  (15, 120, 'MED-INS-GL', 2, 23, 'E11.9', '2025-12-20 20:55:00', 7, 6, 'Use as directed by clinician.', 1),
  (16, 100, 'MED-ATO-40', 9, 24, 'E78.5', '2026-01-11 13:35:00', 5, 6, 'Use as directed by clinician.', 0),
  (17, 119, 'MED-ALB-90', 8, 28, 'J44.9', '2026-02-22 08:55:00', 14, 30, 'Use as directed by clinician.', 0),
  (18, 17, 'MED-SER-50', 11, 29, 'F32.9', '2026-04-02 10:35:00', 30, 10, 'Use as directed by clinician.', 0),
  (19, 2, 'MED-ATO-40', 12, 30, 'E78.5', '2026-04-26 09:50:00', 3, 30, 'Use as directed by clinician.', 0),
  (20, 33, 'MED-HYD-5', 5, 32, 'G89.29', '2025-12-10 17:50:00', 2, 10, 'Use as directed by clinician.', 0),
  (21, 24, 'MED-HYD-5', 10, 33, 'S62.609A', '2026-02-21 13:35:00', 5, 90, 'Use as directed by clinician.', 0),
  (22, 47, 'MED-ASA-81', 3, 34, 'I21.9', '2026-04-12 19:05:00', 5, 30, 'Use as directed by clinician.', 0),
  (23, 47, 'MED-MOR-10', 3, 34, 'I21.9', '2026-04-12 19:05:00', 3, 30, 'Use as directed by clinician.', 0),
  (24, 38, 'MED-FUR-20', 3, 41, 'I50.9', '2025-12-19 09:05:00', 14, 10, 'Use as directed by clinician.', 0),
  (25, 38, 'MED-LIS-20', 3, 41, 'I50.9', '2025-12-19 09:05:00', 90, 12, 'Use as directed by clinician.', 1),
  (26, 110, 'MED-OND-4', 8, 44, 'C50.919', '2026-05-04 08:35:00', 7, 12, 'Use as directed by clinician.', 0),
  (27, 30, 'MED-SER-50', 10, 45, 'F32.9', '2026-01-24 13:45:00', 30, 14, 'Use as directed by clinician.', 0),
  (28, 112, 'MED-ATO-40', 9, 46, 'E78.5', '2025-12-12 08:45:00', 7, 14, 'Use as directed by clinician.', 0),
  (29, 21, 'MED-FUR-20', 3, 48, 'I50.9', '2026-04-23 12:55:00', 90, 14, 'Use as directed by clinician.', 0),
  (30, 21, 'MED-LIS-20', 3, 48, 'I50.9', '2026-04-23 12:55:00', 7, 6, 'Use as directed by clinician.', 0),
  (31, 71, 'MED-LIS-20', 12, 49, 'I10', '2025-11-03 10:55:00', 3, 90, 'Use as directed by clinician.', 0),
  (32, 101, 'MED-MOR-10', 3, 51, 'I21.9', '2025-11-10 11:50:00', 2, 14, 'Use as directed by clinician.', 0),
  (33, 78, 'MED-SER-50', 14, 52, 'F32.9', '2026-04-08 08:55:00', 90, 10, 'Use as directed by clinician.', 0),
  (34, 118, 'MED-ASA-81', 3, 55, 'I21.9', '2026-04-02 15:50:00', 90, 14, 'Use as directed by clinician.', 0),
  (35, 118, 'MED-MOR-10', 3, 55, 'I21.9', '2026-04-02 15:50:00', 4, 14, 'Use as directed by clinician.', 1),
  (36, 22, 'MED-FUR-20', 13, 56, 'I50.9', '2026-01-28 10:45:00', 3, 14, 'Use as directed by clinician.', 0),
  (37, 22, 'MED-LIS-20', 13, 56, 'I50.9', '2026-01-28 10:45:00', 3, 14, 'Use as directed by clinician.', 0),
  (38, 58, 'MED-HYD-5', 8, 58, 'S01.81XA', '2026-05-31 21:20:00', 3, 30, 'Use as directed by clinician.', 1),
  (39, 65, 'MED-ALB-90', 18, 60, 'J44.9', '2025-12-30 08:45:00', 30, 6, 'Use as directed by clinician.', 0),
  (40, 74, 'MED-HYD-5', 8, 61, 'G89.29', '2025-11-03 12:35:00', 5, 30, 'Use as directed by clinician.', 0),
  (41, 40, 'MED-LIS-20', 13, 62, 'I50.9', '2026-01-14 12:35:00', 5, 10, 'Use as directed by clinician.', 1),
  (42, 13, 'MED-HYD-5', 7, 63, 'S01.81XA', '2026-01-10 09:05:00', 3, 12, 'Use as directed by clinician.', 0),
  (43, 95, 'MED-LIS-20', 9, 65, 'I10', '2026-05-20 13:20:00', 7, 10, 'Use as directed by clinician.', 1),
  (44, 8, 'MED-HYD-5', 5, 66, 'G89.29', '2026-02-26 11:05:00', 5, 12, 'Use as directed by clinician.', 0),
  (45, 113, 'MED-ALB-90', 11, 67, 'J44.9', '2026-01-05 19:45:00', 30, 12, 'Use as directed by clinician.', 0),
  (46, 109, 'MED-LIS-20', 12, 70, 'I10', '2026-05-24 09:35:00', 7, 12, 'Use as directed by clinician.', 0),
  (47, 28, 'MED-FUR-20', 13, 72, 'I50.9', '2026-05-08 14:50:00', 90, 90, 'Use as directed by clinician.', 1),
  (48, 73, 'MED-HYD-5', 6, 73, 'S01.81XA', '2026-02-02 15:45:00', 3, 6, 'Use as directed by clinician.', 0),
  (49, 53, 'MED-MET-500', 7, 74, 'E11.9', '2026-02-22 14:05:00', 14, 90, 'Use as directed by clinician.', 0),
  (50, 53, 'MED-INS-GL', 7, 74, 'E11.9', '2026-02-22 14:05:00', 30, 14, 'Use as directed by clinician.', 0),
  (51, 49, 'MED-MET-500', 17, 75, 'E11.9', '2026-03-08 17:35:00', 14, 30, 'Use as directed by clinician.', 0),
  (52, 49, 'MED-INS-GL', 17, 75, 'E11.9', '2026-03-08 17:35:00', 3, 14, 'Use as directed by clinician.', 0),
  (53, 15, 'MED-LIS-20', 9, 76, 'I10', '2025-11-10 10:20:00', 14, 10, 'Use as directed by clinician.', 0),
  (54, 56, 'MED-MOR-10', 3, 77, 'I21.9', '2025-11-11 14:05:00', 2, 12, 'Use as directed by clinician.', 0),
  (55, 42, 'MED-SER-50', 9, 78, 'F32.9', '2026-03-09 18:20:00', 5, 12, 'Use as directed by clinician.', 0),
  (56, 78, 'MED-HYD-5', 9, 80, 'S62.609A', '2026-03-21 12:55:00', 2, 6, 'Use as directed by clinician.', 0),
  (57, 46, 'MED-OND-4', 8, 81, 'C50.919', '2026-03-07 21:20:00', 3, 10, 'Use as directed by clinician.', 0),
  (58, 72, 'MED-ALB-90', 15, 82, 'J44.9', '2025-12-21 10:45:00', 90, 10, 'Use as directed by clinician.', 0),
  (59, 41, 'MED-FUR-20', 13, 83, 'I50.9', '2025-12-30 09:05:00', 14, 90, 'Use as directed by clinician.', 0),
  (60, 41, 'MED-LIS-20', 13, 83, 'I50.9', '2025-12-30 09:05:00', 3, 6, 'Use as directed by clinician.', 0),
  (61, 26, 'MED-HYD-5', 11, 85, 'S01.81XA', '2025-12-26 19:05:00', 5, 90, 'Use as directed by clinician.', 1),
  (62, 42, 'MED-ATO-40', 7, 87, 'E78.5', '2026-02-28 19:50:00', 14, 10, 'Use as directed by clinician.', 0),
  (63, 40, 'MED-ASA-81', 13, 91, 'I21.9', '2025-11-07 08:45:00', 3, 14, 'Use as directed by clinician.', 0),
  (64, 40, 'MED-MOR-10', 13, 91, 'I21.9', '2025-11-07 08:45:00', 2, 90, 'Use as directed by clinician.', 0),
  (65, 68, 'MED-ALB-90', 5, 93, 'J44.9', '2025-11-15 19:05:00', 3, 6, 'Use as directed by clinician.', 1),
  (66, 92, 'MED-ASA-81', 13, 94, 'I21.9', '2026-02-24 14:45:00', 3, 90, 'Use as directed by clinician.', 0),
  (67, 92, 'MED-MOR-10', 13, 94, 'I21.9', '2026-02-24 14:45:00', 2, 10, 'Use as directed by clinician.', 0),
  (68, 17, 'MED-LIS-20', 13, 95, 'I50.9', '2026-03-14 13:50:00', 14, 14, 'Use as directed by clinician.', 0),
  (69, 120, 'MED-LIS-20', 12, 97, 'I10', '2026-02-01 18:50:00', 30, 10, 'Use as directed by clinician.', 0),
  (70, 32, 'MED-HYD-5', 10, 99, 'G89.29', '2025-11-19 19:35:00', 3, 30, 'Use as directed by clinician.', 1),
  (71, 51, 'MED-MET-500', 9, 100, 'E11.9', '2026-04-06 10:35:00', 90, 90, 'Use as directed by clinician.', 0),
  (72, 51, 'MED-INS-GL', 9, 100, 'E11.9', '2026-04-06 10:35:00', 5, 14, 'Use as directed by clinician.', 0),
  (73, 77, 'MED-LIS-20', 9, 102, 'I10', '2025-11-18 08:50:00', 14, 90, 'Use as directed by clinician.', 0),
  (74, 20, 'MED-LIS-20', 2, 106, 'I10', '2026-04-26 18:55:00', 14, 10, 'Use as directed by clinician.', 1),
  (75, 93, 'MED-FUR-20', 13, 107, 'I50.9', '2026-04-19 13:35:00', 30, 6, 'Use as directed by clinician.', 0),
  (76, 93, 'MED-LIS-20', 13, 107, 'I50.9', '2026-04-19 13:35:00', 3, 10, 'Use as directed by clinician.', 0),
  (77, 84, 'MED-HYD-5', 10, 109, 'S01.81XA', '2026-02-15 14:05:00', 4, 10, 'Use as directed by clinician.', 1),
  (78, 69, 'MED-ASA-81', 13, 111, 'I21.9', '2026-04-05 18:45:00', 3, 30, 'Use as directed by clinician.', 0),
  (79, 69, 'MED-MOR-10', 13, 111, 'I21.9', '2026-04-05 18:45:00', 5, 90, 'Use as directed by clinician.', 1),
  (80, 119, 'MED-ATO-40', 2, 114, 'E78.5', '2026-01-15 14:20:00', 7, 10, 'Use as directed by clinician.', 1),
  (81, 77, 'MED-ALB-90', 12, 115, 'J44.9', '2026-05-26 15:55:00', 5, 14, 'Use as directed by clinician.', 0),
  (82, 1, 'MED-FUR-20', 13, 117, 'I50.9', '2026-04-25 09:50:00', 14, 90, 'Use as directed by clinician.', 0),
  (83, 1, 'MED-LIS-20', 13, 117, 'I50.9', '2026-04-25 09:50:00', 90, 10, 'Use as directed by clinician.', 0),
  (84, 22, 'MED-ASA-81', 3, 118, 'I21.9', '2025-12-20 14:55:00', 30, 90, 'Use as directed by clinician.', 0),
  (85, 22, 'MED-MOR-10', 3, 118, 'I21.9', '2025-12-20 14:55:00', 2, 14, 'Use as directed by clinician.', 0),
  (86, 45, 'MED-HYD-5', 17, 119, 'S01.81XA', '2025-12-16 08:45:00', 3, 12, 'Use as directed by clinician.', 0),
  (87, 48, 'MED-HYD-5', 7, 120, 'G89.29', '2026-02-10 11:55:00', 3, 14, 'Use as directed by clinician.', 0),
  (88, 23, 'MED-ALB-90', 2, 122, 'J44.9', '2026-04-27 18:55:00', 30, 10, 'Use as directed by clinician.', 0),
  (89, 46, 'MED-LIS-20', 17, 124, 'I10', '2026-01-09 19:55:00', 7, 90, 'Use as directed by clinician.', 0),
  (90, 8, 'MED-OND-4', 18, 126, 'C50.919', '2025-11-15 12:45:00', 30, 10, 'Use as directed by clinician.', 0),
  (91, 35, 'MED-ASA-81', 13, 127, 'I21.9', '2026-03-28 16:05:00', 7, 30, 'Use as directed by clinician.', 0),
  (92, 35, 'MED-MOR-10', 13, 127, 'I21.9', '2026-03-28 16:05:00', 4, 14, 'Use as directed by clinician.', 0),
  (93, 4, 'MED-SER-50', 12, 128, 'F32.9', '2026-02-03 15:35:00', 30, 90, 'Use as directed by clinician.', 0),
  (94, 119, 'MED-OND-4', 18, 129, 'C50.919', '2026-05-14 12:55:00', 3, 30, 'Use as directed by clinician.', 0),
  (95, 4, 'MED-OND-4', 8, 130, 'C50.919', '2025-12-08 15:55:00', 14, 10, 'Use as directed by clinician.', 0),
  (96, 75, 'MED-HYD-5', 9, 131, 'S01.81XA', '2026-01-01 18:20:00', 4, 12, 'Use as directed by clinician.', 0),
  (97, 38, 'MED-MET-500', 17, 132, 'E11.9', '2025-11-27 17:05:00', 30, 6, 'Use as directed by clinician.', 0),
  (98, 38, 'MED-INS-GL', 17, 132, 'E11.9', '2025-11-27 17:05:00', 90, 10, 'Use as directed by clinician.', 0),
  (99, 57, 'MED-FUR-20', 3, 133, 'I50.9', '2026-04-17 15:05:00', 3, 10, 'Use as directed by clinician.', 0),
  (100, 57, 'MED-LIS-20', 3, 133, 'I50.9', '2026-04-17 15:05:00', 30, 10, 'Use as directed by clinician.', 0),
  (101, 37, 'MED-HYD-5', 2, 135, 'S01.81XA', '2026-05-17 15:20:00', 2, 10, 'Use as directed by clinician.', 0),
  (102, 77, 'MED-HYD-5', 14, 136, 'S01.81XA', '2026-05-12 12:20:00', 4, 14, 'Use as directed by clinician.', 0),
  (103, 16, 'MED-LIS-20', 3, 139, 'I50.9', '2026-04-04 21:20:00', 3, 10, 'Use as directed by clinician.', 0),
  (104, 62, 'MED-LIS-20', 9, 140, 'I10', '2026-03-03 19:45:00', 30, 90, 'Use as directed by clinician.', 0),
  (105, 100, 'MED-ATO-40', 2, 142, 'E78.5', '2026-01-04 21:20:00', 7, 30, 'Use as directed by clinician.', 1),
  (106, 22, 'MED-LIS-20', 13, 143, 'I50.9', '2026-01-16 17:05:00', 5, 12, 'Use as directed by clinician.', 0),
  (107, 83, 'MED-ASA-81', 13, 145, 'I21.9', '2026-03-21 20:50:00', 3, 10, 'Use as directed by clinician.', 0),
  (108, 83, 'MED-MOR-10', 13, 145, 'I21.9', '2026-03-21 20:50:00', 2, 30, 'Use as directed by clinician.', 0),
  (109, 2, 'MED-HYD-5', 9, 146, 'G89.29', '2025-12-21 16:55:00', 2, 10, 'Use as directed by clinician.', 1),
  (110, 27, 'MED-LIS-20', 17, 149, 'I10', '2026-03-21 18:05:00', 7, 12, 'Use as directed by clinician.', 0),
  (111, 9, 'MED-SER-50', 15, 151, 'F32.9', '2026-05-12 10:50:00', 30, 12, 'Use as directed by clinician.', 0),
  (112, 81, 'MED-ALB-90', 3, 152, 'J44.9', '2026-03-17 19:45:00', 3, 10, 'Use as directed by clinician.', 0),
  (113, 101, 'MED-HYD-5', 10, 154, 'S62.609A', '2026-05-31 17:05:00', 2, 6, 'Use as directed by clinician.', 0),
  (114, 21, 'MED-ASA-81', 3, 155, 'I21.9', '2026-01-08 19:05:00', 3, 10, 'Use as directed by clinician.', 0),
  (115, 21, 'MED-MOR-10', 3, 155, 'I21.9', '2026-01-08 19:05:00', 2, 10, 'Use as directed by clinician.', 0),
  (116, 49, 'MED-FUR-20', 3, 156, 'I50.9', '2026-02-10 20:35:00', 5, 90, 'Use as directed by clinician.', 0),
  (117, 49, 'MED-LIS-20', 3, 156, 'I50.9', '2026-02-10 20:35:00', 7, 6, 'Use as directed by clinician.', 0),
  (118, 96, 'MED-HYD-5', 13, 159, 'S01.81XA', '2026-02-21 11:55:00', 4, 14, 'Use as directed by clinician.', 1),
  (119, 16, 'MED-SER-50', 8, 160, 'F32.9', '2025-12-03 17:55:00', 90, 30, 'Use as directed by clinician.', 0),
  (120, 26, 'MED-LIS-20', 17, 163, 'I10', '2026-04-17 13:05:00', 30, 30, 'Use as directed by clinician.', 0),
  (121, 3, 'MED-OND-4', 18, 164, 'C50.919', '2026-04-21 08:45:00', 90, 30, 'Use as directed by clinician.', 0),
  (122, 104, 'MED-ASA-81', 3, 167, 'I21.9', '2026-05-03 16:20:00', 90, 10, 'Use as directed by clinician.', 0),
  (123, 104, 'MED-MOR-10', 3, 167, 'I21.9', '2026-05-03 16:20:00', 3, 12, 'Use as directed by clinician.', 1),
  (124, 101, 'MED-ALB-90', 17, 169, 'J44.9', '2026-05-11 12:55:00', 5, 90, 'Use as directed by clinician.', 0),
  (125, 100, 'MED-OND-4', 8, 170, 'C50.919', '2026-03-02 16:45:00', 30, 30, 'Use as directed by clinician.', 0),
  (126, 8, 'MED-ASA-81', 3, 172, 'I21.9', '2026-05-27 13:45:00', 30, 30, 'Use as directed by clinician.', 0),
  (127, 8, 'MED-MOR-10', 3, 172, 'I21.9', '2026-05-27 13:45:00', 2, 14, 'Use as directed by clinician.', 1),
  (128, 111, 'MED-FUR-20', 13, 173, 'I50.9', '2026-03-22 14:45:00', 3, 30, 'Use as directed by clinician.', 0),
  (129, 111, 'MED-LIS-20', 13, 173, 'I50.9', '2026-03-22 14:45:00', 90, 10, 'Use as directed by clinician.', 1),
  (130, 65, 'MED-HYD-5', 3, 174, 'G89.29', '2026-02-19 18:50:00', 5, 12, 'Use as directed by clinician.', 0),
  (131, 81, 'MED-ALB-90', 2, 176, 'J44.9', '2025-11-18 13:35:00', 7, 30, 'Use as directed by clinician.', 0),
  (132, 41, 'MED-FUR-20', 3, 179, 'I50.9', '2026-01-12 09:20:00', 5, 6, 'Use as directed by clinician.', 0),
  (133, 41, 'MED-LIS-20', 3, 179, 'I50.9', '2026-01-12 09:20:00', 30, 6, 'Use as directed by clinician.', 0),
  (134, 114, 'MED-ASA-81', 13, 180, 'I21.9', '2025-12-28 20:50:00', 14, 30, 'Use as directed by clinician.', 1),
  (135, 114, 'MED-MOR-10', 13, 180, 'I21.9', '2025-12-28 20:50:00', 3, 90, 'Use as directed by clinician.', 0),
  (136, 54, 'MED-ALB-90', 6, 187, 'J44.9', '2026-05-30 15:05:00', 7, 90, 'Use as directed by clinician.', 0),
  (137, 2, 'MED-FUR-20', 3, 193, 'I50.9', '2025-11-27 19:55:00', 14, 12, 'Use as directed by clinician.', 0),
  (138, 2, 'MED-LIS-20', 3, 193, 'I50.9', '2025-11-27 19:55:00', 3, 12, 'Use as directed by clinician.', 0),
  (139, 70, 'MED-ASA-81', 3, 194, 'I21.9', '2026-01-01 12:50:00', 3, 6, 'Use as directed by clinician.', 0),
  (140, 70, 'MED-MOR-10', 3, 194, 'I21.9', '2026-01-01 12:50:00', 5, 12, 'Use as directed by clinician.', 0),
  (141, 30, 'MED-MET-500', 9, 195, 'E11.9', '2026-01-23 11:45:00', 5, 14, 'Use as directed by clinician.', 0),
  (142, 30, 'MED-INS-GL', 9, 195, 'E11.9', '2026-01-23 11:45:00', 7, 14, 'Use as directed by clinician.', 1),
  (143, 38, 'MED-HYD-5', 10, 196, 'S62.609A', '2026-02-03 15:55:00', 3, 10, 'Use as directed by clinician.', 0),
  (144, 42, 'MED-INS-GL', 12, 197, 'E11.9', '2026-01-30 16:50:00', 90, 6, 'Use as directed by clinician.', 0),
  (145, 30, 'MED-MET-500', 7, 198, 'E11.9', '2026-01-23 14:35:00', 3, 14, 'Use as directed by clinician.', 0),
  (146, 30, 'MED-INS-GL', 7, 198, 'E11.9', '2026-01-23 14:35:00', 3, 10, 'Use as directed by clinician.', 0),
  (147, 49, 'MED-OND-4', 18, 199, 'C50.919', '2025-11-25 16:45:00', 30, 90, 'Use as directed by clinician.', 1),
  (148, 74, 'MED-FUR-20', 13, 200, 'I50.9', '2025-11-14 12:45:00', 5, 12, 'Use as directed by clinician.', 0),
  (149, 74, 'MED-LIS-20', 13, 200, 'I50.9', '2025-11-14 12:45:00', 14, 6, 'Use as directed by clinician.', 0),
  (150, 35, 'MED-OND-4', 8, 202, 'C50.919', '2026-03-23 13:20:00', 7, 12, 'Use as directed by clinician.', 0),
  (151, 54, 'MED-OND-4', 8, 205, 'C50.919', '2025-11-15 09:50:00', 14, 30, 'Use as directed by clinician.', 0),
  (152, 90, 'MED-LIS-20', 17, 206, 'I10', '2026-02-14 16:45:00', 30, 12, 'Use as directed by clinician.', 0),
  (153, 25, 'MED-HYD-5', 10, 209, 'S01.81XA', '2026-05-01 17:45:00', 5, 6, 'Use as directed by clinician.', 0),
  (154, 88, 'MED-FUR-20', 3, 211, 'I50.9', '2026-03-30 11:45:00', 7, 30, 'Use as directed by clinician.', 1),
  (155, 45, 'MED-HYD-5', 13, 212, 'G89.29', '2025-11-21 16:35:00', 3, 90, 'Use as directed by clinician.', 0),
  (156, 6, 'MED-ASA-81', 13, 214, 'I21.9', '2026-01-23 12:05:00', 90, 14, 'Use as directed by clinician.', 0),
  (157, 25, 'MED-FUR-20', 3, 215, 'I50.9', '2026-04-29 14:50:00', 90, 14, 'Use as directed by clinician.', 0),
  (158, 25, 'MED-LIS-20', 3, 215, 'I50.9', '2026-04-29 14:50:00', 5, 90, 'Use as directed by clinician.', 0),
  (159, 117, 'MED-HYD-5', 13, 217, 'G89.29', '2026-01-01 20:05:00', 5, 12, 'Use as directed by clinician.', 0),
  (160, 4, 'MED-FUR-20', 3, 218, 'I50.9', '2025-12-29 16:35:00', 30, 14, 'Use as directed by clinician.', 0),
  (161, 4, 'MED-LIS-20', 3, 218, 'I50.9', '2025-12-29 16:35:00', 7, 6, 'Use as directed by clinician.', 0),
  (162, 12, 'MED-FUR-20', 3, 219, 'I50.9', '2026-04-28 13:50:00', 90, 90, 'Use as directed by clinician.', 0),
  (163, 104, 'MED-HYD-5', 18, 221, 'G89.29', '2026-02-13 11:45:00', 4, 6, 'Use as directed by clinician.', 0),
  (164, 62, 'MED-ALB-90', 2, 222, 'J44.9', '2026-04-11 16:45:00', 30, 14, 'Use as directed by clinician.', 0),
  (165, 92, 'MED-OND-4', 8, 225, 'C50.919', '2026-05-11 20:20:00', 14, 10, 'Use as directed by clinician.', 0),
  (166, 83, 'MED-FUR-20', 3, 226, 'I50.9', '2026-04-02 14:20:00', 7, 30, 'Use as directed by clinician.', 0),
  (167, 112, 'MED-FUR-20', 3, 229, 'I50.9', '2026-03-24 12:35:00', 14, 30, 'Use as directed by clinician.', 0),
  (168, 63, 'MED-ATO-40', 7, 233, 'E78.5', '2026-02-28 13:55:00', 3, 90, 'Use as directed by clinician.', 0),
  (169, 32, 'MED-ALB-90', 1, 234, 'J44.9', '2026-04-04 09:45:00', 14, 90, 'Use as directed by clinician.', 1),
  (170, 92, 'MED-OND-4', 8, 235, 'C50.919', '2025-12-30 16:45:00', 5, 10, 'Use as directed by clinician.', 1),
  (171, 19, 'MED-LIS-20', 9, 236, 'I10', '2025-11-14 09:20:00', 7, 90, 'Use as directed by clinician.', 0),
  (172, 62, 'MED-ATO-40', 9, 237, 'E78.5', '2026-03-21 12:05:00', 30, 10, 'Use as directed by clinician.', 0),
  (173, 24, 'MED-HYD-5', 9, 240, 'G89.29', '2026-04-16 14:20:00', 3, 90, 'Use as directed by clinician.', 1),
  (174, 99, 'MED-MET-500', 12, 241, 'E11.9', '2025-12-26 12:05:00', 14, 12, 'Use as directed by clinician.', 1),
  (175, 99, 'MED-INS-GL', 12, 241, 'E11.9', '2025-12-26 12:05:00', 90, 6, 'Use as directed by clinician.', 0),
  (176, 57, 'MED-HYD-5', 18, 243, 'S62.609A', '2026-04-18 10:20:00', 2, 10, 'Use as directed by clinician.', 0),
  (177, 7, 'MED-LIS-20', 9, 245, 'I10', '2026-03-19 09:45:00', 3, 10, 'Use as directed by clinician.', 1),
  (178, 53, 'MED-HYD-5', 1, 247, 'S62.609A', '2026-02-22 17:55:00', 5, 90, 'Use as directed by clinician.', 0),
  (179, 91, 'MED-LIS-20', 13, 252, 'I50.9', '2025-11-20 17:45:00', 3, 90, 'Use as directed by clinician.', 0),
  (180, 52, 'MED-MOR-10', 3, 253, 'I21.9', '2026-04-15 20:20:00', 5, 12, 'Use as directed by clinician.', 1),
  (181, 64, 'MED-FUR-20', 3, 254, 'I50.9', '2026-01-09 12:35:00', 7, 6, 'Use as directed by clinician.', 0),
  (182, 64, 'MED-LIS-20', 3, 254, 'I50.9', '2026-01-09 12:35:00', 90, 12, 'Use as directed by clinician.', 0),
  (183, 85, 'MED-HYD-5', 9, 259, 'S01.81XA', '2026-02-03 13:50:00', 5, 14, 'Use as directed by clinician.', 0),
  (184, 9, 'MED-OND-4', 8, 262, 'C50.919', '2026-03-08 15:05:00', 30, 12, 'Use as directed by clinician.', 0),
  (185, 79, 'MED-ASA-81', 3, 263, 'I21.9', '2025-11-14 09:50:00', 30, 30, 'Use as directed by clinician.', 1),
  (186, 79, 'MED-MOR-10', 3, 263, 'I21.9', '2025-11-14 09:50:00', 3, 30, 'Use as directed by clinician.', 0),
  (187, 30, 'MED-HYD-5', 18, 264, 'S62.609A', '2026-01-31 15:35:00', 5, 12, 'Use as directed by clinician.', 0),
  (188, 48, 'MED-HYD-5', 12, 267, 'S01.81XA', '2026-04-05 18:20:00', 5, 90, 'Use as directed by clinician.', 0),
  (189, 101, 'MED-ASA-81', 13, 269, 'I21.9', '2026-03-08 17:55:00', 3, 6, 'Use as directed by clinician.', 0),
  (190, 101, 'MED-MOR-10', 13, 269, 'I21.9', '2026-03-08 17:55:00', 5, 6, 'Use as directed by clinician.', 1),
  (191, 103, 'MED-INS-GL', 9, 270, 'E11.9', '2025-11-02 19:05:00', 14, 14, 'Use as directed by clinician.', 0),
  (192, 55, 'MED-OND-4', 18, 271, 'C50.919', '2025-12-06 08:45:00', 90, 12, 'Use as directed by clinician.', 0),
  (193, 82, 'MED-HYD-5', 9, 272, 'G89.29', '2025-12-27 15:45:00', 2, 6, 'Use as directed by clinician.', 0),
  (194, 17, 'MED-SER-50', 17, 274, 'F32.9', '2025-12-26 17:55:00', 7, 30, 'Use as directed by clinician.', 0),
  (195, 43, 'MED-HYD-5', 10, 276, 'S62.609A', '2026-05-02 11:55:00', 4, 30, 'Use as directed by clinician.', 1),
  (196, 48, 'MED-OND-4', 18, 280, 'C50.919', '2026-05-20 12:50:00', 90, 30, 'Use as directed by clinician.', 1),
  (197, 40, 'MED-MET-500', 2, 281, 'E11.9', '2026-05-08 18:45:00', 30, 12, 'Use as directed by clinician.', 0),
  (198, 40, 'MED-INS-GL', 2, 281, 'E11.9', '2026-05-08 18:45:00', 30, 14, 'Use as directed by clinician.', 1),
  (199, 18, 'MED-LIS-20', 17, 282, 'I10', '2025-11-22 15:45:00', 30, 90, 'Use as directed by clinician.', 0),
  (200, 86, 'MED-HYD-5', 14, 285, 'G89.29', '2026-03-15 20:55:00', 3, 6, 'Use as directed by clinician.', 0),
  (201, 54, 'MED-LIS-20', 9, 286, 'I10', '2026-04-04 09:05:00', 30, 12, 'Use as directed by clinician.', 0),
  (202, 45, 'MED-ASA-81', 13, 287, 'I21.9', '2025-11-10 19:45:00', 30, 12, 'Use as directed by clinician.', 0),
  (203, 13, 'MED-OND-4', 8, 290, 'C50.919', '2026-05-26 09:55:00', 7, 6, 'Use as directed by clinician.', 0),
  (204, 12, 'MED-LIS-20', 2, 291, 'I10', '2026-01-26 10:35:00', 90, 10, 'Use as directed by clinician.', 0),
  (205, 87, 'MED-OND-4', 8, 293, 'C50.919', '2025-12-26 15:05:00', 14, 12, 'Use as directed by clinician.', 0),
  (206, 117, 'MED-SER-50', 7, 294, 'F32.9', '2026-04-09 16:45:00', 14, 10, 'Use as directed by clinician.', 0),
  (207, 109, 'MED-MET-500', 2, 295, 'E11.9', '2026-03-13 12:45:00', 7, 90, 'Use as directed by clinician.', 1),
  (208, 109, 'MED-INS-GL', 2, 295, 'E11.9', '2026-03-13 12:45:00', 90, 10, 'Use as directed by clinician.', 0),
  (209, 7, 'MED-ATO-40', 17, 297, 'E78.5', '2026-01-06 10:20:00', 90, 10, 'Use as directed by clinician.', 0),
  (210, 62, 'MED-HYD-5', 13, 305, 'S62.609A', '2026-04-15 14:05:00', 4, 90, 'Use as directed by clinician.', 0),
  (211, 61, 'MED-ASA-81', 3, 306, 'I21.9', '2026-02-11 12:35:00', 30, 90, 'Use as directed by clinician.', 0),
  (212, 61, 'MED-MOR-10', 3, 306, 'I21.9', '2026-02-11 12:35:00', 3, 14, 'Use as directed by clinician.', 0),
  (213, 58, 'MED-ALB-90', 18, 308, 'J44.9', '2026-04-19 14:50:00', 30, 10, 'Use as directed by clinician.', 1),
  (214, 46, 'MED-HYD-5', 9, 310, 'S62.609A', '2025-11-04 18:45:00', 5, 12, 'Use as directed by clinician.', 0),
  (215, 43, 'MED-OND-4', 18, 312, 'C50.919', '2026-04-28 09:05:00', 14, 10, 'Use as directed by clinician.', 0),
  (216, 14, 'MED-HYD-5', 14, 314, 'S01.81XA', '2025-12-27 08:45:00', 2, 12, 'Use as directed by clinician.', 0),
  (217, 43, 'MED-MET-500', 17, 315, 'E11.9', '2026-04-10 19:45:00', 7, 90, 'Use as directed by clinician.', 0),
  (218, 43, 'MED-INS-GL', 17, 315, 'E11.9', '2026-04-10 19:45:00', 7, 14, 'Use as directed by clinician.', 1),
  (219, 100, 'MED-ATO-40', 9, 316, 'E78.5', '2026-03-16 10:35:00', 7, 6, 'Use as directed by clinician.', 0),
  (220, 37, 'MED-ATO-40', 2, 317, 'E78.5', '2025-12-02 15:45:00', 7, 90, 'Use as directed by clinician.', 0),
  (221, 39, 'MED-FUR-20', 3, 318, 'I50.9', '2026-02-28 10:35:00', 14, 90, 'Use as directed by clinician.', 0),
  (222, 39, 'MED-LIS-20', 3, 318, 'I50.9', '2026-02-28 10:35:00', 30, 12, 'Use as directed by clinician.', 0),
  (223, 119, 'MED-LIS-20', 17, 319, 'I10', '2026-03-25 14:05:00', 5, 30, 'Use as directed by clinician.', 0),
  (224, 116, 'MED-HYD-5', 6, 320, 'S62.609A', '2025-11-15 11:50:00', 5, 10, 'Use as directed by clinician.', 0);


INSERT INTO treatment_protocol
  (treatment_protocol_id, department_id, icd10_code, procedure_id, protocol_name, active)
VALUES
  (1, 2, 'Z00.00', 1, 'Primary care annual wellness pathway', 1),
  (2, 2, 'E11.9', 2, 'Diabetes monitoring pathway', 1),
  (3, 2, 'I10', 3, 'Hypertension follow-up pathway', 1),
  (4, 3, 'I21.9', 4, 'Acute cardiac intervention pathway', 1),
  (5, 5, 'S01.81XA', 9, 'Emergency laceration closure pathway', 1),
  (6, 6, 'M25.561', 7, 'Orthopedic knee evaluation pathway', 1),
  (7, 8, 'C50.919', 10, 'Oncology infusion pathway', 1),
  (8, 10, 'E11.9', 2, 'Endocrinology diabetes monitoring pathway', 1);


INSERT INTO payer_contract
  (contract_id, payer_name, contract_name, performance_year, risk_model, target_pmpm)
VALUES
  (1, 'Nutmeg Medicare Advantage', '2026 MA Shared Savings', 2026, 'CMS-HCC', 915.0),
  (2, 'Harbor Commercial Health', 'Commercial ACO Quality', 2026, 'Commercial concurrent risk', 540.0),
  (3, 'Bay State Medicaid', 'Medicaid Population Health', 2026, 'State Medicaid risk tier', 690.0);


INSERT INTO patient_attribution
  (attribution_id, patient_id, contract_id, primary_care_doctor_id, attributed_start_date, risk_score, active)
VALUES
  (1, 1, 3, 4, '2026-01-04', 1.77, 1),
  (2, 2, 3, 12, '2026-01-07', 0.48, 1),
  (3, 3, 2, 14, '2026-01-11', 1.34, 1),
  (4, 4, 1, 7, '2026-01-09', 1.72, 1),
  (5, 5, 3, 17, '2026-01-09', 0.9, 1),
  (6, 6, 2, 14, '2026-01-04', 2.08, 1),
  (7, 7, 3, 9, '2026-01-02', 1.1, 1),
  (8, 8, 2, 4, '2026-01-08', 0.6, 1),
  (9, 9, 3, 4, '2026-01-03', 1.63, 1),
  (10, 10, 1, 12, '2026-01-15', 1.91, 1),
  (11, 11, 3, 4, '2026-01-03', 0.75, 1),
  (12, 12, 3, 17, '2026-01-08', 0.93, 1),
  (13, 13, 1, 17, '2026-01-09', 1.9, 1),
  (14, 14, 3, 17, '2026-01-15', 3.34, 1),
  (15, 15, 1, 2, '2026-01-08', 1.59, 1),
  (16, 16, 1, 9, '2026-01-01', 2.02, 1),
  (17, 17, 3, 4, '2026-01-15', 1.77, 1),
  (18, 18, 2, 7, '2026-01-05', 1.66, 1),
  (19, 19, 3, 12, '2026-01-08', 2.79, 1),
  (20, 20, 3, 14, '2026-01-07', 1.36, 1),
  (21, 21, 1, 12, '2026-01-03', 1.44, 1),
  (22, 22, 1, 2, '2026-01-10', 1.02, 1),
  (23, 23, 2, 2, '2026-01-14', 2.23, 1),
  (24, 24, 2, 2, '2026-01-10', 1.78, 1),
  (25, 25, 3, 17, '2026-01-01', 1.17, 1),
  (26, 26, 2, 12, '2026-01-05', 1.89, 1),
  (27, 27, 3, 2, '2026-01-12', 1.41, 1),
  (28, 28, 2, 4, '2026-01-05', 1.64, 1),
  (29, 29, 1, 12, '2026-01-03', 2.29, 1),
  (30, 30, 2, 4, '2026-01-12', 1.06, 1),
  (31, 31, 1, 7, '2026-01-12', 0.52, 1),
  (32, 32, 3, 17, '2026-01-13', 0.35, 1),
  (33, 33, 1, 14, '2026-01-07', 0.52, 1),
  (34, 34, 3, 7, '2026-01-02', 1.41, 1),
  (35, 35, 2, 14, '2026-01-15', 2.04, 1),
  (36, 36, 2, 7, '2026-01-10', 0.99, 1),
  (37, 37, 2, 7, '2026-01-03', 1.37, 1),
  (38, 38, 1, 4, '2026-01-10', 1.23, 1),
  (39, 39, 3, 4, '2026-01-15', 0.4, 1),
  (40, 40, 2, 17, '2026-01-08', 1.95, 1),
  (41, 41, 1, 2, '2026-01-13', 0.35, 1),
  (42, 42, 2, 2, '2026-01-04', 0.35, 1),
  (43, 43, 3, 9, '2026-01-15', 1.62, 1),
  (44, 44, 2, 4, '2026-01-09', 1.06, 1),
  (45, 45, 1, 14, '2026-01-06', 0.64, 1),
  (46, 46, 1, 17, '2026-01-01', 1.58, 1),
  (47, 47, 3, 17, '2026-01-09', 1.23, 1),
  (48, 48, 3, 7, '2026-01-05', 1.51, 1),
  (49, 49, 2, 9, '2026-01-09', 1.74, 1),
  (50, 50, 1, 14, '2026-01-11', 0.99, 1),
  (51, 51, 2, 14, '2026-01-09', 1.85, 1),
  (52, 52, 3, 12, '2026-01-07', 2.2, 1),
  (53, 53, 2, 4, '2026-01-05', 1.49, 1),
  (54, 54, 1, 4, '2026-01-14', 2.64, 1),
  (55, 55, 3, 12, '2026-01-08', 0.81, 1),
  (56, 56, 2, 7, '2026-01-12', 0.35, 1),
  (57, 57, 3, 4, '2026-01-12', 1.91, 1),
  (58, 58, 1, 12, '2026-01-13', 1.79, 1),
  (59, 59, 3, 12, '2026-01-02', 1.94, 1),
  (60, 60, 1, 9, '2026-01-08', 1.27, 1),
  (61, 61, 1, 12, '2026-01-09', 0.44, 1),
  (62, 62, 1, 7, '2026-01-10', 0.54, 1),
  (63, 63, 2, 4, '2026-01-14', 0.98, 1),
  (64, 64, 1, 12, '2026-01-12', 3.05, 1),
  (65, 65, 2, 17, '2026-01-07', 1.31, 1),
  (66, 66, 2, 17, '2026-01-11', 0.77, 1),
  (67, 67, 2, 7, '2026-01-04', 3.13, 1),
  (68, 68, 3, 14, '2026-01-06', 2.89, 1),
  (69, 69, 2, 7, '2026-01-11', 1.8, 1),
  (70, 70, 3, 4, '2026-01-14', 0.98, 1),
  (71, 71, 3, 7, '2026-01-14', 0.96, 1),
  (72, 72, 3, 4, '2026-01-11', 3.31, 1),
  (73, 73, 3, 9, '2026-01-13', 1.2, 1),
  (74, 74, 2, 4, '2026-01-04', 0.94, 1),
  (75, 75, 2, 7, '2026-01-03', 1.47, 1),
  (76, 76, 1, 4, '2026-01-14', 2.61, 1),
  (77, 77, 2, 14, '2026-01-14', 1.27, 1),
  (78, 78, 1, 14, '2026-01-10', 1.26, 1),
  (79, 79, 2, 2, '2026-01-12', 1.45, 1),
  (80, 80, 1, 7, '2026-01-03', 2.9, 1),
  (81, 81, 3, 9, '2026-01-05', 3.33, 1),
  (82, 82, 2, 17, '2026-01-13', 1.75, 1),
  (83, 83, 3, 7, '2026-01-10', 0.44, 1),
  (84, 84, 2, 12, '2026-01-09', 1.71, 1),
  (85, 85, 2, 17, '2026-01-12', 1.42, 1),
  (86, 86, 1, 17, '2026-01-11', 0.56, 1),
  (87, 87, 2, 17, '2026-01-04', 0.35, 1),
  (88, 88, 2, 4, '2026-01-04', 1.19, 1),
  (89, 89, 2, 2, '2026-01-01', 2.24, 1),
  (90, 90, 3, 9, '2026-01-03', 0.93, 1),
  (91, 91, 3, 2, '2026-01-06', 0.96, 1),
  (92, 92, 1, 17, '2026-01-14', 1.25, 1),
  (93, 93, 3, 12, '2026-01-13', 1.69, 1),
  (94, 94, 3, 2, '2026-01-05', 2.92, 1),
  (95, 95, 2, 14, '2026-01-01', 3.34, 1),
  (96, 96, 2, 7, '2026-01-15', 1.56, 1),
  (97, 97, 2, 14, '2026-01-05', 1.26, 1),
  (98, 98, 1, 17, '2026-01-07', 1.72, 1),
  (99, 99, 2, 4, '2026-01-03', 3.58, 1),
  (100, 100, 3, 4, '2026-01-10', 0.75, 1),
  (101, 101, 2, 7, '2026-01-01', 1.94, 1),
  (102, 102, 3, 17, '2026-01-03', 1.54, 1),
  (103, 103, 1, 9, '2026-01-04', 3.52, 1),
  (104, 104, 1, 2, '2026-01-11', 0.62, 1),
  (105, 105, 1, 7, '2026-01-13', 2.12, 1),
  (106, 106, 3, 17, '2026-01-08', 0.35, 1),
  (107, 107, 2, 4, '2026-01-09', 1.49, 1),
  (108, 108, 3, 7, '2026-01-04', 1.65, 1),
  (109, 109, 3, 17, '2026-01-06', 1.49, 1),
  (110, 110, 3, 2, '2026-01-04', 0.35, 1),
  (111, 111, 3, 12, '2026-01-11', 2.83, 1),
  (112, 112, 3, 4, '2026-01-06', 2.14, 1),
  (113, 113, 1, 17, '2026-01-01', 2.36, 1),
  (114, 114, 3, 4, '2026-01-07', 1.84, 1),
  (115, 115, 1, 12, '2026-01-09', 2.94, 1),
  (116, 116, 2, 4, '2026-01-11', 0.99, 1),
  (117, 117, 2, 7, '2026-01-07', 0.59, 1),
  (118, 118, 1, 2, '2026-01-03', 1.86, 1),
  (119, 119, 1, 17, '2026-01-01', 0.75, 1),
  (120, 120, 3, 14, '2026-01-15', 0.59, 1);


INSERT INTO quality_measure
  (measure_code, measure_name, measure_domain, target_rate)
VALUES
  ('A1C_CONTROL', 'Diabetes HbA1c test completed', 'Chronic disease', 0.82),
  ('BP_CONTROL', 'Blood pressure controlled', 'Chronic disease', 0.78),
  ('CRC_SCREEN', 'Colorectal cancer screening current', 'Preventive', 0.72),
  ('AWV_COMPLETE', 'Annual wellness visit complete', 'Preventive', 0.7),
  ('MED_RECON', 'Medication reconciliation after discharge', 'Care coordination', 0.86),
  ('DEP_SCREEN', 'Depression screening complete', 'Behavioral health', 0.76);


INSERT INTO patient_quality_gap
  (quality_gap_id, patient_id, measure_code, gap_status, identified_date, closed_date, responsible_doctor_id, notes)
VALUES
  (1, 1, 'A1C_CONTROL', 'closed', '2026-04-24', '2026-04-29', 4, 'Synthetic ACO quality gap record.'),
  (2, 1, 'CRC_SCREEN', 'open', '2026-02-22', NULL, 4, 'Synthetic ACO quality gap record.'),
  (3, 1, 'MED_RECON', 'open', '2026-04-26', NULL, 4, 'Synthetic ACO quality gap record.'),
  (4, 3, 'BP_CONTROL', 'scheduled', '2026-02-01', NULL, 14, 'Synthetic ACO quality gap record.'),
  (5, 4, 'DEP_SCREEN', 'open', '2026-02-18', NULL, 7, 'Synthetic ACO quality gap record.'),
  (6, 4, 'AWV_COMPLETE', 'scheduled', '2026-01-27', NULL, 7, 'Synthetic ACO quality gap record.'),
  (7, 6, 'BP_CONTROL', 'open', '2026-03-30', NULL, 14, 'Synthetic ACO quality gap record.'),
  (8, 6, 'A1C_CONTROL', 'open', '2026-05-07', NULL, 14, 'Synthetic ACO quality gap record.'),
  (9, 6, 'AWV_COMPLETE', 'closed', '2026-01-17', '2026-01-28', 14, 'Synthetic ACO quality gap record.'),
  (10, 7, 'AWV_COMPLETE', 'scheduled', '2026-02-03', NULL, 9, 'Synthetic ACO quality gap record.'),
  (11, 8, 'BP_CONTROL', 'scheduled', '2026-02-26', NULL, 4, 'Synthetic ACO quality gap record.'),
  (12, 9, 'DEP_SCREEN', 'scheduled', '2026-03-06', NULL, 4, 'Synthetic ACO quality gap record.'),
  (13, 10, 'BP_CONTROL', 'closed', '2026-03-31', '2026-04-29', 12, 'Synthetic ACO quality gap record.'),
  (14, 10, 'A1C_CONTROL', 'open', '2026-02-01', NULL, 12, 'Synthetic ACO quality gap record.'),
  (15, 12, 'AWV_COMPLETE', 'open', '2026-01-01', NULL, 17, 'Synthetic ACO quality gap record.'),
  (16, 13, 'BP_CONTROL', 'open', '2026-03-11', NULL, 17, 'Synthetic ACO quality gap record.'),
  (17, 13, 'A1C_CONTROL', 'closed', '2026-04-11', '2026-05-12', 17, 'Synthetic ACO quality gap record.'),
  (18, 13, 'AWV_COMPLETE', 'open', '2026-04-30', NULL, 17, 'Synthetic ACO quality gap record.'),
  (19, 15, 'A1C_CONTROL', 'open', '2026-01-23', NULL, 2, 'Synthetic ACO quality gap record.'),
  (20, 15, 'MED_RECON', 'open', '2026-03-07', NULL, 2, 'Synthetic ACO quality gap record.'),
  (21, 16, 'A1C_CONTROL', 'closed', '2026-01-12', '2026-02-17', 9, 'Synthetic ACO quality gap record.'),
  (22, 16, 'MED_RECON', 'open', '2026-04-01', NULL, 9, 'Synthetic ACO quality gap record.'),
  (23, 16, 'AWV_COMPLETE', 'scheduled', '2026-01-14', NULL, 9, 'Synthetic ACO quality gap record.'),
  (24, 17, 'AWV_COMPLETE', 'open', '2026-02-17', NULL, 4, 'Synthetic ACO quality gap record.'),
  (25, 18, 'CRC_SCREEN', 'open', '2026-01-21', NULL, 7, 'Synthetic ACO quality gap record.'),
  (26, 18, 'MED_RECON', 'scheduled', '2026-04-06', NULL, 7, 'Synthetic ACO quality gap record.'),
  (27, 18, 'AWV_COMPLETE', 'open', '2026-04-28', NULL, 7, 'Synthetic ACO quality gap record.'),
  (28, 19, 'BP_CONTROL', 'open', '2026-04-24', NULL, 12, 'Synthetic ACO quality gap record.'),
  (29, 19, 'CRC_SCREEN', 'scheduled', '2026-05-16', NULL, 12, 'Synthetic ACO quality gap record.'),
  (30, 21, 'DEP_SCREEN', 'open', '2026-04-20', NULL, 12, 'Synthetic ACO quality gap record.'),
  (31, 21, 'BP_CONTROL', 'open', '2026-01-09', NULL, 12, 'Synthetic ACO quality gap record.'),
  (32, 23, 'MED_RECON', 'scheduled', '2026-01-09', NULL, 2, 'Synthetic ACO quality gap record.'),
  (33, 23, 'AWV_COMPLETE', 'open', '2026-04-15', NULL, 2, 'Synthetic ACO quality gap record.'),
  (34, 24, 'DEP_SCREEN', 'scheduled', '2026-03-16', NULL, 2, 'Synthetic ACO quality gap record.'),
  (35, 24, 'A1C_CONTROL', 'scheduled', '2026-04-28', NULL, 2, 'Synthetic ACO quality gap record.'),
  (36, 24, 'CRC_SCREEN', 'open', '2026-03-03', NULL, 2, 'Synthetic ACO quality gap record.'),
  (37, 24, 'MED_RECON', 'closed', '2026-02-11', '2026-02-27', 2, 'Synthetic ACO quality gap record.'),
  (38, 25, 'BP_CONTROL', 'open', '2026-05-14', NULL, 17, 'Synthetic ACO quality gap record.'),
  (39, 25, 'AWV_COMPLETE', 'open', '2026-04-13', NULL, 17, 'Synthetic ACO quality gap record.'),
  (40, 27, 'CRC_SCREEN', 'open', '2026-03-29', NULL, 2, 'Synthetic ACO quality gap record.'),
  (41, 28, 'CRC_SCREEN', 'open', '2026-04-23', NULL, 4, 'Synthetic ACO quality gap record.'),
  (42, 29, 'BP_CONTROL', 'closed', '2026-05-14', '2026-05-31', 12, 'Synthetic ACO quality gap record.'),
  (43, 29, 'CRC_SCREEN', 'open', '2026-03-06', NULL, 12, 'Synthetic ACO quality gap record.'),
  (44, 29, 'MED_RECON', 'open', '2026-03-01', NULL, 12, 'Synthetic ACO quality gap record.'),
  (45, 31, 'AWV_COMPLETE', 'closed', '2026-02-18', '2026-03-04', 7, 'Synthetic ACO quality gap record.'),
  (46, 34, 'MED_RECON', 'open', '2026-01-12', NULL, 7, 'Synthetic ACO quality gap record.'),
  (47, 35, 'BP_CONTROL', 'open', '2026-01-09', NULL, 14, 'Synthetic ACO quality gap record.'),
  (48, 35, 'A1C_CONTROL', 'open', '2026-03-11', NULL, 14, 'Synthetic ACO quality gap record.'),
  (49, 35, 'AWV_COMPLETE', 'scheduled', '2026-04-06', NULL, 14, 'Synthetic ACO quality gap record.'),
  (50, 36, 'CRC_SCREEN', 'open', '2026-04-29', NULL, 7, 'Synthetic ACO quality gap record.'),
  (51, 37, 'DEP_SCREEN', 'closed', '2026-01-01', '2026-01-12', 7, 'Synthetic ACO quality gap record.'),
  (52, 40, 'BP_CONTROL', 'closed', '2026-01-20', '2026-01-31', 17, 'Synthetic ACO quality gap record.'),
  (53, 40, 'MED_RECON', 'scheduled', '2026-01-18', NULL, 17, 'Synthetic ACO quality gap record.'),
  (54, 40, 'AWV_COMPLETE', 'open', '2026-01-16', NULL, 17, 'Synthetic ACO quality gap record.'),
  (55, 43, 'BP_CONTROL', 'open', '2026-03-13', NULL, 9, 'Synthetic ACO quality gap record.'),
  (56, 43, 'CRC_SCREEN', 'scheduled', '2026-04-04', NULL, 9, 'Synthetic ACO quality gap record.'),
  (57, 43, 'MED_RECON', 'open', '2026-05-01', NULL, 9, 'Synthetic ACO quality gap record.'),
  (58, 45, 'CRC_SCREEN', 'open', '2026-05-05', NULL, 14, 'Synthetic ACO quality gap record.'),
  (59, 46, 'CRC_SCREEN', 'open', '2026-02-11', NULL, 17, 'Synthetic ACO quality gap record.'),
  (60, 47, 'BP_CONTROL', 'closed', '2026-03-11', '2026-04-03', 17, 'Synthetic ACO quality gap record.'),
  (61, 47, 'AWV_COMPLETE', 'scheduled', '2026-05-10', NULL, 17, 'Synthetic ACO quality gap record.'),
  (62, 47, 'CRC_SCREEN', 'open', '2026-04-23', NULL, 17, 'Synthetic ACO quality gap record.'),
  (63, 48, 'MED_RECON', 'closed', '2026-04-10', '2026-05-24', 7, 'Synthetic ACO quality gap record.'),
  (64, 51, 'DEP_SCREEN', 'closed', '2026-03-01', '2026-04-05', 14, 'Synthetic ACO quality gap record.'),
  (65, 51, 'BP_CONTROL', 'scheduled', '2026-03-02', NULL, 14, 'Synthetic ACO quality gap record.'),
  (66, 51, 'MED_RECON', 'open', '2026-02-01', NULL, 14, 'Synthetic ACO quality gap record.'),
  (67, 51, 'AWV_COMPLETE', 'open', '2026-02-16', NULL, 14, 'Synthetic ACO quality gap record.'),
  (68, 52, 'AWV_COMPLETE', 'closed', '2026-01-23', '2026-02-27', 12, 'Synthetic ACO quality gap record.'),
  (69, 54, 'MED_RECON', 'scheduled', '2026-01-27', NULL, 4, 'Synthetic ACO quality gap record.'),
  (70, 54, 'AWV_COMPLETE', 'closed', '2026-01-09', '2026-01-18', 4, 'Synthetic ACO quality gap record.'),
  (71, 55, 'BP_CONTROL', 'scheduled', '2026-05-01', NULL, 12, 'Synthetic ACO quality gap record.'),
  (72, 57, 'BP_CONTROL', 'open', '2026-02-15', NULL, 4, 'Synthetic ACO quality gap record.'),
  (73, 57, 'AWV_COMPLETE', 'closed', '2026-02-21', '2026-03-19', 4, 'Synthetic ACO quality gap record.'),
  (74, 58, 'A1C_CONTROL', 'closed', '2026-04-15', '2026-05-13', 12, 'Synthetic ACO quality gap record.'),
  (75, 58, 'AWV_COMPLETE', 'open', '2026-04-15', NULL, 12, 'Synthetic ACO quality gap record.'),
  (76, 59, 'CRC_SCREEN', 'open', '2026-01-26', NULL, 12, 'Synthetic ACO quality gap record.'),
  (77, 59, 'AWV_COMPLETE', 'scheduled', '2026-01-01', NULL, 12, 'Synthetic ACO quality gap record.'),
  (78, 61, 'BP_CONTROL', 'closed', '2026-04-15', '2026-05-03', 12, 'Synthetic ACO quality gap record.'),
  (79, 61, 'CRC_SCREEN', 'scheduled', '2026-03-24', NULL, 12, 'Synthetic ACO quality gap record.'),
  (80, 62, 'AWV_COMPLETE', 'open', '2026-03-19', NULL, 7, 'Synthetic ACO quality gap record.'),
  (81, 63, 'BP_CONTROL', 'open', '2026-04-28', NULL, 4, 'Synthetic ACO quality gap record.'),
  (82, 63, 'DEP_SCREEN', 'scheduled', '2026-04-24', NULL, 4, 'Synthetic ACO quality gap record.'),
  (83, 64, 'BP_CONTROL', 'open', '2026-03-19', NULL, 12, 'Synthetic ACO quality gap record.'),
  (84, 64, 'MED_RECON', 'closed', '2026-05-14', '2026-05-27', 12, 'Synthetic ACO quality gap record.'),
  (85, 65, 'BP_CONTROL', 'open', '2026-02-22', NULL, 17, 'Synthetic ACO quality gap record.'),
  (86, 66, 'BP_CONTROL', 'closed', '2026-03-11', '2026-03-29', 17, 'Synthetic ACO quality gap record.'),
  (87, 66, 'AWV_COMPLETE', 'scheduled', '2026-02-21', NULL, 17, 'Synthetic ACO quality gap record.'),
  (88, 67, 'MED_RECON', 'scheduled', '2026-02-23', NULL, 7, 'Synthetic ACO quality gap record.'),
  (89, 68, 'A1C_CONTROL', 'closed', '2026-04-28', '2026-05-13', 14, 'Synthetic ACO quality gap record.'),
  (90, 68, 'CRC_SCREEN', 'scheduled', '2026-04-19', NULL, 14, 'Synthetic ACO quality gap record.'),
  (91, 68, 'MED_RECON', 'open', '2026-01-31', NULL, 14, 'Synthetic ACO quality gap record.'),
  (92, 68, 'AWV_COMPLETE', 'scheduled', '2026-03-23', NULL, 14, 'Synthetic ACO quality gap record.'),
  (93, 69, 'DEP_SCREEN', 'open', '2026-03-25', NULL, 7, 'Synthetic ACO quality gap record.'),
  (94, 69, 'BP_CONTROL', 'closed', '2026-01-10', '2026-02-01', 7, 'Synthetic ACO quality gap record.'),
  (95, 69, 'MED_RECON', 'open', '2026-01-14', NULL, 7, 'Synthetic ACO quality gap record.'),
  (96, 69, 'AWV_COMPLETE', 'open', '2026-03-03', NULL, 7, 'Synthetic ACO quality gap record.'),
  (97, 70, 'BP_CONTROL', 'closed', '2026-03-11', '2026-03-22', 4, 'Synthetic ACO quality gap record.'),
  (98, 70, 'CRC_SCREEN', 'closed', '2026-05-03', '2026-06-08', 4, 'Synthetic ACO quality gap record.'),
  (99, 71, 'BP_CONTROL', 'scheduled', '2026-01-09', NULL, 7, 'Synthetic ACO quality gap record.'),
  (100, 71, 'CRC_SCREEN', 'open', '2026-03-19', NULL, 7, 'Synthetic ACO quality gap record.'),
  (101, 72, 'CRC_SCREEN', 'closed', '2026-04-17', '2026-05-06', 4, 'Synthetic ACO quality gap record.'),
  (102, 72, 'MED_RECON', 'closed', '2026-02-17', '2026-03-15', 4, 'Synthetic ACO quality gap record.'),
  (103, 72, 'AWV_COMPLETE', 'open', '2026-04-13', NULL, 4, 'Synthetic ACO quality gap record.'),
  (104, 75, 'BP_CONTROL', 'scheduled', '2026-03-20', NULL, 7, 'Synthetic ACO quality gap record.'),
  (105, 75, 'CRC_SCREEN', 'closed', '2026-04-30', '2026-05-09', 7, 'Synthetic ACO quality gap record.'),
  (106, 76, 'DEP_SCREEN', 'open', '2026-05-13', NULL, 4, 'Synthetic ACO quality gap record.'),
  (107, 76, 'BP_CONTROL', 'open', '2026-04-19', NULL, 4, 'Synthetic ACO quality gap record.'),
  (108, 77, 'BP_CONTROL', 'open', '2026-02-18', NULL, 14, 'Synthetic ACO quality gap record.'),
  (109, 77, 'AWV_COMPLETE', 'open', '2026-01-20', NULL, 14, 'Synthetic ACO quality gap record.'),
  (110, 79, 'MED_RECON', 'open', '2026-04-15', NULL, 2, 'Synthetic ACO quality gap record.'),
  (111, 80, 'CRC_SCREEN', 'closed', '2026-04-02', '2026-04-27', 7, 'Synthetic ACO quality gap record.'),
  (112, 81, 'BP_CONTROL', 'closed', '2026-03-12', '2026-04-01', 9, 'Synthetic ACO quality gap record.'),
  (113, 81, 'A1C_CONTROL', 'open', '2026-03-18', NULL, 9, 'Synthetic ACO quality gap record.'),
  (114, 81, 'CRC_SCREEN', 'scheduled', '2026-01-12', NULL, 9, 'Synthetic ACO quality gap record.'),
  (115, 81, 'MED_RECON', 'scheduled', '2026-01-31', NULL, 9, 'Synthetic ACO quality gap record.'),
  (116, 81, 'AWV_COMPLETE', 'scheduled', '2026-03-27', NULL, 9, 'Synthetic ACO quality gap record.'),
  (117, 82, 'A1C_CONTROL', 'open', '2026-04-13', NULL, 17, 'Synthetic ACO quality gap record.'),
  (118, 82, 'CRC_SCREEN', 'open', '2026-04-07', NULL, 17, 'Synthetic ACO quality gap record.'),
  (119, 82, 'AWV_COMPLETE', 'closed', '2026-02-03', '2026-03-19', 17, 'Synthetic ACO quality gap record.'),
  (120, 83, 'CRC_SCREEN', 'closed', '2026-04-14', '2026-05-13', 7, 'Synthetic ACO quality gap record.'),
  (121, 84, 'A1C_CONTROL', 'scheduled', '2026-01-20', NULL, 12, 'Synthetic ACO quality gap record.'),
  (122, 84, 'CRC_SCREEN', 'closed', '2026-01-21', '2026-03-05', 12, 'Synthetic ACO quality gap record.'),
  (123, 84, 'MED_RECON', 'scheduled', '2026-02-03', NULL, 12, 'Synthetic ACO quality gap record.'),
  (124, 84, 'AWV_COMPLETE', 'scheduled', '2026-03-05', NULL, 12, 'Synthetic ACO quality gap record.'),
  (125, 86, 'BP_CONTROL', 'closed', '2026-03-24', '2026-05-08', 17, 'Synthetic ACO quality gap record.'),
  (126, 86, 'AWV_COMPLETE', 'open', '2026-01-14', NULL, 17, 'Synthetic ACO quality gap record.'),
  (127, 87, 'BP_CONTROL', 'closed', '2026-04-17', '2026-04-27', 17, 'Synthetic ACO quality gap record.'),
  (128, 88, 'AWV_COMPLETE', 'closed', '2026-04-15', '2026-04-23', 4, 'Synthetic ACO quality gap record.'),
  (129, 89, 'CRC_SCREEN', 'closed', '2026-02-20', '2026-03-10', 2, 'Synthetic ACO quality gap record.'),
  (130, 92, 'BP_CONTROL', 'open', '2026-03-18', NULL, 17, 'Synthetic ACO quality gap record.'),
  (131, 93, 'BP_CONTROL', 'closed', '2026-05-09', '2026-05-17', 12, 'Synthetic ACO quality gap record.'),
  (132, 93, 'A1C_CONTROL', 'open', '2026-04-04', NULL, 12, 'Synthetic ACO quality gap record.'),
  (133, 94, 'DEP_SCREEN', 'open', '2026-04-08', NULL, 2, 'Synthetic ACO quality gap record.'),
  (134, 94, 'CRC_SCREEN', 'closed', '2026-02-10', '2026-03-07', 2, 'Synthetic ACO quality gap record.'),
  (135, 94, 'MED_RECON', 'scheduled', '2026-02-28', NULL, 2, 'Synthetic ACO quality gap record.'),
  (136, 95, 'MED_RECON', 'scheduled', '2026-04-15', NULL, 14, 'Synthetic ACO quality gap record.'),
  (137, 95, 'AWV_COMPLETE', 'open', '2026-01-19', NULL, 14, 'Synthetic ACO quality gap record.'),
  (138, 96, 'BP_CONTROL', 'open', '2026-02-22', NULL, 7, 'Synthetic ACO quality gap record.'),
  (139, 96, 'AWV_COMPLETE', 'open', '2026-05-15', NULL, 7, 'Synthetic ACO quality gap record.'),
  (140, 99, 'MED_RECON', 'open', '2026-04-14', NULL, 4, 'Synthetic ACO quality gap record.'),
  (141, 99, 'AWV_COMPLETE', 'open', '2026-04-20', NULL, 4, 'Synthetic ACO quality gap record.'),
  (142, 100, 'BP_CONTROL', 'closed', '2026-04-17', '2026-05-27', 4, 'Synthetic ACO quality gap record.'),
  (143, 101, 'CRC_SCREEN', 'closed', '2026-03-24', '2026-04-29', 7, 'Synthetic ACO quality gap record.'),
  (144, 102, 'BP_CONTROL', 'open', '2026-02-05', NULL, 17, 'Synthetic ACO quality gap record.'),
  (145, 103, 'BP_CONTROL', 'open', '2026-05-11', NULL, 9, 'Synthetic ACO quality gap record.'),
  (146, 103, 'MED_RECON', 'open', '2026-01-10', NULL, 9, 'Synthetic ACO quality gap record.'),
  (147, 104, 'BP_CONTROL', 'open', '2026-01-21', NULL, 2, 'Synthetic ACO quality gap record.'),
  (148, 105, 'A1C_CONTROL', 'closed', '2026-04-04', '2026-04-24', 7, 'Synthetic ACO quality gap record.'),
  (149, 105, 'AWV_COMPLETE', 'closed', '2026-05-11', '2026-05-31', 7, 'Synthetic ACO quality gap record.'),
  (150, 107, 'CRC_SCREEN', 'open', '2026-04-17', NULL, 4, 'Synthetic ACO quality gap record.'),
  (151, 108, 'A1C_CONTROL', 'closed', '2026-03-31', '2026-05-02', 7, 'Synthetic ACO quality gap record.'),
  (152, 109, 'BP_CONTROL', 'open', '2026-02-23', NULL, 17, 'Synthetic ACO quality gap record.'),
  (153, 109, 'AWV_COMPLETE', 'open', '2026-03-10', NULL, 17, 'Synthetic ACO quality gap record.'),
  (154, 111, 'CRC_SCREEN', 'open', '2026-03-28', NULL, 12, 'Synthetic ACO quality gap record.'),
  (155, 111, 'AWV_COMPLETE', 'open', '2026-02-28', NULL, 12, 'Synthetic ACO quality gap record.'),
  (156, 112, 'BP_CONTROL', 'closed', '2026-01-30', '2026-02-18', 4, 'Synthetic ACO quality gap record.'),
  (157, 112, 'CRC_SCREEN', 'closed', '2026-01-04', '2026-02-08', 4, 'Synthetic ACO quality gap record.'),
  (158, 112, 'AWV_COMPLETE', 'scheduled', '2026-03-18', NULL, 4, 'Synthetic ACO quality gap record.'),
  (159, 113, 'AWV_COMPLETE', 'scheduled', '2026-01-29', NULL, 17, 'Synthetic ACO quality gap record.'),
  (160, 114, 'MED_RECON', 'closed', '2026-04-30', '2026-06-02', 4, 'Synthetic ACO quality gap record.'),
  (161, 115, 'MED_RECON', 'scheduled', '2026-03-26', NULL, 12, 'Synthetic ACO quality gap record.'),
  (162, 115, 'AWV_COMPLETE', 'open', '2026-04-07', NULL, 12, 'Synthetic ACO quality gap record.'),
  (163, 117, 'DEP_SCREEN', 'open', '2026-04-12', NULL, 7, 'Synthetic ACO quality gap record.'),
  (164, 117, 'CRC_SCREEN', 'open', '2026-01-26', NULL, 7, 'Synthetic ACO quality gap record.'),
  (165, 118, 'A1C_CONTROL', 'open', '2026-03-09', NULL, 2, 'Synthetic ACO quality gap record.'),
  (166, 118, 'CRC_SCREEN', 'scheduled', '2026-04-04', NULL, 2, 'Synthetic ACO quality gap record.'),
  (167, 118, 'MED_RECON', 'open', '2026-01-19', NULL, 2, 'Synthetic ACO quality gap record.'),
  (168, 118, 'AWV_COMPLETE', 'open', '2026-01-05', NULL, 2, 'Synthetic ACO quality gap record.'),
  (169, 119, 'BP_CONTROL', 'closed', '2026-02-23', '2026-03-11', 17, 'Synthetic ACO quality gap record.'),
  (170, 119, 'AWV_COMPLETE', 'closed', '2026-03-12', '2026-03-31', 17, 'Synthetic ACO quality gap record.');


CREATE VIEW vw_controlled_prescription_history AS
SELECT
  p.patient_id,
  CONCAT_WS(' ', p.first_name, p.last_name) AS patient_name,
  m.medication_code,
  m.medication_name,
  COUNT(*) AS controlled_prescription_count,
  MIN(pp.prescribed_at) AS first_prescribed_at,
  MAX(pp.prescribed_at) AS last_prescribed_at,
  GROUP_CONCAT(DISTINCT CONCAT_WS(' ', d.first_name, d.last_name)
    ORDER BY d.last_name, d.first_name SEPARATOR '; ') AS prescribing_doctors
FROM patient_prescription pp
JOIN patient p ON p.patient_id = pp.patient_id
JOIN medication m ON m.medication_code = pp.medication_code
JOIN doctor d ON d.doctor_id = pp.prescribing_doctor_id
WHERE m.controlled_substance = TRUE
GROUP BY p.patient_id, p.first_name, p.last_name, m.medication_code, m.medication_name;

CREATE VIEW vw_doctor_activity_summary AS
SELECT
  d.doctor_id,
  CONCAT_WS(' ', d.first_name, d.last_name) AS doctor_name,
  dep.department_name AS primary_department,
  h.hospital_name AS primary_hospital,
  d.years_practice,
  d.board_certified,
  COUNT(DISTINCT hv.visit_id) AS visits_attended,
  COUNT(DISTINCT vd.icd10_code) AS diagnoses_recorded,
  COUNT(DISTINCT vp.visit_procedure_id) AS procedures_performed,
  COUNT(DISTINCT pp.prescription_id) AS prescriptions_written
FROM doctor d
JOIN department dep ON dep.department_id = d.primary_department_id
JOIN hospital h ON h.hospital_id = dep.hospital_id
LEFT JOIN hospital_visit hv ON hv.attending_doctor_id = d.doctor_id
LEFT JOIN visit_diagnosis vd ON vd.diagnosing_doctor_id = d.doctor_id
LEFT JOIN visit_procedure vp ON vp.performing_doctor_id = d.doctor_id
LEFT JOIN patient_prescription pp ON pp.prescribing_doctor_id = d.doctor_id
GROUP BY d.doctor_id, d.first_name, d.last_name, dep.department_name, h.hospital_name,
  d.years_practice, d.board_certified;

CREATE VIEW vw_department_resource_profile AS
SELECT
  dep.department_id,
  h.hospital_name,
  dep.department_name,
  dep.operating_budget,
  COALESCE(doc.doctor_count, 0) AS doctor_count,
  COALESCE(v.visit_count, 0) AS visit_count,
  COALESCE(v.unique_patient_count, 0) AS unique_patient_count,
  COALESCE(proc.procedure_count, 0) AS procedure_count,
  COALESCE(proc.total_procedure_cost, 0.00) AS total_procedure_cost,
  COALESCE(tp.active_protocol_count, 0) AS active_protocol_count
FROM department dep
JOIN hospital h ON h.hospital_id = dep.hospital_id
LEFT JOIN (
  SELECT primary_department_id AS department_id, COUNT(*) AS doctor_count
  FROM doctor
  WHERE employment_status = 'active'
  GROUP BY primary_department_id
) doc ON doc.department_id = dep.department_id
LEFT JOIN (
  SELECT admitting_department_id AS department_id, COUNT(*) AS visit_count,
    COUNT(DISTINCT patient_id) AS unique_patient_count
  FROM hospital_visit
  GROUP BY admitting_department_id
) v ON v.department_id = dep.department_id
LEFT JOIN (
  SELECT department_id, COUNT(*) AS procedure_count, SUM(actual_cost) AS total_procedure_cost
  FROM visit_procedure
  GROUP BY department_id
) proc ON proc.department_id = dep.department_id
LEFT JOIN (
  SELECT department_id, COUNT(*) AS active_protocol_count
  FROM treatment_protocol
  WHERE active = TRUE
  GROUP BY department_id
) tp ON tp.department_id = dep.department_id;

CREATE VIEW vw_aco_patient_panel AS
SELECT
  p.patient_id,
  CONCAT_WS(' ', p.first_name, p.last_name) AS patient_name,
  pc.payer_name,
  pc.contract_name,
  pa.risk_score,
  CONCAT_WS(' ', d.first_name, d.last_name) AS primary_care_doctor,
  COUNT(DISTINCT hv.visit_id) AS encounters,
  SUM(CASE WHEN qg.gap_status IN ('open', 'scheduled') THEN 1 ELSE 0 END) AS open_quality_gaps
FROM patient p
JOIN patient_attribution pa ON pa.patient_id = p.patient_id AND pa.active = TRUE
JOIN payer_contract pc ON pc.contract_id = pa.contract_id
JOIN doctor d ON d.doctor_id = pa.primary_care_doctor_id
LEFT JOIN hospital_visit hv ON hv.patient_id = p.patient_id
LEFT JOIN patient_quality_gap qg ON qg.patient_id = p.patient_id
GROUP BY p.patient_id, p.first_name, p.last_name, pc.payer_name, pc.contract_name,
  pa.risk_score, d.first_name, d.last_name;

CREATE VIEW vw_quality_gap_summary AS
SELECT
  qm.measure_code,
  qm.measure_name,
  qm.measure_domain,
  qm.target_rate,
  COUNT(qg.quality_gap_id) AS total_gaps,
  SUM(CASE WHEN qg.gap_status = 'open' THEN 1 ELSE 0 END) AS open_gaps,
  SUM(CASE WHEN qg.gap_status = 'scheduled' THEN 1 ELSE 0 END) AS scheduled_gaps,
  SUM(CASE WHEN qg.gap_status = 'closed' THEN 1 ELSE 0 END) AS closed_gaps,
  ROUND(SUM(CASE WHEN qg.gap_status = 'closed' THEN 1 ELSE 0 END) / NULLIF(COUNT(qg.quality_gap_id), 0), 4) AS closure_rate
FROM quality_measure qm
LEFT JOIN patient_quality_gap qg ON qg.measure_code = qm.measure_code
GROUP BY qm.measure_code, qm.measure_name, qm.measure_domain, qm.target_rate;

-- Portfolio report examples:
-- SELECT * FROM vw_aco_patient_panel WHERE risk_score >= 2.00 ORDER BY risk_score DESC;
-- SELECT * FROM vw_quality_gap_summary ORDER BY open_gaps DESC;
-- SELECT * FROM vw_controlled_prescription_history ORDER BY controlled_prescription_count DESC;
-- SELECT * FROM vw_department_resource_profile ORDER BY visit_count DESC;
