{
  "schema_version": 1,
  "learning_path": {
    "slug": "healthcare-data-analytics-pathway",
    "title": "Healthcare Data Analytics Pathway",
    "subtitle": "A structured route made from individual courses and sections.",
    "description": "Use this pathway to order separate courses into one guided subscription journey.",
    "target_audience": "Clinicians, allied health professionals, public health workers, and career changers",
    "estimated_hours": 48,
    "is_published": true,
    "display_order": 1,
    "course_order": [
      "healthcare-data-analytics-combined-course"
    ]
  },
  "course": {
    "slug": "healthcare-data-analytics-combined-course",
    "title": "Healthcare Data Analytics Combined Course",
    "subtitle": "A complete subscription course covering SQL, Python, statistics, and applied healthcare analytics.",
    "description": "This combined course is designed for clinicians, healthcare professionals, and career changers who want practical healthcare data analytics skills. Learners subscribe once and get access to every module, lesson, practical task, and certificate pathway.",
    "tier": "standard",
    "estimated_hours": 48,
    "difficulty": "Beginner",
    "is_published": true,
    "display_order": 1,
    "modules": [
      {
        "title": "Module 1: Foundations of Healthcare Data",
        "description": "Understand common healthcare datasets, safe data handling, and how analytics supports clinical decisions.",
        "display_order": 1,
        "lessons": [
          {
            "slug": "healthcare-data-introduction",
            "title": "Introduction to healthcare data analytics",
            "lesson_type": "reading",
            "content_md": "## Learning outcome\nBy the end of this lesson, learners can describe how admissions, laboratory, prescribing, and public health datasets are used in healthcare analytics.\n\n## Core content\nHealthcare analytics turns routinely collected information into safer, more efficient decisions. Common tables include patient demographics, admissions, lab results, medications, and outcomes.\n\n## Reflection\nThink of one clinical or operational question from your own setting that could be answered with data.",
            "estimated_minutes": 20,
            "is_free_preview": false,
            "display_order": 1
          },
          {
            "slug": "quiz-healthcare-data-foundations",
            "title": "Quiz: healthcare data foundations",
            "lesson_type": "quiz",
            "content_md": "Check your understanding before moving to the practical task.",
            "estimated_minutes": 10,
            "is_free_preview": false,
            "display_order": 2,
            "quiz": {
              "pass_threshold": 70,
              "questions": [
                {
                  "question_md": "Which dataset is most suitable for studying ward-level length of stay?",
                  "question_type": "single",
                  "options": [
                    {
                      "id": "a",
                      "text": "Admissions data",
                      "is_correct": true
                    },
                    {
                      "id": "b",
                      "text": "Staff rota data",
                      "is_correct": false
                    }
                  ],
                  "explanation_md": "Admissions data usually contains ward and length-of-stay fields.",
                  "display_order": 1
                }
              ]
            }
          },
          {
            "slug": "practice-healthcare-data-questions",
            "title": "Practice: classify healthcare analytics questions",
            "lesson_type": "exercise",
            "content_md": "Learners practise turning clinical questions into measurable data questions.",
            "estimated_minutes": 25,
            "is_free_preview": false,
            "display_order": 3,
            "exercise": {
              "language": "sql",
              "prompt_md": "You have an `admissions` table with `patient_id`, `ward`, `age`, `los_days`, and `readmitted`. Write a query that counts admissions by ward for adult patients only.",
              "starter_code": "SELECT ward, COUNT(*) AS admissions_count\nFROM admissions\nWHERE age >= 18\nGROUP BY ward\nORDER BY admissions_count DESC;",
              "solution_code": "SELECT ward, COUNT(*) AS admissions_count FROM admissions WHERE age >= 18 GROUP BY ward ORDER BY admissions_count DESC;",
              "expected_output": "admissions_count",
              "test_cases": [
                {
                  "description": "Filters to adult patients",
                  "expected_output": "WHERE age >= 18"
                },
                {
                  "description": "Groups by ward",
                  "expected_output": "GROUP BY ward"
                }
              ],
              "hint": "Filter the dataset before grouping it by ward.",
              "max_attempts": null
            }
          }
        ]
      },
      {
        "title": "Module 2: SQL for Healthcare Analytics",
        "description": "Use SQL to filter cohorts, join tables, aggregate results, and answer clinical service questions.",
        "display_order": 2,
        "lessons": [
          {
            "slug": "sql-cohort-selection",
            "title": "Selecting patient cohorts with SQL",
            "lesson_type": "reading",
            "content_md": "## Learning outcome\nLearners can define a patient cohort using inclusion and exclusion criteria.\n\n## Core content\nA cohort is a defined group of records that meets a clear set of criteria. In healthcare analytics, cohort definitions must be explicit: age range, diagnosis, ward, date window, and outcome period all change the answer.",
            "estimated_minutes": 25,
            "is_free_preview": false,
            "display_order": 1
          },
          {
            "slug": "practice-sql-length-of-stay",
            "title": "Practice: calculate average length of stay",
            "lesson_type": "exercise",
            "content_md": "Learners practise aggregating admissions data by ward.",
            "estimated_minutes": 30,
            "is_free_preview": false,
            "display_order": 2,
            "exercise": {
              "language": "sql",
              "prompt_md": "Write a SQL query that returns each ward and the average `los_days` for adult patients only. Sort longest stays first.",
              "starter_code": "SELECT ward, AVG(los_days) AS mean_stay\nFROM admissions\nWHERE age >= 18\nGROUP BY ward\nORDER BY mean_stay DESC;",
              "solution_code": "SELECT ward, AVG(los_days) AS mean_stay FROM admissions WHERE age >= 18 GROUP BY ward ORDER BY mean_stay DESC;",
              "expected_output": "mean_stay",
              "test_cases": [
                {
                  "description": "Calculates average length of stay",
                  "expected_output": "AVG(los_days)"
                },
                {
                  "description": "Sorts longest stays first",
                  "expected_output": "ORDER BY mean_stay DESC"
                }
              ],
              "hint": "Use AVG, GROUP BY, and ORDER BY together.",
              "max_attempts": null
            }
          }
        ]
      },
      {
        "title": "Module 3: Python for Clinical Data",
        "description": "Use Python and pandas to clean, summarise, and visualise healthcare data.",
        "display_order": 3,
        "lessons": [
          {
            "slug": "python-pandas-clinical-data",
            "title": "Working with clinical data in pandas",
            "lesson_type": "reading",
            "content_md": "## Learning outcome\nLearners can load a CSV file, inspect columns, filter rows, and create a grouped summary.\n\n## Core content\nPandas is useful for clinical analytics because healthcare datasets often need cleaning before interpretation. Always inspect missing values, coding systems, and abnormal flags before modelling.",
            "estimated_minutes": 25,
            "is_free_preview": false,
            "display_order": 1
          },
          {
            "slug": "practice-python-lab-flags",
            "title": "Practice: summarise abnormal lab results",
            "lesson_type": "exercise",
            "content_md": "Learners practise filtering abnormal lab results and summarising them by panel.",
            "estimated_minutes": 35,
            "is_free_preview": false,
            "display_order": 2,
            "exercise": {
              "language": "python",
              "prompt_md": "Use pandas to count abnormal lab flags by test panel and print the five most common panels.",
              "starter_code": "import pandas as pd\n\nlabs = pd.read_csv('labs.csv')\nabnormal = labs[labs['flag'] == 'abnormal']\nsummary = abnormal.groupby('test_panel').size().sort_values(ascending=False)\nprint(summary.head())",
              "solution_code": "import pandas as pd\nlabs = pd.read_csv('labs.csv')\nsummary = labs[labs['flag'] == 'abnormal'].groupby('test_panel').size().sort_values(ascending=False)\nprint(summary.head())",
              "expected_output": "test_panel",
              "test_cases": [
                {
                  "description": "Filters abnormal rows",
                  "expected_output": "flag"
                },
                {
                  "description": "Groups by test panel",
                  "expected_output": "groupby"
                }
              ],
              "hint": "Filter first, then group and sort.",
              "max_attempts": null
            }
          }
        ]
      }
    ]
  }
}
