Hospital sample database — MongoDB, flat (4,138 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 — 20 documents
  allergies — 20 documents
  appointments — 1,000 documents
  beds — 600 documents
  billing — 200 documents
  billing_items — 400 documents
  departments — 12 documents
  doctors — 10 documents
  insurance_policies — 40 documents
  insurance_providers — 10 documents
  inventory_categories — 8 documents
  inventory_items — 150 documents
  lab_requests — 120 documents
  lab_results — 110 documents
  lab_tests — 40 documents
  medical_records — 250 documents
  medications — 120 documents
  patient_allergies — 30 documents
  patients — 80 documents
  payments — 180 documents
  prescription_items — 220 documents
  prescriptions — 150 documents
  purchase_order_items — 10 documents
  purchase_orders — 10 documents
  rooms — 200 documents
  schedules — 20 documents
  staff — 10 documents
  staff_roles — 8 documents
  surgeries — 30 documents
  surgical_procedures — 10 documents
  vendors — 20 documents
  visitors — 30 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.
