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

import typing

import pydantic
from ......core.pydantic_utilities import IS_PYDANTIC_V2
from .....diagnoses.types.diagnosis_id import DiagnosisId
from .service_line_create_standalone_base_base import ServiceLineCreateStandaloneBaseBase


class UniversalServiceLineCreateStandalone(ServiceLineCreateStandaloneBaseBase):
    diagnosis_id_zero: typing.Optional[DiagnosisId] = None
    diagnosis_id_one: typing.Optional[DiagnosisId] = None
    diagnosis_id_two: typing.Optional[DiagnosisId] = None
    diagnosis_id_three: typing.Optional[DiagnosisId] = None
    revenue_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    A 4 digit code that specifies facility department or type of service arrangement for institutional service line items (837i). This code is not required for professional claim billing (837p).
    """

    procedure_code: typing.Optional[str] = None
    prior_authorization_number: typing.Optional[str] = pydantic.Field(default=None)
    """
    Prior authorization number for this service line. Maps to the appropriate REF segment on Loop 2400 of the EDI 837p. This is not used for institutional claims (EDI 837i).
    """

    external_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    An external identifier for this service line. This is not used in the EDI 837, but can be used to identify the service line in external systems.
    This field should not contain PHI. Must be unique on a given claim.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
