feat(assessments): layered clinical assessment engine end-to-end
Deploy Ladill Care / deploy (push) Successful in 1m26s

Add a template-driven assessment system with universal intake, clinical
pathways, disease instruments (stroke MVP + extended, diabetes, and ten
specialty packs), scoring, patient outcome trends, REST/API + FHIR
export, and Enterprise org-level assessment analytics. Seed packs and
design/licensing docs ship for deploy and pre-GA review.
This commit is contained in:
isaacclad
2026-07-16 22:58:09 +00:00
parent 8896088425
commit 2ce4bc8993
94 changed files with 13430 additions and 56 deletions
@@ -0,0 +1,146 @@
{
"template": {
"code": "asthma_core",
"name": "Asthma assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Control, exacerbations, inhaler technique, peak flow.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "respiratory",
"estimated_minutes": 8,
"pathway_codes": [
"asthma"
],
"attribution": "Ladill Care Asthma assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "control",
"section": "Control",
"label": "Asthma control",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{
"code": "well",
"label": "Well controlled"
},
{
"code": "partly",
"label": "Partly controlled"
},
{
"code": "uncontrolled",
"label": "Uncontrolled"
}
]
}
},
{
"code": "exacerbations_12m",
"section": "Control",
"label": "Exacerbations in last 12 months",
"answer_type": "number",
"is_required": false,
"sort_order": 20,
"options": {
"min": 0,
"max": 50
},
"validation": {
"min": 0,
"max": 50
}
},
{
"code": "peak_flow",
"section": "Lung function",
"label": "Peak expiratory flow (L/min)",
"answer_type": "number",
"is_required": false,
"sort_order": 30,
"options": {
"min": 50,
"max": 800,
"unit": "L/min"
},
"validation": {
"min": 50,
"max": 800
}
},
{
"code": "inhaler_technique",
"section": "Treatment",
"label": "Inhaler technique",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "good",
"label": "Good"
},
{
"code": "fair",
"label": "Fair"
},
{
"code": "poor",
"label": "Poor"
},
{
"code": "not_assessed",
"label": "Not assessed"
}
]
}
},
{
"code": "night_symptoms",
"section": "Symptoms",
"label": "Night symptoms",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{
"code": "none",
"label": "None"
},
{
"code": "occasional",
"label": "Occasional"
},
{
"code": "frequent",
"label": "Frequent"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
+192
View File
@@ -0,0 +1,192 @@
{
"template": {
"code": "barthel",
"name": "Barthel Index",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "sum_items",
"description": "Barthel Index of Activities of Daily Living (0100). Optional on stroke pathway activation.",
"meta": {
"capture_roles": ["doctor", "nurse"],
"specialty": "neurology",
"estimated_minutes": 5,
"pathway_codes": ["stroke"],
"max_total": 100,
"attribution": "Barthel Index — standard ADL scale for clinical use. Verify licensing for commercial redistribution."
}
},
"questions": [
{
"code": "feeding",
"section": "ADL",
"label": "Feeding",
"answer_type": "score_item",
"is_required": true,
"sort_order": 10,
"score_key": "adl",
"options": {
"max": 10,
"choices": [
{ "code": "0", "label": "Unable", "score": 0 },
{ "code": "5", "label": "Needs help cutting, spreading butter, etc., or requires modified diet", "score": 5 },
{ "code": "10", "label": "Independent", "score": 10 }
]
}
},
{
"code": "bathing",
"section": "ADL",
"label": "Bathing",
"answer_type": "score_item",
"is_required": true,
"sort_order": 20,
"score_key": "adl",
"options": {
"max": 5,
"choices": [
{ "code": "0", "label": "Dependent", "score": 0 },
{ "code": "5", "label": "Independent (or in shower)", "score": 5 }
]
}
},
{
"code": "grooming",
"section": "ADL",
"label": "Grooming",
"answer_type": "score_item",
"is_required": true,
"sort_order": 30,
"score_key": "adl",
"options": {
"max": 5,
"choices": [
{ "code": "0", "label": "Needs help with personal care", "score": 0 },
{ "code": "5", "label": "Independent face/hair/teeth/shaving", "score": 5 }
]
}
},
{
"code": "dressing",
"section": "ADL",
"label": "Dressing",
"answer_type": "score_item",
"is_required": true,
"sort_order": 40,
"score_key": "adl",
"options": {
"max": 10,
"choices": [
{ "code": "0", "label": "Dependent", "score": 0 },
{ "code": "5", "label": "Needs help but can do about half unaided", "score": 5 },
{ "code": "10", "label": "Independent (including buttons, zips, laces, etc.)", "score": 10 }
]
}
},
{
"code": "bowels",
"section": "ADL",
"label": "Bowels",
"answer_type": "score_item",
"is_required": true,
"sort_order": 50,
"score_key": "adl",
"options": {
"max": 10,
"choices": [
{ "code": "0", "label": "Incontinent (or needs to be given enemas)", "score": 0 },
{ "code": "5", "label": "Occasional accident", "score": 5 },
{ "code": "10", "label": "Continent", "score": 10 }
]
}
},
{
"code": "bladder",
"section": "ADL",
"label": "Bladder",
"answer_type": "score_item",
"is_required": true,
"sort_order": 60,
"score_key": "adl",
"options": {
"max": 10,
"choices": [
{ "code": "0", "label": "Incontinent, or catheterized and unable to manage alone", "score": 0 },
{ "code": "5", "label": "Occasional accident", "score": 5 },
{ "code": "10", "label": "Continent", "score": 10 }
]
}
},
{
"code": "toilet",
"section": "ADL",
"label": "Toilet use",
"answer_type": "score_item",
"is_required": true,
"sort_order": 70,
"score_key": "adl",
"options": {
"max": 10,
"choices": [
{ "code": "0", "label": "Dependent", "score": 0 },
{ "code": "5", "label": "Needs some help, but can do something alone", "score": 5 },
{ "code": "10", "label": "Independent (on and off, dressing, wiping)", "score": 10 }
]
}
},
{
"code": "transfers",
"section": "ADL",
"label": "Transfers (bed to chair and back)",
"answer_type": "score_item",
"is_required": true,
"sort_order": 80,
"score_key": "adl",
"options": {
"max": 15,
"choices": [
{ "code": "0", "label": "Unable, no sitting balance", "score": 0 },
{ "code": "5", "label": "Major help (one or two people, physical), can sit", "score": 5 },
{ "code": "10", "label": "Minor help (verbal or physical)", "score": 10 },
{ "code": "15", "label": "Independent", "score": 15 }
]
}
},
{
"code": "mobility",
"section": "ADL",
"label": "Mobility (on level surfaces)",
"answer_type": "score_item",
"is_required": true,
"sort_order": 90,
"score_key": "adl",
"options": {
"max": 15,
"choices": [
{ "code": "0", "label": "Immobile or <50 yards", "score": 0 },
{ "code": "5", "label": "Wheelchair independent, including corners, >50 yards", "score": 5 },
{ "code": "10", "label": "Walks with help of one person (verbal or physical) >50 yards", "score": 10 },
{ "code": "15", "label": "Independent (but may use any aid; for example, stick) >50 yards", "score": 15 }
]
}
},
{
"code": "stairs",
"section": "ADL",
"label": "Stairs",
"answer_type": "score_item",
"is_required": true,
"sort_order": 100,
"score_key": "adl",
"options": {
"max": 10,
"choices": [
{ "code": "0", "label": "Unable", "score": 0 },
{ "code": "5", "label": "Needs help (verbal, physical, carrying aid)", "score": 5 },
{ "code": "10", "label": "Independent", "score": 10 }
]
}
}
]
}
@@ -0,0 +1,150 @@
{
"template": {
"code": "cancer_core",
"name": "Cancer care assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "single_value",
"description": "Primary site, stage summary, performance status, treatment phase.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "oncology",
"estimated_minutes": 8,
"pathway_codes": [
"cancer"
],
"attribution": "Ladill Care Cancer care assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "primary_site",
"section": "Disease",
"label": "Primary site / diagnosis",
"answer_type": "text",
"is_required": true,
"sort_order": 10,
"validation": {
"max": 5000
}
},
{
"code": "stage_summary",
"section": "Disease",
"label": "Stage summary",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 20,
"options": {
"choices": [
{
"code": "local",
"label": "Localized"
},
{
"code": "regional",
"label": "Regional"
},
{
"code": "metastatic",
"label": "Metastatic"
},
{
"code": "unknown",
"label": "Unknown"
},
{
"code": "remission",
"label": "Remission"
}
]
}
},
{
"code": "ecog",
"section": "Function",
"label": "ECOG performance status",
"answer_type": "score_item",
"is_required": true,
"sort_order": 30,
"options": {
"choices": [
{
"code": "0",
"label": "0 \u2014 Fully active",
"score": 0
},
{
"code": "1",
"label": "1 \u2014 Restricted strenuous",
"score": 1
},
{
"code": "2",
"label": "2 \u2014 Ambulatory, self-care",
"score": 2
},
{
"code": "3",
"label": "3 \u2014 Limited self-care",
"score": 3
},
{
"code": "4",
"label": "4 \u2014 Completely disabled",
"score": 4
}
]
},
"score_key": "ecog"
},
{
"code": "treatment_phase",
"section": "Treatment",
"label": "Treatment phase",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "workup",
"label": "Work-up"
},
{
"code": "active",
"label": "Active treatment"
},
{
"code": "surveillance",
"label": "Surveillance"
},
{
"code": "palliative",
"label": "Palliative"
},
{
"code": "survivorship",
"label": "Survivorship"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
+187
View File
@@ -0,0 +1,187 @@
{
"template": {
"code": "ckd_core",
"name": "CKD assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "CKD stage, creatinine, eGFR, proteinuria, anaemia flags.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "nephrology",
"estimated_minutes": 8,
"pathway_codes": [
"ckd"
],
"attribution": "Ladill Care CKD assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "ckd_stage",
"section": "Staging",
"label": "CKD stage",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{
"code": "1",
"label": "Stage 1"
},
{
"code": "2",
"label": "Stage 2"
},
{
"code": "3a",
"label": "Stage 3a"
},
{
"code": "3b",
"label": "Stage 3b"
},
{
"code": "4",
"label": "Stage 4"
},
{
"code": "5",
"label": "Stage 5"
}
]
}
},
{
"code": "creatinine",
"section": "Labs",
"label": "Creatinine (\u00b5mol/L)",
"answer_type": "number",
"is_required": false,
"sort_order": 20,
"options": {
"min": 20,
"max": 2000,
"unit": "\u00b5mol/L"
},
"validation": {
"min": 20,
"max": 2000
}
},
{
"code": "egfr",
"section": "Labs",
"label": "eGFR (mL/min/1.73m\u00b2)",
"answer_type": "number",
"is_required": false,
"sort_order": 30,
"options": {
"min": 1,
"max": 150,
"unit": "mL/min"
},
"validation": {
"min": 1,
"max": 150
}
},
{
"code": "proteinuria",
"section": "Labs",
"label": "Proteinuria / ACR",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "none",
"label": "None/normal"
},
{
"code": "micro",
"label": "Microalbuminuria"
},
{
"code": "macro",
"label": "Overt proteinuria"
},
{
"code": "unknown",
"label": "Unknown"
}
]
}
},
{
"code": "anaemia",
"section": "Complications",
"label": "Anaemia of CKD",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{
"code": "no",
"label": "No"
},
{
"code": "yes",
"label": "Yes"
},
{
"code": "unknown",
"label": "Unknown"
}
]
}
},
{
"code": "dialysis",
"section": "Treatment",
"label": "Dialysis status",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 60,
"options": {
"choices": [
{
"code": "none",
"label": "None"
},
{
"code": "hd",
"label": "Haemodialysis"
},
{
"code": "pd",
"label": "Peritoneal dialysis"
},
{
"code": "transplant",
"label": "Transplant"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
+160
View File
@@ -0,0 +1,160 @@
{
"template": {
"code": "copd_core",
"name": "COPD assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "single_value",
"description": "CAT, mMRC, spirometry, pack-years, oxygen therapy.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "respiratory",
"estimated_minutes": 8,
"pathway_codes": [
"copd"
],
"attribution": "Ladill Care COPD assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "mmrc",
"section": "Dyspnea",
"label": "mMRC dyspnea scale",
"answer_type": "score_item",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{
"code": "0",
"label": "0 \u2014 breathless only with strenuous exercise",
"score": 0
},
{
"code": "1",
"label": "1 \u2014 short of breath when hurrying",
"score": 1
},
{
"code": "2",
"label": "2 \u2014 walks slower than people of same age",
"score": 2
},
{
"code": "3",
"label": "3 \u2014 stops for breath after ~100 m",
"score": 3
},
{
"code": "4",
"label": "4 \u2014 too breathless to leave house",
"score": 4
}
]
},
"score_key": "mmrc"
},
{
"code": "cat_score",
"section": "Symptoms",
"label": "CAT score (0\u201340)",
"answer_type": "number",
"is_required": false,
"sort_order": 20,
"options": {
"min": 0,
"max": 40
},
"validation": {
"min": 0,
"max": 40
}
},
{
"code": "fev1_percent",
"section": "Spirometry",
"label": "FEV1 % predicted",
"answer_type": "number",
"is_required": false,
"sort_order": 30,
"options": {
"min": 10,
"max": 150,
"unit": "%"
},
"validation": {
"min": 10,
"max": 150
}
},
{
"code": "pack_years",
"section": "Risk",
"label": "Smoking pack-years",
"answer_type": "number",
"is_required": false,
"sort_order": 40,
"options": {
"min": 0,
"max": 200
},
"validation": {
"min": 0,
"max": 200
}
},
{
"code": "oxygen_therapy",
"section": "Treatment",
"label": "Long-term oxygen therapy",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{
"code": "no",
"label": "No"
},
{
"code": "yes",
"label": "Yes"
}
]
}
},
{
"code": "exacerbations_12m",
"section": "Control",
"label": "Exacerbations last 12 months",
"answer_type": "number",
"is_required": false,
"sort_order": 60,
"options": {
"min": 0,
"max": 30
},
"validation": {
"min": 0,
"max": 30
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
@@ -0,0 +1,137 @@
{
"template": {
"code": "dementia_core",
"name": "Dementia assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "MMSE/MoCA scores, ADL, behaviour, caregiver burden.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "neurology",
"estimated_minutes": 8,
"pathway_codes": [
"dementia"
],
"attribution": "Ladill Care Dementia assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "mmse",
"section": "Cognition",
"label": "MMSE score (0\u201330)",
"answer_type": "number",
"is_required": false,
"sort_order": 10,
"options": {
"min": 0,
"max": 30
},
"validation": {
"min": 0,
"max": 30
}
},
{
"code": "moca",
"section": "Cognition",
"label": "MoCA score (0\u201330)",
"answer_type": "number",
"is_required": false,
"sort_order": 20,
"options": {
"min": 0,
"max": 30
},
"validation": {
"min": 0,
"max": 30
}
},
{
"code": "adl",
"section": "Function",
"label": "ADL independence",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 30,
"options": {
"choices": [
{
"code": "independent",
"label": "Independent"
},
{
"code": "partial",
"label": "Partial help"
},
{
"code": "dependent",
"label": "Dependent"
}
]
}
},
{
"code": "behavioural_symptoms",
"section": "Behaviour",
"label": "Behavioural symptoms",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "none",
"label": "None"
},
{
"code": "mild",
"label": "Mild"
},
{
"code": "moderate",
"label": "Moderate"
},
{
"code": "severe",
"label": "Severe"
}
]
}
},
{
"code": "caregiver_burden",
"section": "Caregiver",
"label": "Caregiver burden (0\u201310)",
"answer_type": "scale",
"is_required": false,
"sort_order": 50,
"options": {
"min": 0,
"max": 10
},
"validation": {
"min": 0,
"max": 10
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
@@ -0,0 +1,161 @@
{
"template": {
"code": "diabetes_core",
"name": "Diabetes assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Core diabetes review: glycaemia, feet, eyes, kidney markers, lifestyle, and insulin regimen.",
"meta": {
"capture_roles": ["doctor", "nurse"],
"specialty": "endocrinology",
"estimated_minutes": 12,
"pathway_codes": ["diabetes"],
"attribution": "Ladill Care diabetes core assessment (platform-authored checklist aligned to common clinic review items)."
}
},
"questions": [
{
"code": "hba1c",
"section": "Glycaemia",
"label": "HbA1c (%)",
"help_text": "Optional manual entry. Prefer lab results when available.",
"answer_type": "number",
"is_required": false,
"sort_order": 10,
"options": { "min": 3, "max": 20, "unit": "%" },
"validation": { "min": 3, "max": 20 }
},
{
"code": "hba1c_date",
"section": "Glycaemia",
"label": "HbA1c date",
"answer_type": "date",
"is_required": false,
"sort_order": 20
},
{
"code": "hypoglycaemia_episodes",
"section": "Glycaemia",
"label": "Hypoglycaemia episodes (last 3 months)",
"answer_type": "integer",
"is_required": false,
"sort_order": 30,
"options": { "min": 0, "max": 100 },
"validation": { "min": 0, "max": 100 }
},
{
"code": "insulin_regimen",
"section": "Treatment",
"label": "Insulin regimen",
"answer_type": "textarea",
"is_required": false,
"sort_order": 40,
"validation": { "max": 2000 }
},
{
"code": "diet_adherence",
"section": "Treatment",
"label": "Diet adherence",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{ "code": "good", "label": "Good" },
{ "code": "fair", "label": "Fair" },
{ "code": "poor", "label": "Poor" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "foot_assessment",
"section": "Complications",
"label": "Foot assessment",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 60,
"options": {
"choices": [
{ "code": "normal", "label": "Normal" },
{ "code": "at_risk", "label": "At risk" },
{ "code": "ulcer", "label": "Ulcer present" },
{ "code": "amputation", "label": "Prior amputation" },
{ "code": "not_examined", "label": "Not examined" }
]
}
},
{
"code": "monofilament",
"section": "Complications",
"label": "Monofilament test",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 70,
"options": {
"choices": [
{ "code": "intact", "label": "Sensation intact" },
{ "code": "reduced", "label": "Reduced" },
{ "code": "absent", "label": "Absent" },
{ "code": "not_done", "label": "Not done" }
]
}
},
{
"code": "eye_examination",
"section": "Complications",
"label": "Eye examination / retinopathy status",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 80,
"options": {
"choices": [
{ "code": "normal", "label": "No retinopathy" },
{ "code": "non_proliferative", "label": "Non-proliferative" },
{ "code": "proliferative", "label": "Proliferative" },
{ "code": "maculopathy", "label": "Maculopathy" },
{ "code": "unknown", "label": "Unknown / pending" },
{ "code": "not_done", "label": "Not examined this visit" }
]
}
},
{
"code": "microalbuminuria",
"section": "Complications",
"label": "Microalbuminuria / ACR",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 90,
"options": {
"choices": [
{ "code": "normal", "label": "Normal" },
{ "code": "elevated", "label": "Elevated" },
{ "code": "unknown", "label": "Unknown" },
{ "code": "not_done", "label": "Not done" }
]
}
},
{
"code": "neuropathy_score",
"section": "Complications",
"label": "Neuropathy score (010 clinical impression)",
"answer_type": "scale",
"is_required": false,
"sort_order": 100,
"options": { "min": 0, "max": 10 },
"validation": { "min": 0, "max": 10 }
},
{
"code": "notes",
"section": "Notes",
"label": "Clinical notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 110,
"validation": { "max": 5000 }
}
]
}
+82
View File
@@ -0,0 +1,82 @@
{
"template": {
"code": "gcs",
"name": "Glasgow Coma Scale",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "sum_items",
"description": "Glasgow Coma Scale (E + V + M). Total 315. Optional on stroke pathway.",
"meta": {
"capture_roles": ["doctor", "nurse"],
"specialty": "neurology",
"estimated_minutes": 2,
"pathway_codes": ["stroke"],
"max_total": 15,
"attribution": "Glasgow Coma Scale (GCS) — Teasdale & Jennett. Standard clinical instrument; confirm local documentation practice."
}
},
"questions": [
{
"code": "eye",
"section": "GCS",
"label": "Eye opening (E)",
"answer_type": "score_item",
"is_required": true,
"sort_order": 10,
"score_key": "eye",
"options": {
"min": 1,
"max": 4,
"choices": [
{ "code": "4", "label": "Spontaneous", "score": 4 },
{ "code": "3", "label": "To speech", "score": 3 },
{ "code": "2", "label": "To pain", "score": 2 },
{ "code": "1", "label": "None", "score": 1 }
]
}
},
{
"code": "verbal",
"section": "GCS",
"label": "Verbal response (V)",
"answer_type": "score_item",
"is_required": true,
"sort_order": 20,
"score_key": "verbal",
"options": {
"min": 1,
"max": 5,
"choices": [
{ "code": "5", "label": "Oriented", "score": 5 },
{ "code": "4", "label": "Confused", "score": 4 },
{ "code": "3", "label": "Inappropriate words", "score": 3 },
{ "code": "2", "label": "Incomprehensible sounds", "score": 2 },
{ "code": "1", "label": "None", "score": 1 }
]
}
},
{
"code": "motor",
"section": "GCS",
"label": "Motor response (M)",
"answer_type": "score_item",
"is_required": true,
"sort_order": 30,
"score_key": "motor",
"options": {
"min": 1,
"max": 6,
"choices": [
{ "code": "6", "label": "Obeys commands", "score": 6 },
{ "code": "5", "label": "Localizes pain", "score": 5 },
{ "code": "4", "label": "Withdrawal from pain", "score": 4 },
{ "code": "3", "label": "Flexion to pain (decorticate)", "score": 3 },
{ "code": "2", "label": "Extension to pain (decerebrate)", "score": 2 },
{ "code": "1", "label": "None", "score": 1 }
]
}
}
]
}
@@ -0,0 +1,197 @@
{
"template": {
"code": "heart_failure_core",
"name": "Heart failure assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "single_value",
"description": "NYHA class, EF, BNP, fluid status for heart failure pathway.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "cardiology",
"estimated_minutes": 8,
"pathway_codes": [
"heart_failure"
],
"attribution": "Ladill Care Heart failure assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "nyha",
"section": "Classification",
"label": "NYHA classification",
"answer_type": "score_item",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{
"code": "1",
"label": "I \u2014 No limitation",
"score": 1
},
{
"code": "2",
"label": "II \u2014 Slight limitation",
"score": 2
},
{
"code": "3",
"label": "III \u2014 Marked limitation",
"score": 3
},
{
"code": "4",
"label": "IV \u2014 Symptoms at rest",
"score": 4
}
]
},
"score_key": "nyha"
},
{
"code": "ejection_fraction",
"section": "Cardiac",
"label": "Ejection fraction (%)",
"answer_type": "number",
"is_required": false,
"sort_order": 20,
"options": {
"min": 5,
"max": 80,
"unit": "%"
},
"validation": {
"min": 5,
"max": 80
}
},
{
"code": "bnp",
"section": "Labs",
"label": "BNP / NT-proBNP",
"answer_type": "number",
"is_required": false,
"sort_order": 30,
"options": {
"min": 0,
"max": 100000,
"unit": "pg/mL"
},
"validation": {
"min": 0,
"max": 100000
}
},
{
"code": "edema",
"section": "Fluid",
"label": "Peripheral edema",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "none",
"label": "None"
},
{
"code": "mild",
"label": "Mild"
},
{
"code": "moderate",
"label": "Moderate"
},
{
"code": "severe",
"label": "Severe"
}
]
}
},
{
"code": "weight_kg",
"section": "Fluid",
"label": "Current weight (kg)",
"answer_type": "number",
"is_required": false,
"sort_order": 50,
"options": {
"min": 20,
"max": 300,
"unit": "kg"
},
"validation": {
"min": 20,
"max": 300
}
},
{
"code": "weight_change",
"section": "Fluid",
"label": "Weight change since last visit",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 60,
"options": {
"choices": [
{
"code": "down",
"label": "Decreased"
},
{
"code": "stable",
"label": "Stable"
},
{
"code": "up",
"label": "Increased"
}
]
}
},
{
"code": "exercise_tolerance",
"section": "Function",
"label": "Exercise tolerance",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 70,
"options": {
"choices": [
{
"code": "good",
"label": "Good"
},
{
"code": "reduced",
"label": "Reduced"
},
{
"code": "poor",
"label": "Poor"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
@@ -0,0 +1,171 @@
{
"template": {
"code": "hypertension_core",
"name": "Hypertension assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "BP control, end-organ risk, adherence for hypertension pathway.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "cardiology",
"estimated_minutes": 8,
"pathway_codes": [
"hypertension"
],
"attribution": "Ladill Care Hypertension assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "sbp",
"section": "BP",
"label": "Clinic SBP (mmHg)",
"answer_type": "number",
"is_required": true,
"sort_order": 10,
"options": {
"min": 60,
"max": 300,
"unit": "mmHg"
},
"validation": {
"min": 60,
"max": 300
}
},
{
"code": "dbp",
"section": "BP",
"label": "Clinic DBP (mmHg)",
"answer_type": "number",
"is_required": true,
"sort_order": 20,
"options": {
"min": 30,
"max": 200,
"unit": "mmHg"
},
"validation": {
"min": 30,
"max": 200
}
},
{
"code": "control_status",
"section": "BP",
"label": "BP control",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 30,
"options": {
"choices": [
{
"code": "controlled",
"label": "Controlled"
},
{
"code": "uncontrolled",
"label": "Uncontrolled"
},
{
"code": "unknown",
"label": "Unknown"
}
]
}
},
{
"code": "home_monitoring",
"section": "BP",
"label": "Home BP monitoring",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "yes",
"label": "Yes"
},
{
"code": "no",
"label": "No"
}
]
}
},
{
"code": "target_organ",
"section": "Risk",
"label": "Target organ damage",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{
"code": "none",
"label": "None known"
},
{
"code": "lvh",
"label": "LVH"
},
{
"code": "ckd",
"label": "CKD"
},
{
"code": "retinopathy",
"label": "Retinopathy"
},
{
"code": "multiple",
"label": "Multiple"
}
]
}
},
{
"code": "adherence",
"section": "Treatment",
"label": "Medication adherence",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 60,
"options": {
"choices": [
{
"code": "good",
"label": "Good"
},
{
"code": "fair",
"label": "Fair"
},
{
"code": "poor",
"label": "Poor"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
+45
View File
@@ -0,0 +1,45 @@
{
"template": {
"code": "mrs",
"name": "Modified Rankin Scale",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "single_value",
"description": "Global disability scale after stroke (06). Required on stroke pathway activation.",
"meta": {
"capture_roles": ["doctor"],
"specialty": "neurology",
"estimated_minutes": 2,
"pathway_codes": ["stroke"],
"attribution": "Modified Rankin Scale (mRS) — clinical instrument for educational/clinical use. Verify commercial redistribution rights before packaging for sale."
}
},
"questions": [
{
"code": "mrs_score",
"section": "Disability",
"label": "Modified Rankin Scale score",
"help_text": "Select the grade that best describes the patient.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 1,
"score_key": "total",
"options": {
"min": 0,
"max": 6,
"choices": [
{ "code": "0", "label": "No symptoms at all", "score": 0 },
{ "code": "1", "label": "No significant disability despite symptoms; able to carry out all usual duties and activities", "score": 1 },
{ "code": "2", "label": "Slight disability; unable to carry out all previous activities, but able to look after own affairs without assistance", "score": 2 },
{ "code": "3", "label": "Moderate disability; requiring some help, but able to walk without assistance", "score": 3 },
{ "code": "4", "label": "Moderately severe disability; unable to walk without assistance and unable to attend to own bodily needs without assistance", "score": 4 },
{ "code": "5", "label": "Severe disability; bedridden, incontinent and requiring constant nursing care and attention", "score": 5 },
{ "code": "6", "label": "Dead", "score": 6 }
]
},
"validation": { "min": 0, "max": 6 }
}
]
}
+320
View File
@@ -0,0 +1,320 @@
{
"template": {
"code": "nihss",
"name": "NIH Stroke Scale",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "sum_items",
"description": "National Institutes of Health Stroke Scale (NIHSS). Total 042. Required on stroke pathway activation.",
"meta": {
"capture_roles": ["doctor"],
"specialty": "neurology",
"estimated_minutes": 10,
"pathway_codes": ["stroke"],
"max_total": 42,
"attribution": "NIH Stroke Scale (NIHSS) — public-domain clinical instrument originating from NINDS/NIH. Confirm local training and documentation requirements for clinical use."
}
},
"questions": [
{
"code": "1a_loc",
"section": "1. Level of consciousness",
"label": "1a. Level of consciousness",
"help_text": "Alertness.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 10,
"score_key": "loc",
"options": {
"min": 0,
"max": 3,
"choices": [
{ "code": "0", "label": "Alert; keenly responsive", "score": 0 },
{ "code": "1", "label": "Not alert; arousable by minor stimulation", "score": 1 },
{ "code": "2", "label": "Not alert; requires repeated stimulation / obtunded", "score": 2 },
{ "code": "3", "label": "Responds only with reflex motor or autonomic effects / totally unresponsive", "score": 3 }
]
}
},
{
"code": "1b_loc_questions",
"section": "1. Level of consciousness",
"label": "1b. LOC questions",
"help_text": "Month and age. Score only initial answer.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 20,
"score_key": "loc",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "Answers both questions correctly", "score": 0 },
{ "code": "1", "label": "Answers one question correctly", "score": 1 },
{ "code": "2", "label": "Answers neither question correctly", "score": 2 }
]
}
},
{
"code": "1c_loc_commands",
"section": "1. Level of consciousness",
"label": "1c. LOC commands",
"help_text": "Open and close eyes; grip and release non-paretic hand.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 30,
"score_key": "loc",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "Performs both tasks correctly", "score": 0 },
{ "code": "1", "label": "Performs one task correctly", "score": 1 },
{ "code": "2", "label": "Performs neither task correctly", "score": 2 }
]
}
},
{
"code": "2_gaze",
"section": "2. Best gaze",
"label": "2. Best gaze",
"help_text": "Horizontal eye movements only.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 40,
"score_key": "gaze",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "Normal", "score": 0 },
{ "code": "1", "label": "Partial gaze palsy", "score": 1 },
{ "code": "2", "label": "Forced deviation, or total gaze paresis not overcome by oculocephalic maneuver", "score": 2 }
]
}
},
{
"code": "3_visual",
"section": "3. Visual",
"label": "3. Visual fields",
"answer_type": "score_item",
"is_required": true,
"sort_order": 50,
"score_key": "visual",
"options": {
"min": 0,
"max": 3,
"choices": [
{ "code": "0", "label": "No visual loss", "score": 0 },
{ "code": "1", "label": "Partial hemianopia", "score": 1 },
{ "code": "2", "label": "Complete hemianopia", "score": 2 },
{ "code": "3", "label": "Bilateral hemianopia (blind including cortical blindness)", "score": 3 }
]
}
},
{
"code": "4_facial",
"section": "4. Facial palsy",
"label": "4. Facial palsy",
"answer_type": "score_item",
"is_required": true,
"sort_order": 60,
"score_key": "facial",
"options": {
"min": 0,
"max": 3,
"choices": [
{ "code": "0", "label": "Normal symmetrical movements", "score": 0 },
{ "code": "1", "label": "Minor paralysis (flattened nasolabial fold, asymmetry on smiling)", "score": 1 },
{ "code": "2", "label": "Partial paralysis (total or near-total paralysis of lower face)", "score": 2 },
{ "code": "3", "label": "Complete paralysis of one or both sides (upper and lower face)", "score": 3 }
]
}
},
{
"code": "5a_motor_arm_left",
"section": "5. Motor arm",
"label": "5a. Motor arm — left",
"help_text": "Extend arms 90° (sitting) or 45° (supine) for 10 seconds.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 70,
"score_key": "motor_arm",
"options": {
"min": 0,
"max": 4,
"choices": [
{ "code": "0", "label": "No drift; limb holds 90° (or 45°) for full 10 seconds", "score": 0 },
{ "code": "1", "label": "Drift; limb holds but drifts down before full 10 seconds", "score": 1 },
{ "code": "2", "label": "Some effort against gravity", "score": 2 },
{ "code": "3", "label": "No effort against gravity; limb falls", "score": 3 },
{ "code": "4", "label": "No movement", "score": 4 },
{ "code": "UN", "label": "Amputation or joint fusion (score as 0 for total; document)", "score": 0 }
]
}
},
{
"code": "5b_motor_arm_right",
"section": "5. Motor arm",
"label": "5b. Motor arm — right",
"answer_type": "score_item",
"is_required": true,
"sort_order": 80,
"score_key": "motor_arm",
"options": {
"min": 0,
"max": 4,
"choices": [
{ "code": "0", "label": "No drift; limb holds 90° (or 45°) for full 10 seconds", "score": 0 },
{ "code": "1", "label": "Drift; limb holds but drifts down before full 10 seconds", "score": 1 },
{ "code": "2", "label": "Some effort against gravity", "score": 2 },
{ "code": "3", "label": "No effort against gravity; limb falls", "score": 3 },
{ "code": "4", "label": "No movement", "score": 4 },
{ "code": "UN", "label": "Amputation or joint fusion (score as 0 for total; document)", "score": 0 }
]
}
},
{
"code": "6a_motor_leg_left",
"section": "6. Motor leg",
"label": "6a. Motor leg — left",
"help_text": "Hold leg at 30° for 5 seconds (always tested supine).",
"answer_type": "score_item",
"is_required": true,
"sort_order": 90,
"score_key": "motor_leg",
"options": {
"min": 0,
"max": 4,
"choices": [
{ "code": "0", "label": "No drift; leg holds 30° for full 5 seconds", "score": 0 },
{ "code": "1", "label": "Drift; leg falls by the end of 5-second period but does not hit bed", "score": 1 },
{ "code": "2", "label": "Some effort against gravity; leg falls to bed by 5 seconds", "score": 2 },
{ "code": "3", "label": "No effort against gravity; leg falls to bed immediately", "score": 3 },
{ "code": "4", "label": "No movement", "score": 4 },
{ "code": "UN", "label": "Amputation or joint fusion (score as 0 for total; document)", "score": 0 }
]
}
},
{
"code": "6b_motor_leg_right",
"section": "6. Motor leg",
"label": "6b. Motor leg — right",
"answer_type": "score_item",
"is_required": true,
"sort_order": 100,
"score_key": "motor_leg",
"options": {
"min": 0,
"max": 4,
"choices": [
{ "code": "0", "label": "No drift; leg holds 30° for full 5 seconds", "score": 0 },
{ "code": "1", "label": "Drift; leg falls by the end of 5-second period but does not hit bed", "score": 1 },
{ "code": "2", "label": "Some effort against gravity; leg falls to bed by 5 seconds", "score": 2 },
{ "code": "3", "label": "No effort against gravity; leg falls to bed immediately", "score": 3 },
{ "code": "4", "label": "No movement", "score": 4 },
{ "code": "UN", "label": "Amputation or joint fusion (score as 0 for total; document)", "score": 0 }
]
}
},
{
"code": "7_ataxia",
"section": "7. Limb ataxia",
"label": "7. Limb ataxia",
"help_text": "Finger-nose-finger and heel-shin tests on both sides.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 110,
"score_key": "ataxia",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "Absent", "score": 0 },
{ "code": "1", "label": "Present in one limb", "score": 1 },
{ "code": "2", "label": "Present in two limbs", "score": 2 },
{ "code": "UN", "label": "Amputation or joint fusion (score as 0; document)", "score": 0 }
]
}
},
{
"code": "8_sensory",
"section": "8. Sensory",
"label": "8. Sensory",
"help_text": "Sensation or grimace to pinprick when consciousness decreased.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 120,
"score_key": "sensory",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "Normal; no sensory loss", "score": 0 },
{ "code": "1", "label": "Mild-to-moderate sensory loss", "score": 1 },
{ "code": "2", "label": "Severe to total sensory loss", "score": 2 }
]
}
},
{
"code": "9_language",
"section": "9. Best language",
"label": "9. Best language",
"help_text": "Describe picture, name items, read sentences.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 130,
"score_key": "language",
"options": {
"min": 0,
"max": 3,
"choices": [
{ "code": "0", "label": "No aphasia; normal", "score": 0 },
{ "code": "1", "label": "Mild-to-moderate aphasia", "score": 1 },
{ "code": "2", "label": "Severe aphasia", "score": 2 },
{ "code": "3", "label": "Mute, global aphasia; no usable speech or auditory comprehension", "score": 3 }
]
}
},
{
"code": "10_dysarthria",
"section": "10. Dysarthria",
"label": "10. Dysarthria",
"help_text": "Read or repeat words from list.",
"answer_type": "score_item",
"is_required": true,
"sort_order": 140,
"score_key": "dysarthria",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "Normal", "score": 0 },
{ "code": "1", "label": "Mild-to-moderate dysarthria", "score": 1 },
{ "code": "2", "label": "Severe dysarthria; unintelligible or mute/anarthric", "score": 2 },
{ "code": "UN", "label": "Intubated or other physical barrier (score as 0; document)", "score": 0 }
]
}
},
{
"code": "11_extinction",
"section": "11. Extinction and inattention",
"label": "11. Extinction and inattention (formerly neglect)",
"answer_type": "score_item",
"is_required": true,
"sort_order": 150,
"score_key": "extinction",
"options": {
"min": 0,
"max": 2,
"choices": [
{ "code": "0", "label": "No abnormality", "score": 0 },
{ "code": "1", "label": "Visual, tactile, auditory, spatial, or personal inattention; or extinction to bilateral simultaneous stimulation in one sensory modality", "score": 1 },
{ "code": "2", "label": "Profound hemi-inattention or extinction to more than one modality; does not recognize own hand or orients to only one side of space", "score": 2 }
]
}
}
]
}
@@ -0,0 +1,144 @@
{
"template": {
"code": "orthopaedics_core",
"name": "Orthopaedics assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Injury/region, pain, weight-bearing, fracture status.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "orthopaedics",
"estimated_minutes": 8,
"pathway_codes": [
"orthopaedics"
],
"attribution": "Ladill Care Orthopaedics assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "region",
"section": "Injury",
"label": "Anatomical region",
"answer_type": "text",
"is_required": true,
"sort_order": 10,
"validation": {
"max": 5000
}
},
{
"code": "weight_bearing",
"section": "Function",
"label": "Weight-bearing status",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 20,
"options": {
"choices": [
{
"code": "full",
"label": "Full"
},
{
"code": "partial",
"label": "Partial"
},
{
"code": "non",
"label": "Non-weight-bearing"
}
]
}
},
{
"code": "pain_score",
"section": "Symptoms",
"label": "Pain score (0\u201310)",
"answer_type": "scale",
"is_required": false,
"sort_order": 30,
"options": {
"min": 0,
"max": 10
},
"validation": {
"min": 0,
"max": 10
}
},
{
"code": "fracture_status",
"section": "Imaging",
"label": "Fracture status",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{
"code": "none",
"label": "No fracture"
},
{
"code": "suspected",
"label": "Suspected"
},
{
"code": "confirmed",
"label": "Confirmed"
},
{
"code": "healed",
"label": "Healing/healed"
}
]
}
},
{
"code": "operative_plan",
"section": "Plan",
"label": "Operative plan",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{
"code": "none",
"label": "Conservative"
},
{
"code": "planned",
"label": "Surgery planned"
},
{
"code": "done",
"label": "Post-op"
},
{
"code": "unknown",
"label": "Unknown"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
@@ -0,0 +1,120 @@
{
"template": {
"code": "outcome_core",
"name": "Outcome measures",
"category": "outcome",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Generic longitudinal outcome tracking across conditions. Prefer typed vitals for weight/BP.",
"meta": {
"capture_roles": ["doctor", "nurse"],
"specialty": "general",
"estimated_minutes": 5,
"attribution": "Ladill Care generic outcome measures (platform-authored)."
}
},
"questions": [
{
"code": "quality_of_life",
"section": "Patient-reported",
"label": "Quality of life (010)",
"help_text": "0 = worst imaginable, 10 = best imaginable.",
"answer_type": "scale",
"is_required": false,
"sort_order": 10,
"options": { "min": 0, "max": 10 },
"validation": { "min": 0, "max": 10 }
},
{
"code": "pain_score",
"section": "Patient-reported",
"label": "Pain score (010)",
"answer_type": "scale",
"is_required": false,
"sort_order": 20,
"options": { "min": 0, "max": 10 },
"validation": { "min": 0, "max": 10 }
},
{
"code": "functional_independence",
"section": "Function",
"label": "Functional independence",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 30,
"options": {
"choices": [
{ "code": "independent", "label": "Independent" },
{ "code": "minimal_help", "label": "Minimal help" },
{ "code": "moderate_help", "label": "Moderate help" },
{ "code": "dependent", "label": "Dependent" }
]
}
},
{
"code": "medication_adherence",
"section": "Treatment",
"label": "Medication adherence",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{ "code": "good", "label": "Good (≥80%)" },
{ "code": "fair", "label": "Fair" },
{ "code": "poor", "label": "Poor" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "hospital_admissions_since_last",
"section": "Events",
"label": "Hospital admissions since last review",
"answer_type": "integer",
"is_required": false,
"sort_order": 50,
"options": { "min": 0, "max": 50 },
"validation": { "min": 0, "max": 50 }
},
{
"code": "falls_count",
"section": "Events",
"label": "Falls since last review",
"answer_type": "integer",
"is_required": false,
"sort_order": 60,
"options": { "min": 0, "max": 100 },
"validation": { "min": 0, "max": 100 }
},
{
"code": "readmissions_flag",
"section": "Events",
"label": "Unplanned readmission since last review?",
"answer_type": "boolean",
"is_required": false,
"sort_order": 70
},
{
"code": "patient_satisfaction",
"section": "Patient-reported",
"label": "Patient satisfaction (010)",
"answer_type": "scale",
"is_required": false,
"sort_order": 80,
"options": { "min": 0, "max": 10 },
"validation": { "min": 0, "max": 10 }
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 90,
"validation": { "max": 3000 }
}
]
}
@@ -0,0 +1,156 @@
{
"template": {
"code": "parkinsons_core",
"name": "Parkinson's assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": "single_value",
"description": "Hoehn & Yahr, tremor, freezing, falls.",
"meta": {
"capture_roles": [
"doctor"
],
"specialty": "neurology",
"estimated_minutes": 8,
"pathway_codes": [
"parkinsons"
],
"attribution": "Ladill Care Parkinson's assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "hoehn_yahr",
"section": "Staging",
"label": "Hoehn & Yahr stage",
"answer_type": "score_item",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{
"code": "1",
"label": "1",
"score": 1
},
{
"code": "1.5",
"label": "1.5",
"score": 1.5
},
{
"code": "2",
"label": "2",
"score": 2
},
{
"code": "2.5",
"label": "2.5",
"score": 2.5
},
{
"code": "3",
"label": "3",
"score": 3
},
{
"code": "4",
"label": "4",
"score": 4
},
{
"code": "5",
"label": "5",
"score": 5
}
]
},
"score_key": "hy"
},
{
"code": "tremor_score",
"section": "Motor",
"label": "Tremor severity (0\u201310)",
"answer_type": "scale",
"is_required": false,
"sort_order": 20,
"options": {
"min": 0,
"max": 10
},
"validation": {
"min": 0,
"max": 10
}
},
{
"code": "freezing",
"section": "Motor",
"label": "Freezing episodes",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 30,
"options": {
"choices": [
{
"code": "none",
"label": "None"
},
{
"code": "rare",
"label": "Rare"
},
{
"code": "frequent",
"label": "Frequent"
}
]
}
},
{
"code": "falls_6m",
"section": "Safety",
"label": "Falls in last 6 months",
"answer_type": "number",
"is_required": false,
"sort_order": 40,
"options": {
"min": 0,
"max": 50
},
"validation": {
"min": 0,
"max": 50
}
},
{
"code": "updrs_total",
"section": "Motor",
"label": "UPDRS total (if available)",
"answer_type": "number",
"is_required": false,
"sort_order": 50,
"options": {
"min": 0,
"max": 200
},
"validation": {
"min": 0,
"max": 200
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
@@ -0,0 +1,172 @@
{
"template": {
"code": "pregnancy_core",
"name": "Pregnancy assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Gestational age, parity, risk factors, BP, foetal movement.",
"meta": {
"capture_roles": [
"doctor",
"nurse"
],
"specialty": "obstetrics",
"estimated_minutes": 8,
"pathway_codes": [
"pregnancy"
],
"attribution": "Ladill Care Pregnancy assessment content pack (platform-authored clinical checklist)."
}
},
"questions": [
{
"code": "ga_weeks",
"section": "Pregnancy",
"label": "Gestational age (weeks)",
"answer_type": "number",
"is_required": true,
"sort_order": 10,
"options": {
"min": 0,
"max": 45,
"unit": "weeks"
},
"validation": {
"min": 0,
"max": 45
}
},
{
"code": "gravida",
"section": "Obstetric history",
"label": "Gravida",
"answer_type": "number",
"is_required": false,
"sort_order": 20,
"options": {
"min": 0,
"max": 20
},
"validation": {
"min": 0,
"max": 20
}
},
{
"code": "para",
"section": "Obstetric history",
"label": "Para",
"answer_type": "number",
"is_required": false,
"sort_order": 30,
"options": {
"min": 0,
"max": 20
},
"validation": {
"min": 0,
"max": 20
}
},
{
"code": "sbp",
"section": "Vitals",
"label": "BP systolic",
"answer_type": "number",
"is_required": false,
"sort_order": 40,
"options": {
"min": 60,
"max": 250,
"unit": "mmHg"
},
"validation": {
"min": 60,
"max": 250
}
},
{
"code": "dbp",
"section": "Vitals",
"label": "BP diastolic",
"answer_type": "number",
"is_required": false,
"sort_order": 50,
"options": {
"min": 30,
"max": 150,
"unit": "mmHg"
},
"validation": {
"min": 30,
"max": 150
}
},
{
"code": "risk_category",
"section": "Risk",
"label": "Risk category",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 60,
"options": {
"choices": [
{
"code": "low",
"label": "Low"
},
{
"code": "moderate",
"label": "Moderate"
},
{
"code": "high",
"label": "High"
}
]
}
},
{
"code": "foetal_movement",
"section": "Foetal",
"label": "Foetal movements",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 70,
"options": {
"choices": [
{
"code": "normal",
"label": "Normal"
},
{
"code": "reduced",
"label": "Reduced"
},
{
"code": "na",
"label": "N/A early"
},
{
"code": "unknown",
"label": "Unknown"
}
]
}
},
{
"code": "notes",
"section": "Notes",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 100,
"validation": {
"max": 5000
}
}
]
}
@@ -0,0 +1,179 @@
{
"template": {
"code": "stroke_clinical",
"name": "Stroke clinical assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Stroke subtype (incl. TIA), timeline, imaging, reperfusion, and focal findings. Optional on pathway activation.",
"meta": {
"capture_roles": ["doctor"],
"specialty": "neurology",
"estimated_minutes": 8,
"pathway_codes": ["stroke"],
"attribution": "Ladill Care stroke clinical form (platform-authored). Subtype field implements KD-19 (single stroke pathway for TIA and stroke)."
}
},
"questions": [
{
"code": "stroke_subtype",
"section": "Classification",
"label": "Stroke / TIA subtype",
"help_text": "TIA shares the stroke pathway; record subtype here (not a separate pathway).",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{ "code": "tia", "label": "TIA" },
{ "code": "ischaemic", "label": "Ischaemic stroke" },
{ "code": "haemorrhagic", "label": "Haemorrhagic stroke" },
{ "code": "unspecified", "label": "Unspecified / under investigation" }
]
}
},
{
"code": "tlkw",
"section": "Timeline",
"label": "Time last known well",
"answer_type": "datetime",
"is_required": false,
"sort_order": 20
},
{
"code": "symptom_onset",
"section": "Timeline",
"label": "Symptom onset (if witnessed)",
"answer_type": "datetime",
"is_required": false,
"sort_order": 30
},
{
"code": "ct_findings",
"section": "Imaging",
"label": "CT / imaging findings",
"answer_type": "textarea",
"is_required": false,
"sort_order": 40,
"validation": { "max": 5000 }
},
{
"code": "thrombolysis_status",
"section": "Reperfusion",
"label": "Thrombolysis status",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 50,
"options": {
"choices": [
{ "code": "not_indicated", "label": "Not indicated" },
{ "code": "contraindicated", "label": "Contraindicated" },
{ "code": "given", "label": "Given" },
{ "code": "offered_declined", "label": "Offered / declined" },
{ "code": "pending", "label": "Pending decision" }
]
}
},
{
"code": "thrombolysis_time",
"section": "Reperfusion",
"label": "Thrombolysis time (if given)",
"answer_type": "datetime",
"is_required": false,
"sort_order": 60
},
{
"code": "mechanical_thrombectomy",
"section": "Reperfusion",
"label": "Mechanical thrombectomy",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 70,
"options": {
"choices": [
{ "code": "not_indicated", "label": "Not indicated" },
{ "code": "referred", "label": "Referred / transferred" },
{ "code": "performed", "label": "Performed" },
{ "code": "not_available", "label": "Not available" }
]
}
},
{
"code": "limb_strength",
"section": "Findings",
"label": "Limb strength summary",
"answer_type": "textarea",
"is_required": false,
"sort_order": 80,
"validation": { "max": 2000 }
},
{
"code": "aphasia",
"section": "Findings",
"label": "Aphasia",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 90,
"options": {
"choices": [
{ "code": "none", "label": "None" },
{ "code": "mild", "label": "Mild" },
{ "code": "moderate", "label": "Moderate" },
{ "code": "severe", "label": "Severe" }
]
}
},
{
"code": "dysphagia",
"section": "Findings",
"label": "Dysphagia",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 100,
"options": {
"choices": [
{ "code": "none", "label": "None / not suspected" },
{ "code": "suspected", "label": "Suspected" },
{ "code": "confirmed", "label": "Confirmed" }
]
}
},
{
"code": "spasticity",
"section": "Findings",
"label": "Spasticity",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 110,
"options": {
"choices": [
{ "code": "none", "label": "None" },
{ "code": "mild", "label": "Mild" },
{ "code": "moderate", "label": "Moderate" },
{ "code": "severe", "label": "Severe" },
{ "code": "na_acute", "label": "N/A (hyperacute)" }
]
}
},
{
"code": "cognition",
"section": "Findings",
"label": "Cognition notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 120,
"validation": { "max": 2000 }
},
{
"code": "clinical_notes",
"section": "Notes",
"label": "Additional clinical notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 130,
"validation": { "max": 10000 }
}
]
}
@@ -0,0 +1,106 @@
{
"template": {
"code": "stroke_swallow",
"name": "Swallow assessment",
"category": "disease",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Bedside swallow screen after stroke. Optional on stroke pathway.",
"meta": {
"capture_roles": ["doctor", "nurse"],
"specialty": "neurology",
"estimated_minutes": 5,
"pathway_codes": ["stroke"],
"attribution": "Ladill Care stroke swallow screen (platform-authored checklist). Not a substitute for formal SALT assessment."
}
},
"questions": [
{
"code": "npo_status",
"section": "Screen",
"label": "Nil by mouth status",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 10,
"options": {
"choices": [
{ "code": "npo", "label": "NBM / NPO" },
{ "code": "oral_allowed", "label": "Oral intake allowed" },
{ "code": "modified", "label": "Modified texture only" }
]
}
},
{
"code": "level_of_alertness",
"section": "Screen",
"label": "Alert enough for swallow trial?",
"answer_type": "boolean",
"is_required": true,
"sort_order": 20
},
{
"code": "voice_wet",
"section": "Screen",
"label": "Wet / gurgly voice after sip?",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 30,
"options": {
"choices": [
{ "code": "no", "label": "No" },
{ "code": "yes", "label": "Yes" },
{ "code": "not_tested", "label": "Not tested" }
]
}
},
{
"code": "cough_after_sip",
"section": "Screen",
"label": "Cough / choke on water trial?",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{ "code": "no", "label": "No" },
{ "code": "yes", "label": "Yes" },
{ "code": "not_tested", "label": "Not tested" }
]
}
},
{
"code": "screen_result",
"section": "Result",
"label": "Screen result",
"answer_type": "single_choice",
"is_required": true,
"sort_order": 50,
"options": {
"choices": [
{ "code": "pass", "label": "Pass — oral trial appropriate" },
{ "code": "fail", "label": "Fail — keep NBM, refer SALT" },
{ "code": "deferred", "label": "Deferred — not safe to screen" }
]
}
},
{
"code": "salt_referral",
"section": "Result",
"label": "Speech & language therapy referral",
"answer_type": "boolean",
"is_required": false,
"sort_order": 60
},
{
"code": "notes",
"section": "Result",
"label": "Notes",
"answer_type": "textarea",
"is_required": false,
"sort_order": 70,
"validation": { "max": 2000 }
}
]
}
@@ -0,0 +1,256 @@
{
"template": {
"code": "universal_intake",
"name": "Universal Intake",
"category": "universal",
"version": 1,
"is_current": true,
"is_active": true,
"scoring_strategy": null,
"description": "Disease-agnostic structured intake: presenting complaint, social history, and functional status. Demographics, allergies, vitals, and labs remain on typed Care forms.",
"meta": {
"capture_roles": ["doctor", "nurse"],
"specialty": "general",
"estimated_minutes": 8,
"attribution": "Ladill Care universal clinical intake (platform-authored). Not a licensed third-party instrument."
}
},
"questions": [
{
"code": "chief_complaint",
"section": "Presenting complaint",
"label": "Chief complaint",
"help_text": "Primary reason for this visit in the patient's own words when possible.",
"answer_type": "textarea",
"is_required": true,
"sort_order": 10,
"options": null,
"validation": { "max": 2000 }
},
{
"code": "hpi",
"section": "Presenting complaint",
"label": "History of presenting illness",
"help_text": "Onset, course, associated features. Free-text symptoms on the consultation remain the narrative source of truth (not auto-synced).",
"answer_type": "textarea",
"is_required": false,
"sort_order": 20,
"options": null,
"validation": { "max": 10000 }
},
{
"code": "duration_value",
"section": "Presenting complaint",
"label": "Duration (value)",
"help_text": "Numeric duration; pair with duration unit.",
"answer_type": "number",
"is_required": false,
"sort_order": 30,
"options": { "min": 0, "max": 9999 },
"validation": { "min": 0, "max": 9999 }
},
{
"code": "duration_unit",
"section": "Presenting complaint",
"label": "Duration unit",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 40,
"options": {
"choices": [
{ "code": "minutes", "label": "Minutes" },
{ "code": "hours", "label": "Hours" },
{ "code": "days", "label": "Days" },
{ "code": "weeks", "label": "Weeks" },
{ "code": "months", "label": "Months" },
{ "code": "years", "label": "Years" }
]
}
},
{
"code": "pain_score",
"section": "Presenting complaint",
"label": "Pain score (010)",
"help_text": "0 = no pain, 10 = worst imaginable pain.",
"answer_type": "scale",
"is_required": false,
"sort_order": 50,
"options": { "min": 0, "max": 10 },
"validation": { "min": 0, "max": 10 }
},
{
"code": "current_symptoms",
"section": "Presenting complaint",
"label": "Current symptoms",
"help_text": "Structured symptom list or free description. Does not replace consultation free-text symptoms.",
"answer_type": "textarea",
"is_required": false,
"sort_order": 60,
"options": null,
"validation": { "max": 5000 }
},
{
"code": "smoking_status",
"section": "Social history",
"label": "Smoking status",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 100,
"options": {
"choices": [
{ "code": "never", "label": "Never smoked" },
{ "code": "former", "label": "Former smoker" },
{ "code": "current", "label": "Current smoker" },
{ "code": "unknown", "label": "Unknown / not asked" }
]
}
},
{
"code": "smoking_pack_years",
"section": "Social history",
"label": "Smoking pack-years",
"help_text": "If former or current smoker. Packs/day × years.",
"answer_type": "number",
"is_required": false,
"sort_order": 110,
"options": { "min": 0, "max": 500, "unit": "pack-years" },
"validation": { "min": 0, "max": 500 }
},
{
"code": "alcohol_use",
"section": "Social history",
"label": "Alcohol use",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 120,
"options": {
"choices": [
{ "code": "none", "label": "None" },
{ "code": "occasional", "label": "Occasional" },
{ "code": "moderate", "label": "Moderate" },
{ "code": "heavy", "label": "Heavy" },
{ "code": "unknown", "label": "Unknown / not asked" }
]
}
},
{
"code": "occupation",
"section": "Social history",
"label": "Occupation",
"answer_type": "text",
"is_required": false,
"sort_order": 130,
"options": null,
"validation": { "max": 255 }
},
{
"code": "mobility",
"section": "Functional status",
"label": "Mobility",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 200,
"options": {
"choices": [
{ "code": "independent", "label": "Independent" },
{ "code": "with_aid", "label": "With aid (stick/frame)" },
{ "code": "wheelchair", "label": "Wheelchair" },
{ "code": "bedbound", "label": "Bedbound" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "communication",
"section": "Functional status",
"label": "Communication",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 210,
"options": {
"choices": [
{ "code": "normal", "label": "Normal" },
{ "code": "impaired", "label": "Impaired" },
{ "code": "non_verbal", "label": "Non-verbal" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "vision",
"section": "Functional status",
"label": "Vision",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 220,
"options": {
"choices": [
{ "code": "normal", "label": "Normal / corrected" },
{ "code": "impaired", "label": "Impaired" },
{ "code": "blind", "label": "Blind" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "hearing",
"section": "Functional status",
"label": "Hearing",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 230,
"options": {
"choices": [
{ "code": "normal", "label": "Normal" },
{ "code": "impaired", "label": "Impaired" },
{ "code": "deaf", "label": "Deaf" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "feeding",
"section": "Functional status",
"label": "Feeding",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 240,
"options": {
"choices": [
{ "code": "independent", "label": "Independent" },
{ "code": "needs_help", "label": "Needs help" },
{ "code": "dependent", "label": "Dependent / tube" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "continence",
"section": "Functional status",
"label": "Continence",
"answer_type": "single_choice",
"is_required": false,
"sort_order": 250,
"options": {
"choices": [
{ "code": "continent", "label": "Continent" },
{ "code": "occasional", "label": "Occasional incontinence" },
{ "code": "incontinent", "label": "Incontinent" },
{ "code": "catheter", "label": "Catheter / diversion" },
{ "code": "unknown", "label": "Unknown" }
]
}
},
{
"code": "baseline_labs_summary",
"section": "Baseline laboratories",
"label": "Baseline labs summary (optional)",
"help_text": "Free-text summary only. Prefer ordered investigation results in Lab for structured values (CBC, glucose, creatinine, electrolytes).",
"answer_type": "textarea",
"is_required": false,
"sort_order": 300,
"options": null,
"validation": { "max": 5000 }
}
]
}
+32
View File
@@ -0,0 +1,32 @@
{
"pathway": {
"code": "asthma",
"name": "Asthma",
"description": "Asthma clinical pathway.",
"match_rules": {
"icd_prefixes": [
"J45"
],
"keywords": [
"asthma",
"asthmatic"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 60,
"meta": {
"specialty": "respiratory"
}
},
"templates": [
{
"template_code": "asthma_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+36
View File
@@ -0,0 +1,36 @@
{
"pathway": {
"code": "cancer",
"name": "Cancer",
"description": "Cancer clinical pathway.",
"match_rules": {
"icd_prefixes": [
"C"
],
"keywords": [
"cancer",
"carcinoma",
"malignancy",
"malignant neoplasm",
"tumour",
"tumor"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 100,
"meta": {
"specialty": "oncology"
}
},
"templates": [
{
"template_code": "cancer_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+36
View File
@@ -0,0 +1,36 @@
{
"pathway": {
"code": "ckd",
"name": "CKD",
"description": "CKD clinical pathway.",
"match_rules": {
"icd_prefixes": [
"N18",
"N19"
],
"keywords": [
"ckd",
"chronic kidney",
"chronic renal",
"end stage renal",
"esrd"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 40,
"meta": {
"specialty": "nephrology"
}
},
"templates": [
{
"template_code": "ckd_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+34
View File
@@ -0,0 +1,34 @@
{
"pathway": {
"code": "copd",
"name": "COPD",
"description": "COPD clinical pathway.",
"match_rules": {
"icd_prefixes": [
"J44"
],
"keywords": [
"copd",
"chronic obstructive",
"emphysema",
"chronic bronchitis"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 70,
"meta": {
"specialty": "respiratory"
}
},
"templates": [
{
"template_code": "copd_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+38
View File
@@ -0,0 +1,38 @@
{
"pathway": {
"code": "dementia",
"name": "Dementia",
"description": "Dementia clinical pathway.",
"match_rules": {
"icd_prefixes": [
"F00",
"F01",
"F02",
"F03",
"G30"
],
"keywords": [
"dementia",
"alzheimer",
"alzheimers",
"vascular dementia"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 80,
"meta": {
"specialty": "neurology"
}
},
"templates": [
{
"template_code": "dementia_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+36
View File
@@ -0,0 +1,36 @@
{
"pathway": {
"code": "diabetes",
"name": "Diabetes",
"description": "Diabetes mellitus clinical pathway for structured review assessments.",
"match_rules": {
"icd_prefixes": ["E10", "E11", "E12", "E13", "E14"],
"keywords": [
"diabetes",
"diabetic",
"type 1 diabetes",
"type 2 diabetes",
"dm",
"iddm",
"niddm",
"hyperglycaemia",
"hyperglycemia"
],
"exclude_keywords": ["family history", "gestational diabetes risk"]
},
"is_active": true,
"sort_order": 20,
"meta": {
"specialty": "endocrinology",
"color": "amber"
}
},
"templates": [
{
"template_code": "diabetes_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+37
View File
@@ -0,0 +1,37 @@
{
"pathway": {
"code": "heart_failure",
"name": "Heart Failure",
"description": "Heart Failure clinical pathway.",
"match_rules": {
"icd_prefixes": [
"I50",
"I11"
],
"keywords": [
"heart failure",
"chf",
"ccf",
"hfrEF",
"hfpef",
"congestive cardiac failure"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 30,
"meta": {
"specialty": "cardiology"
}
},
"templates": [
{
"template_code": "heart_failure_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+38
View File
@@ -0,0 +1,38 @@
{
"pathway": {
"code": "hypertension",
"name": "Hypertension",
"description": "Hypertension clinical pathway.",
"match_rules": {
"icd_prefixes": [
"I10",
"I11",
"I12",
"I13",
"I15"
],
"keywords": [
"hypertension",
"high blood pressure",
"htn",
"hypertensive"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 50,
"meta": {
"specialty": "cardiology"
}
},
"templates": [
{
"template_code": "hypertension_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+38
View File
@@ -0,0 +1,38 @@
{
"pathway": {
"code": "orthopaedics",
"name": "Orthopaedics",
"description": "Orthopaedics clinical pathway.",
"match_rules": {
"icd_prefixes": [
"S",
"M80",
"M81",
"M84"
],
"keywords": [
"fracture",
"orthopaedic",
"orthopedic",
"dislocation",
"sprain"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 120,
"meta": {
"specialty": "orthopaedics"
}
},
"templates": [
{
"template_code": "orthopaedics_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+33
View File
@@ -0,0 +1,33 @@
{
"pathway": {
"code": "parkinsons",
"name": "Parkinson's",
"description": "Parkinson's clinical pathway.",
"match_rules": {
"icd_prefixes": [
"G20"
],
"keywords": [
"parkinson",
"parkinsons",
"parkinson's disease"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 90,
"meta": {
"specialty": "neurology"
}
},
"templates": [
{
"template_code": "parkinsons_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+36
View File
@@ -0,0 +1,36 @@
{
"pathway": {
"code": "pregnancy",
"name": "Pregnancy",
"description": "Pregnancy clinical pathway.",
"match_rules": {
"icd_prefixes": [
"O",
"Z33",
"Z34"
],
"keywords": [
"pregnancy",
"pregnant",
"antenatal",
"prenatal"
],
"exclude_keywords": [
"family history"
]
},
"is_active": true,
"sort_order": 110,
"meta": {
"specialty": "obstetrics"
}
},
"templates": [
{
"template_code": "pregnancy_core",
"is_required_on_activation": true,
"phase": "any",
"sort_order": 1
}
]
}
+68
View File
@@ -0,0 +1,68 @@
{
"pathway": {
"code": "stroke",
"name": "Stroke",
"description": "Acute and follow-up stroke clinical pathway (includes TIA as subtype on assessments).",
"match_rules": {
"icd_prefixes": ["I60", "I61", "I62", "I63", "I64", "G45"],
"keywords": [
"stroke",
"cva",
"tia",
"transient ischaemic attack",
"transient ischemic attack",
"cerebrovascular",
"hemiplegia",
"ischaemic stroke",
"ischemic stroke",
"hemorrhagic stroke",
"haemorrhagic stroke"
],
"exclude_keywords": ["family history"]
},
"is_active": true,
"sort_order": 10,
"meta": {
"specialty": "neurology",
"color": "rose"
}
},
"templates": [
{
"template_code": "nihss",
"is_required_on_activation": true,
"phase": "acute",
"sort_order": 1
},
{
"template_code": "mrs",
"is_required_on_activation": true,
"phase": "acute",
"sort_order": 2
},
{
"template_code": "gcs",
"is_required_on_activation": false,
"phase": "acute",
"sort_order": 3
},
{
"template_code": "stroke_clinical",
"is_required_on_activation": false,
"phase": "acute",
"sort_order": 4
},
{
"template_code": "stroke_swallow",
"is_required_on_activation": false,
"phase": "acute",
"sort_order": 5
},
{
"template_code": "barthel",
"is_required_on_activation": false,
"phase": "follow_up",
"sort_order": 6
}
]
}
@@ -0,0 +1,109 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* PR 1 Assessment engine schema (templates, questions, assessments, answers).
* Scores: PR 4. Pathways: PR 5.
*/
return new class extends Migration
{
public function up(): void
{
Schema::create('care_assessment_templates', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->unique();
// v1 always NULL (system catalog). Reserved for future org forks.
$table->foreignId('organization_id')->nullable()->constrained('care_organizations')->nullOnDelete();
$table->string('code');
$table->string('name');
$table->string('category'); // universal, disease, outcome, screening
$table->text('description')->nullable();
$table->unsignedInteger('version')->default(1);
$table->boolean('is_current')->default(true);
$table->string('scoring_strategy')->nullable(); // sum_items, single_value, custom:Handler
$table->json('meta')->nullable();
$table->boolean('is_active')->default(true);
$table->timestamps();
$table->softDeletes();
// Valid for v1 (system-only rows). Org clones out of scope.
$table->unique(['code', 'version']);
$table->index(['category', 'is_current', 'is_active']);
$table->index(['code', 'is_current']);
});
Schema::create('care_assessment_questions', function (Blueprint $table) {
$table->id();
$table->foreignId('template_id')->constrained('care_assessment_templates')->cascadeOnDelete();
$table->string('code');
$table->string('section')->nullable();
$table->string('label');
$table->text('help_text')->nullable();
$table->string('answer_type'); // text, number, boolean, date, single_choice, multi_choice, score_item, calculated
$table->json('options')->nullable();
$table->boolean('is_required')->default(false);
$table->unsignedInteger('sort_order')->default(0);
$table->string('score_key')->nullable();
$table->json('validation')->nullable();
$table->timestamps();
$table->unique(['template_id', 'code']);
$table->index(['template_id', 'sort_order']);
});
Schema::create('care_assessments', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->unique();
$table->string('owner_ref')->index();
$table->foreignId('organization_id')->constrained('care_organizations')->cascadeOnDelete();
$table->foreignId('branch_id')->nullable()->constrained('care_branches')->nullOnDelete();
$table->foreignId('patient_id')->constrained('care_patients')->cascadeOnDelete();
// Frozen template version for historical integrity.
$table->foreignId('template_id')->constrained('care_assessment_templates')->restrictOnDelete();
$table->foreignId('consultation_id')->nullable()->constrained('care_consultations')->nullOnDelete();
$table->foreignId('visit_id')->nullable()->constrained('care_visits')->nullOnDelete();
// patient_pathway_id added in PR 5 when pathway tables exist.
$table->foreignId('practitioner_id')->nullable()->constrained('care_practitioners')->nullOnDelete();
$table->string('status')->default('draft'); // draft, completed, cancelled
$table->timestamp('assessed_at')->nullable();
$table->timestamp('completed_at')->nullable();
$table->string('completed_by')->nullable();
$table->string('started_by')->nullable();
$table->text('notes')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['patient_id', 'assessed_at']);
$table->index(['consultation_id']);
$table->index(['owner_ref', 'status']);
$table->index(['template_id', 'status']);
$table->index(['patient_id', 'template_id', 'status']);
});
Schema::create('care_assessment_answers', function (Blueprint $table) {
$table->id();
$table->string('owner_ref')->index();
$table->foreignId('assessment_id')->constrained('care_assessments')->cascadeOnDelete();
$table->foreignId('question_id')->constrained('care_assessment_questions')->restrictOnDelete();
$table->text('value_text')->nullable();
$table->decimal('value_number', 12, 4)->nullable();
$table->boolean('value_boolean')->nullable();
$table->dateTime('value_date')->nullable();
$table->json('value_json')->nullable();
$table->timestamps();
$table->unique(['assessment_id', 'question_id']);
});
}
public function down(): void
{
Schema::dropIfExists('care_assessment_answers');
Schema::dropIfExists('care_assessments');
Schema::dropIfExists('care_assessment_questions');
Schema::dropIfExists('care_assessment_templates');
}
};
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/** PR 4 — materialize instrument scores on assessment complete. */
return new class extends Migration
{
public function up(): void
{
Schema::create('care_assessment_scores', function (Blueprint $table) {
$table->id();
$table->string('owner_ref')->index();
$table->foreignId('assessment_id')->constrained('care_assessments')->cascadeOnDelete();
$table->string('template_code')->index();
$table->decimal('total_score', 12, 4)->nullable();
$table->decimal('max_score', 12, 4)->nullable();
$table->json('subscores')->nullable();
$table->string('severity_label')->nullable();
$table->timestamp('computed_at');
$table->timestamps();
$table->unique('assessment_id');
$table->index(['owner_ref', 'template_code', 'computed_at']);
});
}
public function down(): void
{
Schema::dropIfExists('care_assessment_scores');
}
};
@@ -0,0 +1,82 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* PR 5 clinical pathway catalog + patient pathway activation.
* Pathway bindings use template_code only (no template_id FK).
*/
return new class extends Migration
{
public function up(): void
{
Schema::create('care_clinical_pathways', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->unique();
$table->string('code')->unique();
$table->string('name');
$table->text('description')->nullable();
$table->json('match_rules')->nullable();
$table->boolean('is_active')->default(true);
$table->unsignedInteger('sort_order')->default(0);
$table->json('meta')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['is_active', 'sort_order']);
});
Schema::create('care_pathway_templates', function (Blueprint $table) {
$table->id();
$table->foreignId('pathway_id')->constrained('care_clinical_pathways')->cascadeOnDelete();
$table->string('template_code');
$table->boolean('is_required_on_activation')->default(false);
$table->string('phase')->default('any'); // acute, follow_up, any
$table->unsignedInteger('sort_order')->default(0);
$table->timestamps();
$table->unique(['pathway_id', 'template_code']);
$table->index(['template_code']);
});
Schema::create('care_patient_pathways', function (Blueprint $table) {
$table->id();
$table->uuid('uuid')->unique();
$table->string('owner_ref')->index();
$table->foreignId('organization_id')->constrained('care_organizations')->cascadeOnDelete();
$table->foreignId('patient_id')->constrained('care_patients')->cascadeOnDelete();
$table->foreignId('pathway_id')->constrained('care_clinical_pathways')->restrictOnDelete();
$table->string('status')->default('active'); // active, resolved, inactive
$table->timestamp('activated_at');
$table->string('activated_by')->nullable();
$table->foreignId('activation_consultation_id')->nullable()->constrained('care_consultations')->nullOnDelete();
$table->string('activation_diagnosis_text')->nullable();
$table->timestamp('resolved_at')->nullable();
$table->text('notes')->nullable();
$table->timestamps();
$table->softDeletes();
$table->index(['patient_id', 'status']);
$table->index(['patient_id', 'pathway_id', 'status']);
});
Schema::table('care_assessments', function (Blueprint $table) {
$table->foreignId('patient_pathway_id')
->nullable()
->after('visit_id')
->constrained('care_patient_pathways')
->nullOnDelete();
});
}
public function down(): void
{
Schema::table('care_assessments', function (Blueprint $table) {
$table->dropConstrainedForeignId('patient_pathway_id');
});
Schema::dropIfExists('care_patient_pathways');
Schema::dropIfExists('care_pathway_templates');
Schema::dropIfExists('care_clinical_pathways');
}
};
@@ -0,0 +1,131 @@
<?php
namespace Database\Seeders;
use App\Models\AssessmentQuestion;
use App\Models\AssessmentTemplate;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use RuntimeException;
/**
* Loads platform assessment content packs from database/data/assessments/*.json.
* Upserts by (code, version); replaces questions for that template version.
*/
class AssessmentTemplateSeeder extends Seeder
{
public function run(): void
{
$dir = database_path('data/assessments');
if (! is_dir($dir)) {
$this->command?->warn("No assessment packs directory at {$dir}");
return;
}
$files = collect(File::files($dir))
->filter(fn ($file) => str_ends_with(strtolower($file->getFilename()), '.json'))
->sortBy(fn ($file) => $file->getFilename())
->values();
if ($files->isEmpty()) {
$this->command?->warn('No assessment JSON packs found.');
return;
}
foreach ($files as $file) {
$this->seedPack($file->getPathname());
}
}
public function seedPack(string $path): AssessmentTemplate
{
$raw = File::get($path);
$data = json_decode($raw, true);
if (! is_array($data) || ! isset($data['template'], $data['questions'])) {
throw new RuntimeException("Invalid assessment pack: {$path}");
}
$t = $data['template'];
foreach (['code', 'name', 'category', 'version'] as $required) {
if (! array_key_exists($required, $t)) {
throw new RuntimeException("Assessment pack missing template.{$required}: {$path}");
}
}
return DB::transaction(function () use ($t, $data, $path) {
$template = AssessmentTemplate::withTrashed()
->whereNull('organization_id')
->where('code', $t['code'])
->where('version', (int) $t['version'])
->first();
$attributes = [
'organization_id' => null,
'code' => $t['code'],
'name' => $t['name'],
'category' => $t['category'],
'description' => $t['description'] ?? null,
'version' => (int) $t['version'],
'is_current' => (bool) ($t['is_current'] ?? true),
'is_active' => (bool) ($t['is_active'] ?? true),
'scoring_strategy' => $t['scoring_strategy'] ?? null,
'meta' => $t['meta'] ?? null,
'deleted_at' => null,
];
if ($template) {
if ($template->trashed()) {
$template->restore();
}
$template->fill(collect($attributes)->except('deleted_at')->all())->save();
} else {
$template = AssessmentTemplate::create(collect($attributes)->except('deleted_at')->all());
}
if ($template->is_current) {
AssessmentTemplate::query()
->whereNull('organization_id')
->where('code', $template->code)
->where('id', '!=', $template->id)
->where('is_current', true)
->update(['is_current' => false]);
}
// Replace questions for this template version (stable codes within version).
AssessmentQuestion::query()->where('template_id', $template->id)->delete();
$sort = 0;
foreach ($data['questions'] as $q) {
if (empty($q['code']) || empty($q['label']) || empty($q['answer_type'])) {
throw new RuntimeException("Invalid question in pack {$path}");
}
$sort++;
AssessmentQuestion::create([
'template_id' => $template->id,
'code' => $q['code'],
'section' => $q['section'] ?? null,
'label' => $q['label'],
'help_text' => $q['help_text'] ?? null,
'answer_type' => $q['answer_type'],
'options' => $q['options'] ?? null,
'is_required' => (bool) ($q['is_required'] ?? false),
'sort_order' => (int) ($q['sort_order'] ?? $sort),
'score_key' => $q['score_key'] ?? null,
'validation' => $q['validation'] ?? null,
]);
}
$this->command?->info(sprintf(
'Seeded assessment pack %s v%d (%d questions)',
$template->code,
$template->version,
count($data['questions']),
));
return $template->fresh('questions');
});
}
}
@@ -0,0 +1,95 @@
<?php
namespace Database\Seeders;
use App\Models\ClinicalPathway;
use App\Models\PathwayTemplate;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use RuntimeException;
/**
* Loads platform pathway packs from database/data/pathways/*.json.
* Bindings store template_code only (resolve is_current at assessment start).
*/
class ClinicalPathwaySeeder extends Seeder
{
public function run(): void
{
$dir = database_path('data/pathways');
if (! is_dir($dir)) {
$this->command?->warn("No pathway packs directory at {$dir}");
return;
}
$files = collect(File::files($dir))
->filter(fn ($file) => str_ends_with(strtolower($file->getFilename()), '.json'))
->sortBy(fn ($file) => $file->getFilename())
->values();
foreach ($files as $file) {
$this->seedPack($file->getPathname());
}
}
public function seedPack(string $path): ClinicalPathway
{
$data = json_decode(File::get($path), true);
if (! is_array($data) || ! isset($data['pathway'])) {
throw new RuntimeException("Invalid pathway pack: {$path}");
}
$p = $data['pathway'];
if (empty($p['code']) || empty($p['name'])) {
throw new RuntimeException("Pathway pack missing code/name: {$path}");
}
return DB::transaction(function () use ($p, $data, $path) {
$pathway = ClinicalPathway::withTrashed()->where('code', $p['code'])->first();
$attributes = [
'code' => $p['code'],
'name' => $p['name'],
'description' => $p['description'] ?? null,
'match_rules' => $p['match_rules'] ?? null,
'is_active' => (bool) ($p['is_active'] ?? true),
'sort_order' => (int) ($p['sort_order'] ?? 0),
'meta' => $p['meta'] ?? null,
];
if ($pathway) {
if ($pathway->trashed()) {
$pathway->restore();
}
$pathway->fill($attributes)->save();
} else {
$pathway = ClinicalPathway::create($attributes);
}
PathwayTemplate::query()->where('pathway_id', $pathway->id)->delete();
foreach ($data['templates'] ?? [] as $i => $binding) {
if (empty($binding['template_code'])) {
throw new RuntimeException("Pathway pack binding missing template_code: {$path}");
}
PathwayTemplate::create([
'pathway_id' => $pathway->id,
'template_code' => $binding['template_code'],
'is_required_on_activation' => (bool) ($binding['is_required_on_activation'] ?? false),
'phase' => $binding['phase'] ?? PathwayTemplate::PHASE_ANY,
'sort_order' => (int) ($binding['sort_order'] ?? ($i + 1)),
]);
}
$this->command?->info(sprintf(
'Seeded pathway %s (%d template bindings)',
$pathway->code,
count($data['templates'] ?? []),
));
return $pathway->fresh('templates');
});
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
public function run(): void
{
$this->call([
AssessmentTemplateSeeder::class,
ClinicalPathwaySeeder::class,
]);
}
}