/**
 * This function determines whether a physician can prescribe medication to a patient.
 *
 * @param physicianSpecialty The specialty of the physician.
 * @param patientAge The age of the patient.
 * @param patientCondition The medical condition of the patient.
 * @return A message stating whether the physician can prescribe medication.
 */
fun canPrescribeMedication(physicianSpecialty: String, patientAge: Int, patientCondition: String): String {

    return when {
        physicianSpecialty == "Cardiologist" && patientAge > 50 && patientCondition == "Heart Disease" -> "The physician can prescribe medication."
        physicianSpecialty == "Dermatologist" && patientAge >= 18 && patientCondition == "Acne" -> "The physician can prescribe medication."
        physicianSpecialty == "Pediatrician" && patientAge <= 12 && patientCondition == "Fever" -> "The physician can prescribe medication."
        physicianSpecialty == "Neurologist" && (patientAge >= 18 || patientAge <= 65) && patientCondition == "Migraine" -> "The physician can prescribe medication."
        else -> ""
    }
}
/**
 * This function determines whether a physician can prescribe medication to a patient.
 *
 * @param physicianSpecialty The specialty of the physician.
 * @param patientAge The age of the patient.
 * @param patientCondition The medical condition of the patient.
 * @return A message stating whether the physician can prescribe medication.
 */
fun canPrescribeMedication(physicianSpecialty: String, patientAge: Int, patientCondition: String): String {
/**
 * This function determines whether a physician can prescribe medication to a patient.
 *
 * @param physicianSpecialty The specialty of the physician.
 * @param patientAge The age of the patient.
 * @param patientCondition The medical condition of the patient.
 * @return A message stating whether the physician can prescribe medication.
 */
fun canPrescribeMedication(physicianSpecialty: String, patientAge: Int, patientCondition: String): String {

    return when {
        physicianSpecialty == "Cardiologist" && patientAge > 50 && patientCondition == "Heart Disease" -> "The physician can prescribe medication."
        physicianSpecialty == "Dermatologist" && patientAge >= 18 && patientCondition == "Acne" -> "The physician can prescribe medication."
        physicianSpecialty == "Pediatrician" && patientAge <= 12 && patientCondition == "Fever" -> "The physician can prescribe medication."
        physicianSpecialty == "Neurologist" && (patientAge >= 18 || patientAge <= 65) && patientCondition == "Migraine" -> "The physician can prescribe medication."
        else -> ""
    }
}