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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class PresentOnAdmissionIndicatorCode(enum.StrEnum):
    CY = "Y"
    """
    PRESENT AT THE TIME OF INPATIENT ADMISSION
    """

    CN = "N"
    """
    NOT PRESENT AT THE TIME OF INPATIENT ADMISSION
    """

    CU = "U"
    """
    DOCUMENTATION IS INSUFFICIENT TO DETERMINE IF CONDITION IS PRESENT ON ADMISSION
    """

    CW = "W"
    """
    PROVIDER IS UNABLE TO CLINICALLY DETERMINE WHETHER CONDITION WAS PRESENT ON ADMISSION OR NOT
    """

    C_1 = "1"
    """
    EXEMPT FROM POA REPORTING ON UB-04 PAPER FORM ONLY; NOT FOR USE ON 837
    """

    _UNKNOWN = "__PRESENTONADMISSIONINDICATORCODE_UNKNOWN__"
    """
    This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
    """

    @classmethod
    def _missing_(cls, value: typing.Any) -> "PresentOnAdmissionIndicatorCode":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        cy: typing.Callable[[], T_Result],
        cn: typing.Callable[[], T_Result],
        cu: typing.Callable[[], T_Result],
        cw: typing.Callable[[], T_Result],
        c_1: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is PresentOnAdmissionIndicatorCode.CY:
            return cy()
        if self is PresentOnAdmissionIndicatorCode.CN:
            return cn()
        if self is PresentOnAdmissionIndicatorCode.CU:
            return cu()
        if self is PresentOnAdmissionIndicatorCode.CW:
            return cw()
        if self is PresentOnAdmissionIndicatorCode.C_1:
            return c_1()
        return _unknown_member(self._value_)
