/**
 * Given patient data as a list of tuples, the condition which a patient may have, and the symptoms a patient may exhibit,
 * this function returns the count of patients who have either the specified condition or any of the given symptoms.
 *
 * @param patientData A list containing patient information as tuples.
 * @param condition A string representing the medical condition.
 * @param symptoms A list containing symptoms (each symptom represented as a string).
 * @return The count of patients who have either the specified condition or any of the given symptoms.
 */
fun countPatientsWithCondOrSymptoms(patientData: List<Triple<String, String, List<String>>>, condition: String, symptoms: List<String>): Int {

    var count = 0

    for (entry in patientData) {
        if (entry.second == condition || symptoms.any { symptom -> entry.third.contains(symptom) }) {
            count++
        }
    }

    return count
}
/**
 * Given patient data as a list of tuples, the condition which a patient may have, and the symptoms a patient may exhibit,
 * this function returns the count of patients who have either the specified condition or any of the given symptoms.
 *
 * @param patientData A list containing patient information as tuples.
 * @param condition A string representing the medical condition.
 * @param symptoms A list containing symptoms (each symptom represented as a string).
 * @return The count of patients who have either the specified condition or any of the given symptoms.
 */
fun countPatientsWithCondOrSymptoms(patientData: List<Triple<String, String, List<String>>>, condition: String, symptoms: List<String>): Int {
/**
 * Given patient data as a list of tuples, the condition which a patient may have, and the symptoms a patient may exhibit,
 * this function returns the count of patients who have either the specified condition or any of the given symptoms.
 *
 * @param patientData A list containing patient information as tuples.
 * @param condition A string representing the medical condition.
 * @param symptoms A list containing symptoms (each symptom represented as a string).
 * @return The count of patients who have either the specified condition or any of the given symptoms.
 */
fun countPatientsWithCondOrSymptoms(patientData: List<Triple<String, String, List<String>>>, condition: String, symptoms: List<String>): Int {

    var count = 0

    for (entry in patientData) {
        if (entry.second == condition || symptoms.any { symptom -> entry.third.contains(symptom) }) {
            count++
        }
    }

    return count
}