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

import typing

import pydantic
from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...commons.types.street_address_short_zip_optional import StreetAddressShortZipOptional


class EncounterServiceFacilityUpdateWithOptionalAddress(UniversalBaseModel):
    organization_name: typing.Optional[str] = None
    npi: typing.Optional[str] = pydantic.Field(default=None)
    """
    An NPI specific to the service facility if applicable, i.e. if it has one and is not under the billing provider's NPI.
    Box 32 section (a) of the CMS-1500 claim form.
    """

    address: typing.Optional[StreetAddressShortZipOptional] = pydantic.Field(default=None)
    """
    zip_plus_four_code is required for service facility address. When the zip_plus_four_code is not available use "9998" as per CMS documentation.
    """

    secondary_identification: typing.Optional[str] = pydantic.Field(default=None)
    """
    An additional identifier for the service facility other than the facility's NPI. Some payers may require this field.
    Potential examples: state license number, provider commercial number, or location number.
    Box 32 section (b) of the CMS-1500 claim form.
    """

    mammography_certification_number: typing.Optional[str] = pydantic.Field(default=None)
    """
    The associated mammography certification number for this service facility. This is a 6 digit code assigned by the FDA.
    """

    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
