{
  "format": "dataset-manifest/1",
  "slug": "patient-journey-dataset",
  "version": 1,
  "seed": "patient-journey-dataset:1",
  "spec": {
    "format": "dataset/1",
    "slug": "patient-journey-dataset",
    "name": "Patient Journey Dataset",
    "tagline": "Patient demographics, admissions, treatments, providers, and billing records from a hospital's care journey.",
    "description": "Patients navigate through their healthcare journey at the hospital, starting from the moment they arrive for admission to the treatment they receive and eventual discharge. Each patient has a unique profile containing demographic information that informs their care. Admissions create a record of when and why patients come to the hospital, linking directly to the treatments they undergo, which are managed by various healthcare providers. Billing information captures the financial transactions associated with each treatment and visit, while appointments ensure that patients receive timely follow-ups or outpatient care. \n\nIn this dataset, rows in the patients table represent individual patients, detailing their characteristics and background. The admissions table connects each patient to their visit record, where the specifics of their arrival and associated treatments are noted. Treatments are tied to both patients and healthcare providers, illustrating the collaboration necessary for effective patient care. Billing information is linked to both the admissions and treatments, detailing the costs incurred during the patient's stay. Finally, the appointments table tracks future interactions, ensuring continuity of care.\n\nThis dataset answers critical questions about patient flows, treatment outcomes, and financial aspects of hospital operations. Developers can explore trends in admissions based on demographics, analyze the effectiveness of different treatments for common conditions, and assess patterns in billing and appointments. This environment provides ample opportunity to practice skills related to relational databases, data cleaning, and analysis.\n\nIt’s important to note that the data within this dataset is synthetic, designed to simulate real-world scenarios in a hospital setting for educational and developmental purposes.",
    "domain": "healthcare",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "patient care",
      "healthcare providers",
      "treatment plans",
      "admissions",
      "billing",
      "outpatient",
      "inpatient",
      "demographics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "patients": {
        "description": "This table contains demographic information about patients. Each row represents a unique patient, linking to their healthcare records.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each patient."
          },
          "first_name": {
            "kind": "firstName",
            "description": "Patient's first name."
          },
          "last_name": {
            "kind": "lastName",
            "description": "Patient's last name."
          },
          "dob": {
            "kind": "date",
            "from": "1930-01-01",
            "to": "2023-12-31",
            "description": "Date of birth of the patient."
          },
          "gender": {
            "kind": "enum",
            "values": [
              "male",
              "female",
              "other"
            ],
            "description": "Gender of the patient."
          },
          "contact_number": {
            "kind": "phone",
            "description": "Contact number of the patient."
          },
          "email": {
            "kind": "email",
            "from": [
              "first_name",
              "last_name"
            ],
            "description": "Email address of the patient."
          }
        }
      },
      "admissions": {
        "description": "This table records the admissions of patients into the hospital. Each row links to a patient and includes details of their admission.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each admission record."
          },
          "patient_id": {
            "kind": "fk",
            "ref": "patients.id",
            "description": "Link to the patient being admitted."
          },
          "admission_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date and time of admission.",
            "dayProfile": "waking"
          },
          "discharge_date": {
            "kind": "datetime",
            "after": "admission_date",
            "withinDays": 60,
            "description": "Date and time of discharge."
          },
          "status": {
            "kind": "enum",
            "values": [
              "admitted",
              "discharged"
            ],
            "description": "Current status of the patient in the hospital."
          },
          "reason": {
            "kind": "words",
            "max": 50,
            "description": "Reason for admission."
          }
        }
      },
      "treatments": {
        "description": "This table contains information on the treatments provided to patients during their hospital stay. Each treatment entry links to a specific admission record.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each treatment record."
          },
          "admission_id": {
            "kind": "fk",
            "ref": "admissions.id",
            "description": "Link to the admission record for the patient."
          },
          "treatment_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date the treatment was administered.",
            "dayProfile": "waking"
          },
          "treatment_type": {
            "kind": "enum",
            "values": [
              "medication",
              "surgery",
              "therapy"
            ],
            "description": "Type of treatment provided."
          },
          "provider_id": {
            "kind": "fk",
            "ref": "providers.id",
            "description": "Link to the healthcare provider administering the treatment."
          },
          "notes": {
            "kind": "sentence",
            "max": 200,
            "nullable": true,
            "description": "Additional notes regarding the treatment."
          }
        }
      },
      "providers": {
        "description": "This table lists healthcare providers working in the hospital. Each provider has unique credentials and areas of expertise.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each healthcare provider."
          },
          "first_name": {
            "kind": "firstName",
            "description": "Provider's first name."
          },
          "last_name": {
            "kind": "lastName",
            "description": "Provider's last name."
          },
          "specialty": {
            "kind": "enum",
            "values": [
              "cardiology",
              "orthopedics",
              "neurology",
              "general"
            ],
            "description": "Specialty of the provider."
          },
          "contact_info": {
            "kind": "words",
            "max": 100,
            "description": "Contact information for the provider."
          }
        }
      },
      "billing": {
        "description": "This table contains billing information related to patient admissions and treatments. Each entry links to an admission record.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each billing record."
          },
          "admission_id": {
            "kind": "fk",
            "ref": "admissions.id",
            "description": "Link to the related admission record."
          },
          "billing_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date the billing was issued.",
            "dayProfile": "business"
          },
          "amount": {
            "kind": "decimal",
            "min": 50,
            "max": 20000,
            "scale": 2,
            "description": "Total amount billed for services."
          },
          "status": {
            "kind": "enum",
            "values": [
              "paid",
              "pending",
              "overdue"
            ],
            "description": "Current status of the billing."
          }
        }
      },
      "appointments": {
        "description": "This table records outpatient appointments for patients. Each appointment entry links to a patient and a provider.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each appointment."
          },
          "patient_id": {
            "kind": "fk",
            "ref": "patients.id",
            "description": "Link to the patient who made the appointment."
          },
          "provider_id": {
            "kind": "fk",
            "ref": "providers.id",
            "description": "Link to the provider for the appointment."
          },
          "appointment_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "Date and time of the scheduled appointment.",
            "dayProfile": "business"
          },
          "reason": {
            "kind": "words",
            "max": 50,
            "description": "Reason for the outpatient appointment."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "timestamped",
      "monetary"
    ],
    "analysisQuestions": [
      "What are the most common reasons for patient admissions?",
      "How does treatment type vary by provider specialty?",
      "What percentage of bills are paid on time?",
      "Which days have the highest number of outpatient appointments?",
      "How long do patients typically stay in the hospital?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Patients and Admissions",
        "sql": "SELECT patients.first_name, patients.last_name, admissions.admission_date FROM patients JOIN admissions ON patients.id = admissions.patient_id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Treatments by Type",
        "sql": "SELECT treatment_type, COUNT(*) FROM treatments GROUP BY treatment_type;",
        "dialect": "postgres"
      },
      {
        "title": "Average Billing Amount by Status",
        "sql": "SELECT status, AVG(amount) FROM billing GROUP BY status;",
        "dialect": "postgres"
      },
      {
        "title": "Patients Treated by Provider Specialty",
        "sql": "SELECT providers.specialty, COUNT(treatments.id) FROM treatments JOIN providers ON treatments.provider_id = providers.id GROUP BY providers.specialty;",
        "dialect": "postgres"
      },
      {
        "title": "Discharge Rates Over Time",
        "sql": "SELECT DATE_TRUNC('month', discharge_date) AS month, COUNT(*) FROM admissions WHERE status = 'discharged' GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Hospital Management System Development",
        "body": "Developers building a hospital management system can utilize this dataset to seed their database with realistic patient and treatment data, ensuring their application can handle various patient scenarios effectively."
      },
      {
        "title": "Healthcare Analytics Platform",
        "body": "Data analysts working on a healthcare analytics platform can leverage this dataset to create visualizations and reports that highlight patient flow, treatment outcomes, and billing trends, aiding in operational decision-making."
      },
      {
        "title": "Training for Medical Students",
        "body": "Medical educators may use this dataset to train students on patient case management, allowing students to analyze and understand treatment plans and healthcare provider interactions in a simulated environment."
      },
      {
        "title": "Research on Healthcare Inefficiencies",
        "body": "Researchers focusing on healthcare inefficiencies can analyze this dataset to identify trends in patient admissions and treatment delays, helping to pinpoint areas for improvement within hospital operations."
      }
    ]
  },
  "counts": {
    "patients": 200,
    "admissions": 300,
    "billing": 300,
    "providers": 100,
    "appointments": 250,
    "treatments": 400
  },
  "stats": {
    "patients": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "first_name": {
          "nulls": 0,
          "distinct": 77,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 0,
          "distinct": 68,
          "min": "Adams",
          "max": "Zhang"
        },
        "dob": {
          "nulls": 0,
          "distinct": 200,
          "min": "1931-08-14",
          "max": "2022-09-16"
        },
        "gender": {
          "nulls": 0,
          "distinct": 3,
          "min": "female",
          "max": "other"
        },
        "contact_number": {
          "nulls": 0,
          "distinct": 195
        },
        "email": {
          "nulls": 0,
          "distinct": 198
        }
      }
    },
    "admissions": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "patient_id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 200
        },
        "admission_date": {
          "nulls": 0,
          "distinct": 300,
          "min": "2020-01-10 19:06:58",
          "max": "2023-12-27 16:26:43"
        },
        "discharge_date": {
          "nulls": 0,
          "distinct": 300,
          "min": "2020-01-14 18:01:33",
          "max": "2024-02-12 06:50:40"
        },
        "status": {
          "nulls": 0,
          "distinct": 2,
          "min": "admitted",
          "max": "discharged"
        },
        "reason": {
          "nulls": 0,
          "distinct": 300
        }
      }
    },
    "treatments": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "admission_id": {
          "nulls": 0,
          "distinct": 219,
          "min": 2,
          "max": 300
        },
        "treatment_date": {
          "nulls": 0,
          "distinct": 400,
          "min": "2020-01-04 11:06:08",
          "max": "2023-12-22 23:00:29"
        },
        "treatment_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "medication",
          "max": "therapy"
        },
        "provider_id": {
          "nulls": 0,
          "distinct": 98,
          "min": 1,
          "max": 100
        },
        "notes": {
          "nulls": 48,
          "distinct": 351
        }
      }
    },
    "providers": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "first_name": {
          "nulls": 0,
          "distinct": 58,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 0,
          "distinct": 52,
          "min": "Adams",
          "max": "Young"
        },
        "specialty": {
          "nulls": 0,
          "distinct": 4,
          "min": "cardiology",
          "max": "orthopedics"
        },
        "contact_info": {
          "nulls": 0,
          "distinct": 100
        }
      }
    },
    "billing": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "admission_id": {
          "nulls": 0,
          "distinct": 187,
          "min": 2,
          "max": 300
        },
        "billing_date": {
          "nulls": 0,
          "distinct": 300,
          "min": "2020-01-07 13:33:24",
          "max": "2023-12-29 02:51:11"
        },
        "amount": {
          "nulls": 0,
          "distinct": 300,
          "min": 61.9,
          "max": 19923.26
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "overdue",
          "max": "pending"
        }
      }
    },
    "appointments": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "patient_id": {
          "nulls": 0,
          "distinct": 148,
          "min": 1,
          "max": 198
        },
        "provider_id": {
          "nulls": 0,
          "distinct": 96,
          "min": 1,
          "max": 100
        },
        "appointment_date": {
          "nulls": 0,
          "distinct": 250,
          "min": "2020-01-14 10:51:13",
          "max": "2023-12-10 12:36:36"
        },
        "reason": {
          "nulls": 0,
          "distinct": 250
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/patients.csv",
      "format": "csv",
      "table": "patients",
      "key": "datasets/patient-journey-dataset/v1/csv/patients.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/csv/patients.csv",
      "bytes": 14741,
      "sha256": "1c2971a9d53c20223b2b74061d96c863d62478d1cf80cbb40a305606669ca44d",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/admissions.csv",
      "format": "csv",
      "table": "admissions",
      "key": "datasets/patient-journey-dataset/v1/csv/admissions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/csv/admissions.csv",
      "bytes": 70831,
      "sha256": "1b6ef15ec1326aaff3fd918dfb3e2884419b7ee1da09c30dcaacd6e1031ce7db",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/billing.csv",
      "format": "csv",
      "table": "billing",
      "key": "datasets/patient-journey-dataset/v1/csv/billing.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/csv/billing.csv",
      "bytes": 13210,
      "sha256": "a6a123f1efa149c9545400a5681cd3823b8655cc5639c2c3855529e1e6ea116e",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/providers.csv",
      "format": "csv",
      "table": "providers",
      "key": "datasets/patient-journey-dataset/v1/csv/providers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/csv/providers.csv",
      "bytes": 34471,
      "sha256": "346cfb10625641c13549405d2efd6ffe97ba63bea7fb6ceef9be06a307140762",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/appointments.csv",
      "format": "csv",
      "table": "appointments",
      "key": "datasets/patient-journey-dataset/v1/csv/appointments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/csv/appointments.csv",
      "bytes": 51885,
      "sha256": "3646aa75620dd2cbcca9420e624783333f9d262f63570930d3fd7051c3aa5e8a",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/treatments.csv",
      "format": "csv",
      "table": "treatments",
      "key": "datasets/patient-journey-dataset/v1/csv/treatments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/csv/treatments.csv",
      "bytes": 36114,
      "sha256": "e473b4f6e294a092f1f950b175cb36d1d2bf8650ead8f52e8e4025b29b599464",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "patient-journey-dataset.json",
      "format": "json",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/patient-journey-dataset.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/patient-journey-dataset.json",
      "bytes": 421040,
      "sha256": "397f16246c0214a17799951f3940d22a1a4fcec06f00fa22429fe6f0f20bf2ba",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/sql/postgres.sql",
      "bytes": 251965,
      "sha256": "abff9f2314d06046e1f591662ee93d4750eb94f3b90091707e170f3244572b35",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/sql/mysql.sql",
      "bytes": 251281,
      "sha256": "9e272745a86517307b11df5bcdb66c8f7a6cbc6e93ee76db8196e37b39b4e683",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/sql/mssql.sql",
      "bytes": 256743,
      "sha256": "f3c1e12a0e6efafd44ca317206b360da8f4c91051f45353bf30327d96e764fb5",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/sql/sqlite.sql",
      "bytes": 250930,
      "sha256": "38e67d57bd6317d21ccdef5b6acf048c599ae982998997608ae3b19d09c8ee6c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/prisma/seed.ts",
      "bytes": 375114,
      "sha256": "13cebd306bb85e7c691377d482a10f846f576ecb83f7474daa3757b4345f91ac",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/patient-journey-dataset/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/patient-journey-dataset/v1/django/fixtures.json",
      "bytes": 488101,
      "sha256": "8594fd1056676162f95b264ccff55748da97f6d3a6798ed67d1f56dd48017499",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788734160174,
  "updatedAt": 1788734160174
}
