Home / Admin / ACF_KEYSMST_MSTCASECPT – TAB: CLINICAL ASSESSMENTS (v3.0 Modular)
Duplicate Snippet

Embed Snippet on Your Site

ACF_KEYSMST_MSTCASECPT – TAB: CLINICAL ASSESSMENTS (v3.0 Modular)

ismail daugherty PRO
<10
Code Preview
php
<?php
/**
 * ============================================
 * MST CASE - TAB: CLINICAL ASSESSMENTS (v3.0 Modular)
 * ============================================
 * 
 * Purpose: Adds Clinical Assessments tab to master field group
 * Parent: group_mst_case_master
 * Source: Forms 244, 245, 240, 218 - Clinical assessment data
 * Fields: 45 fields
 * 
 * VERSION: 3.0 - Modular Architecture
 * Priority: 14 (loads after Treatment Progress)
 * 
 * Purpose: Centralized clinical assessment data
 * - Fit assessment data (Form 244)
 * - Safety assessment tracking (Form 245)
 * - Genogram and family structure (Form 240)
 * - Secondary assessment data (Form 218)
 * - Clinical hypothesis and testing
 * - Evidence-based intervention planning
 * 
 * IMPORTANT: Master field group snippet must be active first!
 * ============================================
 */
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
add_action('acf/init', 'mst_add_clinical_assessments_tab', 14);
function mst_add_clinical_assessments_tab() {
    
    if (!function_exists('acf_add_local_field')) {
        return;
    }
    
    // ========================================
    // TAB: CLINICAL ASSESSMENTS
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_tab_clinical_assessments',
        'label' => '🔬 Clinical Assessments',
        'name' => '',
        'type' => 'tab',
        'parent' => 'group_mst_case_master',
        'placement' => 'top',
    ));
    
    // ========================================
    // SECTION 1: FIT ASSESSMENT (Form 244)
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_fit_assessment',
        'label' => 'Fit Assessment Data',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong>Initial fit assessment from Form 244 - Critical Information & Fit Circle</strong>',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Field 1: Fit Assessment Date
    acf_add_local_field(array(
        'key' => 'field_fit_assessment_date',
        'label' => 'Fit Assessment Date',
        'name' => 'fit_assessment_date',
        'type' => 'date_picker',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Date Form 244 was completed',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'display_format' => 'm/d/Y',
        'return_format' => 'Y-m-d',
        'first_day' => 0,
    ));
    
    // Field 2: Fit Assessment Complete
    acf_add_local_field(array(
        'key' => 'field_fit_assessment_complete',
        'label' => 'Fit Assessment Complete',
        'name' => 'fit_assessment_complete',
        'type' => 'true_false',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Has Form 244 been completed?',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'message' => 'Form 244 completed',
        'default_value' => 0,
        'ui' => 1,
    ));
    
    // Field 3: Fit Factors Summary
    acf_add_local_field(array(
        'key' => 'field_fit_factors_summary',
        'label' => 'Fit Factors Summary',
        'name' => 'fit_factors_summary',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Summary of key fit factors from Form 244 (drivers of referral behaviors)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 4,
        'placeholder' => 'Key drivers identified in fit circle and assessment',
    ));
    
    // Field 4: Clinical Hypothesis
    acf_add_local_field(array(
        'key' => 'field_clinical_hypothesis',
        'label' => 'Clinical Hypothesis',
        'name' => 'clinical_hypothesis',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Working clinical hypothesis about what maintains the problem behaviors',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Hypothesis about how identified fit factors work together to produce/maintain referral behaviors',
    ));
    
    // Field 5: Hypothesis Evidence
    acf_add_local_field(array(
        'key' => 'field_hypothesis_evidence',
        'label' => 'Supporting Evidence',
        'name' => 'hypothesis_evidence',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Evidence supporting the clinical hypothesis',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Behavioral sequences, patterns, and data that support the hypothesis',
    ));
    
    // Field 6: Hypothesis Testing Plan
    acf_add_local_field(array(
        'key' => 'field_hypothesis_testing_plan',
        'label' => 'Hypothesis Testing Plan',
        'name' => 'hypothesis_testing_plan',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Plan for testing the clinical hypothesis',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Specific interventions and measures to test whether hypothesis is accurate',
    ));
    
    // ========================================
    // SECTION 2: GENOGRAM DATA (Form 240)
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_genogram',
        'label' => 'Genogram & Family Structure',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong>Family genogram and ecological assessment from Form 240</strong>',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Field 7: Genogram Completed
    acf_add_local_field(array(
        'key' => 'field_genogram_completed',
        'label' => 'Genogram Completed',
        'name' => 'genogram_completed',
        'type' => 'true_false',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Has Form 240 been completed?',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'message' => 'Form 240 completed',
        'default_value' => 0,
        'ui' => 1,
    ));
    
    // Field 8: Genogram Date
    acf_add_local_field(array(
        'key' => 'field_genogram_date',
        'label' => 'Genogram Date',
        'name' => 'genogram_date',
        'type' => 'date_picker',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Date Form 240 was completed',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'display_format' => 'm/d/Y',
        'return_format' => 'Y-m-d',
        'first_day' => 0,
    ));
    
    // Field 9: Family Structure Summary
    acf_add_local_field(array(
        'key' => 'field_family_structure_summary',
        'label' => 'Family Structure Summary',
        'name' => 'family_structure_summary',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Summary of family structure from genogram',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Key family members, relationships, patterns, and dynamics',
    ));
    
    // Field 10: Overarching Goals
    acf_add_local_field(array(
        'key' => 'field_overarching_goals',
        'label' => 'Overarching Treatment Goals',
        'name' => 'overarching_goals',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Big picture treatment goals from Form 240 Field 132 - guide all MST treatment',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 4,
        'placeholder' => 'Goal 1: [Specific behavioral goal]\nGoal 2: [Specific behavioral goal]\nGoal 3: [Specific behavioral goal]',
    ));
    
    // ========================================
    // SECTION 3: SECONDARY ASSESSMENT (Form 218)
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_secondary_assessment',
        'label' => 'Secondary Assessment Data',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong>Extended clinical and social assessment from Form 218</strong>',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Field 11: Secondary Assessment Complete
    acf_add_local_field(array(
        'key' => 'field_secondary_assessment_complete',
        'label' => 'Secondary Assessment Complete',
        'name' => 'secondary_assessment_complete',
        'type' => 'true_false',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Has Form 218 been completed?',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'message' => 'Form 218 completed',
        'default_value' => 0,
        'ui' => 1,
    ));
    
    // Field 12: Secondary Assessment Date
    acf_add_local_field(array(
        'key' => 'field_secondary_assessment_date',
        'label' => 'Secondary Assessment Date',
        'name' => 'secondary_assessment_date',
        'type' => 'date_picker',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Date Form 218 was completed',
        'required' => 0,
        'wrapper' => array('width' => '50'),
        'display_format' => 'm/d/Y',
        'return_format' => 'Y-m-d',
        'first_day' => 0,
    ));
    
    // Field 13: Emergency Contacts Summary
    acf_add_local_field(array(
        'key' => 'field_emergency_contacts_summary',
        'label' => 'Emergency Contacts Summary',
        'name' => 'emergency_contacts_summary',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Summary from Form 219 (nested in Form 218)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Key emergency contacts with names, relationships, phone numbers',
    ));
    
    // Field 14: Household Members Summary
    acf_add_local_field(array(
        'key' => 'field_household_members_summary',
        'label' => 'Household Members Summary',
        'name' => 'household_members_summary',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Summary from Form 220 (nested in Form 218)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'All household members with ages, relationships, and key information',
    ));
    
    // Field 15: Agency Involvement Summary
    acf_add_local_field(array(
        'key' => 'field_agency_involvement_summary',
        'label' => 'Agency Involvement Summary',
        'name' => 'agency_involvement_summary',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Summary from Form 221 (nested in Form 218)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'All involved agencies, workers, roles, and coordination needs',
    ));
    
    // Field 16: Additional Contacts Summary
    acf_add_local_field(array(
        'key' => 'field_additional_contacts_summary',
        'label' => 'Additional Support Contacts',
        'name' => 'additional_contacts_summary',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Summary from Form 222 (nested in Form 218)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Natural supports, mentors, coaches, spiritual leaders, etc.',
    ));
    
    // ========================================
    // SECTION 4: EVIDENCE-BASED INTERVENTIONS
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_evidence_based',
        'label' => 'Evidence-Based Intervention Planning',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong>Evidence-based treatment modalities and MST techniques planned</strong>',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Field 17: Evidence-Based Categories
    acf_add_local_field(array(
        'key' => 'field_evidence_based_categories',
        'label' => 'Evidence-Based Treatment Modalities',
        'name' => 'evidence_based_categories',
        'type' => 'checkbox',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Select all evidence-based approaches being used',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'choices' => array(
            'cbt' => 'Cognitive Behavioral Therapy (CBT)',
            'mi' => 'Motivational Interviewing (MI)',
            'structural_family' => 'Structural Family Therapy',
            'strategic_family' => 'Strategic Family Therapy',
            'behavioral_parent' => 'Behavioral Parent Training',
            'contingency_mgmt' => 'Contingency Management',
            'exposure' => 'Exposure Therapy',
            'trauma_focused' => 'Trauma-Focused CBT',
            'dbt_skills' => 'DBT Skills Training',
            'problem_solving' => 'Problem-Solving Therapy',
        ),
        'default_value' => array(),
        'layout' => 'vertical',
        'return_format' => 'value',
    ));
    
    // Field 18: MST Techniques Planned
    acf_add_local_field(array(
        'key' => 'field_mst_techniques_planned',
        'label' => 'Specific MST Techniques',
        'name' => 'mst_techniques_planned',
        'type' => 'checkbox',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Select MST-specific intervention techniques',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'choices' => array(
            'joining' => 'Joining & Engagement Strategies',
            'reframing' => 'Reframing',
            'enactment' => 'Enactment',
            'boundary_setting' => 'Boundary Setting',
            'communication_skills' => 'Communication Skills Training',
            'behavior_management' => 'Behavior Management Strategies',
            'monitoring' => 'Parental Monitoring Enhancement',
            'school_liaison' => 'School Liaison & Advocacy',
            'peer_influence' => 'Peer Influence Interventions',
            'community_resources' => 'Community Resource Mobilization',
        ),
        'default_value' => array(),
        'layout' => 'vertical',
        'return_format' => 'value',
    ));
    
    // ========================================
    // SECTION 5: ASSESSMENT SUMMARIES BY SYSTEM
    // ========================================
    acf_add_local_field(array(
        'key' => 'field_section_system_summaries',
        'label' => 'System-Level Assessment Summaries',
        'name' => '',
        'type' => 'message',
        'parent' => 'group_mst_case_master',
        'message' => '<strong>Strengths and needs by ecological system (Individual, Family, Peer, School, Community)</strong>',
        'new_lines' => '',
        'esc_html' => 0,
    ));
    
    // Field 19: Individual Youth Assessment
    acf_add_local_field(array(
        'key' => 'field_youth_individual_assessment',
        'label' => 'Youth Individual - Strengths & Needs',
        'name' => 'youth_individual_assessment',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Individual youth strengths and needs (from Form 244)',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Strengths:\n[List strengths]\n\nNeeds:\n[List needs]',
    ));
    
    // Field 20: Family System Assessment
    acf_add_local_field(array(
        'key' => 'field_family_system_assessment',
        'label' => 'Family System - Strengths & Needs',
        'name' => 'family_system_assessment',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Family system strengths and needs',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Strengths:\n[List strengths]\n\nNeeds:\n[List needs]',
    ));
    
    // Field 21: Peer System Assessment
    acf_add_local_field(array(
        'key' => 'field_peer_system_assessment',
        'label' => 'Peer System - Strengths & Needs',
        'name' => 'peer_system_assessment',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Peer relationships strengths and needs',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Strengths:\n[List strengths]\n\nNeeds:\n[List needs]',
    ));
    
    // Field 22: School System Assessment
    acf_add_local_field(array(
        'key' => 'field_school_system_assessment',
        'label' => 'School System - Strengths & Needs',
        'name' => 'school_system_assessment',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'School system strengths and needs',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Strengths:\n[List strengths]\n\nNeeds:\n[List needs]',
    ));
    
    // Field 23: Community Assessment
    acf_add_local_field(array(
        'key' => 'field_community_assessment',
        'label' => 'Community - Strengths & Needs',
        'name' => 'community_assessment',
        'type' => 'textarea',
        'parent' => 'group_mst_case_master',
        'instructions' => 'Community resources and barriers',
        'required' => 0,
        'wrapper' => array('width' => '100'),
        'rows' => 3,
        'placeholder' => 'Strengths:\n[List strengths]\n\nNeeds:\n[List needs]',
    ));
}

Comments

Add a Comment