<?php

/**
 * Specialty shell overlays: stage maps, billable service catalogs, workspace tabs.
 * Merged onto catalog entries from care_specialty_modules.php by SpecialtyShellService.
 *
 * Modules without an entry inherit the generic defaults below.
 *
 * @return array{
 *     defaults: array<string, mixed>,
 *     modules: array<string, array<string, mixed>>
 * }
 */
return [
    'defaults' => [
        'stages' => [
            ['code' => 'waiting', 'label' => 'Waiting', 'queue_point' => 'waiting'],
            ['code' => 'in_care', 'label' => 'In care', 'queue_point' => 'chair'],
            ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
        ],
        'services' => [
            [
                'code' => 'specialty.consultation',
                'label' => 'Specialty consultation',
                'amount_minor' => (int) env('CARE_CONSULTATION_FEE_MINOR', 5000),
                'type' => 'consultation',
            ],
        ],
        'workspace_tabs' => [
            'overview' => 'Overview',
            'timeline' => 'Timeline',
            'clinical_notes' => 'Clinical notes',
            'orders' => 'Orders',
            'billing' => 'Billing',
            'documents' => 'Documents',
        ],
        // Maps visit specialty_stage → workspace ?tab= after Move / stage pill POST.
        'stage_tabs' => [
            'waiting' => 'overview',
            'in_care' => 'clinical_notes',
            'completed' => 'overview',
        ],
        'actions' => [
            'call_next' => 'Call next',
            'start' => 'Start',
            'complete' => 'Complete',
            'order_test' => 'Order test',
            'prescribe' => 'Prescribe',
            'invoice' => 'Add to invoice',
            'discharge' => 'Discharge',
        ],
    ],

    'modules' => [
        'emergency' => [
            'stages' => [
                ['code' => 'arrival', 'label' => 'Arrival / triage', 'queue_point' => 'waiting'],
                ['code' => 'resus', 'label' => 'Resuscitation', 'queue_point' => 'resus'],
                ['code' => 'treatment', 'label' => 'Treatment bay', 'queue_point' => 'bay'],
                ['code' => 'observation', 'label' => 'Observation', 'queue_point' => 'obs'],
                ['code' => 'disposition', 'label' => 'Disposition', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'er.triage', 'label' => 'Emergency triage', 'amount_minor' => 0, 'type' => 'consultation'],
                ['code' => 'er.consultation', 'label' => 'Emergency consultation', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'er.procedure', 'label' => 'Emergency procedure', 'amount_minor' => 15000, 'type' => 'procedure'],
                ['code' => 'er.resuscitation', 'label' => 'Resuscitation', 'amount_minor' => 25000, 'type' => 'procedure'],
                ['code' => 'er.observation', 'label' => 'Observation bed (per hour)', 'amount_minor' => 3000, 'type' => 'misc'],
                ['code' => 'er.transfer', 'label' => 'Transfer coordination', 'amount_minor' => 5000, 'type' => 'misc'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'triage' => 'Triage',
                'vitals' => 'Vitals',
                'clinical_notes' => 'Clinical notes',
                'observation' => 'Observation',
                'disposition' => 'Disposition',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'arrival' => 'triage',
                'resus' => 'triage',
                'treatment' => 'clinical_notes',
                'observation' => 'observation',
                'disposition' => 'disposition',
            ],
        ],
        'blood_bank' => [
            'stages' => [
                ['code' => 'request', 'label' => 'Request received', 'queue_point' => 'waiting'],
                ['code' => 'crossmatch', 'label' => 'Cross-match', 'queue_point' => 'lab'],
                ['code' => 'issue', 'label' => 'Product issue', 'queue_point' => 'issue'],
                ['code' => 'transfusion', 'label' => 'Transfusion', 'queue_point' => null],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'bb.crossmatch', 'label' => 'Cross-match', 'amount_minor' => 4000, 'type' => 'lab'],
                ['code' => 'bb.whole_blood', 'label' => 'Whole blood unit', 'amount_minor' => 12000, 'type' => 'misc'],
                ['code' => 'bb.packed_rbc', 'label' => 'Packed RBC unit', 'amount_minor' => 15000, 'type' => 'misc'],
                ['code' => 'bb.platelets', 'label' => 'Platelets unit', 'amount_minor' => 18000, 'type' => 'misc'],
                ['code' => 'bb.ffp', 'label' => 'FFP unit', 'amount_minor' => 14000, 'type' => 'misc'],
                ['code' => 'bb.cryo', 'label' => 'Cryoprecipitate unit', 'amount_minor' => 16000, 'type' => 'misc'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'requests' => 'Requests',
                'inventory' => 'Inventory',
                'issue' => 'Issue',
                'transfusion' => 'Transfusion',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'request' => 'requests',
                'crossmatch' => 'requests',
                'issue' => 'issue',
                'transfusion' => 'transfusion',
                'completed' => 'overview',
            ],
        ],
        'dentistry' => [
            'stages' => [
                ['code' => 'waiting', 'label' => 'Waiting room', 'queue_point' => 'waiting'],
                ['code' => 'chair', 'label' => 'Chair assignment', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure', 'queue_point' => 'chair'],
                ['code' => 'recovery', 'label' => 'Recovery', 'queue_point' => 'recovery'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'den.consult', 'label' => 'Dental consultation', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'den.exam', 'label' => 'Dental examination', 'amount_minor' => 4000, 'type' => 'consultation'],
                ['code' => 'den.cleaning', 'label' => 'Scaling / polishing', 'amount_minor' => 8000, 'type' => 'procedure'],
                ['code' => 'den.fill', 'label' => 'Filling', 'amount_minor' => 12000, 'type' => 'procedure'],
                ['code' => 'den.extraction', 'label' => 'Extraction', 'amount_minor' => 15000, 'type' => 'procedure'],
                ['code' => 'den.rct', 'label' => 'Root canal treatment', 'amount_minor' => 35000, 'type' => 'procedure'],
                ['code' => 'den.crown', 'label' => 'Crown', 'amount_minor' => 45000, 'type' => 'procedure'],
                ['code' => 'den.bridge', 'label' => 'Bridge unit', 'amount_minor' => 40000, 'type' => 'procedure'],
                ['code' => 'den.implant_consult', 'label' => 'Implant consultation', 'amount_minor' => 10000, 'type' => 'consultation'],
                ['code' => 'den.perio', 'label' => 'Periodontal treatment', 'amount_minor' => 20000, 'type' => 'procedure'],
                ['code' => 'den.xray_pa', 'label' => 'Periapical X-ray', 'amount_minor' => 3000, 'type' => 'imaging'],
                ['code' => 'den.xray_bw', 'label' => 'Bitewing X-ray', 'amount_minor' => 3500, 'type' => 'imaging'],
                ['code' => 'den.xray_opg', 'label' => 'OPG / panoramic X-ray', 'amount_minor' => 8000, 'type' => 'imaging'],
                ['code' => 'den.photo', 'label' => 'Clinical photography', 'amount_minor' => 2000, 'type' => 'imaging'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'odontogram' => 'Chart',
                'perio' => 'Perio',
                'plan' => 'Plan',
                'treat' => 'Treat',
                'lab' => 'Lab',
                'notes' => 'Notes',
                'imaging' => 'Imaging',
                'recalls' => 'Recalls',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'waiting' => 'overview',
                'chair' => 'odontogram',
                'procedure' => 'treat',
                'recovery' => 'notes',
                'completed' => 'overview',
            ],
        ],
        'ophthalmology' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History / intake', 'queue_point' => 'waiting'],
                ['code' => 'refraction', 'label' => 'VA / refraction', 'queue_point' => 'chair'],
                ['code' => 'exam', 'label' => 'Examination', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'treatment', 'label' => 'Procedure / treatment', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'eye.consult', 'label' => 'Eye consultation', 'amount_minor' => 6000, 'type' => 'consultation'],
                ['code' => 'eye.refraction', 'label' => 'Refraction / glasses exam', 'amount_minor' => 4000, 'type' => 'procedure'],
                ['code' => 'eye.iop', 'label' => 'IOP / pressure check', 'amount_minor' => 3000, 'type' => 'procedure'],
                ['code' => 'eye.fundus', 'label' => 'Fundus examination', 'amount_minor' => 5000, 'type' => 'procedure'],
                ['code' => 'eye.slit_lamp', 'label' => 'Slit-lamp examination', 'amount_minor' => 4500, 'type' => 'procedure'],
                ['code' => 'eye.oct', 'label' => 'OCT imaging', 'amount_minor' => 18000, 'type' => 'imaging'],
                ['code' => 'eye.visual_fields', 'label' => 'Visual fields', 'amount_minor' => 12000, 'type' => 'imaging'],
                ['code' => 'eye.biometry', 'label' => 'Biometry / A-scan', 'amount_minor' => 10000, 'type' => 'imaging'],
                ['code' => 'eye.foreign_body', 'label' => 'Foreign body removal', 'amount_minor' => 15000, 'type' => 'procedure'],
                ['code' => 'eye.yag', 'label' => 'YAG laser', 'amount_minor' => 25000, 'type' => 'procedure'],
                ['code' => 'eye.procedure', 'label' => 'Ocular procedure', 'amount_minor' => 20000, 'type' => 'procedure'],
                ['code' => 'eye.cataract_assess', 'label' => 'Cataract assessment', 'amount_minor' => 8000, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'refraction' => 'VA / refraction',
                'exam' => 'Examination',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'treat' => 'Treatment',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'overview',
                'refraction' => 'refraction',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'treatment' => 'treat',
                'completed' => 'overview',
            ],
        ],
        'physiotherapy' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'assessment', 'label' => 'Assessment', 'queue_point' => 'chair'],
                ['code' => 'treatment_plan', 'label' => 'Treatment plan', 'queue_point' => 'chair'],
                ['code' => 'session', 'label' => 'Therapy session', 'queue_point' => 'chair'],
                ['code' => 'progress', 'label' => 'Progress review', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'pt.assessment', 'label' => 'Physio assessment', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'pt.plan', 'label' => 'Treatment plan review', 'amount_minor' => 4000, 'type' => 'consultation'],
                ['code' => 'pt.session', 'label' => 'Treatment session', 'amount_minor' => 7000, 'type' => 'procedure'],
                ['code' => 'pt.manual', 'label' => 'Manual therapy', 'amount_minor' => 8000, 'type' => 'procedure'],
                ['code' => 'pt.electro', 'label' => 'Electrotherapy / modalities', 'amount_minor' => 6000, 'type' => 'procedure'],
                ['code' => 'pt.exercise', 'label' => 'Therapeutic exercise session', 'amount_minor' => 6500, 'type' => 'procedure'],
                ['code' => 'pt.progress', 'label' => 'Progress / outcome review', 'amount_minor' => 4500, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'assessment' => 'Assessment',
                'plan' => 'Treatment plan',
                'session' => 'Sessions / progress',
                'exercises' => 'Exercises / home program',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'assessment' => 'assessment',
                'treatment_plan' => 'plan',
                'session' => 'session',
                'progress' => 'exercises',
                'completed' => 'overview',
            ],
        ],
        'womens_health' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'ANC history', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam / vitals', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Care plan', 'queue_point' => 'chair'],
                ['code' => 'postnatal', 'label' => 'Delivery / postnatal', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'mat.anc', 'service_line' => 'antenatal', 'label' => 'Antenatal visit', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'mat.history', 'service_line' => 'antenatal', 'label' => 'Obstetric history intake', 'amount_minor' => 3500, 'type' => 'consultation'],
                ['code' => 'mat.exam', 'service_line' => 'obstetrics', 'label' => 'Obstetric examination', 'amount_minor' => 4500, 'type' => 'procedure'],
                ['code' => 'mat.ultrasound', 'service_line' => 'obstetrics', 'label' => 'Obstetric ultrasound', 'amount_minor' => 12000, 'type' => 'imaging'],
                ['code' => 'mat.labs', 'service_line' => 'antenatal', 'label' => 'ANC investigations panel', 'amount_minor' => 8000, 'type' => 'procedure'],
                ['code' => 'mat.postnatal', 'service_line' => 'postnatal', 'label' => 'Postnatal review', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'wh.gyn.consult', 'service_line' => 'gynecology', 'label' => 'Gynecology consultation', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'wh.fp.consult', 'service_line' => 'family_planning', 'label' => 'Family planning visit', 'amount_minor' => 3500, 'type' => 'consultation'],
                ['code' => 'wh.cervical', 'service_line' => 'cervical_screening', 'label' => 'Cervical screening', 'amount_minor' => 4500, 'type' => 'procedure'],
                ['code' => 'wh.menopause', 'service_line' => 'menopause', 'label' => 'Menopause clinic visit', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'wh.high_risk', 'service_line' => 'high_risk_pregnancy', 'label' => 'High-risk pregnancy review', 'amount_minor' => 6000, 'type' => 'consultation'],
                ['code' => 'wh.epa', 'service_line' => 'early_pregnancy', 'label' => 'Early pregnancy assessment', 'amount_minor' => 5500, 'type' => 'consultation'],
                ['code' => 'wh.labour', 'service_line' => 'labour_delivery', 'label' => 'Labour & delivery attendance', 'amount_minor' => 15000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'ANC history',
                'exam' => 'Obstetric exam',
                'fetal' => 'Fetal notes',
                'investigations' => 'Investigations',
                'plan' => 'Care plan',
                'postnatal' => 'Delivery / postnatal',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'postnatal' => 'postnatal',
                'completed' => 'overview',
            ],
        ],
        'radiology' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'protocol', 'label' => 'Request / protocol', 'queue_point' => 'waiting'],
                ['code' => 'acquisition', 'label' => 'Acquisition', 'queue_point' => 'chair'],
                ['code' => 'reporting', 'label' => 'Reporting', 'queue_point' => 'chair'],
                ['code' => 'verified', 'label' => 'Verified', 'queue_point' => null],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'rad.xray', 'label' => 'X-ray', 'amount_minor' => 8000, 'type' => 'imaging'],
                ['code' => 'rad.ultrasound', 'label' => 'Ultrasound', 'amount_minor' => 15000, 'type' => 'imaging'],
                ['code' => 'rad.ct', 'label' => 'CT scan', 'amount_minor' => 45000, 'type' => 'imaging'],
                ['code' => 'rad.mri', 'label' => 'MRI', 'amount_minor' => 65000, 'type' => 'imaging'],
                ['code' => 'rad.fluoro', 'label' => 'Fluoroscopy', 'amount_minor' => 20000, 'type' => 'imaging'],
                ['code' => 'rad.contrast', 'label' => 'Contrast administration', 'amount_minor' => 5000, 'type' => 'procedure'],
                ['code' => 'rad.report', 'label' => 'Radiology report', 'amount_minor' => 4000, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'protocol' => 'Request / protocol',
                'acquisition' => 'Acquisition',
                'findings' => 'Findings / report',
                'verification' => 'Verification',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'protocol' => 'protocol',
                'acquisition' => 'acquisition',
                'reporting' => 'findings',
                'verified' => 'verification',
                'completed' => 'overview',
            ],
        ],
        'cardiology' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam / ECG', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure / intervention', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'car.consult', 'label' => 'Cardiology consultation', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'car.ecg', 'label' => 'ECG', 'amount_minor' => 5000, 'type' => 'procedure'],
                ['code' => 'car.echo', 'label' => 'Echocardiogram', 'amount_minor' => 25000, 'type' => 'imaging'],
                ['code' => 'car.stress', 'label' => 'Stress test', 'amount_minor' => 18000, 'type' => 'procedure'],
                ['code' => 'car.holter', 'label' => 'Holter monitoring', 'amount_minor' => 15000, 'type' => 'procedure'],
                ['code' => 'car.procedure', 'label' => 'Cardiac procedure', 'amount_minor' => 35000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Exam / ECG',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'procedures' => 'Procedures',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'procedure' => 'procedures',
                'completed' => 'overview',
            ],
        ],
        'psychiatry' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History / MSE', 'queue_point' => 'waiting'],
                ['code' => 'risk', 'label' => 'Risk assessment', 'queue_point' => 'chair'],
                ['code' => 'formulation', 'label' => 'Formulation / plan', 'queue_point' => 'chair'],
                ['code' => 'review', 'label' => 'Follow-up review', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'psy.consult', 'label' => 'Psychiatry consultation', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'psy.mse', 'label' => 'Mental state examination', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'psy.risk', 'label' => 'Risk assessment', 'amount_minor' => 4500, 'type' => 'consultation'],
                ['code' => 'psy.followup', 'label' => 'Follow-up review', 'amount_minor' => 6000, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History / MSE',
                'risk' => 'Risk',
                'plan' => 'Formulation / plan',
                'followup' => 'Follow-up',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'risk' => 'risk',
                'formulation' => 'plan',
                'review' => 'followup',
                'completed' => 'overview',
            ],
        ],
        'pediatrics' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam / growth', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'treatment', 'label' => 'Treatment / immunization', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'ped.consult', 'label' => 'Pediatric consultation', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'ped.growth', 'label' => 'Growth assessment', 'amount_minor' => 3000, 'type' => 'consultation'],
                ['code' => 'ped.immunization', 'label' => 'Immunization visit', 'amount_minor' => 4000, 'type' => 'procedure'],
                ['code' => 'ped.procedure', 'label' => 'Pediatric procedure', 'amount_minor' => 8000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'growth' => 'Growth / exam',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'treatment' => 'Treatment',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'growth',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'treatment' => 'treatment',
                'completed' => 'overview',
            ],
        ],
        'orthopedics' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam', 'queue_point' => 'chair'],
                ['code' => 'imaging', 'label' => 'Imaging', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure / cast', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'ort.consult', 'label' => 'Orthopedic consultation', 'amount_minor' => 6000, 'type' => 'consultation'],
                ['code' => 'ort.xray', 'label' => 'Ortho imaging review', 'amount_minor' => 5000, 'type' => 'imaging'],
                ['code' => 'ort.cast', 'label' => 'Casting / splinting', 'amount_minor' => 10000, 'type' => 'procedure'],
                ['code' => 'ort.procedure', 'label' => 'Orthopedic procedure', 'amount_minor' => 25000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Exam',
                'imaging' => 'Imaging',
                'plan' => 'Diagnosis & plan',
                'procedure' => 'Procedure',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'imaging' => 'imaging',
                'plan' => 'plan',
                'procedure' => 'procedure',
                'completed' => 'overview',
            ],
        ],
        'ent' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'ent.consult', 'label' => 'ENT consultation', 'amount_minor' => 6000, 'type' => 'consultation'],
                ['code' => 'ent.audiology', 'label' => 'Hearing assessment', 'amount_minor' => 5000, 'type' => 'procedure'],
                ['code' => 'ent.procedure', 'label' => 'ENT procedure', 'amount_minor' => 12000, 'type' => 'procedure'],
                ['code' => 'ent.endoscopy', 'label' => 'Nasal / laryngeal endoscopy', 'amount_minor' => 15000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Exam',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'procedure' => 'Procedure',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'procedure' => 'procedure',
                'completed' => 'overview',
            ],
        ],
        'oncology' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'staging', 'label' => 'Staging / exam', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'treatment', 'label' => 'Treatment / chemo', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'onc.consult', 'label' => 'Oncology consultation', 'amount_minor' => 10000, 'type' => 'consultation'],
                ['code' => 'onc.staging', 'label' => 'Staging assessment', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'onc.chemo', 'label' => 'Chemo day-care session', 'amount_minor' => 50000, 'type' => 'procedure'],
                ['code' => 'onc.supportive', 'label' => 'Supportive care visit', 'amount_minor' => 6000, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'staging' => 'Staging / exam',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'treatment' => 'Treatment',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'staging' => 'staging',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'treatment' => 'treatment',
                'completed' => 'overview',
            ],
        ],
        'renal' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam', 'queue_point' => 'chair'],
                ['code' => 'dialysis', 'label' => 'Dialysis / labs', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Care plan', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'ren.consult', 'label' => 'Nephrology consultation', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'ren.dialysis', 'label' => 'Dialysis session', 'amount_minor' => 35000, 'type' => 'procedure'],
                ['code' => 'ren.labs', 'label' => 'Renal labs panel', 'amount_minor' => 6000, 'type' => 'lab'],
                ['code' => 'ren.review', 'label' => 'Clinic review', 'amount_minor' => 5000, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Exam',
                'dialysis' => 'Dialysis / labs',
                'plan' => 'Care plan',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'dialysis' => 'dialysis',
                'plan' => 'plan',
                'completed' => 'overview',
            ],
        ],
        'surgery' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'Pre-op history', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Consent / plan', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure', 'queue_point' => 'chair'],
                ['code' => 'postop', 'label' => 'Post-op', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'sur.consult', 'label' => 'Surgical consultation', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'sur.preop', 'label' => 'Pre-op assessment', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'sur.procedure', 'label' => 'Minor procedure / clinic', 'amount_minor' => 25000, 'type' => 'procedure'],
                ['code' => 'sur.postop', 'label' => 'Post-op review', 'amount_minor' => 4500, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Exam',
                'investigations' => 'Investigations',
                'plan' => 'Consent / plan',
                'procedure' => 'Procedure',
                'postop' => 'Post-op',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'procedure' => 'procedure',
                'postop' => 'postop',
                'completed' => 'overview',
            ],
        ],
        'vaccination' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'eligibility', 'label' => 'History / eligibility', 'queue_point' => 'chair'],
                ['code' => 'consent', 'label' => 'Consent', 'queue_point' => 'chair'],
                ['code' => 'administer', 'label' => 'Administer', 'queue_point' => 'chair'],
                ['code' => 'observation', 'label' => 'Observation / AEFI', 'queue_point' => 'obs'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'vax.consult', 'label' => 'Immunization counselling', 'amount_minor' => 2000, 'type' => 'consultation'],
                ['code' => 'vax.admin', 'label' => 'Vaccine administration', 'amount_minor' => 3000, 'type' => 'procedure'],
                ['code' => 'vax.travel', 'label' => 'Travel vaccine package', 'amount_minor' => 8000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'eligibility' => 'History / eligibility',
                'consent' => 'Consent',
                'administer' => 'Administer',
                'observation' => 'Observation / AEFI',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'eligibility' => 'eligibility',
                'consent' => 'consent',
                'administer' => 'administer',
                'observation' => 'observation',
                'completed' => 'overview',
            ],
        ],
        'pathology' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'request', 'label' => 'Request', 'queue_point' => 'waiting'],
                ['code' => 'specimen', 'label' => 'Specimen', 'queue_point' => 'lab'],
                ['code' => 'processing', 'label' => 'Processing', 'queue_point' => 'lab'],
                ['code' => 'report', 'label' => 'Report', 'queue_point' => 'lab'],
                ['code' => 'verified', 'label' => 'Verified', 'queue_point' => 'lab'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'path.histo', 'label' => 'Histopathology', 'amount_minor' => 20000, 'type' => 'lab'],
                ['code' => 'path.cyto', 'label' => 'Cytology', 'amount_minor' => 15000, 'type' => 'lab'],
                ['code' => 'path.special', 'label' => 'Special stains / IHC', 'amount_minor' => 25000, 'type' => 'lab'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'request' => 'Request',
                'specimen' => 'Specimen',
                'processing' => 'Processing',
                'report' => 'Report',
                'verification' => 'Verification',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'request' => 'request',
                'specimen' => 'specimen',
                'processing' => 'processing',
                'report' => 'report',
                'verified' => 'verification',
                'completed' => 'overview',
            ],
        ],
        'infusion' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'assessment', 'label' => 'Assessment', 'queue_point' => 'chair'],
                ['code' => 'protocol', 'label' => 'Order / protocol', 'queue_point' => 'chair'],
                ['code' => 'session', 'label' => 'Infusion session', 'queue_point' => 'chair'],
                ['code' => 'monitoring', 'label' => 'Monitoring', 'queue_point' => 'obs'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'inf.assess', 'label' => 'Infusion assessment', 'amount_minor' => 4000, 'type' => 'consultation'],
                ['code' => 'inf.session', 'label' => 'Infusion session', 'amount_minor' => 15000, 'type' => 'procedure'],
                ['code' => 'inf.observe', 'label' => 'Post-infusion observation', 'amount_minor' => 3000, 'type' => 'misc'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'assessment' => 'Assessment',
                'protocol' => 'Protocol / order',
                'session' => 'Infusion session',
                'monitoring' => 'Monitoring',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'assessment' => 'assessment',
                'protocol' => 'protocol',
                'session' => 'session',
                'monitoring' => 'monitoring',
                'completed' => 'overview',
            ],
        ],
        'dermatology' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Skin exam', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure / treatment', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'der.consult', 'label' => 'Dermatology consultation', 'amount_minor' => 6000, 'type' => 'consultation'],
                ['code' => 'der.biopsy', 'label' => 'Skin biopsy', 'amount_minor' => 10000, 'type' => 'procedure'],
                ['code' => 'der.cryotherapy', 'label' => 'Cryotherapy', 'amount_minor' => 8000, 'type' => 'procedure'],
                ['code' => 'der.procedure', 'label' => 'Skin procedure', 'amount_minor' => 12000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Skin exam',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'procedure' => 'Procedure',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'procedure' => 'procedure',
                'completed' => 'overview',
            ],
        ],
        'podiatry' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Foot exam', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'procedure', 'label' => 'Procedure', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'pod.consult', 'label' => 'Podiatry consultation', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'pod.assessment', 'label' => 'Diabetic foot assessment', 'amount_minor' => 4500, 'type' => 'consultation'],
                ['code' => 'pod.debridement', 'label' => 'Wound debridement', 'amount_minor' => 9000, 'type' => 'procedure'],
                ['code' => 'pod.treatment', 'label' => 'Foot treatment', 'amount_minor' => 8000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Foot exam',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'procedure' => 'Procedure',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'procedure' => 'procedure',
                'completed' => 'overview',
            ],
        ],
        'fertility' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'history', 'label' => 'History', 'queue_point' => 'waiting'],
                ['code' => 'exam', 'label' => 'Exam', 'queue_point' => 'chair'],
                ['code' => 'investigation', 'label' => 'Investigations', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Diagnosis & plan', 'queue_point' => 'chair'],
                ['code' => 'cycle', 'label' => 'Cycle / procedure note', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'fer.consult', 'label' => 'Fertility consultation', 'amount_minor' => 10000, 'type' => 'consultation'],
                ['code' => 'fer.scan', 'label' => 'Pelvic / follicular scan', 'amount_minor' => 15000, 'type' => 'imaging'],
                ['code' => 'fer.cycle', 'label' => 'Cycle review', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'fer.iui', 'label' => 'IUI procedure note', 'amount_minor' => 20000, 'type' => 'procedure'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'history' => 'History',
                'exam' => 'Exam',
                'investigations' => 'Investigations',
                'plan' => 'Diagnosis & plan',
                'cycle' => 'Cycle note',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'history' => 'history',
                'exam' => 'exam',
                'investigation' => 'investigations',
                'plan' => 'plan',
                'cycle' => 'cycle',
                'completed' => 'overview',
            ],
        ],
        'child_welfare' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'Check-in', 'queue_point' => 'waiting'],
                ['code' => 'intake', 'label' => 'Intake / history', 'queue_point' => 'waiting'],
                ['code' => 'assessment', 'label' => 'Assessment', 'queue_point' => 'chair'],
                ['code' => 'plan', 'label' => 'Care plan', 'queue_point' => 'chair'],
                ['code' => 'followup', 'label' => 'Intervention / follow-up', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'cwc.visit', 'label' => 'Well-child / CWC visit', 'amount_minor' => 3000, 'type' => 'consultation'],
                ['code' => 'cwc.growth', 'label' => 'Growth & development assessment', 'amount_minor' => 2500, 'type' => 'consultation'],
                ['code' => 'cwc.counseling', 'label' => 'Caregiver counselling', 'amount_minor' => 2000, 'type' => 'consultation'],
                ['code' => 'cwc.followup', 'label' => 'CWC follow-up review', 'amount_minor' => 2500, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'intake' => 'Intake / history',
                'assessment' => 'Assessment',
                'plan' => 'Care plan',
                'followup' => 'Intervention / follow-up',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'intake' => 'intake',
                'assessment' => 'assessment',
                'plan' => 'plan',
                'followup' => 'followup',
                'completed' => 'overview',
            ],
        ],
        'ambulance' => [
            'stages' => [
                ['code' => 'check_in', 'label' => 'New call', 'queue_point' => 'waiting'],
                ['code' => 'dispatch', 'label' => 'Dispatched', 'queue_point' => 'waiting'],
                ['code' => 'on_scene', 'label' => 'On scene', 'queue_point' => 'chair'],
                ['code' => 'transport', 'label' => 'Transport', 'queue_point' => 'chair'],
                ['code' => 'handover', 'label' => 'Handover', 'queue_point' => 'chair'],
                ['code' => 'completed', 'label' => 'Completed', 'queue_point' => null],
            ],
            'services' => [
                ['code' => 'amb.dispatch', 'label' => 'Ambulance dispatch / response', 'amount_minor' => 8000, 'type' => 'consultation'],
                ['code' => 'amb.scene', 'label' => 'Scene assessment', 'amount_minor' => 5000, 'type' => 'consultation'],
                ['code' => 'amb.transport', 'label' => 'Patient transport', 'amount_minor' => 12000, 'type' => 'procedure'],
                ['code' => 'amb.handover', 'label' => 'Facility handover', 'amount_minor' => 4000, 'type' => 'consultation'],
            ],
            'workspace_tabs' => [
                'overview' => 'Overview',
                'dispatch' => 'Dispatch',
                'scene' => 'Scene / triage',
                'en_route' => 'En-route care',
                'handover' => 'Handover',
                'orders' => 'Orders',
                'billing' => 'Billing',
                'documents' => 'Documents',
            ],
            'stage_tabs' => [
                'check_in' => 'overview',
                'dispatch' => 'dispatch',
                'on_scene' => 'scene',
                'transport' => 'en_route',
                'handover' => 'handover',
                'completed' => 'overview',
            ],
        ],

        // Ops hub — patient shell is unused (specialty.show redirects to nursing hub).
        'nursing_services' => [
            'stages' => [
                ['code' => 'active', 'label' => 'On duty', 'queue_point' => null],
            ],
            'services' => [],
            'workspace_tabs' => [
                'overview' => 'Overview',
            ],
            'stage_tabs' => [
                'active' => 'overview',
            ],
            'actions' => [],
        ],

    ],
];
