Hospital sample database — MongoDB, flat (287,518 rows)

A collection per table. Each primary key is the document _id; foreign keys are fields under their own names, so the SQL version's joins become $lookup stages.

Load it:
  sh import.sh                    (into mongodb://localhost:27017)
  sh import.sh "<connection string>"

Or one collection at a time: mongoimport --db hospital --collection <name> --file <name>.ndjson

Collections:
  admissions — 2,000 documents
  allergies — 20 documents
  appointments — 100,000 documents
  beds — 600 documents
  billing — 20,000 documents
  billing_items — 40,000 documents
  departments — 12 documents
  doctors — 80 documents
  insurance_policies — 4,000 documents
  insurance_providers — 10 documents
  inventory_categories — 8 documents
  inventory_items — 150 documents
  lab_requests — 12,000 documents
  lab_results — 11,000 documents
  lab_tests — 40 documents
  medical_records — 25,000 documents
  medications — 120 documents
  patient_allergies — 3,000 documents
  patients — 8,000 documents
  payments — 18,000 documents
  prescription_items — 22,000 documents
  prescriptions — 15,000 documents
  purchase_order_items — 500 documents
  purchase_orders — 100 documents
  rooms — 200 documents
  schedules — 2,000 documents
  staff — 200 documents
  staff_roles — 8 documents
  surgeries — 30 documents
  surgical_procedures — 400 documents
  vendors — 20 documents
  visitors — 3,000 documents
  wards — 20 documents

Types: numeric columns are Decimal128, so totals stay exact; dates and timestamps are
Date values read as UTC (the data has no time zone); times and UUIDs are strings;
JSON columns are embedded objects.

Synthetic data, CC0-1.0, from databasesample.com. The same rows as the SQL and CSV files.
