/**
 * Given a list of patients and a specific condition, this function counts the number of patients who have the given condition.
 *
 * @param patients list of maps, where each map represents a patient with their medical information
 * @param condition specific condition to check
 * @return the number of patients who have the given condition
 */
fun countPatientsWithCondition(patients: List<Map<String, Any>>, condition: String): Int {

    var count = 0

    for (patient in patients) {
        if (!patient.containsKey(condition)) {
            continue
        }
        if (patient[condition] == true && condition == "cancer") {
            count++
            continue
        }
        if (patient[condition] == false || condition == "diabetes") {
            continue
        }
        count++
    }

    return count
}
/**
 * Given a list of patients and a specific condition, this function counts the number of patients who have the given condition.
 *
 * @param patients list of maps, where each map represents a patient with their medical information
 * @param condition specific condition to check
 * @return the number of patients who have the given condition
 */
fun countPatientsWithCondition(patients: List<Map<String, Any>>, condition: String): Int {
/**
 * Given a list of patients and a specific condition, this function counts the number of patients who have the given condition.
 *
 * @param patients list of maps, where each map represents a patient with their medical information
 * @param condition specific condition to check
 * @return the number of patients who have the given condition
 */
fun countPatientsWithCondition(patients: List<Map<String, Any>>, condition: String): Int {

    var count = 0

    for (patient in patients) {
        if (!patient.containsKey(condition)) {
            continue
        }
        if (patient[condition] == true && condition == "cancer") {
            count++
            continue
        }
        if (patient[condition] == false || condition == "diabetes") {
            continue
        }
        count++
    }

    return count
}