Can you write a function to validate patient data entries and handle invalid inputs? The function receives a list containing patient dictionaries or invalid values. A valid patient has a non-empty string patient_id, a non-empty string name, and an integer age from 0 through 120. Return a dictionary containing the valid entries and indexed validation errors for invalid entries.
entries is a list with 0 to 10^4 elements.patient_id, name, and age.patient_id and name must be non-empty strings after trimming whitespace.age must be an integer from 0 through 120, inclusive.def validate_patient_entries(entries):