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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class PatientDischargeStatusCode(enum.StrEnum):
    C_01 = "01"
    """
    DISCHARGED TO HOME OR SELF CARE (ROUTINE DISCHARGE)
    """

    C_02 = "02"
    """
    DISCHARGED/TRANSFERRED TO A SHORT-TERM GENERAL HOSPITAL FOR INPATIENT CARE
    """

    C_03 = "03"
    """
    DISCHARGED/TRANSFERRED TO SKILLED NURSING FACILITY (SNF) WITH MEDICARE CERTIFICATION IN ANTICIPATION OF SKILLED CARE
    """

    C_04 = "04"
    """
    DISCHARGED/TRANSFERRED TO A FACILITY THAT PROVIDES CUSTODIAL OR SUPPORTIVE CARE
    """

    C_05 = "05"
    """
    DISCHARGED/TRANSFERRED TO A DESIGNATED CANCER CENTER OR CHILDREN'S HOSPITAL
    """

    C_06 = "06"
    """
    DISCHARGED/TRANSFERRED TO HOME UNDER CARE OF AN ORGANIZED HOME HEALTH SERVICE ORGANIZATION IN ANTICIPATION OF COVERED SKILLED CARE
    """

    C_07 = "07"
    """
    LEFT AGAINST MEDICAL ADVICE OR DISCONTINUED CARE
    """

    C_09 = "09"
    """
    ADMITTED AS AN INPATIENT TO THIS HOSPITAL
    """

    C_20 = "20"
    """
    EXPIRED(A)
    """

    C_21 = "21"
    """
    DISCHARGED/TRANSFERRED TO COURT/LAW ENFORCEMENT
    """

    C_30 = "30"
    """
    STILL PATIENT
    """

    C_40 = "40"
    """
    EXPIRED AT HOME(A)
    """

    C_41 = "41"
    """
    EXPIRED IN A MEDICAL FACILITY A) (E.G. HOSPITAL, SNF, ICF, OR FREE STANDING HOSPICE)
    """

    C_42 = "42"
    """
    EXPIRED - PLACE UNKNOWN A)
    """

    C_43 = "43"
    """
    DISCHARGED/TRANSFERRED TO A FEDERAL HEALTH CARE FACILITY
    """

    C_50 = "50"
    """
    HOSPICE - HOME
    """

    C_51 = "51"
    """
    HOSPICE - MEDICAL FACILITY (CERTIFIED) PROVIDING HOSPICE LEVEL OF CARE
    """

    C_61 = "61"
    """
    DISCHARGED/TRANSFERRED TO A HOSPITAL-BASED MEDICARE APPROVED SWING BED
    """

    C_62 = "62"
    """
    DISCHARGED/TRANSFERRED TO AN INPATIENT REHABILITATION FACILITY (IRF) INCLUDING REHABILITATION DISTINCT PART UNITS OF A HOSPITAL
    """

    C_63 = "63"
    """
    DISCHARGED/TRANSFERRED TO A MEDICARE CERTIFIED LONG TERM CARE HOSPITAL (LTCH)
    """

    C_64 = "64"
    """
    DISCHARGED/TRANSFERRED TO A NURSING FACILITY CERTIFIED UNDER MEDICAID BUT NOT CERTIFIED UNDER MEDICARE
    """

    C_65 = "65"
    """
    DISCHARGED/TRANSFERRED TO A PSYCHIATRIC HOSPITAL OR PSYCHIATRIC DISTINCT PART UNIT OF A HOSPITAL
    """

    C_66 = "66"
    """
    DISCHARGED/TRANSFERRED TO A CRITICAL ACCESS HOSPITAL (CAH)
    """

    C_69 = "69"
    """
    DISCHARGED/TRANSFERRED TO A DESIGNATED DISASTER ALTERNATE CARE SITE (EFFECTIVE 10/1/13)
    """

    C_70 = "70"
    """
    DISCHARGED/TRANSFERRED TO ANOTHER TYPE OF HEALTH CARE INSTITUTION NOT DEFINED ELSEWHERE IN THIS CODE LIST
    """

    C_81 = "81"
    """
    DISCHARGED TO HOME OR SELF CARE WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_82 = "82"
    """
    DISCHARGED/TRANSFERRED TO A SHORT TERM GENERAL HOSPITAL FOR INPATIENT CARE WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_83 = "83"
    """
    DISCHARGED/TRANSFERRED TO A SKILLED NURSING FACILITY (SNF) WITH MEDICARE CERTIFICATION WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_84 = "84"
    """
    DISCHARGED/TRANSFERRED TO A FACILITY THAT PROVIDES CUSTODIAL OR SUPPORTIVE CARE WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_85 = "85"
    """
    DISCHARGED/TRANSFERRED TO A DESIGNATED CANCER CENTER OR CHILDREN'S HOSPITAL WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_86 = "86"
    """
    DISCHARGED/TRANSFERRED TO HOME UNDER CARE OF ORGANIZED HOME HEALTH SERVICE ORGANIZATION IN ANTICIPATION OF COVERED SKILLED CARE WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_87 = "87"
    """
    DISCHARGED/TRANSFERRED TO COURT/LAW ENFORCEMENT WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_88 = "88"
    """
    DISCHARGED/TRANSFERRED TO A FEDERAL HEALTH CARE FACILITY WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_89 = "89"
    """
    DISCHARGED/TRANSFERRED TO A HOSPITAL-BASED MEDICARE APPROVED SWING BED WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_90 = "90"
    """
    DISCHARGED/TRANSFERRED TO AN INPATIENT REHABILITATION FACILITY (IRF) INCLUDING REHABILITATION DISTINCT PART UNITS OF A HOSPITAL WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_91 = "91"
    """
    DISCHARGED/TRANSFERRED TO A MEDICARE CERTIFIED LONG TERM CARE HOSPITAL (LTCH) WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_92 = "92"
    """
    DISCHARGED/TRANSFERRED TO A NURSING FACILITY CERTIFIED UNDER MEDICAID BUT NOT CERTIFIED UNDER MEDICARE WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_93 = "93"
    """
    DISCHARGED/TRANSFERRED TO A PSYCHIATRIC HOSPITAL OR PSYCHIATRIC DISTINCT PART UNIT OF A HOSPITAL WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_94 = "94"
    """
    DISCHARGED/TRANSFERRED TO A CRITICAL ACCESS HOSPITAL (CAH) WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    C_95 = "95"
    """
    DISCHARGED/TRANSFERRED TO ANOTHER TYPE OF HEALTH CARE INSTITUTION NOT DEFINED ELSEWHERE IN THIS CODE LIST WITH A PLANNED ACUTE CARE HOSPITAL INPATIENT READMISSION (EFFECTIVE 10/1/13)
    """

    _UNKNOWN = "__PATIENTDISCHARGESTATUSCODE_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) -> "PatientDischargeStatusCode":
        unknown = cls._UNKNOWN
        unknown._value_ = value
        return unknown

    def visit(
        self,
        c_01: typing.Callable[[], T_Result],
        c_02: typing.Callable[[], T_Result],
        c_03: typing.Callable[[], T_Result],
        c_04: typing.Callable[[], T_Result],
        c_05: typing.Callable[[], T_Result],
        c_06: typing.Callable[[], T_Result],
        c_07: typing.Callable[[], T_Result],
        c_09: typing.Callable[[], T_Result],
        c_20: typing.Callable[[], T_Result],
        c_21: typing.Callable[[], T_Result],
        c_30: typing.Callable[[], T_Result],
        c_40: typing.Callable[[], T_Result],
        c_41: typing.Callable[[], T_Result],
        c_42: typing.Callable[[], T_Result],
        c_43: typing.Callable[[], T_Result],
        c_50: typing.Callable[[], T_Result],
        c_51: typing.Callable[[], T_Result],
        c_61: typing.Callable[[], T_Result],
        c_62: typing.Callable[[], T_Result],
        c_63: typing.Callable[[], T_Result],
        c_64: typing.Callable[[], T_Result],
        c_65: typing.Callable[[], T_Result],
        c_66: typing.Callable[[], T_Result],
        c_69: typing.Callable[[], T_Result],
        c_70: typing.Callable[[], T_Result],
        c_81: typing.Callable[[], T_Result],
        c_82: typing.Callable[[], T_Result],
        c_83: typing.Callable[[], T_Result],
        c_84: typing.Callable[[], T_Result],
        c_85: typing.Callable[[], T_Result],
        c_86: typing.Callable[[], T_Result],
        c_87: typing.Callable[[], T_Result],
        c_88: typing.Callable[[], T_Result],
        c_89: typing.Callable[[], T_Result],
        c_90: typing.Callable[[], T_Result],
        c_91: typing.Callable[[], T_Result],
        c_92: typing.Callable[[], T_Result],
        c_93: typing.Callable[[], T_Result],
        c_94: typing.Callable[[], T_Result],
        c_95: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is PatientDischargeStatusCode.C_01:
            return c_01()
        if self is PatientDischargeStatusCode.C_02:
            return c_02()
        if self is PatientDischargeStatusCode.C_03:
            return c_03()
        if self is PatientDischargeStatusCode.C_04:
            return c_04()
        if self is PatientDischargeStatusCode.C_05:
            return c_05()
        if self is PatientDischargeStatusCode.C_06:
            return c_06()
        if self is PatientDischargeStatusCode.C_07:
            return c_07()
        if self is PatientDischargeStatusCode.C_09:
            return c_09()
        if self is PatientDischargeStatusCode.C_20:
            return c_20()
        if self is PatientDischargeStatusCode.C_21:
            return c_21()
        if self is PatientDischargeStatusCode.C_30:
            return c_30()
        if self is PatientDischargeStatusCode.C_40:
            return c_40()
        if self is PatientDischargeStatusCode.C_41:
            return c_41()
        if self is PatientDischargeStatusCode.C_42:
            return c_42()
        if self is PatientDischargeStatusCode.C_43:
            return c_43()
        if self is PatientDischargeStatusCode.C_50:
            return c_50()
        if self is PatientDischargeStatusCode.C_51:
            return c_51()
        if self is PatientDischargeStatusCode.C_61:
            return c_61()
        if self is PatientDischargeStatusCode.C_62:
            return c_62()
        if self is PatientDischargeStatusCode.C_63:
            return c_63()
        if self is PatientDischargeStatusCode.C_64:
            return c_64()
        if self is PatientDischargeStatusCode.C_65:
            return c_65()
        if self is PatientDischargeStatusCode.C_66:
            return c_66()
        if self is PatientDischargeStatusCode.C_69:
            return c_69()
        if self is PatientDischargeStatusCode.C_70:
            return c_70()
        if self is PatientDischargeStatusCode.C_81:
            return c_81()
        if self is PatientDischargeStatusCode.C_82:
            return c_82()
        if self is PatientDischargeStatusCode.C_83:
            return c_83()
        if self is PatientDischargeStatusCode.C_84:
            return c_84()
        if self is PatientDischargeStatusCode.C_85:
            return c_85()
        if self is PatientDischargeStatusCode.C_86:
            return c_86()
        if self is PatientDischargeStatusCode.C_87:
            return c_87()
        if self is PatientDischargeStatusCode.C_88:
            return c_88()
        if self is PatientDischargeStatusCode.C_89:
            return c_89()
        if self is PatientDischargeStatusCode.C_90:
            return c_90()
        if self is PatientDischargeStatusCode.C_91:
            return c_91()
        if self is PatientDischargeStatusCode.C_92:
            return c_92()
        if self is PatientDischargeStatusCode.C_93:
            return c_93()
        if self is PatientDischargeStatusCode.C_94:
            return c_94()
        if self is PatientDischargeStatusCode.C_95:
            return c_95()
        return _unknown_member(self._value_)
