/**
 * A nurse is checking the conditions of patients in a hospital. Complete the code to:
 * - Iterate over each patient in the list of patients.
 * - If a patient's condition is critical, print "Attend to patient immediately" and continue to the next patient.
 * - If a patient's condition is stable, print "Monitor patient's condition" and continue to the next patient.
 * - If a patient's condition is under observation, print "Keep an eye on patient" and break the loop.
 *
 * @param patients A list of patient information containing (name, age, condition).
 */
fun checkPatientConditions(patients: List<Triple<String, Int, String>>) {

    for (patient in patients) {
        val (name, age, condition) = patient

        // Check the condition of the patient
        when (condition) {
            "critical" -> {
                println("Attend to patient immediately")
            }
            "stable" -> {
                println("Monitor patient's condition")
            }
            "under observation" -> {
                println("Keep an eye on patient")
                break
            }
        }
    }
}
/**
 * A nurse is checking the conditions of patients in a hospital. Complete the code to:
 * - Iterate over each patient in the list of patients.
 * - If a patient's condition is critical, print "Attend to patient immediately" and continue to the next patient.
 * - If a patient's condition is stable, print "Monitor patient's condition" and continue to the next patient.
 * - If a patient's condition is under observation, print "Keep an eye on patient" and break the loop.
 *
 * @param patients A list of patient information containing (name, age, condition).
 */
fun checkPatientConditions(patients: List<Triple<String, Int, String>>) {
/**
 * A nurse is checking the conditions of patients in a hospital. Complete the code to:
 * - Iterate over each patient in the list of patients.
 * - If a patient's condition is critical, print "Attend to patient immediately" and continue to the next patient.
 * - If a patient's condition is stable, print "Monitor patient's condition" and continue to the next patient.
 * - If a patient's condition is under observation, print "Keep an eye on patient" and break the loop.
 *
 * @param patients A list of patient information containing (name, age, condition).
 */
fun checkPatientConditions(patients: List<Triple<String, Int, String>>) {

    for (patient in patients) {
        val (name, age, condition) = patient

        // Check the condition of the patient
        when (condition) {
            "critical" -> {
                println("Attend to patient immediately")
            }
            "stable" -> {
                println("Monitor patient's condition")
            }
            "under observation" -> {
                println("Keep an eye on patient")
                break
            }
        }
    }
}