/**
 * Suppose you are a nurse and you need to check the infection level of patients in the hospital.
 * The patientData map consists of patient names as keys and their corresponding infection levels as values.
 * The infection level can be categorized as 'low', 'medium', or 'high'.
 *
 * Your task is to implement a function that checks each patient's infection level and prints a message according to the following conditions:
 * - If the infection level is low, print "<patientName> is in a stable condition."
 * - If the infection level is medium, print "<patientName> requires immediate attention."
 * - If the infection level is high, print "<patientName> is in critical condition."
 * - If the patient name is not found in the map, print "Patient not found."
 *
 * Complete the code below to solve the exercise.
 */
fun checkPatientInfectionLevel(patientData: Map<String, String>) {

    for ((patientName, infectionLevel) in patientData) {
        when (infectionLevel) {
            "low" -> println("$patientName is in a stable condition.")
            "medium" -> println("$patientName requires immediate attention.")
            "high" -> println("$patientName is in critical condition.")
            else -> println("Patient not found.")
        }
    }
}
/**
 * Suppose you are a nurse and you need to check the infection level of patients in the hospital.
 * The patientData map consists of patient names as keys and their corresponding infection levels as values.
 * The infection level can be categorized as 'low', 'medium', or 'high'.
 *
 * Your task is to implement a function that checks each patient's infection level and prints a message according to the following conditions:
 * - If the infection level is low, print "<patientName> is in a stable condition."
 * - If the infection level is medium, print "<patientName> requires immediate attention."
 * - If the infection level is high, print "<patientName> is in critical condition."
 * - If the patient name is not found in the map, print "Patient not found."
 *
 * Complete the code below to solve the exercise.
 */
fun checkPatientInfectionLevel(patientData: Map<String, String>) {
/**
 * Suppose you are a nurse and you need to check the infection level of patients in the hospital.
 * The patientData map consists of patient names as keys and their corresponding infection levels as values.
 * The infection level can be categorized as 'low', 'medium', or 'high'.
 *
 * Your task is to implement a function that checks each patient's infection level and prints a message according to the following conditions:
 * - If the infection level is low, print "<patientName> is in a stable condition."
 * - If the infection level is medium, print "<patientName> requires immediate attention."
 * - If the infection level is high, print "<patientName> is in critical condition."
 * - If the patient name is not found in the map, print "Patient not found."
 *
 * Complete the code below to solve the exercise.
 */
fun checkPatientInfectionLevel(patientData: Map<String, String>) {

    for ((patientName, infectionLevel) in patientData) {
        when (infectionLevel) {
            "low" -> println("$patientName is in a stable condition.")
            "medium" -> println("$patientName requires immediate attention.")
            "high" -> println("$patientName is in critical condition.")
            else -> println("Patient not found.")
        }
    }
}