/**
 * Given a nested list of nurse's data and a patient's name, return the corresponding patient ID.
 *
 * The nurse's data is represented as a nested list of pairs [(patient_ID, patient_name), ...].
 *
 * @param nursesData Nested list containing patient information in the format (patient_ID, patient_name).
 * @param patientName Name of the patient to find.
 * @return The ID of the patient with the matching name. Returns 'Not Found' if the patient is not found.
 *
 * Examples:
 * findPatientId(listOf(Pair("001", "John Doe"), Pair("002", "Jane Smith"), Pair("003", "Alice Johnson")), "Jane Smith")
 * // Output: "002"
 * findPatientId(listOf(Pair("001", "John Doe"), Pair("002", "Jane Smith"), Pair("003", "Alice Johnson")), "Bob Johnson")
 * // Output: "Not Found"
 */
fun findPatientId(nursesData: List<Pair<String, String>>, patientName: String): String {

    for (patient in nursesData) {
        if (patient.second == patientName) {
            return patient.first
        }
    }
    return "Not Found"
}
/**
 * Given a nested list of nurse's data and a patient's name, return the corresponding patient ID.
 *
 * The nurse's data is represented as a nested list of pairs [(patient_ID, patient_name), ...].
 *
 * @param nursesData Nested list containing patient information in the format (patient_ID, patient_name).
 * @param patientName Name of the patient to find.
 * @return The ID of the patient with the matching name. Returns 'Not Found' if the patient is not found.
 *
 * Examples:
 * findPatientId(listOf(Pair("001", "John Doe"), Pair("002", "Jane Smith"), Pair("003", "Alice Johnson")), "Jane Smith")
 * // Output: "002"
 * findPatientId(listOf(Pair("001", "John Doe"), Pair("002", "Jane Smith"), Pair("003", "Alice Johnson")), "Bob Johnson")
 * // Output: "Not Found"
 */
fun findPatientId(nursesData: List<Pair<String, String>>, patientName: String): String {
/**
 * Given a nested list of nurse's data and a patient's name, return the corresponding patient ID.
 *
 * The nurse's data is represented as a nested list of pairs [(patient_ID, patient_name), ...].
 *
 * @param nursesData Nested list containing patient information in the format (patient_ID, patient_name).
 * @param patientName Name of the patient to find.
 * @return The ID of the patient with the matching name. Returns 'Not Found' if the patient is not found.
 *
 * Examples:
 * findPatientId(listOf(Pair("001", "John Doe"), Pair("002", "Jane Smith"), Pair("003", "Alice Johnson")), "Jane Smith")
 * // Output: "002"
 * findPatientId(listOf(Pair("001", "John Doe"), Pair("002", "Jane Smith"), Pair("003", "Alice Johnson")), "Bob Johnson")
 * // Output: "Not Found"
 */
fun findPatientId(nursesData: List<Pair<String, String>>, patientName: String): String {

    for (patient in nursesData) {
        if (patient.second == patientName) {
            return patient.first
        }
    }
    return "Not Found"
}