/**
 * Given a list of patients, this function makes a copy of the list and modifies each patient's status.
 *
 * @param patientsList A list of patients
 * @return A list of patients with modified status
 */
fun copyAndModify(patientsList: List<Map<String, String>>): List<Map<String, String>> {

    // Create an empty list to store the modified patients
    val modifiedList = mutableListOf<Map<String, String>>()

    // Iterate over each patient in the patientsList using a for loop
    for (patient in patientsList) {
        val modifiedPatient = patient.toMutableMap()

        // Modify the patient's status
        modifiedPatient["status"] = "Recovered"

        // Add the modified patient to the modifiedList
        modifiedList.add(modifiedPatient)
    }

    return modifiedList
}
/**
 * Given a list of patients, this function makes a copy of the list and modifies each patient's status.
 *
 * @param patientsList A list of patients
 * @return A list of patients with modified status
 */
fun copyAndModify(patientsList: List<Map<String, String>>): List<Map<String, String>> {
/**
 * Given a list of patients, this function makes a copy of the list and modifies each patient's status.
 *
 * @param patientsList A list of patients
 * @return A list of patients with modified status
 */
fun copyAndModify(patientsList: List<Map<String, String>>): List<Map<String, String>> {

    // Create an empty list to store the modified patients
    val modifiedList = mutableListOf<Map<String, String>>()

    // Iterate over each patient in the patientsList using a for loop
    for (patient in patientsList) {
        val modifiedPatient = patient.toMutableMap()

        // Modify the patient's status
        modifiedPatient["status"] = "Recovered"

        // Add the modified patient to the modifiedList
        modifiedList.add(modifiedPatient)
    }

    return modifiedList
}