/**
 * This function takes two lists as input: the list of patients and the list of exercises.
 * It returns a new list of exercises filtered for only the physical therapists who work with the given patients.
 *
 * @param patients A list of patients' names
 * @param exercises A list of pairs containing the exercise name and the physical therapist's name
 * @return A new list of exercises only for the therapist assigned to the given patients
 */
fun getRehabilitationList(patients: List<String>, exercises: List<Pair<String, String>>): List<String> {

    val filteredExercises = mutableListOf<String>()
    for ((exercise, therapist) in exercises) {
        if (therapist in patients) {
            filteredExercises.add(exercise)
        }
    }
    return filteredExercises
}
/**
 * This function takes two lists as input: the list of patients and the list of exercises.
 * It returns a new list of exercises filtered for only the physical therapists who work with the given patients.
 *
 * @param patients A list of patients' names
 * @param exercises A list of pairs containing the exercise name and the physical therapist's name
 * @return A new list of exercises only for the therapist assigned to the given patients
 */
fun getRehabilitationList(patients: List<String>, exercises: List<Pair<String, String>>): List<String> {
/**
 * This function takes two lists as input: the list of patients and the list of exercises.
 * It returns a new list of exercises filtered for only the physical therapists who work with the given patients.
 *
 * @param patients A list of patients' names
 * @param exercises A list of pairs containing the exercise name and the physical therapist's name
 * @return A new list of exercises only for the therapist assigned to the given patients
 */
fun getRehabilitationList(patients: List<String>, exercises: List<Pair<String, String>>): List<String> {

    val filteredExercises = mutableListOf<String>()
    for ((exercise, therapist) in exercises) {
        if (therapist in patients) {
            filteredExercises.add(exercise)
        }
    }
    return filteredExercises
}