models
The models the patient-data API's domains share.
They are not any one domain's: the caller's identity, the failure body every route can return, and the liveness payload of the one route that is not a domain's at all.
Classes
AuthenticatedUser
class AuthenticatedUser(**data: Any):Authenticated caller identity produced by the auth dependency.
Arguments
user_id: The caller's Bitfount user ID (the hub's ID for the user, not the tokensub). Writes are attributed to this.username: The verified username of the authenticated caller, matching the user the pod is logged in as.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
ErrorDetail
class ErrorDetail(**data: Any):FastAPI's HTTPException response body.
Arguments
detail: The failure reason. Never carries a filesystem path or a file basename, either of which can itself encode PHI.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
HealthStatus
class HealthStatus(**data: Any):Liveness payload for the unauthenticated /health endpoint.
Arguments
status: Always"ok"when the API process is serving requests.api_version: The version of the API contract this server implements (info.versionin its OpenAPI document), asmajor.minor.patch. A client that needs a route or field introduced in a given version reads this to tell whether the server it is talking to has it.pid: The id of the process serving the API. Says which serveranswered: a compute starting its API finds one an earlier run left on the port by this, and clears it.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Variables
- static
api_version : str
- static
model_config
- static
pid : int
- static
status : Literal['ok']