/**
 * Given a list of social worker data, modify the elements based on two conditions:
 * 1. If the element contains the word 'moderate', replace it with 'high'.
 * 2. If the element contains the word 'good', replace it with 'great'.
 *
 * @param data A list of social worker data elements.
 * @param condition1 True if condition 1 should be applied, False otherwise.
 * @param condition2 True if condition 2 should be applied, False otherwise.
 * @return The modified list of social worker data elements.
 */
fun modifySocialWorkerData(data: List<String>, condition1: Boolean, condition2: Boolean): List<String> {

    val modifiedData = data.toMutableList()

    if (condition1 && condition2) {
        modifiedData.replaceAll { it.replace("moderate", "high").replace("good", "great") }
    } else if (condition1) {
        modifiedData.replaceAll { it.replace("moderate", "high") }
    } else if (condition2) {
        modifiedData.replaceAll { it.replace("good", "great") }
    }

    return modifiedData
}
/**
 * Given a list of social worker data, modify the elements based on two conditions:
 * 1. If the element contains the word 'moderate', replace it with 'high'.
 * 2. If the element contains the word 'good', replace it with 'great'.
 *
 * @param data A list of social worker data elements.
 * @param condition1 True if condition 1 should be applied, False otherwise.
 * @param condition2 True if condition 2 should be applied, False otherwise.
 * @return The modified list of social worker data elements.
 */
fun modifySocialWorkerData(data: List<String>, condition1: Boolean, condition2: Boolean): List<String> {
/**
 * Given a list of social worker data, modify the elements based on two conditions:
 * 1. If the element contains the word 'moderate', replace it with 'high'.
 * 2. If the element contains the word 'good', replace it with 'great'.
 *
 * @param data A list of social worker data elements.
 * @param condition1 True if condition 1 should be applied, False otherwise.
 * @param condition2 True if condition 2 should be applied, False otherwise.
 * @return The modified list of social worker data elements.
 */
fun modifySocialWorkerData(data: List<String>, condition1: Boolean, condition2: Boolean): List<String> {

    val modifiedData = data.toMutableList()

    if (condition1 && condition2) {
        modifiedData.replaceAll { it.replace("moderate", "high").replace("good", "great") }
    } else if (condition1) {
        modifiedData.replaceAll { it.replace("moderate", "high") }
    } else if (condition2) {
        modifiedData.replaceAll { it.replace("good", "great") }
    }

    return modifiedData
}