/**
 * Given a list of patient records, return the names of patients who have visited the hospital more than 3 times.
 *
 * @param patients A list of dictionaries representing patient records.
 * @return A list of names of patients who visited the hospital more than 3 times.
 */
fun nurseCodeCompletion(patients: List<Map<String, Any>>): List<String> {

    val frequentVisitors = mutableListOf<String>()

    for (patient in patients) {
        if (patient["visits"] as Int > 3) {
            frequentVisitors.add(patient["name"] as String)
        }
    }

    return frequentVisitors
}
/**
 * Given a list of patient records, return the names of patients who have visited the hospital more than 3 times.
 *
 * @param patients A list of dictionaries representing patient records.
 * @return A list of names of patients who visited the hospital more than 3 times.
 */
fun nurseCodeCompletion(patients: List<Map<String, Any>>): List<String> {
/**
 * Given a list of patient records, return the names of patients who have visited the hospital more than 3 times.
 *
 * @param patients A list of dictionaries representing patient records.
 * @return A list of names of patients who visited the hospital more than 3 times.
 */
fun nurseCodeCompletion(patients: List<Map<String, Any>>): List<String> {

    val frequentVisitors = mutableListOf<String>()

    for (patient in patients) {
        if (patient["visits"] as Int > 3) {
            frequentVisitors.add(patient["name"] as String)
        }
    }

    return frequentVisitors
}