Hospital sample database — MongoDB, embedded (4,138 rows)

Tables that belong to another are folded into it as arrays, so the documents read the way the application uses them. The rest are collections of their own, joined by key as in the flat version.

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, each with its billing_items
  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
  patients — 80 documents, each with its patient_allergies
  payments — 180 documents
  prescriptions — 150 documents, each with its prescription_items
  purchase_orders — 10 documents, each with its purchase_order_items
  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

Folded in (no collection of their own):
  billing_items — 400 rows, as the "billing_items" array on billing (its billing_id is the parent's _id)
  patient_allergies — 30 rows, as the "patient_allergies" array on patients (its patient_id is the parent's _id)
  prescription_items — 220 rows, as the "prescription_items" array on prescriptions (its prescription_id is the parent's _id)
  purchase_order_items — 10 rows, as the "purchase_order_items" array on purchase_orders (its purchase_order_id is the parent's _id)

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.
