/**
 * Given a list of cases, remove all expired cases.
 *
 * @param caseList A list of cases, each represented as a dictionary.
 * @return The updated list of cases with all expired cases removed.
 */
fun removeExpiredCases(caseList: MutableList<Map<String, String>>): MutableList<Map<String, String>> {

    // Iterate through each case in the list
    val iterator = caseList.iterator()
    while (iterator.hasNext()) {
        val case = iterator.next()
        // Check if the case is expired or not
        if (case["status"] == "expired") {
            // Remove the expired case from the list using the remove() method
            iterator.remove()
        }
    }
    return caseList
}
/**
 * Given a list of cases, remove all expired cases.
 *
 * @param caseList A list of cases, each represented as a dictionary.
 * @return The updated list of cases with all expired cases removed.
 */
fun removeExpiredCases(caseList: MutableList<Map<String, String>>): MutableList<Map<String, String>> {
/**
 * Given a list of cases, remove all expired cases.
 *
 * @param caseList A list of cases, each represented as a dictionary.
 * @return The updated list of cases with all expired cases removed.
 */
fun removeExpiredCases(caseList: MutableList<Map<String, String>>): MutableList<Map<String, String>> {

    // Iterate through each case in the list
    val iterator = caseList.iterator()
    while (iterator.hasNext()) {
        val case = iterator.next()
        // Check if the case is expired or not
        if (case["status"] == "expired") {
            // Remove the expired case from the list using the remove() method
            iterator.remove()
        }
    }
    return caseList
}