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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class ConstrueCohortRequestConfig(UniversalBaseModel):
    include_extract_results: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When enabled, includes detailed information about medical codes extracted from the text.
    """

    include_rationale: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When enabled, includes AI-generated explanations for each query component and code extraction.
    """

    exclude_deceased: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Controls whether deceased patients should be excluded from the cohort.
    """

    sql_syntax: typing.Optional[typing.Literal["bigquery"]] = pydantic.Field(default=None)
    """
    Specifies the SQL dialect for query generation. Currently, only "bigquery" is supported.
    """

    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
