Labcorp Patient input validation may need to evaluate a text label and a numeric result summary together. Write a function that checks whether a string is a palindrome and finds the second distinct largest value in an integer array.
For the palindrome check, ignore capitalization and every character that is not a letter or digit. Use a two-pointer approach rather than reversing or building a second normalized string. For the array, return the second distinct largest value. If fewer than two distinct values exist, return None for that result.
Implement analyze_patient_input(text, nums). The input text is a string, and nums is a list of integers. Return a dictionary with this exact structure: {"is_palindrome": boolean, "second_largest": integer or None}.
def analyze_patient_input(text, nums):