/**
 * This function formats a patient's name based on a flag.
 * The name is converted to upper case if the flag is true, and to lower case if the flag is false.
 *
 * @param patientName The name of the patient
 * @param isProperCase Flag indicating if the name should be formatted in proper case (true) or not (false)
 * @return The formatted name of the patient
 */
fun formatName(patientName: String, isProperCase: Boolean): String {

    return when {
        isProperCase -> patientName.toUpperCase()
        !isProperCase -> patientName.toLowerCase()
        else -> "Invalid flag! Please provide a boolean value."
    }
}
/**
 * This function formats a patient's name based on a flag.
 * The name is converted to upper case if the flag is true, and to lower case if the flag is false.
 *
 * @param patientName The name of the patient
 * @param isProperCase Flag indicating if the name should be formatted in proper case (true) or not (false)
 * @return The formatted name of the patient
 */
fun formatName(patientName: String, isProperCase: Boolean): String {
/**
 * This function formats a patient's name based on a flag.
 * The name is converted to upper case if the flag is true, and to lower case if the flag is false.
 *
 * @param patientName The name of the patient
 * @param isProperCase Flag indicating if the name should be formatted in proper case (true) or not (false)
 * @return The formatted name of the patient
 */
fun formatName(patientName: String, isProperCase: Boolean): String {

    return when {
        isProperCase -> patientName.toUpperCase()
        !isProperCase -> patientName.toLowerCase()
        else -> "Invalid flag! Please provide a boolean value."
    }
}