care.emr.api.viewsets.batch_request module

class Request(*, url: str, method: str, body: dict = {}, reference_id: str)

Bases: BaseModel

url: str
method: str
body: dict
reference_id: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class BatchRequest(*, requests: Annotated[list[Request], MinLen(min_length=1), MaxLen(max_length=20)])

Bases: BaseModel

requests: list[Request]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

exception HandledError

Bases: Exception

class BatchRequestView(**kwargs)

Bases: GenericViewSet

get_exception_handler()
create(request, *args, **kwargs)