/**
 * Let's write a function to remove the deceased patients from the patient records.
 *
 * @param patientRecords A dictionary containing the records of patients.
 * @param deceasedIds A list of patient IDs of deceased patients.
 * @return The updated patient records dictionary with deceased patients removed.
 */
fun removeDeadPatients(patientRecords: MutableMap<String, String>, deceasedIds: List<String>): MutableMap<String, String> {

    // Create a copy of the original patient records to modify it
    val updatedRecords = patientRecords.toMutableMap()

    // Iterate over the deceasedIds list
    for (patientId in deceasedIds) {
        // Check if the patientId exists in the patientRecords dictionary
        if (patientId in patientRecords) {
            // Remove the patient from the updatedRecords dictionary
            updatedRecords.remove(patientId)
        }
    }

    return updatedRecords
}
/**
 * Let's write a function to remove the deceased patients from the patient records.
 *
 * @param patientRecords A dictionary containing the records of patients.
 * @param deceasedIds A list of patient IDs of deceased patients.
 * @return The updated patient records dictionary with deceased patients removed.
 */
fun removeDeadPatients(patientRecords: MutableMap<String, String>, deceasedIds: List<String>): MutableMap<String, String> {
/**
 * Let's write a function to remove the deceased patients from the patient records.
 *
 * @param patientRecords A dictionary containing the records of patients.
 * @param deceasedIds A list of patient IDs of deceased patients.
 * @return The updated patient records dictionary with deceased patients removed.
 */
fun removeDeadPatients(patientRecords: MutableMap<String, String>, deceasedIds: List<String>): MutableMap<String, String> {

    // Create a copy of the original patient records to modify it
    val updatedRecords = patientRecords.toMutableMap()

    // Iterate over the deceasedIds list
    for (patientId in deceasedIds) {
        // Check if the patientId exists in the patientRecords dictionary
        if (patientId in patientRecords) {
            // Remove the patient from the updatedRecords dictionary
            updatedRecords.remove(patientId)
        }
    }

    return updatedRecords
}