Home / Admin / ACF_KEYSMST_MSTCASECPT – TAB – MST FIDELITY TRACKING (v3.0 Modular)
Duplicate Snippet

Embed Snippet on Your Site

ACF_KEYSMST_MSTCASECPT – TAB – MST FIDELITY TRACKING (v3.0 Modular)

ismail daugherty PRO
<10
Code Preview
php
<?php
/**
 * ============================================
 * MST CASE - TAB: MST FIDELITY TRACKING (v3.0 Modular)
 * ============================================
 * 
 * Purpose: Adds MST Fidelity Tracking tab to master field group
 * Parent: group_mst_case_master
 * Source: MST 9 Principles + TAM/SAM scores from Form 302
 * Fields: 15 fields
 * 
 * VERSION: 3.0 - Modular Architecture
 * Priority: 15 (loads after Clinical Assessments)
 * 
 * Purpose: MST certification compliance tracking
 * - The 9 MST Principles adherence (1-5 scale each)
 * - TAM scores (Therapist Adherence Measure)
 * - SAM scores (Supervisor Adherence Measure)
 * - Evidence-based techniques tracking
 * - Consultation notes
 * 
 * CRITICAL: Required for MST certification and fidelity monitoring
 * 
 * IMPORTANT: Master field group snippet must be active first!
 * ============================================
 */
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
add_action('acf/init', 'mst_add_fidelity_tracking_tab', 15);
function mst_add_fidelity_tracking_tab() {
    
    if (!function_exists('acf_add_local_field')) {
        return;
    }
    
    // ========================================
    // TAB: MST FIDELITY TRACKING
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_tab_mst_fidelity',
        'label' => '🎯 MST Fidelity Tracking',
        'name' => '',
        'type' => 'tab',
        'parent' => 'group_mst_case_master',
        'placement' => 'top',
    ));
    
    // ========================================
    // SECTION 1: THE 9 MST PRINCIPLES
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_mst_principles',
        'label' => 'The 9 MST Principles',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong style="color: #0073aa;">🎯 MST CERTIFICATION REQUIREMENT: Track adherence to all 9 MST principles</strong><br>Rate each principle on a scale of 1-5:<br>1 = Not adhering | 2 = Minimal adherence | 3 = Moderate adherence | 4 = Good adherence | 5 = Excellent adherence',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Principle 1: Finding the Fit
    acf_add_local_field(array(
        'key' => 'field_principle_1_adherence',
        'label' => 'Principle 1: Finding the Fit',
        'name' => 'principle_1_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Assessment identifies fit factors maintaining referral behaviors',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 2: Positive & Strength Focus
    acf_add_local_field(array(
        'key' => 'field_principle_2_adherence',
        'label' => 'Principle 2: Positive & Strength Focus',
        'name' => 'principle_2_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions build on strengths, promote competence',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 3: Increasing Responsibility
    acf_add_local_field(array(
        'key' => 'field_principle_3_adherence',
        'label' => 'Principle 3: Increasing Responsibility',
        'name' => 'principle_3_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions promote responsible behavior',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 4: Present-Focused
    acf_add_local_field(array(
        'key' => 'field_principle_4_adherence',
        'label' => 'Principle 4: Present-Focused',
        'name' => 'principle_4_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions target current, well-defined problems',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 5: Targeting Sequences
    acf_add_local_field(array(
        'key' => 'field_principle_5_adherence',
        'label' => 'Principle 5: Targeting Sequences',
        'name' => 'principle_5_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions target behavioral sequences in natural settings',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 6: Developmentally Appropriate
    acf_add_local_field(array(
        'key' => 'field_principle_6_adherence',
        'label' => 'Principle 6: Developmentally Appropriate',
        'name' => 'principle_6_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions fit developmental needs',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 7: Continuous Effort
    acf_add_local_field(array(
        'key' => 'field_principle_7_adherence',
        'label' => 'Principle 7: Continuous Effort',
        'name' => 'principle_7_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions require daily/weekly effort by family',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 8: Evaluation & Accountability
    acf_add_local_field(array(
        'key' => 'field_principle_8_adherence',
        'label' => 'Principle 8: Evaluation & Accountability',
        'name' => 'principle_8_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Effectiveness evaluated continuously from multiple perspectives',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // Principle 9: Generalization
    acf_add_local_field(array(
        'key' => 'field_principle_9_adherence',
        'label' => 'Principle 9: Generalization',
        'name' => 'principle_9_adherence',
        'type' => 'select',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Interventions promote sustainability and family empowerment',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'choices' => array(
            '1' => '1 - Not adhering',
            '2' => '2 - Minimal adherence',
            '3' => '3 - Moderate adherence',
            '4' => '4 - Good adherence',
            '5' => '5 - Excellent adherence',
        ),
        'default_value' => '3',
        'ui' => 1,
        'return_format' => 'value',
    ));
    
    // ========================================
    // SECTION 2: TAM/SAM SCORES & HYPOTHESIS
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_tam_sam',
        'label' => 'Fidelity Measures & Clinical Planning',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong>Weekly fidelity scores and clinical planning</strong><br>TAM = Therapist Adherence Measure | SAM = Supervisor Adherence Measure',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Field 10: TAM Score Current
    acf_add_local_field(array(
        'key' => 'field_tam_score_current',
        'label' => 'Current TAM Score',
        'name' => 'tam_score_current',
        'type' => 'number',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Most recent Therapist Adherence Measure score (1-5 scale)',
        'required' => 0,
        'wrapper' => array('width' => '33'),
        'default_value' => '',
        'placeholder' => 'e.g., 4.2',
        'prepend' => 'TAM:',
        'min' => 1,
        'max' => 5,
        'step' => 0.1,
    ));
    
    // Field 11: SAM Score Current
    acf_add_local_field(array(
        'key' => 'field_sam_score_current',
        'label' => 'Current SAM Score',
        'name' => 'sam_score_current',
        'type' => 'number',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Most recent Supervisor Adherence Measure score (1-5 scale)',
        'required' => 0,
        'wrapper' => array('width' => '33'),
        'default_value' => '',
        'placeholder' => 'e.g., 4.5',
        'prepend' => 'SAM:',
        'min' => 1,
        'max' => 5,
        'step' => 0.1,
    ));
    
    // Field 12: Fidelity Review Date
    acf_add_local_field(array(
        'key' => 'field_fidelity_review_date',
        'label' => 'Last Fidelity Review',
        'name' => 'fidelity_review_date',
        'type' => 'date_picker',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Date of most recent fidelity review',
        'required' => 0,
        'wrapper' => array('width' => '34'),
        'display_format' => 'm/d/Y',
        'return_format' => 'Y-m-d',
        'first_day' => 0,
    ));
    
    // Field 13: Initial Hypothesis
    acf_add_local_field(array(
        'key' => 'field_initial_hypothesis',
        'label' => 'Initial Clinical Hypothesis',
        'name' => 'initial_hypothesis',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Original clinical hypothesis from assessment (baseline reference)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Original hypothesis about what maintains the problem behaviors',
    ));
    
    // Field 14: MST Consultation Notes
    acf_add_local_field(array(
        'key' => 'field_consultation_notes',
        'label' => 'MST Consultation Notes',
        'name' => 'consultation_notes',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Key points from weekly supervision/consultation',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 4,
        'placeholder' => 'Summary of supervision discussions, guidance received, and action items',
    ));
    
    // Field 15: Fidelity Concerns
    acf_add_local_field(array(
        'key' => 'field_fidelity_concerns',
        'label' => 'Fidelity Concerns',
        'name' => 'fidelity_concerns',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Any concerns about MST fidelity or adherence',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 2,
        'placeholder' => 'Document any challenges in maintaining MST fidelity and plans to address',
    ));
}

Comments

Add a Comment