| |
| <?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| if (!defined('ABSPATH')) {
|
| exit;
|
| }
|
|
|
| add_action('acf/init', 'mst_add_administrative_tab', 18);
|
|
|
| function mst_add_administrative_tab() {
|
|
|
| if (!function_exists('acf_add_local_field')) {
|
| return;
|
| }
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_tab_administrative',
|
| 'label' => '⚙️ Administrative',
|
| 'name' => '',
|
| 'type' => 'tab',
|
| 'parent' => 'group_mst_case_master',
|
| 'placement' => 'top',
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_case_metadata',
|
| 'label' => 'Case Creation & Modification',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong style="color: #6b7280;">📋 SYSTEM METADATA</strong><br>Automated tracking of case creation and modifications (read-only)',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_created_date',
|
| 'label' => 'Case Created Date',
|
| 'name' => 'case_created_date',
|
| 'type' => 'date_picker',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Date this case record was created (auto-populated)',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '33'),
|
| 'display_format' => 'm/d/Y',
|
| 'return_format' => 'Y-m-d',
|
| 'first_day' => 0,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_created_by',
|
| 'label' => 'Case Created By',
|
| 'name' => 'case_created_by',
|
| 'type' => 'user',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'User who created this case record',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '33'),
|
| 'role' => '',
|
| 'allow_null' => 0,
|
| 'multiple' => 0,
|
| 'return_format' => 'array',
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_last_modified_date',
|
| 'label' => 'Last Modified Date',
|
| 'name' => 'case_last_modified_date',
|
| 'type' => 'date_time_picker',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Most recent modification timestamp',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '34'),
|
| 'display_format' => 'm/d/Y g:i a',
|
| 'return_format' => 'Y-m-d H:i:s',
|
| 'first_day' => 0,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_last_modified_by',
|
| 'label' => 'Last Modified By',
|
| 'name' => 'case_last_modified_by',
|
| 'type' => 'user',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'User who last updated this case',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '50'),
|
| 'role' => '',
|
| 'allow_null' => 0,
|
| 'multiple' => 0,
|
| 'return_format' => 'array',
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_modification_count',
|
| 'label' => 'Total Modifications',
|
| 'name' => 'case_modification_count',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Total number of times this case has been updated',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '50'),
|
| 'default_value' => 0,
|
| 'placeholder' => '',
|
| 'prepend' => '',
|
| 'append' => 'edits',
|
| 'min' => 0,
|
| 'step' => 1,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_additional_form_links',
|
| 'label' => 'Additional Form Entry Links',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong>🔗 FORM ENTRY REFERENCES</strong><br>Links to ongoing documentation forms (Note: Initial assessment forms are tracked in Case Status & Tracking tab)',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_weekly_summaries_count',
|
| 'label' => 'Weekly Summaries Submitted',
|
| 'name' => 'weekly_summaries_count',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Total number of Form 302 weekly summaries submitted',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '33'),
|
| 'default_value' => 0,
|
| 'placeholder' => '',
|
| 'prepend' => '',
|
| 'append' => 'summaries',
|
| 'min' => 0,
|
| 'step' => 1,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_contact_logs_count',
|
| 'label' => 'Contact Logs Submitted',
|
| 'name' => 'contact_logs_count',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Total number of Form 301 contact logs submitted',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '33'),
|
| 'default_value' => 0,
|
| 'placeholder' => '',
|
| 'prepend' => '',
|
| 'append' => 'contacts',
|
| 'min' => 0,
|
| 'step' => 1,
|
| 'readonly' => 1,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_most_recent_weekly_summary_id',
|
| 'label' => 'Most Recent Weekly Summary',
|
| 'name' => 'most_recent_weekly_summary_id',
|
| 'type' => 'number',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Entry ID of most recent Form 302 submission',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '34'),
|
| 'default_value' => '',
|
| 'placeholder' => '',
|
| 'prepend' => 'Entry #',
|
| 'min' => 1,
|
| 'step' => 1,
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_billing',
|
| 'label' => 'Billing & Insurance',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong style="color: #059669;">💰 BILLING & INSURANCE TRACKING</strong><br>Manage billing status and insurance authorization',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_billing_status',
|
| 'label' => 'Billing Status',
|
| 'name' => 'billing_status',
|
| 'type' => 'select',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Current billing status for this case',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '33'),
|
| 'choices' => array(
|
| 'current' => 'Current - Up to Date',
|
| 'pending' => 'Pending - Awaiting Submission',
|
| 'behind' => 'Behind - Action Needed',
|
| 'hold' => 'On Hold - Insurance Issue',
|
| 'closed' => 'Closed - Complete',
|
| ),
|
| 'default_value' => 'current',
|
| 'ui' => 1,
|
| 'return_format' => 'value',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_insurance_authorization_number',
|
| 'label' => 'Insurance Authorization #',
|
| 'name' => 'insurance_authorization_number',
|
| 'type' => 'text',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Insurance authorization/pre-certification number',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '33'),
|
| 'default_value' => '',
|
| 'placeholder' => '',
|
| 'maxlength' => '',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_insurance_authorization_expires',
|
| 'label' => 'Authorization Expires',
|
| 'name' => 'insurance_authorization_expires',
|
| 'type' => 'date_picker',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Insurance authorization expiration date',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '34'),
|
| 'display_format' => 'm/d/Y',
|
| 'return_format' => 'Y-m-d',
|
| 'first_day' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_billing_notes',
|
| 'label' => 'Billing Notes',
|
| 'name' => 'billing_notes',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Internal notes about billing, insurance issues, or payment status',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'rows' => 3,
|
| 'placeholder' => 'Document any billing issues, insurance communications, or payment notes',
|
| ));
|
|
|
|
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_section_internal_notes',
|
| 'label' => 'Internal Administrative Notes',
|
| 'name' => '',
|
| 'type' => 'message',
|
| 'parent' => 'group_mst_case_master',
|
| 'message' => '<strong style="color: #dc2626;">🔒 INTERNAL USE ONLY</strong><br>Administrative notes not visible to family',
|
| 'new_lines' => '',
|
| 'esc_html' => 0,
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_notes_internal',
|
| 'label' => 'Internal Case Notes',
|
| 'name' => 'case_notes_internal',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Internal administrative notes (supervisor communications, special considerations, etc.)',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'rows' => 4,
|
| 'placeholder' => 'Internal administrative notes, supervisor flags, special handling instructions, etc. NOT visible to family.',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_case_flags_alerts',
|
| 'label' => 'Case Flags / Alerts',
|
| 'name' => 'case_flags_alerts',
|
| 'type' => 'checkbox',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Select any administrative flags that apply to this case',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'choices' => array(
|
| 'high_priority' => '🔴 High Priority - Supervisor Attention Needed',
|
| 'compliance_concern' => '⚠️ Compliance Concern',
|
| 'billing_issue' => '💰 Billing Issue',
|
| 'insurance_expiring' => '📅 Insurance Authorization Expiring Soon',
|
| 'transfer_pending' => '🔄 Transfer Pending',
|
| 'litigation' => '⚖️ Litigation / Legal Involvement',
|
| 'media_attention' => '📰 Media Attention / High Profile',
|
| 'language_barrier' => '🗣️ Significant Language Barrier',
|
| 'transportation_issue' => '🚗 Transportation Challenges',
|
| 'housing_unstable' => '🏠 Housing Instability',
|
| ),
|
| 'default_value' => array(),
|
| 'layout' => 'vertical',
|
| 'toggle' => 0,
|
| 'return_format' => 'value',
|
| ));
|
|
|
|
|
| acf_add_local_field(array(
|
| 'key' => 'field_data_quality_audit',
|
| 'label' => 'Data Quality Audit Log',
|
| 'name' => 'data_quality_audit',
|
| 'type' => 'textarea',
|
| 'parent' => 'group_mst_case_master',
|
| 'instructions' => 'Log of data quality checks, missing information, or corrections needed',
|
| 'required' => 0,
|
| 'wrapper' => array('width' => '100'),
|
| 'rows' => 2,
|
| 'placeholder' => 'Track data quality issues: missing forms, incomplete assessments, data corrections, etc.',
|
| ));
|
| }
|
| |
| |
Comments