{
  "dataset_generator": {
    "brief": {
      "business_context": "A multi-site physical therapy clinic tracking patients, appointments, treatment plans and insurance claims.",
      "dialect": "postgresql",
      "dirty_modes": [],
      "field_complexity": "moderate",
      "include_dirty_data": false,
      "naming_style": "snake_case",
      "row_scale": "medium",
      "schema_name": "",
      "seed": 11,
      "table_count": [
        6,
        9
      ]
    },
    "business_context": "Motion Forward Physical Therapy operates five outpatient clinics across a metropolitan region, providing rehabilitation, injury recovery, and chronic pain management services. Patients are referred by physicians or self-refer, receive individualized treatment plans, and attend scheduled appointments with licensed therapists. The business bills private insurers and government payers for covered services and tracks claim outcomes to manage revenue.",
    "defects": [],
    "design": {
      "business_context": "Motion Forward Physical Therapy operates five outpatient clinics across a metropolitan region, providing rehabilitation, injury recovery, and chronic pain management services. Patients are referred by physicians or self-refer, receive individualized treatment plans, and attend scheduled appointments with licensed therapists. The business bills private insurers and government payers for covered services and tracks claim outcomes to manage revenue.",
      "design_notes": "The schema separates the clinical pathway (patients \u2192 treatment plans \u2192 appointments) from the financial pathway (appointments \u2192 insurance claims) to support both operational and billing queries. A junction table links patients to their insurers because a patient can carry multiple insurance policies.",
      "dialect": "postgresql",
      "display_name": "Motion Forward Physical Therapy",
      "naming_style": "snake_case",
      "schema": "physical_therapy_clinic",
      "tables": [
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the clinic.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "clinic_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Human-readable name of the clinic location, e.g. 'Northside Sports Rehab'.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "clinic_name",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(120)",
              "start": "",
              "type": "text",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Street address of the clinic.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "street",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(120)",
              "start": "",
              "type": "street",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "City where the clinic is located.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "city",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "city",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "State abbreviation.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "state",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(2)",
              "start": "",
              "type": "state",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "ZIP code of the clinic.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "postal_code",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(10)",
              "start": "",
              "type": "postal_code",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per physical clinic location operated by Motion Forward.",
          "is_junction": false,
          "name": "clinics",
          "row_count": 12,
          "singular_label": "Clinic",
          "size_class": "lookup",
          "unique_together": []
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the therapist.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "therapist_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Therapist's given name.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "first_name",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(50)",
              "start": "",
              "type": "first_name",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Therapist's family name.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "last_name",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(50)",
              "start": "",
              "type": "last_name",
              "unique": false,
              "weights": []
            },
            {
              "categories": [
                "Orthopedic",
                "Neurological",
                "Pediatric",
                "Sports Medicine",
                "Geriatric",
                "Cardiopulmonary"
              ],
              "decimals": 2,
              "description": "Clinical specialty area of the therapist.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "specialty",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "category",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The clinic where this therapist is primarily based.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "clinic_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "clinics",
              "references_column": "clinic_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Date the therapist was hired.",
              "distribution": "uniform",
              "end": "2024-06-30",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "hire_date",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DATE",
              "start": "2015-01-01",
              "type": "date",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per licensed physical therapist employed at any clinic.",
          "is_junction": false,
          "name": "therapists",
          "row_count": 260,
          "singular_label": "Therapist",
          "size_class": "dimension",
          "unique_together": []
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the patient.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "patient_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Patient's given name.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "first_name",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(50)",
              "start": "",
              "type": "first_name",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Patient's family name.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "last_name",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(50)",
              "start": "",
              "type": "last_name",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Patient's date of birth used to calculate age and eligibility.",
              "distribution": "uniform",
              "end": "2010-12-31",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "date_of_birth",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DATE",
              "start": "1940-01-01",
              "type": "date",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Primary contact phone number.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "phone",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(20)",
              "start": "",
              "type": "phone",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Email address; not all patients provide one.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "email",
              "null_rate": 0.15,
              "nullable": true,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(120)",
              "start": "",
              "type": "email",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The clinic location where the patient first registered.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "referring_clinic_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "clinics",
              "references_column": "clinic_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per registered patient across all clinic locations.",
          "is_junction": false,
          "name": "patients",
          "row_count": 260,
          "singular_label": "Patient",
          "size_class": "dimension",
          "unique_together": []
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the insurer.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "insurer_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Name of the insurance company or program, e.g. 'BlueCross BlueShield'.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "insurer_name",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(120)",
              "start": "",
              "type": "company",
              "unique": false,
              "weights": []
            },
            {
              "categories": [
                "Private",
                "Medicare",
                "Medicaid",
                "Workers Comp",
                "VA Benefits"
              ],
              "decimals": 2,
              "description": "Broad category of payer used for billing rule selection.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "payer_type",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "category",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Fraction of billed charges the insurer typically reimburses.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": 0.95,
              "minimum": 0.55,
              "name": "reimbursement_rate",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DECIMAL(5,2)",
              "start": "",
              "type": "percent",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per insurance company or government payer accepted by the clinics.",
          "is_junction": false,
          "name": "insurers",
          "row_count": 12,
          "singular_label": "Insurer",
          "size_class": "lookup",
          "unique_together": []
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the coverage record.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "patient_insurer_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The covered patient.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "patient_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "patients",
              "references_column": "patient_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The insurer providing coverage.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "insurer_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "insurers",
              "references_column": "insurer_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Insurer-assigned policy identifier.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "policy_number",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "POL-@@-######",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(30)",
              "start": "",
              "type": "code",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Date the coverage became active.",
              "distribution": "uniform",
              "end": "2024-01-01",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "coverage_start",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DATE",
              "start": "2018-01-01",
              "type": "date",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "True if this is the patient's primary insurance; false for secondary coverage.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "is_primary",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "BOOLEAN",
              "start": "",
              "type": "bool",
              "unique": false,
              "weights": []
            }
          ],
          "description": "Junction table recording which insurance policies a patient holds; a patient may carry primary and secondary coverage.",
          "is_junction": true,
          "name": "patient_insurers",
          "row_count": 1200,
          "singular_label": "Patient Insurer",
          "size_class": "fact",
          "unique_together": [
            [
              "patient_id",
              "insurer_id"
            ]
          ]
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the treatment plan.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "treatment_plan_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The patient this plan is designed for.",
              "distribution": "zipf",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "patient_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "patients",
              "references_column": "patient_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The therapist who authored the plan.",
              "distribution": "zipf",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "therapist_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "therapists",
              "references_column": "therapist_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "ICD-10 diagnosis code for the primary condition being treated, e.g. M54.5 for low back pain.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "diagnosis_code",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "M##.#",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(30)",
              "start": "",
              "type": "code",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Date the treatment plan officially begins.",
              "distribution": "recent",
              "end": "2025-03-31",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "start_date",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DATE",
              "start": "2021-01-01",
              "type": "date",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Number of visits pre-authorized by the insurer for this plan.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": 36.0,
              "minimum": 4.0,
              "name": "authorized_visits",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "int",
              "unique": false,
              "weights": []
            },
            {
              "categories": [
                "Active",
                "Completed",
                "Discharged",
                "On Hold",
                "Cancelled"
              ],
              "decimals": 2,
              "description": "Current lifecycle status of the treatment plan.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "status",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "category",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per course of treatment prescribed for a patient, typically following an initial evaluation.",
          "is_junction": false,
          "name": "treatment_plans",
          "row_count": 260,
          "singular_label": "Treatment Plan",
          "size_class": "dimension",
          "unique_together": []
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the appointment.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "appointment_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The treatment plan this visit is part of.",
              "distribution": "zipf",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "treatment_plan_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "treatment_plans",
              "references_column": "treatment_plan_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The therapist who conducted or will conduct the session.",
              "distribution": "zipf",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "therapist_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "therapists",
              "references_column": "therapist_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The clinic location where the appointment takes place.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "clinic_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "clinics",
              "references_column": "clinic_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Scheduled date and time of the appointment.",
              "distribution": "seasonal",
              "end": "2025-06-30",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "appointment_datetime",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "TIMESTAMP",
              "start": "2021-01-01",
              "type": "datetime",
              "unique": false,
              "weights": []
            },
            {
              "categories": [
                "Completed",
                "No-Show",
                "Cancelled",
                "Rescheduled",
                "In Progress"
              ],
              "decimals": 2,
              "description": "Outcome or current state of the appointment.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "status",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "category",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Planned or actual session length in minutes.",
              "distribution": "normal",
              "end": "",
              "expression": "",
              "maximum": 90.0,
              "minimum": 30.0,
              "name": "duration_minutes",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "int",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Gross amount billed to the insurer for this visit before adjustments.",
              "distribution": "pareto",
              "end": "",
              "expression": "",
              "maximum": 400.0,
              "minimum": 75.0,
              "name": "billed_amount",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DECIMAL(12,2)",
              "start": "",
              "type": "money",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per scheduled or completed patient visit at a clinic.",
          "is_junction": false,
          "name": "appointments",
          "row_count": 1200,
          "singular_label": "Appointment",
          "size_class": "fact",
          "unique_together": []
        },
        {
          "columns": [
            {
              "categories": [],
              "decimals": 2,
              "description": "Surrogate primary key for the insurance claim.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "claim_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "INTEGER",
              "start": "",
              "type": "pk",
              "unique": true,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The appointment this claim is billing for.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "appointment_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "appointments",
              "references_column": "appointment_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "The insurer to whom the claim was submitted.",
              "distribution": "zipf",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "insurer_id",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "insurers",
              "references_column": "insurer_id",
              "sql_type": "INTEGER",
              "start": "",
              "type": "fk",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Date the claim was submitted to the insurer.",
              "distribution": "recent",
              "end": "2025-06-30",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "submitted_date",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DATE",
              "start": "2021-01-15",
              "type": "date",
              "unique": false,
              "weights": []
            },
            {
              "categories": [
                "Submitted",
                "Approved",
                "Denied",
                "Partially Approved",
                "Under Review",
                "Appealed"
              ],
              "decimals": 2,
              "description": "Current status of the claim in the adjudication process.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "claim_status",
              "null_rate": 0.0,
              "nullable": false,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "category",
              "unique": false,
              "weights": []
            },
            {
              "categories": [],
              "decimals": 2,
              "description": "Amount the insurer agreed to pay; null if the claim has not yet been adjudicated.",
              "distribution": "pareto",
              "end": "",
              "expression": "",
              "maximum": 400.0,
              "minimum": 0.0,
              "name": "approved_amount",
              "null_rate": 0.2,
              "nullable": true,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "DECIMAL(12,2)",
              "start": "",
              "type": "money",
              "unique": false,
              "weights": []
            },
            {
              "categories": [
                "Not Medically Necessary",
                "Coverage Lapsed",
                "Duplicate Claim",
                "Missing Documentation",
                "Out of Network",
                "Visit Limit Exceeded"
              ],
              "decimals": 2,
              "description": "Reason provided by the insurer when a claim is denied; null for approved or pending claims.",
              "distribution": "uniform",
              "end": "",
              "expression": "",
              "maximum": null,
              "minimum": null,
              "name": "denial_reason",
              "null_rate": 0.5,
              "nullable": true,
              "pattern": "",
              "references": "",
              "references_column": "",
              "sql_type": "VARCHAR(60)",
              "start": "",
              "type": "category",
              "unique": false,
              "weights": []
            }
          ],
          "description": "One row per claim submitted to an insurer for reimbursement of a completed appointment.",
          "is_junction": false,
          "name": "insurance_claims",
          "row_count": 1200,
          "singular_label": "Insurance Claim",
          "size_class": "fact",
          "unique_together": []
        }
      ]
    },
    "dialect": "postgresql",
    "display_name": "Motion Forward Physical Therapy",
    "naming_style": "snake_case",
    "narrative": {
      "column_meanings": {
        "appointments.appointment_datetime": "The date and time the appointment was scheduled to begin.",
        "appointments.billed_amount": "The dollar amount charged to the insurer for this visit before any insurer adjustments or patient cost-sharing.",
        "appointments.duration_minutes": "How long the therapy session actually lasted, in minutes.",
        "appointments.status": "The outcome of the scheduled visit \u2014 whether the patient attended and it was Completed, whether they did not show up (No-Show), or whether the visit was Cancelled, Rescheduled, or is still In Progress.",
        "appointments.treatment_plan_id": "Identifies which treatment plan this visit is being conducted under, linking the visit to the patient's diagnosis and authorized visit count.",
        "clinics.clinic_id": "A unique identifier assigned to each clinic location, used throughout the database to connect therapists, patients, and appointments back to the physical site.",
        "insurance_claims.approved_amount": "The dollar amount the insurer has agreed to pay for this claim. This may be less than the billed amount or zero if the claim was denied.",
        "insurance_claims.claim_status": "The current standing of the claim in the insurer's review process \u2014 ranging from Submitted and Under Review through Approved, Partially Approved, Denied, or Appealed.",
        "insurance_claims.denial_reason": "When a claim is denied or only partially approved, this field records the insurer's stated reason, such as Coverage Lapsed, Not Medically Necessary, or Visit Limit Exceeded.",
        "insurance_claims.submitted_date": "The date the billing staff sent this claim to the insurer for review.",
        "insurers.payer_type": "Classifies the insurer as a Private health plan, Medicare, Medicaid, Workers Compensation program, or VA Benefits \u2014 categories that differ significantly in billing rules and reimbursement rates.",
        "insurers.reimbursement_rate": "The negotiated rate, expressed as a percentage of the billed amount, that this payer agrees to reimburse for covered services.",
        "patient_insurers.coverage_start": "The date on which this insurance policy became active for the patient.",
        "patient_insurers.is_primary": "Indicates whether this policy is the patient's primary insurance. A value of true means this insurer is billed first; a secondary policy, if present, may cover remaining balances.",
        "patient_insurers.policy_number": "The unique identifier printed on the patient's insurance card for this particular policy.",
        "patients.date_of_birth": "The patient's birth date, used to determine age and eligibility for age-specific programs such as pediatric or geriatric care.",
        "patients.referring_clinic_id": "The clinic that first registered or received this patient, whether through a physician referral or self-referral.",
        "therapists.clinic_id": "The clinic where this therapist is primarily based and sees patients.",
        "therapists.hire_date": "The date the therapist began employment with Motion Forward.",
        "therapists.specialty": "The clinical area in which the therapist is licensed and primarily practices \u2014 one of Orthopedic, Neurological, Pediatric, Sports Medicine, Geriatric, or Cardiopulmonary.",
        "treatment_plans.authorized_visits": "The total number of therapy visits the insurer has pre-approved for this treatment plan. Appointments beyond this number may not be reimbursed.",
        "treatment_plans.diagnosis_code": "A standardized medical diagnosis code documenting the condition being treated under this plan.",
        "treatment_plans.status": "Where the treatment plan currently stands \u2014 Active means care is ongoing; Completed and Discharged mean the patient finished treatment; On Hold means care is temporarily paused; Cancelled means the plan was abandoned before completion."
      },
      "company_story": "Motion Forward Physical Therapy is an outpatient rehabilitation provider operating five clinics across a metropolitan region. The company offers physical therapy services covering injury recovery, post-surgical rehabilitation, chronic pain management, and specialty programs for populations such as pediatric, geriatric, and neurological patients. Patients arrive either through a physician referral or by self-referring directly to a clinic. The company bills a mix of private health insurers, Medicare, Medicaid, Workers Compensation programs, and VA Benefits to collect payment for the services it delivers.",
      "operations": "When a new patient arrives, their demographic information and insurance coverage are recorded, and a therapist conducts an initial evaluation that results in a formal treatment plan specifying a diagnosis and a maximum number of authorized visits. From that point forward, the patient schedules individual appointments against that treatment plan, each visit handled by a licensed therapist at one of the five clinic locations. After a visit is marked complete, the billing staff submits an insurance claim to the appropriate payer on the patient's behalf. The claim then moves through the insurer's review process and may be approved, partially approved, denied, or appealed, with the final approved dollar amount recorded so management can monitor how much revenue is actually collected versus what was billed.",
      "relationships_prose": "Each therapist is assigned to one clinic, and every appointment takes place at a specific clinic with a specific therapist, tying individual visits back to both the staff and location involved. A patient's care is organized through treatment plans \u2014 each plan belongs to one patient and designates one lead therapist \u2014 and appointments are then scheduled against that plan so the clinic can track progress toward the authorized visit limit. On the billing side, each completed appointment can generate an insurance claim directed to one of the insurers listed on the patient's coverage record, and the outcome of that claim \u2014 including any denial reason and the amount actually approved \u2014 is recorded separately so the business can reconcile what it billed against what it collected.",
      "source": "ai",
      "table_meanings": {
        "appointments": "One row per visit that has been scheduled or carried out at a clinic. Each appointment is linked to the governing treatment plan, records which therapist actually saw the patient and at which location, and captures how long the session ran and how much was billed for it.",
        "clinics": "One row per physical clinic location that Motion Forward operates. This table serves as the master list of locations that therapists are assigned to and where appointments are held.",
        "insurance_claims": "One row per claim submitted to an insurer seeking reimbursement for a completed appointment. This table tracks the full lifecycle of a claim from initial submission through approval or denial, and records the amount the insurer actually agreed to pay as well as the reason if a claim was rejected.",
        "insurers": "One row per insurance company or government payer program whose coverage Motion Forward accepts. The reimbursement rate captures the negotiated percentage of the billed amount that this payer typically covers.",
        "patient_insurers": "One row per insurance policy held by a patient. Because a patient may carry both a primary and a secondary insurance plan, a single patient can have more than one row here. This table records the policy number, when coverage began, and which policy is the primary one used for billing.",
        "patients": "One row per person who has registered as a patient at any Motion Forward clinic, regardless of how many treatments or visits they have had.",
        "therapists": "One row per licensed physical therapist currently or previously employed by Motion Forward. Each therapist is based at a specific clinic and holds one of six recognized specialties that determines the types of cases they are best suited to treat.",
        "treatment_plans": "One row per course of treatment prescribed for a patient following their evaluation. A treatment plan is tied to a specific diagnosis, assigns a lead therapist responsible for the patient's care, and caps the number of visits the insurer has authorized. As care progresses the plan moves through statuses such as Active, Completed, or On Hold."
      }
    },
    "relationships": [
      {
        "cardinality": "1:N",
        "from_column": "clinic_id",
        "from_table": "therapists",
        "optional": false,
        "to_column": "clinic_id",
        "to_table": "clinics"
      },
      {
        "cardinality": "1:N",
        "from_column": "referring_clinic_id",
        "from_table": "patients",
        "optional": false,
        "to_column": "clinic_id",
        "to_table": "clinics"
      },
      {
        "cardinality": "N:M",
        "from_column": "patient_id",
        "from_table": "patient_insurers",
        "optional": false,
        "to_column": "patient_id",
        "to_table": "patients"
      },
      {
        "cardinality": "N:M",
        "from_column": "insurer_id",
        "from_table": "patient_insurers",
        "optional": false,
        "to_column": "insurer_id",
        "to_table": "insurers"
      },
      {
        "cardinality": "1:N",
        "from_column": "patient_id",
        "from_table": "treatment_plans",
        "optional": false,
        "to_column": "patient_id",
        "to_table": "patients"
      },
      {
        "cardinality": "1:N",
        "from_column": "therapist_id",
        "from_table": "treatment_plans",
        "optional": false,
        "to_column": "therapist_id",
        "to_table": "therapists"
      },
      {
        "cardinality": "1:N",
        "from_column": "treatment_plan_id",
        "from_table": "appointments",
        "optional": false,
        "to_column": "treatment_plan_id",
        "to_table": "treatment_plans"
      },
      {
        "cardinality": "1:N",
        "from_column": "therapist_id",
        "from_table": "appointments",
        "optional": false,
        "to_column": "therapist_id",
        "to_table": "therapists"
      },
      {
        "cardinality": "1:N",
        "from_column": "clinic_id",
        "from_table": "appointments",
        "optional": false,
        "to_column": "clinic_id",
        "to_table": "clinics"
      },
      {
        "cardinality": "1:N",
        "from_column": "appointment_id",
        "from_table": "insurance_claims",
        "optional": false,
        "to_column": "appointment_id",
        "to_table": "appointments"
      },
      {
        "cardinality": "1:N",
        "from_column": "insurer_id",
        "from_table": "insurance_claims",
        "optional": false,
        "to_column": "insurer_id",
        "to_table": "insurers"
      }
    ],
    "version": "1.0.0"
  },
  "name": "physical_therapy_clinic",
  "schema": "physical_therapy_clinic",
  "source": "Agoge dataset generator 1.0.0 (seed 11) \u2014 fully synthetic",
  "tables": [
    {
      "approx_rows": 12,
      "columns": [
        {
          "key": "PRI",
          "name": "clinic_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "clinic_name",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "street",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "city",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "state",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "postal_code",
          "type": "varchar"
        }
      ],
      "name": "clinics"
    },
    {
      "approx_rows": 260,
      "columns": [
        {
          "key": "PRI",
          "name": "therapist_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "first_name",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "last_name",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "specialty",
          "type": "varchar"
        },
        {
          "key": "MUL",
          "name": "clinic_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "hire_date",
          "type": "date"
        }
      ],
      "name": "therapists"
    },
    {
      "approx_rows": 260,
      "columns": [
        {
          "key": "PRI",
          "name": "patient_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "first_name",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "last_name",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "date_of_birth",
          "type": "date"
        },
        {
          "key": "",
          "name": "phone",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "email",
          "type": "varchar"
        },
        {
          "key": "MUL",
          "name": "referring_clinic_id",
          "type": "int"
        }
      ],
      "name": "patients"
    },
    {
      "approx_rows": 12,
      "columns": [
        {
          "key": "PRI",
          "name": "insurer_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "insurer_name",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "payer_type",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "reimbursement_rate",
          "type": "decimal"
        }
      ],
      "name": "insurers"
    },
    {
      "approx_rows": 1200,
      "columns": [
        {
          "key": "PRI",
          "name": "patient_insurer_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "patient_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "insurer_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "policy_number",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "coverage_start",
          "type": "date"
        },
        {
          "key": "",
          "name": "is_primary",
          "type": "tinyint"
        }
      ],
      "name": "patient_insurers"
    },
    {
      "approx_rows": 260,
      "columns": [
        {
          "key": "PRI",
          "name": "treatment_plan_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "patient_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "therapist_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "diagnosis_code",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "start_date",
          "type": "date"
        },
        {
          "key": "",
          "name": "authorized_visits",
          "type": "int"
        },
        {
          "key": "",
          "name": "status",
          "type": "varchar"
        }
      ],
      "name": "treatment_plans"
    },
    {
      "approx_rows": 1200,
      "columns": [
        {
          "key": "PRI",
          "name": "appointment_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "treatment_plan_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "therapist_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "clinic_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "appointment_datetime",
          "type": "datetime"
        },
        {
          "key": "",
          "name": "status",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "duration_minutes",
          "type": "int"
        },
        {
          "key": "",
          "name": "billed_amount",
          "type": "decimal"
        }
      ],
      "name": "appointments"
    },
    {
      "approx_rows": 1200,
      "columns": [
        {
          "key": "PRI",
          "name": "claim_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "appointment_id",
          "type": "int"
        },
        {
          "key": "MUL",
          "name": "insurer_id",
          "type": "int"
        },
        {
          "key": "",
          "name": "submitted_date",
          "type": "date"
        },
        {
          "key": "",
          "name": "claim_status",
          "type": "varchar"
        },
        {
          "key": "",
          "name": "approved_amount",
          "type": "decimal"
        },
        {
          "key": "",
          "name": "denial_reason",
          "type": "varchar"
        }
      ],
      "name": "insurance_claims"
    }
  ]
}