# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class PatientHistoryCategoryEnum(str, enum.Enum):
    PRESENT_ILLNESS = "present_illness"
    MEDICAL = "medical"
    FAMILY = "family"
    SOCIAL = "social"

    def visit(
        self,
        present_illness: typing.Callable[[], T_Result],
        medical: typing.Callable[[], T_Result],
        family: typing.Callable[[], T_Result],
        social: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is PatientHistoryCategoryEnum.PRESENT_ILLNESS:
            return present_illness()
        if self is PatientHistoryCategoryEnum.MEDICAL:
            return medical()
        if self is PatientHistoryCategoryEnum.FAMILY:
            return family()
        if self is PatientHistoryCategoryEnum.SOCIAL:
            return social()
