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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class OccurrenceCode(enum.StrEnum):
    C_01 = "01"
    """
    Accident/Medical Coverage Code indicating accident-related injury for which there is medical payment coverage. Provide the date of accident/injury.
    """

    C_02 = "02"
    """
    No Fault Insurance Involved - Including Auto Accident/Other Code indicating the date of an accident including auto or other where state has applicable no fault liability laws (i.e., legal basis for settlement without admission of proof of guilt).
    """

    C_03 = "03"
    """
    Accident/Tort Liability Code indicating the date of an accident resulting from a third party’s action that may involve a civil court process in an attempt to require payment by the third party, other than no fault liability.
    """

    C_04 = "04"
    """
    Accident/Employment Related Code indicating the date of an accident allegedly relating to the patient’s employment.
    """

    C_05 = "05"
    """
    Accident/No Medical or Liability Coverage Code indicating accident related injury for which there is no medical payment or third-party liability coverage. Provide the date of accident/ injury.
    """

    C_06 = "06"
    """
    Crime Victim Code indicating the date on which a medical condition resulted from alleged criminal action committed by one or more parties.
    """

    C_09 = "09"
    """
    Start of Infertility Treatment Cycle Code indicating the date of start of infertility treatment cycle.
    """

    C_10 = "10"
    """
    Last Menstrual Period Code indicating the date of the last menstrual period; ONLY applies when patient is being treated for maternity related condition.
    """

    C_11 = "11"
    """
    Onset of Symptoms/Illness Code indicating the date the patient first became aware of symptoms/illness.
    """

    C_12 = "12"
    """
    Date of Onset for a Chronically Dependent Individual (HHA Claims Only.) Code denotes date the patient/beneficiary becomes a Chronically Dependent Individual (CDI). This is the first month of the 3-month period immediately before eligibility under respite care benefit.
    """

    C_16 = "16"
    """
    Date of Last Therapy Code denotes last day of therapy services (e.g., physical therapy, occupational therapy, speech therapy).
    """

    C_17 = "17"
    """
    Date Outpatient Occupational Therapy Plan Established or Last Reviewed Code denotes date an occupational therapy plan was established or last reviewed.
    """

    C_18 = "18"
    """
    Date of Retirement - Patient/ Beneficiary The date of retirement for the patient/ beneficiary.
    """

    C_19 = "19"
    """
    Date of Retirement - Spouse Code denotes the retirement date for the patient’s spouse.
    """

    C_20 = "20"
    """
    Date Guarantee of Payment Began Code indicates date on which the provider began claiming Medicare payment under the guarantee of payment provision (see Medicare manual for special Medicare instructions).
    """

    C_21 = "21"
    """
    Date UR Notice Received Code indicating the date of receipt by the provider of the UR Committee’s finding that the admission or future stay was not medically necessary.
    """

    C_22 = "22"
    """
    Date Active Care Ended Code indicates the date covered level of care ended in a SNF or general hospital, or date on which active care ended in a psychiatric or tuberculosis hospital, or date on which patient was released on a trial basis from a residential facility. Code not required when Condition Code 21 is used.
    """

    C_24 = "24"
    """
    Date Insurance Denied Code indicating the date the denial of coverage was received by the health care facility from any insurer.
    """

    C_25 = "25"
    """
    Date Benefits Terminated by Primary Payer Code indicating the date on which coverage (including Worker’s Compensation benefits or no-fault coverage) is no longer available to the patient.
    """

    C_26 = "26"
    """
    Date SNF Bed Became Available Code indicating the date on which a SNF bed became available to hospital inpatient who requires only SNF level care.
    """

    C_27 = "27"
    """
    Date of Hospice Certification or Recertification Code indicating the date of certification or recertification of the hospice benefit period.
    """

    C_28 = "28"
    """
    Date Comprehensive Outpatient Rehabilitation Plan Established or Last Reviewed Code indicating the date a comprehensive outpatient rehabilitation plan was established or last reviewed.
    """

    C_29 = "29"
    """
    Date Outpatient Physical Therapy Plan Established or Last Reviewed Code indicating the date a physical therapy plan established or last reviewed.
    """

    C_30 = "30"
    """
    Date Outpatient Speech Pathology Plan Established or Last Reviewed Code indicating the date a speech pathology plan was established or last reviewed.
    """

    C_31 = "31"
    """
    Date Beneficiary Notified of Intent to Bill (Accommodations) The date of notice provided by the hospital to the patient that inpatient care is no longer required.
    """

    C_32 = "32"
    """
    Date Beneficiary Notified of Intent to Bill (Procedures or Treatments) The date of notice provided to the beneficiary that requested care (diagnostic procedures or treatments) may not be reasonable or necessary.
    """

    C_33 = "33"
    """
    First Day of the Coordination Period for ESRD Beneficiaries Covered by EGHP Code indicates the first day of coordination for benefits that are secondary to benefits payable under an employer’s group health plan. Required only for ESRD beneficiaries.
    """

    C_34 = "34"
    """
    Date of Election of Extended Care Facilities Code indicates the date the guest elected to receive extended care services (used by Religious Non-Medical only).
    """

    C_35 = "35"
    """
    Date Treatment Started for Physical Therapy Code indicates the initial date services by the billing provider for physical therapy began.
    """

    C_36 = "36"
    """
    Date of Inpatient Hospital Discharge for Covered Transplant Patient Code indicates the date of discharge for inpatient hospital stay in which the patient received a covered transplant procedure when the hospital is billing for immunosuppressive drugs. Note: When the patient received both a covered and a non-covered transplant, the covered transplant predominates.
    """

    C_37 = "37"
    """
    Date of Inpatient Hospital Discharge for Non-covered Transplant Patient Code indicates the date of discharge for the inpatient hospital stay in which the patient received a non-covered transplant procedure when the hospital is billing for immunosuppressive drugs.
    """

    C_38 = "38"
    """
    Date Treatment Started for Home IV Therapy Date the patient was first treated at home for IV therapy. (Home IV providers - Bill Type 085x.)
    """

    C_39 = "39"
    """
    Date Discharged on a Continuous Course of IV Therapy Date the patient was discharged from the hospital on continuous course of IV therapy. (Home IV providers - Bill Type 085x.)
    """

    C_40 = "40"
    """
    SCHEDULED DATE OF ADMISSION - The scheduled date the patient will be admitted as an inpatient to the hospital. (This code may only be used on an outpatient claim.)
    """

    C_41 = "41"
    """
    DATE OF FIRST TEST PRE-ADMISSION TESTING - The date on which the first outpatient diagnostic test was performed as part of a PAT program. This code may only be used if a date of admission was scheduled before the administration of the test(s).
    """

    C_42 = "42"
    """
    DATE OF DISCHARGE - Use only when "Through" date in Form Locator 06 (Statement Covers Period) is not the actual discharge date and the frequency code in Form Locator 04 is that of a final bill. For final bill for hospice care, enter the date the Medicare beneficiary terminated his election of hospice care.
    """

    C_43 = "43"
    """
    SCHEDULED DATE OF CANCELED SURGERY - The date for which outpatient surgery was scheduled.
    """

    C_44 = "44"
    """
    DATE TREATMENT STARTED OCCUPATIONAL THERAPY - The date services were initiated by the billing provider for occupational therapy.
    """

    C_45 = "45"
    """
    DATE TREATMENT STARTED FOR SPEECH THERAPY - The date services were initiated by the billing provider for speech therapy.
    """

    C_46 = "46"
    """
    DATE TREATMENT STARTED FOR CARDIAC REHABILITATION - The date services were initiated by the billing provider for cardiac rehabilitation.
    """

    C_47 = "47"
    """
    DATE COST OUTLIER STATUS BEGINS - Code indicates that this is the first day after the day the Cost Outlier threshold is reached. For Medicare purposes, a beneficiary must have regular, coinsurance and/or lifetime reserve days available beginning on this date to allow coverage of additional daily charges for the purpose of making a cost outlier payment.
    """

    C_50 = "50"
    """
    ASSESSMENT DATE (EFFECTIVE 1/1/11) - Code indicating an assessment date as defined by the assessment instrument applicable to this provider type (e.g., Minimum Data Set (MDS) for skilled nursing).
    """

    C_51 = "51"
    """
    DATE OF LAST KT/V READING (EFFECTIVE 7/1/10) - For in-center hemodialysis patients, this is the date of the last reading taken during the billing period. For peritoneal dialysis patients (and home hemodialysis patients), this date may be before the current billing period but should be within 4 months of the date of service.
    """

    C_52 = "52"
    """
    MEDICAL CERTIFICATION/RECERTIFICATION DATE (EFFECTIVE 1/1/11) - The date of the most recent non-hospice medical certification or recertification of the patient. Use Occurrence Code 27 for Date of Hospice Certification or Recertification.
    """

    C_54 = "54"
    """
    PHYSICIAN FOLLOW-UP DATE (EFFECTIVE 1/1/11) - Last date of a physician follow-up with the patient.
    """

    C_55 = "55"
    """
    DATE OF DEATH (EFFECTIVE 10/1/12) - Report this code when patient discharge status codes 20 (expired), 40 (expired at home), 41 (expired in a medical facility), or 42 (expired - place unknown) are used.
    """

    C_56 = "56"
    """
    ORIGINAL HOSPICE ELECTION OR REVOCATION DATE (EFFECTIVE 1/1/18) - Used when the hospice is submitting a correction to the election date reported on a previous 08xA Type of Bill or the revocation date on a previous 08xB Type of Bill. The hospice reports the correct dates in FL06 - Statement Covers Period (From-Through) and the original date in this occurrence code.
    """

    C_61 = "61"
    """
    HOSPITAL DISCHARGE DATE (HHA ONLY) (EFFECTIVE 1/1/2020) - The Through date of a hospital stay that ended within 14 days prior to the From date of this HHA claim.
    """

    C_62 = "62"
    """
    OTHER INSTITUTIONAL DISCHARGE DATE (HHA ONLY) (EFFECTIVE 1/1/2020) - The Through date of a skilled nursing facility (SNF), inpatient rehabilitation facility (IRF), long term care hospital (LTCH), or inpatient psychiatric facility (IPF) stay that ended within 14 days prior to this HHA admission.
    """

    CA_1 = "A1"
    """
    BIRTH DATE - INSURED A - The birth date of the individual in whose name the insurance is carried.
    """

    CA_2 = "A2"
    """
    EFFECTIVE DATE - INSURED A POLICY - A code indicating the first date insurance is in force.
    """

    CA_3 = "A3"
    """
    BENEFITS EXHAUSTED - PAYER A - Code indicating the last date for which benefits are available and after which no payment can be made by Payer A.
    """

    CA_4 = "A4"
    """
    SPLIT BILL DATE - Date patient became eligible due to medically needy spend down (sometimes referred to as "Split Bill Date").
    """

    CB_1 = "B1"
    """
    BIRTH DATE INSURED B - The birth date of the individual in whose name the insurance is carried.
    """

    CB_2 = "B2"
    """
    EFFECTIVE DATE - INSURED B POLICY - A code indicating the first date insurance is in force.
    """

    CB_3 = "B3"
    """
    BENEFITS EXHAUSTED - PAYER B - Code indicating the last date for which benefits are available and after which no payment can be made by Payer B.
    """

    CC_1 = "C1"
    """
    BIRTH DATE INSURED C - The birth date of the individual in whose name the insurance is carried.
    """

    CC_2 = "C2"
    """
    EFFECTIVE DATE - INSURED C POLICY - A code indicating the first date insurance is in force.
    """

    CC_3 = "C3"
    """
    BENEFITS EXHAUSTED - PAYER C - Code indicating the last date for which benefits are available and after which no payment can be made by Payer C.
    """

    _UNKNOWN = "__OCCURRENCECODE_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) -> "OccurrenceCode":
        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_09: typing.Callable[[], T_Result],
        c_10: typing.Callable[[], T_Result],
        c_11: typing.Callable[[], T_Result],
        c_12: typing.Callable[[], T_Result],
        c_16: typing.Callable[[], T_Result],
        c_17: typing.Callable[[], T_Result],
        c_18: typing.Callable[[], T_Result],
        c_19: typing.Callable[[], T_Result],
        c_20: typing.Callable[[], T_Result],
        c_21: typing.Callable[[], T_Result],
        c_22: typing.Callable[[], T_Result],
        c_24: typing.Callable[[], T_Result],
        c_25: typing.Callable[[], T_Result],
        c_26: typing.Callable[[], T_Result],
        c_27: typing.Callable[[], T_Result],
        c_28: typing.Callable[[], T_Result],
        c_29: typing.Callable[[], T_Result],
        c_30: typing.Callable[[], T_Result],
        c_31: typing.Callable[[], T_Result],
        c_32: typing.Callable[[], T_Result],
        c_33: typing.Callable[[], T_Result],
        c_34: typing.Callable[[], T_Result],
        c_35: typing.Callable[[], T_Result],
        c_36: typing.Callable[[], T_Result],
        c_37: typing.Callable[[], T_Result],
        c_38: typing.Callable[[], T_Result],
        c_39: 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_44: typing.Callable[[], T_Result],
        c_45: typing.Callable[[], T_Result],
        c_46: typing.Callable[[], T_Result],
        c_47: typing.Callable[[], T_Result],
        c_50: typing.Callable[[], T_Result],
        c_51: typing.Callable[[], T_Result],
        c_52: typing.Callable[[], T_Result],
        c_54: typing.Callable[[], T_Result],
        c_55: typing.Callable[[], T_Result],
        c_56: typing.Callable[[], T_Result],
        c_61: typing.Callable[[], T_Result],
        c_62: typing.Callable[[], T_Result],
        ca_1: typing.Callable[[], T_Result],
        ca_2: typing.Callable[[], T_Result],
        ca_3: typing.Callable[[], T_Result],
        ca_4: typing.Callable[[], T_Result],
        cb_1: typing.Callable[[], T_Result],
        cb_2: typing.Callable[[], T_Result],
        cb_3: typing.Callable[[], T_Result],
        cc_1: typing.Callable[[], T_Result],
        cc_2: typing.Callable[[], T_Result],
        cc_3: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is OccurrenceCode.C_01:
            return c_01()
        if self is OccurrenceCode.C_02:
            return c_02()
        if self is OccurrenceCode.C_03:
            return c_03()
        if self is OccurrenceCode.C_04:
            return c_04()
        if self is OccurrenceCode.C_05:
            return c_05()
        if self is OccurrenceCode.C_06:
            return c_06()
        if self is OccurrenceCode.C_09:
            return c_09()
        if self is OccurrenceCode.C_10:
            return c_10()
        if self is OccurrenceCode.C_11:
            return c_11()
        if self is OccurrenceCode.C_12:
            return c_12()
        if self is OccurrenceCode.C_16:
            return c_16()
        if self is OccurrenceCode.C_17:
            return c_17()
        if self is OccurrenceCode.C_18:
            return c_18()
        if self is OccurrenceCode.C_19:
            return c_19()
        if self is OccurrenceCode.C_20:
            return c_20()
        if self is OccurrenceCode.C_21:
            return c_21()
        if self is OccurrenceCode.C_22:
            return c_22()
        if self is OccurrenceCode.C_24:
            return c_24()
        if self is OccurrenceCode.C_25:
            return c_25()
        if self is OccurrenceCode.C_26:
            return c_26()
        if self is OccurrenceCode.C_27:
            return c_27()
        if self is OccurrenceCode.C_28:
            return c_28()
        if self is OccurrenceCode.C_29:
            return c_29()
        if self is OccurrenceCode.C_30:
            return c_30()
        if self is OccurrenceCode.C_31:
            return c_31()
        if self is OccurrenceCode.C_32:
            return c_32()
        if self is OccurrenceCode.C_33:
            return c_33()
        if self is OccurrenceCode.C_34:
            return c_34()
        if self is OccurrenceCode.C_35:
            return c_35()
        if self is OccurrenceCode.C_36:
            return c_36()
        if self is OccurrenceCode.C_37:
            return c_37()
        if self is OccurrenceCode.C_38:
            return c_38()
        if self is OccurrenceCode.C_39:
            return c_39()
        if self is OccurrenceCode.C_40:
            return c_40()
        if self is OccurrenceCode.C_41:
            return c_41()
        if self is OccurrenceCode.C_42:
            return c_42()
        if self is OccurrenceCode.C_43:
            return c_43()
        if self is OccurrenceCode.C_44:
            return c_44()
        if self is OccurrenceCode.C_45:
            return c_45()
        if self is OccurrenceCode.C_46:
            return c_46()
        if self is OccurrenceCode.C_47:
            return c_47()
        if self is OccurrenceCode.C_50:
            return c_50()
        if self is OccurrenceCode.C_51:
            return c_51()
        if self is OccurrenceCode.C_52:
            return c_52()
        if self is OccurrenceCode.C_54:
            return c_54()
        if self is OccurrenceCode.C_55:
            return c_55()
        if self is OccurrenceCode.C_56:
            return c_56()
        if self is OccurrenceCode.C_61:
            return c_61()
        if self is OccurrenceCode.C_62:
            return c_62()
        if self is OccurrenceCode.CA_1:
            return ca_1()
        if self is OccurrenceCode.CA_2:
            return ca_2()
        if self is OccurrenceCode.CA_3:
            return ca_3()
        if self is OccurrenceCode.CA_4:
            return ca_4()
        if self is OccurrenceCode.CB_1:
            return cb_1()
        if self is OccurrenceCode.CB_2:
            return cb_2()
        if self is OccurrenceCode.CB_3:
            return cb_3()
        if self is OccurrenceCode.CC_1:
            return cc_1()
        if self is OccurrenceCode.CC_2:
            return cc_2()
        if self is OccurrenceCode.CC_3:
            return cc_3()
        return _unknown_member(self._value_)
