/**
 * Given a list of patient records, this function updates the age of each patient by adding 5 to their current age.
 * It uses a while loop to iterate through each patient record and modify the age.
 *
 * @param patients A list of dictionaries where each dictionary represents a patient record.
 * @return The updated list of patient records.
 */
fun updatePatientRecords(patients: List<MutableMap<String, Any>>): List<MutableMap<String, Any>> {

    var index = 0

    while (index < patients.size) {
        patients[index]["age"] = (patients[index]["age"] as Int) + 5
        index++
    }

    return patients
}
/**
 * Given a list of patient records, this function updates the age of each patient by adding 5 to their current age.
 * It uses a while loop to iterate through each patient record and modify the age.
 *
 * @param patients A list of dictionaries where each dictionary represents a patient record.
 * @return The updated list of patient records.
 */
fun updatePatientRecords(patients: List<MutableMap<String, Any>>): List<MutableMap<String, Any>> {
/**
 * Given a list of patient records, this function updates the age of each patient by adding 5 to their current age.
 * It uses a while loop to iterate through each patient record and modify the age.
 *
 * @param patients A list of dictionaries where each dictionary represents a patient record.
 * @return The updated list of patient records.
 */
fun updatePatientRecords(patients: List<MutableMap<String, Any>>): List<MutableMap<String, Any>> {

    var index = 0

    while (index < patients.size) {
        patients[index]["age"] = (patients[index]["age"] as Int) + 5
        index++
    }

    return patients
}