| |
| <?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| if (!defined('ABSPATH')) {
|
| exit;
|
| }
|
|
|
| add_action('acf/init', 'mst_add_treatment_progress_tab', 13);
|
|
|
| function mst_add_treatment_progress_tab() {
|
|
|
| if (!function_exists('acf_add_local_field')) {
|
| return;
|
| }
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_tab_treatment_progress',
|
| 'label' => '📈 Treatment Progress',
|
| 'name' => '',
|
| 'type' => 'tab',
|
| 'parent' => 'group_mst_case_master',
|
| 'placement' => 'top',
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_current_goals',
|
| 'label' => 'Current Treatment Goals',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong>Active intermediary treatment goals (updated from Form 302 weekly summaries)</strong>',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_current_treatment_goals',
|
| 'label' => 'Current Treatment Goals Summary',
|
| 'name' => 'current_treatment_goals',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Summary of all active intermediary goals',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'rows' => 4,
|
| 'placeholder' => 'List all active treatment goals with target dates',
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_goal_progress',
|
| 'label' => 'Goal Progress Tracking',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong>Track up to 5 intermediary goals with progress percentages</strong>',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_1_description',
|
| 'label' => 'Goal 1 Description',
|
| 'name' => 'goal_1_description',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Specific, measurable goal statement',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '60'),
|
| 'rows' => 2,
|
| 'placeholder' => 'WHO will do WHAT by WHEN',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_1_progress',
|
| 'label' => 'Goal 1 Progress',
|
| 'name' => 'goal_1_progress',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Current progress status',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'choices' => array(
|
| 'not_started' => 'Not Started',
|
| 'in_progress' => 'In Progress',
|
| 'achieved' => 'Achieved',
|
| 'abandoned' => 'Abandoned',
|
| ),
|
| 'default_value' => 'not_started',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_1_percentage',
|
| 'label' => 'Goal 1 %',
|
| 'name' => 'goal_1_percentage',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Completion percentage',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'default_value' => 0,
|
| 'append' => '%',
|
| 'min' => 0,
|
| 'max' => 100,
|
| 'step' => 5,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_2_description',
|
| 'label' => 'Goal 2 Description',
|
| 'name' => 'goal_2_description',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Specific, measurable goal statement',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '60'),
|
| 'rows' => 2,
|
| 'placeholder' => 'WHO will do WHAT by WHEN',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_2_progress',
|
| 'label' => 'Goal 2 Progress',
|
| 'name' => 'goal_2_progress',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'choices' => array(
|
| 'not_started' => 'Not Started',
|
| 'in_progress' => 'In Progress',
|
| 'achieved' => 'Achieved',
|
| 'abandoned' => 'Abandoned',
|
| ),
|
| 'default_value' => 'not_started',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_2_percentage',
|
| 'label' => 'Goal 2 %',
|
| 'name' => 'goal_2_percentage',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'default_value' => 0,
|
| 'append' => '%',
|
| 'min' => 0,
|
| 'max' => 100,
|
| 'step' => 5,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_3_description',
|
| 'label' => 'Goal 3 Description',
|
| 'name' => 'goal_3_description',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '60'),
|
| 'rows' => 2,
|
| 'placeholder' => 'WHO will do WHAT by WHEN',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_3_progress',
|
| 'label' => 'Goal 3 Progress',
|
| 'name' => 'goal_3_progress',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'choices' => array(
|
| 'not_started' => 'Not Started',
|
| 'in_progress' => 'In Progress',
|
| 'achieved' => 'Achieved',
|
| 'abandoned' => 'Abandoned',
|
| ),
|
| 'default_value' => 'not_started',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_3_percentage',
|
| 'label' => 'Goal 3 %',
|
| 'name' => 'goal_3_percentage',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'default_value' => 0,
|
| 'append' => '%',
|
| 'min' => 0,
|
| 'max' => 100,
|
| 'step' => 5,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_4_description',
|
| 'label' => 'Goal 4 Description',
|
| 'name' => 'goal_4_description',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '60'),
|
| 'rows' => 2,
|
| 'placeholder' => 'WHO will do WHAT by WHEN',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_4_progress',
|
| 'label' => 'Goal 4 Progress',
|
| 'name' => 'goal_4_progress',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'choices' => array(
|
| 'not_started' => 'Not Started',
|
| 'in_progress' => 'In Progress',
|
| 'achieved' => 'Achieved',
|
| 'abandoned' => 'Abandoned',
|
| ),
|
| 'default_value' => 'not_started',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_4_percentage',
|
| 'label' => 'Goal 4 %',
|
| 'name' => 'goal_4_percentage',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'default_value' => 0,
|
| 'append' => '%',
|
| 'min' => 0,
|
| 'max' => 100,
|
| 'step' => 5,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_5_description',
|
| 'label' => 'Goal 5 Description',
|
| 'name' => 'goal_5_description',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '60'),
|
| 'rows' => 2,
|
| 'placeholder' => 'WHO will do WHAT by WHEN',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_5_progress',
|
| 'label' => 'Goal 5 Progress',
|
| 'name' => 'goal_5_progress',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'choices' => array(
|
| 'not_started' => 'Not Started',
|
| 'in_progress' => 'In Progress',
|
| 'achieved' => 'Achieved',
|
| 'abandoned' => 'Abandoned',
|
| ),
|
| 'default_value' => 'not_started',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_goal_5_percentage',
|
| 'label' => 'Goal 5 %',
|
| 'name' => 'goal_5_percentage',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '20'),
|
| 'default_value' => 0,
|
| 'append' => '%',
|
| 'min' => 0,
|
| 'max' => 100,
|
| 'step' => 5,
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_interventions',
|
| 'label' => 'Interventions & Engagement',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong>Current interventions and family engagement levels</strong>',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_interventions_summary',
|
| 'label' => 'Current Interventions Summary',
|
| 'name' => 'interventions_summary',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Summary of active MST interventions',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'rows' => 3,
|
| 'placeholder' => 'List active interventions by system (Individual, Family, Peer, School, Community)',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_family_engagement_level',
|
| 'label' => 'Family Engagement Level',
|
| 'name' => 'family_engagement_level',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Overall family participation and engagement',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '50'),
|
| 'choices' => array(
|
| 'low' => 'Low - Minimal participation',
|
| 'moderate' => 'Moderate - Inconsistent engagement',
|
| 'high' => 'High - Actively engaged',
|
| ),
|
| 'default_value' => 'moderate',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_barriers_current',
|
| 'label' => 'Current Barriers to Treatment',
|
| 'name' => 'barriers_current',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Active barriers impacting treatment progress',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '50'),
|
| 'rows' => 3,
|
| 'placeholder' => 'Identify current obstacles and challenges',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_strengths_leveraged',
|
| 'label' => 'Strengths Being Leveraged',
|
| 'name' => 'strengths_leveraged',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Family/youth strengths currently being utilized',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '50'),
|
| 'rows' => 3,
|
| 'placeholder' => 'List strengths actively being used in treatment',
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_contact_hours',
|
| 'label' => 'Contact Hours & Attendance',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong>Contact hour tracking and session attendance (auto-updated from Form 301)</strong>',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_contact_hours_this_week',
|
| 'label' => 'Contact Hours This Week',
|
| 'name' => 'contact_hours_this_week',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Total contact hours for current week (auto-calculated from Form 301)',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '25'),
|
| 'default_value' => 0,
|
| 'append' => 'hours',
|
| 'min' => 0,
|
| 'max' => 40,
|
| 'step' => 0.25,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_contact_hours_total',
|
| 'label' => 'Total Contact Hours',
|
| 'name' => 'contact_hours_total',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Cumulative contact hours since treatment start',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '25'),
|
| 'default_value' => 0,
|
| 'append' => 'hours',
|
| 'min' => 0,
|
| 'step' => 0.25,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_sessions_completed',
|
| 'label' => 'Sessions Completed',
|
| 'name' => 'sessions_completed',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Total number of completed sessions',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '25'),
|
| 'default_value' => 0,
|
| 'min' => 0,
|
| 'step' => 1,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_sessions_cancelled',
|
| 'label' => 'Sessions Cancelled',
|
| 'name' => 'sessions_cancelled',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Total number of cancelled/missed sessions',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '25'),
|
| 'default_value' => 0,
|
| 'min' => 0,
|
| 'step' => 1,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_homework_compliance',
|
| 'label' => 'Homework Compliance',
|
| 'name' => 'homework_compliance',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Family completion of between-session tasks',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'choices' => array(
|
| 'poor' => 'Poor - Rarely completes homework',
|
| 'fair' => 'Fair - Sometimes completes homework',
|
| 'good' => 'Good - Usually completes homework',
|
| 'excellent' => 'Excellent - Consistently completes homework',
|
| ),
|
| 'default_value' => 'fair',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
| }
|
| |
| |
Comments