/**
 * Given a list of medical records of patients, find the patients who have no recorded medical history.
 * Return their names in a list.
 *
 * @param medicalRecords A list of dictionaries containing patient information, where each dictionary
 * has 'name' and 'medicalHistory' keys.
 * @return A list of names of patients with no recorded medical history. If no such patients exist, return an empty list.
 */
fun findPatientsWithNone(medicalRecords: List<Map<String, Any>>): List<String> {

    val patientsWithNone = mutableListOf<String>()

    for (record in medicalRecords) {
        if (record["medicalHistory"] == null) {
            patientsWithNone.add(record["name"] as String)
        }
    }

    return patientsWithNone
}

// Example usage:
/**
 * Given a list of medical records of patients, find the patients who have no recorded medical history.
 * Return their names in a list.
 *
 * @param medicalRecords A list of dictionaries containing patient information, where each dictionary
 * has 'name' and 'medicalHistory' keys.
 * @return A list of names of patients with no recorded medical history. If no such patients exist, return an empty list.
 */
fun findPatientsWithNone(medicalRecords: List<Map<String, Any>>): List<String> {
/**
 * Given a list of medical records of patients, find the patients who have no recorded medical history.
 * Return their names in a list.
 *
 * @param medicalRecords A list of dictionaries containing patient information, where each dictionary
 * has 'name' and 'medicalHistory' keys.
 * @return A list of names of patients with no recorded medical history. If no such patients exist, return an empty list.
 */
fun findPatientsWithNone(medicalRecords: List<Map<String, Any>>): List<String> {

    val patientsWithNone = mutableListOf<String>()

    for (record in medicalRecords) {
        if (record["medicalHistory"] == null) {
            patientsWithNone.add(record["name"] as String)
        }
    }

    return patientsWithNone
}

// Example usage: