/**
 * This function takes a list of patients and a list of treatments, and returns a list of tuples containing the names
 * of patients who have received all the given treatments.
 *
 * @param patients A list of patient names (strings)
 * @param treatments A list of treatments (strings)
 * @return A list of tuples where each tuple contains the names of patients who have received all the given treatments
 *
 * Note:
 * - If a patient has received a treatment multiple times, it should only be counted once.
 */
fun findPatientTreatments(patients: List<String>, treatments: List<String>): List<String> {

    val completeTreatments = mutableListOf<String>()

    for (patient in patients) {
        var hasAllTreatments = true
        for (treatment in treatments) {
            // Check if the patient has received all the treatments
            if (!patients.any { it.contains(treatment) }) {
                hasAllTreatments = false
                break
            }
        }
        if (hasAllTreatments) {
            completeTreatments.add(patient)
        }
    }

    return completeTreatments
}
/**
 * This function takes a list of patients and a list of treatments, and returns a list of tuples containing the names
 * of patients who have received all the given treatments.
 *
 * @param patients A list of patient names (strings)
 * @param treatments A list of treatments (strings)
 * @return A list of tuples where each tuple contains the names of patients who have received all the given treatments
 *
 * Note:
 * - If a patient has received a treatment multiple times, it should only be counted once.
 */
fun findPatientTreatments(patients: List<String>, treatments: List<String>): List<String> {
/**
 * This function takes a list of patients and a list of treatments, and returns a list of tuples containing the names
 * of patients who have received all the given treatments.
 *
 * @param patients A list of patient names (strings)
 * @param treatments A list of treatments (strings)
 * @return A list of tuples where each tuple contains the names of patients who have received all the given treatments
 *
 * Note:
 * - If a patient has received a treatment multiple times, it should only be counted once.
 */
fun findPatientTreatments(patients: List<String>, treatments: List<String>): List<String> {

    val completeTreatments = mutableListOf<String>()

    for (patient in patients) {
        var hasAllTreatments = true
        for (treatment in treatments) {
            // Check if the patient has received all the treatments
            if (!patients.any { it.contains(treatment) }) {
                hasAllTreatments = false
                break
            }
        }
        if (hasAllTreatments) {
            completeTreatments.add(patient)
        }
    }

    return completeTreatments
}