/**
 * This function calculates the total number of exercises completed by a physical therapist based on the patient data.
 *
 * @param patientData A dictionary containing information about the patient's exercises and completion status
 * @return The total number of exercises completed by the patient
 */
fun calculateExercises(patientData: Map<String, String>): Int {

    var totalExercises = 0  // Initialize the total number of exercises

    // Iterate over each exercise in the patient's data
    for ((exercise, completionStatus) in patientData) {
        if (completionStatus == "Complete" && !exercise.contains("pain")) {
            totalExercises++

            // Check if the patient complained about pain during the exercise
            if (patientData.containsKey("pain") && patientData["pain"] == "Yes") {
                break
            }
        }
    }

    return totalExercises
}
/**
 * This function calculates the total number of exercises completed by a physical therapist based on the patient data.
 *
 * @param patientData A dictionary containing information about the patient's exercises and completion status
 * @return The total number of exercises completed by the patient
 */
fun calculateExercises(patientData: Map<String, String>): Int {
/**
 * This function calculates the total number of exercises completed by a physical therapist based on the patient data.
 *
 * @param patientData A dictionary containing information about the patient's exercises and completion status
 * @return The total number of exercises completed by the patient
 */
fun calculateExercises(patientData: Map<String, String>): Int {

    var totalExercises = 0  // Initialize the total number of exercises

    // Iterate over each exercise in the patient's data
    for ((exercise, completionStatus) in patientData) {
        if (completionStatus == "Complete" && !exercise.contains("pain")) {
            totalExercises++

            // Check if the patient complained about pain during the exercise
            if (patientData.containsKey("pain") && patientData["pain"] == "Yes") {
                break
            }
        }
    }

    return totalExercises
}