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

import typing

from ......core import enum

T_Result = typing.TypeVar("T_Result")


class EncounterSubmissionExpectation(enum.StrEnum):
    """
    Used to describe the currently expected target form for this encounter.  This effects what
    validations and queues the form is processed under.  Before submission,
    this value will be required by some rules or user intervention.  It can be changed
    at any time, although doing so may incur other rules.
    """

    TARGET_PROFESSIONAL = "TARGET_PROFESSIONAL"
    """
    Treat this encounter as a potential professional claim submission and validate it as such.
    """

    TARGET_INSTITUTIONAL = "TARGET_INSTITUTIONAL"
    """
    Treat this encounter as a potential institutional claim submission and validate it as such.
    """

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

    def visit(
        self,
        target_professional: typing.Callable[[], T_Result],
        target_institutional: typing.Callable[[], T_Result],
        _unknown_member: typing.Callable[[str], T_Result],
    ) -> T_Result:
        if self is EncounterSubmissionExpectation.TARGET_PROFESSIONAL:
            return target_professional()
        if self is EncounterSubmissionExpectation.TARGET_INSTITUTIONAL:
            return target_institutional()
        return _unknown_member(self._value_)
