openapi: 3.1.0
paths:
  /auth/b2b/login:
    post:
      description: "This API endpoint logs a user in to a project.\n\n## Example cURL request\n\n```bash\ncurl -X POST \\\n\
        \ --url 'https://api.dev.ovok.com/auth/b2b/login' \\\n -H 'Content-Type: application/json' \\\n -d '{\n    \"email\"\
        : \"max.mustermann@example.com\",\n    \"password\": \"A[.DmUv]2vE|n_+]\",\n    \"clientId\": \"87ea5dfc-8b8e-384d-8489-79496e706390\"\
        ,\n    \"tenantId\": \"87ea5dfc-8b8e-384d-8489-79496e706390\"\n}'\n```\n"
      operationId: AuthB2BLoginController_login
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestLoginV2Dto'
      responses:
        '200':
          description: Register response with tokens and IDs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Login
      tags:
      - Authentication - B2B
  /auth/b2b/register:
    post:
      description: "This API endpoint registers a user to a project.\n\n## Example cURL request\n\n```bash\ncurl -X POST \\\
        \n --url 'https://api.dev.ovok.com/auth/b2b/register' \\\n -H 'Content-Type: application/json' \\\n -d '{\n    \"\
        email\": \"max.mustermann@example.com\",\n    \"password\": \"A[.DmUv]2vE|n_+]\",\n    \"name\": \"Max\",\n    \"\
        surname\": \"Mustermann\",\n    \"tenantId\": \"87ea5dfc-8b8e-384d-8489-79496e706390\",\n    \"clientId\": \"87ea5dfc-8b8e-384d-8489-79496e706390\"\
        \n}'\n```\n"
      operationId: AuthB2BRegisterController_register
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestRegisterV2Dto'
      responses:
        '200':
          description: Login response with tokens and IDs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Register an account
      tags:
      - Authentication - B2B
  /auth/refresh-token:
    post:
      description: "By making a POST request to this endpoint you can refresh the access token, ensuring uninterrupted access\
        \ to protected resources.\n\n## Example cURL request\n\n```bash\ncurl -X POST \\\n --url 'https://api.dev.ovok.com/auth/refresh-token'\
        \ \\\n -H 'Content-Type: application/json' \\\n -d '{\n    \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzEzMzY0NDIsImV4cCI6MTczMTM0MDA0Mn0.MQbovtK2tKu8Zj6_7vaqSVXWunIG8-iuwa6JEXCqXAQ\"\
        \n}'\n```\n"
      operationId: AuthController_refreshToken
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefreshTokenDto'
      responses:
        '200':
          description: Access token, refresh token and expiration time.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseTokenDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Refresh access token
      tags:
      - Authentication
  /auth/delete:
    delete:
      description: "The Delete User API endpoint schedules user account deletion from the Ovok platform to be carried out\
        \ in 30 days.\n<br>User deletion can be aborted by logging in to the account.\n\n## Example cURL request\n\n```bash\n\
        curl -X DELETE \\\n --url 'https://api.dev.ovok.com/auth/delete' \\\n -H 'Authorization: Bearer example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\
        \ \\\n -H 'Content-Type: application/json' \\\n -d '{\n    \"days\": 30,\n    \"wipe\": false\n}'\n```\n"
      operationId: AuthDeleteController_deleteUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestDeleteDto'
      responses:
        '200':
          description: User account deletion confirmation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDeleteDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: Schedule user account deletion
      tags:
      - Authentication
  /v2/auth/login:
    post:
      description: "The Login API endpoint facilitates the authentication process, allowing users to obtain a JWT (JSON Web\
        \ Token) for subsequent authorized requests.\n<br>This API is crucial for secure access to Ovok services.\n\n## Example\
        \ cURL request\n\n```bash\ncurl -X POST \\\n --url 'https://api.dev.ovok.com/auth/login' \\\n -H 'Content-Type: application/json'\
        \ \\\n -d '{\n    \"email\": \"john.doe@mail.com\",\n    \"password\": \"password1234\",\n    \"clientId\": \"5e505642-9024-474d-9434-e5a44f505cc5\"\
        \n}'\n```\n"
      operationId: AuthLoginController_login_v2
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginDto'
      responses:
        '200':
          description: Access token, refresh token and expiration time.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Login
      tags:
      - Authentication
  /auth/me:
    get:
      description: "This API fetches the user profile information.\n\n## Example cURL request\n\n```bash\ncurl -X GET \\\n\
        \ --url 'https://api.dev.ovok.com/auth/me' \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzEzMzY0NDIsImV4cCI6MTczMTM0MDA0Mn0.MQbovtK2tKu8Zj6_7vaqSVXWunIG8-iuwa6JEXCqXAQ'\n\
        ```\n"
      operationId: AuthMeController_getUserProfile
      parameters: []
      responses:
        '200':
          description: User profile returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseMeDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: Get account information
      tags:
      - Authentication
  /auth/register:
    post:
      description: "The Register API endpoint allows users to create a new account on the Ovok platform.\n<br>This API is\
        \ essential for onboarding new users and providing access to Ovok services.\n\n## Example cURL request\n\n```bash\n\
        curl -X POST \\\n --url 'https://api.dev.ovok.com/auth/register' \\\n -H 'Content-Type: application/json' \\\n -d\
        \ '{\n    \"email\": \"john.doe@mail.com\",\n    \"password\": \"password1234\",\n    \"clientId\": \"5e505642-9024-474d-9434-e5a44f505cc5\"\
        ,\n    \"type\": \"Patient\",\n    \"name\": \"John\",\n    \"surname\": \"Doe\"\n}'\n```\n"
      operationId: AuthRegisterController_register
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterDto'
      responses:
        '200':
          description: Access token, refresh token and expiration time.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Register an account
      tags:
      - Authentication
  /auth/session:
    get:
      description: "The GET Session API endpoint retrieves all sessions from the Ovok platform.\n\n## Example cURL request\n\
        \n```bash\ncurl -X GET \\\n --url 'https://api.dev.ovok.com/auth/session' \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\n\
        ```\n"
      operationId: AuthSessionController_findAll
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsResponseDto'
        '400': &id001
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id002
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id003
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id004
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id005
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security: &id006
      - bearer: []
      summary: Get all sessions
      tags:
      - Authentication - Session Management
  /auth/session/{option}:
    delete:
      description: "The Delete Session API endpoint revokes session(s) from the Ovok platform. The access and refresh tokens\
        \ for the sessions(s) will be invalidated.\nYou can specify if you'd like to revoke `all`, `current`, `other` or a\
        \ specific session by providing the session ID.\n\n## Example cURL request\n\n```bash\ncurl -X DELETE \\\n --url 'https://api.dev.ovok.com/auth/session/other'\
        \ \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\n\
        ```\n"
      operationId: AuthSessionController_revokeSessions
      parameters:
      - name: option
        required: true
        in: path
        description: Which sessions to revoke. Use `current` to revoke the calling session, `other` to revoke every session
          except the calling one, `all` to revoke every session, or a specific session UUID to revoke just that session.
        schema:
          oneOf:
          - type: string
            enum:
            - current
            - other
            - all
          - type: string
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsResponseDto'
        '400': *id001
        '401': *id002
        '404': *id003
        '422': *id004
        '500': *id005
      security: *id006
      summary: Revoke sessions
      tags:
      - Authentication - Session Management
  /auth/tenant/Practitioner/login/start:
    post:
      description: Login with email and password. Response either contains challange or MFA challenge - which is followed
        up by challenge as a second step as well.
      operationId: TenantPractitionerAuthController_startLogin
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPractitionerLoginBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartPractitionerLoginResponseDto'
        '400': &id007
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id008
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id009
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id010
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id011
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Practitioner - Login
      tags:
      - Tenant Authentication
  /auth/tenant/Practitioner/login/token:
    post:
      description: Login with challenge token. Success response contains access and refresh tokens.
      operationId: TenantPractitionerAuthController_finishLogin
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinishPractitionerLoginBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400': *id007
        '401': *id008
        '404': *id009
        '422': *id010
        '500': *id011
      summary: Practitioner - Exchange Token
      tags:
      - Tenant Authentication
  /auth/tenant/Practitioner/login/mfa:
    post:
      description: Login with MFA token. Success response contains a challenge token that can be used to finish login via
        login/token endpoint.
      operationId: TenantPractitionerAuthController_mfaStart
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPractitionerMFABodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartPractitionerMFAResponseDto'
        '400': *id007
        '401': *id008
        '404': *id009
        '422': *id010
        '500': *id011
      summary: Practitioner - MFA
      tags:
      - Tenant Authentication
  /auth/tenant/Patient/login/start:
    post:
      description: Login with email and password. Response either contains challange or MFA challenge - which is followed
        up by challenge as a second step as well.
      operationId: TenantPatientAuthController_startLogin
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPatientLoginBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartPatientLoginResponseDto'
        '400': &id012
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id013
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id014
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id015
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id016
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Patient - Login
      tags:
      - Tenant Authentication
  /auth/tenant/Patient/login/token:
    post:
      description: Login with challenge token. Success response contains access and refresh tokens.
      operationId: TenantPatientAuthController_finishLogin
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinishPatientLoginBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400': *id012
        '401': *id013
        '404': *id014
        '422': *id015
        '500': *id016
      summary: Patient - Exchange Token
      tags:
      - Tenant Authentication
  /auth/tenant/Patient/login/mfa:
    post:
      description: Login with MFA token. Success response contains a challenge token that can be used to finish login via
        login/token endpoint.
      operationId: TenantPatientAuthController_mfaStart
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPatientMFABodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartPatientMFAResponseDto'
        '400': *id012
        '401': *id013
        '404': *id014
        '422': *id015
        '500': *id016
      summary: Patient - MFA
      tags:
      - Tenant Authentication
  /auth/tenant/Patient/register:
    post:
      description: Register a new user.
      operationId: TenantPatientAuthController_register
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterPatientBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRegisterLoginDto'
        '400': *id012
        '401': *id013
        '404': *id014
        '422': *id015
        '500': *id016
      summary: Patient - Register
      tags:
      - Tenant Authentication
  /locales:
    get:
      description: Fetch the enabled locales and the default locale for localization.
      operationId: LocaleController_getLocale
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocaleBodyDto'
        '400': &id017
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id018
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id019
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id020
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id021
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security: &id022
      - bearer: []
      summary: Get available locales
      tags:
      - Localization
    patch:
      description: Enable or disable the available locales for localization.
      operationId: LocaleController_patchLocale
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LocaleBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocaleBodyDto'
        '400': *id017
        '401': *id018
        '404': *id019
        '422': *id020
        '500': *id021
      security: *id022
      summary: Update the available locales
      tags:
      - Localization
  /organizations/code/email:
    post:
      description: Receive organization codes to your email
      operationId: OrganizationCodeController_sendEmailOfOrganizations
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailRequestBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailRequestBodyDto'
        '400': &id023
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id024
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id025
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id026
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id027
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Receive Organization Codes
      tags:
      - Organization Code Information
  /organizations/code:
    get:
      description: Get organization code
      operationId: OrganizationCodeController_getOrganizationCode
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantCodeDto'
        '400': *id023
        '401': *id024
        '404': *id025
        '422': *id026
        '500': *id027
      summary: Get Organization Code
      tags:
      - Organization Code Information
  /v1/content:
    get:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_get
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': &id028
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id029
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id030
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id031
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id032
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    post:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_post
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    put:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_put
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    delete:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_delete
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    patch:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_patch
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    options:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_options
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    head:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_head
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    search:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_search
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
  /v1/content/{path}:
    get:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_get
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    post:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_post
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    put:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_put
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    delete:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_delete
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    patch:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_patch
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    options:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_options
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    head:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_head
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
    search:
      description: Catch-all that forwards every method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS) under `/v1/content/*` to
        the project-scoped Payload CMS instance. The Medplum project id is injected as the Payload tenant header, so multi-tenant
        scoping is automatic — you address `Collection/<id>` or `Collection?where=...` exactly as the Payload REST API expects.
        Response shape and status code are whatever Payload returns; refer to your collection schemas (and the `payloadcms.com/docs/rest-api`
        reference) for the per-collection details. 502 surfaces when Payload itself is unreachable.
      operationId: ContentProxyController_proxy_search
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentProxyResponseDto'
        '400': *id028
        '401': *id029
        '404': *id030
        '422': *id031
        '500': *id032
      security:
      - bearer: []
      summary: Content CMS reverse proxy
      tags:
      - Content
  /partner/health-check:
    get:
      description: 'Unauthenticated liveness ping for partner load balancers and sandbox smoke checks. Always returns `{ status:
        "ok", healthy: true, timestamp }` when the handler is reachable. Mounted at version-neutral, v1, v2 and v3 paths so
        older partner SDKs keep working as the surrounding API evolves.'
      operationId: PartnerController_healthCheck[0]
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerHealthResponseDto'
        '400': &id033
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id034
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id035
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id036
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id037
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Partner integration health check
      tags:
      - Partner
  /v1/partner/health-check:
    get:
      description: 'Unauthenticated liveness ping for partner load balancers and sandbox smoke checks. Always returns `{ status:
        "ok", healthy: true, timestamp }` when the handler is reachable. Mounted at version-neutral, v1, v2 and v3 paths so
        older partner SDKs keep working as the surrounding API evolves.'
      operationId: PartnerController_healthCheck[1]_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerHealthResponseDto'
        '400': *id033
        '401': *id034
        '404': *id035
        '422': *id036
        '500': *id037
      summary: Partner integration health check
      tags:
      - Partner
  /v2/partner/health-check:
    get:
      description: 'Unauthenticated liveness ping for partner load balancers and sandbox smoke checks. Always returns `{ status:
        "ok", healthy: true, timestamp }` when the handler is reachable. Mounted at version-neutral, v1, v2 and v3 paths so
        older partner SDKs keep working as the surrounding API evolves.'
      operationId: PartnerController_healthCheck[2]_v2
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerHealthResponseDto'
        '400': *id033
        '401': *id034
        '404': *id035
        '422': *id036
        '500': *id037
      summary: Partner integration health check
      tags:
      - Partner
  /v3/partner/health-check:
    get:
      description: 'Unauthenticated liveness ping for partner load balancers and sandbox smoke checks. Always returns `{ status:
        "ok", healthy: true, timestamp }` when the handler is reachable. Mounted at version-neutral, v1, v2 and v3 paths so
        older partner SDKs keep working as the surrounding API evolves.'
      operationId: PartnerController_healthCheck[3]_v3
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerHealthResponseDto'
        '400': *id033
        '401': *id034
        '404': *id035
        '422': *id036
        '500': *id037
      summary: Partner integration health check
      tags:
      - Partner
  /ai/translation:
    post:
      description: 'AI Translation uses LLMs for translation.


        ### Warning


        The translation may fail or return hallucinated results due to the nature of LLMs.


        ### Body Parameters


        | Parameter        | Type       | Description                                     | Example                                 |

        | ---------------- | ---------- | ----------------------------------------------- | ---------------------------------------
        |

        | `sourceLanguage` | `string`   | ISO 639-1 language code, or full language name. | `en-US`                                 |

        | `targetLanguage` | `string`   | ISO 639-1 language code, or full language name. | `de-DE`                                 |

        | `text`           | `string[]` | The text to translate.                          | `["Hello, world!", "How is ?"]`
        |


        > String values in the `text` array can be in any format, including HTML, Markdown, or plain text and may contain
        variables with double curly braces.

        '
      operationId: TranslationController_translate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTranslationRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTranslationResponseDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Translate
      tags:
      - AI Translation
  /document:
    post:
      description: "Generate a file upload url and credentials\n\n### Parameters\n\n| Parameter     | In     | Description\
        \                                    | Example     |\n| ------------- | ------ | ----------------------------------------------\
        \ | ----------- |\n| `contentType` | `body` | The mime type of the file                      | `image/png` |\n| `fileName`\
        \    | `body` | The filename of the resource to be saved with. | `cat.png`   |\n\n### Response\n\n```json\n{\n  \"\
        id\": \"12345\",\n  \"lastUpdated\": \"2000-01-01T00:00:00.000Z\",\n  \"author\": {\n    \"reference\": \"Practitioner/...\"\
        ,\n    \"display\": \"Max Mustermann\"\n  },\n  \"fileName\": \"cat.png\",\n  \"contentType\": \"image/png\",\n  \"\
        uploadOptions\": {\n    \"url\": \"https://s3.eu-central-1.amazonaws.com/s...\",\n    \"fields\": {\n      \"bucket\"\
        : \"s...\",\n      \"X-Amz-Algorithm\": \"A...\",\n      \"X-Amz-Credential\": \"A...\",\n      \"X-Amz-Date\": \"\
        2025...\",\n      \"key\": \"bi...\",\n      \"Policy\": \"ey...\",\n      \"X-Amz-Signature\": \"a6...\"\n    }\n\
        \  }\n}\n```\n\nBy using the credentials provided in the `uploadOptions`, you can use any http client to upload your\
        \ file in http form field.\nAll of the `field` values in the `uploadOptions` should be provided as form data key value\
        \ pairs, along with another form data field `file` with the value of actual file itself.\n\n```ts\nimport axios from\
        \ 'axios';\nimport * as fs from 'fs';\nimport FormData from 'form-data';\n\nasync function uploadFileWithCredentials(filePath:\
        \ string, uploadCredentialsResponse: any) {\n  const { url, fields } = uploadCredentialsResponse.uploadOptions;\n\
        \  const formData = new FormData();\n\n  for (const [key, value] of Object.entries(fields)) {\n    formData.append(key,\
        \ value);\n  }\n\n  try {\n    const fileContent = fs.readFileSync(filePath);\n    formData.append('file', fileContent);\n\
        \n    const response = await axios.post(url, formData, {\n      headers: formData.getHeaders(),\n    });\n    console.log('Upload\
        \ successful:', response.status);\n  } catch (error: any) {\n    console.error('Upload failed:', error);\n  }\n}\n\
        \nconst uploadCredentialsResponse = {\n  id: '12345',\n  lastUpdated: '2000-01-01T00:00:00.000Z',\n  author: {\n \
        \   reference: 'Practitioner/...',\n    display: 'Max Mustermann',\n  },\n  fileName: 'cat.png',\n  contentType: 'image/png',\n\
        \  uploadOptions: {\n    url: 'https://s3.eu-central-1.amazonaws.com/s...',\n    fields: {\n      bucket: 's...',\n\
        \      'X-Amz-Algorithm': 'A...',\n      'X-Amz-Credential': 'A...',\n      'X-Amz-Date': '2025...',\n      key: 'bi...',\n\
        \      Policy: 'ey...',\n      'X-Amz-Signature': 'a6...',\n    },\n  },\n};\n\nuploadFileWithCredentials('path/to/cat.png',\
        \ uploadCredentialsResponse);\n```\n"
      operationId: DocumentController_createUploadCredentials
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostFileUploadDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileEntryDto'
        '400': &id038
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id039
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id040
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id041
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id042
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: Upload document - Generate credentials
      tags:
      - Document
    get:
      description: 'File search


        Information such as id, contentType, fileName, public token.


        ### Parameters


        | Parameter | In      | Description                                                     | Example |

        | --------- | ------- | --------------------------------------------------------------- | ------- |

        | `_count`  | `query` | Total amount of file informations per query                     | `10`    |

        | `_offset` | `query` | Total amount of file informations to be skipped (page \* count) | `0`     |

        '
      operationId: DocumentController_searchFiles
      parameters:
      - name: _count
        required: false
        in: query
        description: Page size — maximum number of documents to return in one response. Defaults to `100`.
        schema:
          default: '100'
          example: 100
          type: string
      - name: _offset
        required: false
        in: query
        description: Number of documents to skip before returning results. Combine with `_count` to paginate (offset = page
          × count).
        schema:
          default: '0'
          example: 0
          type: string
      - name: _sort
        required: false
        in: query
        description: FHIR sort expression applied to the underlying `DocumentReference` search. Defaults to `-_lastUpdated`
          (most recently updated first).
        schema:
          default: -_lastUpdated
          example: -_lastUpdated
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSearchFilesResponseDto'
        '400': *id038
        '401': *id039
        '404': *id040
        '422': *id041
        '500': *id042
      security:
      - bearer: []
      summary: Search documents
      tags:
      - Document
  /document/public/{token}:
    get:
      description: 'Public file download


        Information such as id, contentType, fileName, publicToken can be fetched by querying /fhir/DocumentReference.


        ### Parameters


        | Parameter | In       | Description                                                                                                  |
        Example             |

        | --------- | -------- | ------------------------------------------------------------------------------------------------------------
        | ------------------- |

        | `token`   | `params` | The DocumentReference public token found in the extension of the resource                                    |
        `example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY`
        |

        | `width`   | `query`  | The width of the image to resize the image to (optional)                                                     |
        `100`               |

        | `height`  | `query`  | The height of the image to resize the image to (optional)                                                    |
        `100`               |

        | `fit`     | `query`  | The fit of the image to resize the image to (optional) [See](https://sharp.pixelplumbing.com/api-resize#fit)
        | `cover`             |


        > Useful for embedding images with \<img\> tags on websites, predefined HTML files. Note that anyone with the url
        will be able to access the file without any Authorization.

        '
      operationId: DocumentController_getPublicFileUrl
      parameters:
      - name: token
        required: true
        in: path
        description: Public access JWT minted for the document and stored as an extension on the `DocumentReference`. Anyone
          with this token can read the file, so treat it as the shareable link itself.
        schema:
          type: string
      - name: ETag
        required: false
        in: header
        description: The ETag of the file for GET requests. If provided, the server will check the value of the ETag against
          the value of the ETag in the request headers. If the values match, the server will return a 304 Not Modified response.
          If the values do not match, the server will return a 200 OK response and the file content, if the file exists.
        schema:
          type: string
      - name: width
        required: false
        in: query
        description: The width of the binary resource if the resource is an image.
        schema:
          type: string
      - name: height
        required: false
        in: query
        description: The height of the binary resource if the resource is an image.
        schema:
          type: string
      - name: fit
        required: false
        in: query
        description: The fit of the image. See https://sharp.pixelplumbing.com/api-resize#fit for more information.
        schema:
          default: cover
          type: string
          enum:
          - cover
          - contain
          - fill
          - inside
          - outside
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedirectResponseDto'
        '400': *id038
        '401': *id039
        '404': *id040
        '422': *id041
        '500': *id042
      summary: Get a document as public user
      tags:
      - Document
  /document/{id}:
    get:
      description: 'File download


        Information such as id, contentType, fileName can be fetched by querying /fhir/DocumentReference.


        ### Parameters


        | Parameter | In       | Description                                                                                                  |
        Example              |

        | --------- | -------- | ------------------------------------------------------------------------------------------------------------
        | -------------------- |

        | `id`      | `params` | The DocumentReference id of the file resource                                                                |
        `c3499c27-2973-0a7f-807e-fb8676a92dcb` |

        | `width`   | `query`  | The width of the image to resize the image to (optional)                                                     |
        `100`                |

        | `height`  | `query`  | The height of the image to resize the image to (optional)                                                    |
        `100`                |

        | `fit`     | `query`  | The fit of the image to resize the image to (optional) [See](https://sharp.pixelplumbing.com/api-resize#fit)
        | `cover`              |

        '
      operationId: DocumentController_getFileUrl
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR `DocumentReference` id of the file to download. The response is a 307 redirect to a short-lived
          signed URL.
        schema:
          format: uuid
          type: string
      - name: ETag
        required: false
        in: header
        description: The ETag of the file for GET requests. If provided, the server will check the value of the ETag against
          the value of the ETag in the request headers. If the values match, the server will return a 304 Not Modified response.
          If the values do not match, the server will return a 200 OK response and the file content, if the file exists.
        schema:
          type: string
      - name: width
        required: false
        in: query
        description: The width of the binary resource if the resource is an image.
        schema:
          type: string
      - name: height
        required: false
        in: query
        description: The height of the binary resource if the resource is an image.
        schema:
          type: string
      - name: fit
        required: false
        in: query
        description: The fit of the image. See https://sharp.pixelplumbing.com/api-resize#fit for more information.
        schema:
          default: cover
          type: string
          enum:
          - cover
          - contain
          - fill
          - inside
          - outside
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedirectResponseDto'
        '400': *id038
        '401': *id039
        '404': *id040
        '422': *id041
        '500': *id042
      security:
      - bearer: []
      summary: Get a document as authenticated user
      tags:
      - Document
    delete:
      description: "Delete document\n\nDeletes a document and its associated file from the system.\n\n### Parameters\n\n|\
        \ Parameter | In     | Description                                        | Example   |\n| --------- | ------ | --------------------------------------------------\
        \ | --------- |\n| `id`      | `path` | The id of the DocumentReference resource to delete | `023f2f-` |\n\n### Response\n\
        \n```json\n{\n  \"message\": \"Document deleted successfully\"\n}\n```\n\n> Note: This operation will permanently\
        \ delete both the DocumentReference metadata and the associated binary file from S3. This action cannot be undone.\n"
      operationId: DocumentController_deleteDocument
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR `DocumentReference` id of the document to delete. Removes the underlying binary and the reference
          resource.
        schema:
          format: uuid
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDeletedResponseDto'
        '400': *id038
        '401': *id039
        '404': *id040
        '422': *id041
        '500': *id042
      security:
      - bearer: []
      summary: Delete a document
      tags:
      - Document
    patch:
      description: "Update document metadata\n\nUpdates the name and/or publicity settings of an uploaded document.\n\n###\
        \ Parameters\n\n| Parameter  | In     | Description                                                              \
        \    | Example   |\n| ---------- | ------ | ----------------------------------------------------------------------------\
        \ | --------- |\n| `id`       | `path` | The id of the DocumentReference resource to update                      \
        \     | `023f2f-` |\n| `fileName` | `body` | The new filename for the document (optional)                        \
        \         | `cat.png` |\n| `isPublic` | `body` | Whether the document should be publicly accessible (optional, true\
        \ or false) | `false`   |\n\n### Request Body\n\n```json\n{\n  \"fileName\": \"updated-image.png\",\n  \"isPublic\"\
        : \"false\"\n}\n```\n\n### Response\n\nReturns the updated document information in the same format as the create endpoint:\n\
        \n```json\n{\n  \"id\": \"12345\",\n  \"meta\": {\n    \"lastUpdated\": \"2000-01-01T00:00:00.000Z\"\n  },\n  \"author\"\
        : {\n    \"reference\": \"Practitioner/...\",\n    \"display\": \"Max Mustermann\"\n  },\n  \"fileName\": \"updated-image.png\"\
        ,\n  \"contentType\": \"image/png\",\n  \"publicToken\": null\n}\n```\n"
      operationId: DocumentController_updateDocumentMetadata
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR `DocumentReference` id whose metadata should be updated (e.g. file name, author, content type).
          The binary itself is not changed — use `POST /document/:id` to replace the file.
        schema:
          format: uuid
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentMetadataDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileEntryDto'
        '400': *id038
        '401': *id039
        '404': *id040
        '422': *id041
        '500': *id042
      security:
      - bearer: []
      summary: Update document metadata
      tags:
      - Document
    post:
      description: "Generate credentials for file replacement\n\nThe file replacement follows the same pattern as file creation\
        \ - you first get upload credentials, then upload directly to S3.\n\n### Parameters\n\n| Parameter     | In      \
        \ | Description                                    | Example     |\n| ------------- | -------- | ----------------------------------------------\
        \ | ----------- |\n| `id`          | `params` | The id of the DocumentReference                | `023f2f-`   |\n|\
        \ `fileName`    | `body`   | The filename of the resource to be saved with. | `cat.png`   |\n| `contentType` | `body`\
        \   | The mime type of the file                      | `image/png` |\n\n### Response\n\nSimilar to document creation,\
        \ this endpoint returns upload credentials:\n\n```json\n{\n  \"id\": \"12345\",\n  \"lastUpdated\": \"2000-01-01T00:00:00.000Z\"\
        ,\n  \"author\": {\n    \"reference\": \"Practitioner/...\",\n    \"display\": \"Max Mustermann\"\n  },\n  \"fileName\"\
        : \"cat.png\",\n  \"contentType\": \"image/png\",\n  \"uploadOptions\": {\n    \"url\": \"https://s3.eu-central-1.amazonaws.com/s...\"\
        ,\n    \"fields\": {\n      \"bucket\": \"s...\",\n      \"X-Amz-Algorithm\": \"A...\",\n      \"X-Amz-Credential\"\
        : \"A...\",\n      \"X-Amz-Date\": \"2025...\",\n      \"key\": \"bi...\",\n      \"Policy\": \"ey...\",\n      \"\
        X-Amz-Signature\": \"a6...\"\n    }\n  }\n}\n```\n\nUse the credentials in `uploadOptions` to upload your replacement\
        \ file directly to S3 using form data, exactly like the initial upload process.\n"
      operationId: DocumentController_generateReplaceCredentials
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR `DocumentReference` id whose binary should be replaced. The endpoint returns fresh upload credentials;
          the metadata resource itself stays in place.
        schema:
          format: uuid
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceDocumentFileDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileEntryDto'
        '400': *id038
        '401': *id039
        '404': *id040
        '422': *id041
        '500': *id042
      security:
      - bearer: []
      summary: Generate credentials for document file replacement
      tags:
      - Document
  /bots:
    post:
      description: "This API executes a bot by its identifier.\n<br>Additional parameters can be provided in the request body.\n\
        \n## Example bot resource\n\n```json\n{\n  \"resourceType\": \"Bot\",\n  \"identifier\": [{\n    \"system\": \"https://example.com\"\
        ,\n    \"value\": \"get-users\"\n  }],\n  ...\n}\n```\n\n## Example cURL request\n\nThe bot identifier is provided\
        \ in the query, while additional parameters are sent in the JSON body.\n\n```bash\ncurl -X POST \\\n --url 'https://api.dev.ovok.com/bots?identifier=https://example.com|get-users'\
        \ \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MzEzMzY0NDIsImV4cCI6MTczMTM0MDA0Mn0.MQbovtK2tKu8Zj6_7vaqSVXWunIG8-iuwa6JEXCqXAQ'\
        \ \\\n -H 'Content-Type: application/json' \\\n -d '{\n    \"parameter1\": \"value1\",\n    \"parameter2\": \"value2\"\
        \n}'\n```\n\n**Note**: The `https://example.com|get-users` query parameter value consists of identifier's `system`\
        \ and `value` properties merged by a single pipe `|` symbol, following the FHIR search parameter syntax.\n"
      operationId: BotsController_execBotByIdentifierPOST
      parameters:
      - name: identifier
        required: true
        in: query
        description: Bot identifier in FHIR `system|value` form (e.g. `https://example.com|get-users`); the `system` half
          may be omitted. The request body is forwarded to the bot as its input.
        schema:
          type: string
      responses:
        '200':
          description: Bot response (shape depends on the bot).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BotExecResponseDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Execute a bot with request body
      tags:
      - Bots - Execute a custom script
  /fhir/Observation/$lastn:
    get:
      description: "This endpoint allows users to fetch patient informations, specifically observations.\n\n## Example cURL\
        \ request\n\n```bash\ncurl -X GET \\\n -G 'https://api.dev.ovok.com/fhir/Observation/$lastn' \\\n -d 'patient=Patient/e70f3aec-d37e-453d-887b-72654c26b3fe'\
        \ \\\n -d 'max=2' \\\n -d 'code=131328,8886-4'\n```\n\n## Example JSON response\n\n```json\n{\n  \"resourceType\"\
        : \"Bundle\",\n  \"type\": \"searchset\",\n  \"entry\": [\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"subject\": {\n          \"reference\": \"Patient/7c4d044d-af23-4ef8-948b-c4503e64e528\"\
        ,\n          \"display\": \"Max Mustermann\"\n        },\n        \"code\": {\n          \"coding\": [\n         \
        \   {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"131328\"\n            }\n      \
        \    ]\n        },\n        \"status\": \"amended\",\n        \"id\": \"a4508b00-7854-4108-a903-57aa67eaa79e\"\n \
        \     },\n      \"fullUrl\": \"https://fhir.ovok.com/fhir/R4/Observation/a4508b00-7854-4108-a903-57aa67eaa79e\"\n\
        \    },\n    {\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"status\": \"final\",\n\
        \        \"valueQuantity\": {\n          \"unit\": \"bpm\",\n          \"value\": 150\n        },\n        \"code\"\
        : {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\"\
        : \"8883-1\"\n            },\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\"\
        : \"8886-4\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/7c4d044d-af23-4ef8-948b-c4503e64e528\"\
        ,\n          \"display\": \"Max Mustermann\"\n        },\n        \"id\": \"32fd6e5d-fa2f-4923-97ac-1042ed3f90bb\"\
        \n      },\n      \"fullUrl\": \"https://fhir.ovok.com/fhir/R4/Observation/32fd6e5d-fa2f-4923-97ac-1042ed3f90bb\"\n\
        \    }\n  ]\n}\n```\n"
      operationId: FhirController_getPatientLastObservation[0]
      parameters:
      - name: patient
        required: false
        in: query
        description: FHIR Patient reference (e.g. `Patient/<uuid>`) whose most-recent observations to return.
        schema:
          type: string
      - name: max
        required: false
        in: query
        description: Maximum number of observations to return per code. Defaults to `1`.
        schema:
          default: '1'
          type: string
      - name: code
        required: false
        in: query
        description: Comma-separated list of Observation codes to filter by (e.g. `131328,8886-4`).
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientObservationResponseDto'
        '400': &id043
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id044
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id045
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id046
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id047
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      summary: Get last observations
      tags:
      - FHIR Operations
  /fhir/R4/Observation/$lastn:
    get:
      description: "This endpoint allows users to fetch patient informations, specifically observations.\n\n## Example cURL\
        \ request\n\n```bash\ncurl -X GET \\\n -G 'https://api.dev.ovok.com/fhir/Observation/$lastn' \\\n -d 'patient=Patient/e70f3aec-d37e-453d-887b-72654c26b3fe'\
        \ \\\n -d 'max=2' \\\n -d 'code=131328,8886-4'\n```\n\n## Example JSON response\n\n```json\n{\n  \"resourceType\"\
        : \"Bundle\",\n  \"type\": \"searchset\",\n  \"entry\": [\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"subject\": {\n          \"reference\": \"Patient/7c4d044d-af23-4ef8-948b-c4503e64e528\"\
        ,\n          \"display\": \"Max Mustermann\"\n        },\n        \"code\": {\n          \"coding\": [\n         \
        \   {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"131328\"\n            }\n      \
        \    ]\n        },\n        \"status\": \"amended\",\n        \"id\": \"a4508b00-7854-4108-a903-57aa67eaa79e\"\n \
        \     },\n      \"fullUrl\": \"https://fhir.ovok.com/fhir/R4/Observation/a4508b00-7854-4108-a903-57aa67eaa79e\"\n\
        \    },\n    {\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"status\": \"final\",\n\
        \        \"valueQuantity\": {\n          \"unit\": \"bpm\",\n          \"value\": 150\n        },\n        \"code\"\
        : {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\"\
        : \"8883-1\"\n            },\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\"\
        : \"8886-4\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/7c4d044d-af23-4ef8-948b-c4503e64e528\"\
        ,\n          \"display\": \"Max Mustermann\"\n        },\n        \"id\": \"32fd6e5d-fa2f-4923-97ac-1042ed3f90bb\"\
        \n      },\n      \"fullUrl\": \"https://fhir.ovok.com/fhir/R4/Observation/32fd6e5d-fa2f-4923-97ac-1042ed3f90bb\"\n\
        \    }\n  ]\n}\n```\n"
      operationId: FhirController_getPatientLastObservation[1]
      parameters:
      - name: patient
        required: false
        in: query
        description: FHIR Patient reference (e.g. `Patient/<uuid>`) whose most-recent observations to return.
        schema:
          type: string
      - name: max
        required: false
        in: query
        description: Maximum number of observations to return per code. Defaults to `1`.
        schema:
          default: '1'
          type: string
      - name: code
        required: false
        in: query
        description: Comma-separated list of Observation codes to filter by (e.g. `131328,8886-4`).
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientObservationResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get last observations
      tags:
      - FHIR Operations
  /fhir/R5/Observation/$lastn:
    get:
      description: "This endpoint allows users to fetch patient informations, specifically observations.\n\n## Example cURL\
        \ request\n\n```bash\ncurl -X GET \\\n -G 'https://api.dev.ovok.com/fhir/Observation/$lastn' \\\n -d 'patient=Patient/e70f3aec-d37e-453d-887b-72654c26b3fe'\
        \ \\\n -d 'max=2' \\\n -d 'code=131328,8886-4'\n```\n\n## Example JSON response\n\n```json\n{\n  \"resourceType\"\
        : \"Bundle\",\n  \"type\": \"searchset\",\n  \"entry\": [\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"subject\": {\n          \"reference\": \"Patient/7c4d044d-af23-4ef8-948b-c4503e64e528\"\
        ,\n          \"display\": \"Max Mustermann\"\n        },\n        \"code\": {\n          \"coding\": [\n         \
        \   {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"131328\"\n            }\n      \
        \    ]\n        },\n        \"status\": \"amended\",\n        \"id\": \"a4508b00-7854-4108-a903-57aa67eaa79e\"\n \
        \     },\n      \"fullUrl\": \"https://fhir.ovok.com/fhir/R4/Observation/a4508b00-7854-4108-a903-57aa67eaa79e\"\n\
        \    },\n    {\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"status\": \"final\",\n\
        \        \"valueQuantity\": {\n          \"unit\": \"bpm\",\n          \"value\": 150\n        },\n        \"code\"\
        : {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\"\
        : \"8883-1\"\n            },\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\"\
        : \"8886-4\"\n            }\n          ]\n        },\n        \"subject\": {\n          \"reference\": \"Patient/7c4d044d-af23-4ef8-948b-c4503e64e528\"\
        ,\n          \"display\": \"Max Mustermann\"\n        },\n        \"id\": \"32fd6e5d-fa2f-4923-97ac-1042ed3f90bb\"\
        \n      },\n      \"fullUrl\": \"https://fhir.ovok.com/fhir/R4/Observation/32fd6e5d-fa2f-4923-97ac-1042ed3f90bb\"\n\
        \    }\n  ]\n}\n```\n"
      operationId: FhirController_getPatientLastObservation[2]
      parameters:
      - name: patient
        required: false
        in: query
        description: FHIR Patient reference (e.g. `Patient/<uuid>`) whose most-recent observations to return.
        schema:
          type: string
      - name: max
        required: false
        in: query
        description: Maximum number of observations to return per code. Defaults to `1`.
        schema:
          default: '1'
          type: string
      - name: code
        required: false
        in: query
        description: Comma-separated list of Observation codes to filter by (e.g. `131328,8886-4`).
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientObservationResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get last observations
      tags:
      - FHIR Operations
  /fhir/Device/{id}/telemetry:
    get:
      description: "Returns the current effective telemetry for a device as a FHIR searchset Bundle of Observations, derived\
        \ from the device's state machine snapshot. One Observation per metric is included: presence, heart rate (when a fresh\
        \ value is cached), respiratory rate (when a fresh value is cached), and sleep status. Each Observation uses its own\
        \ `effectiveInstant` so clients can reason about staleness per metric.\n\n## Example cURL request\n\n```bash\ncurl\
        \ -X GET \\\n 'https://api.dev.ovok.com/fhir/R4/Device/87ea5dfc-8b8e-384d-8489-79496e706390/telemetry' \\\n -H 'Authorization:\
        \ Bearer <token>'\n```\n\n## Example JSON response\n\n```json\n{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"\
        searchset\",\n  \"total\": 4,\n  \"entry\": [\n    {\n      \"resource\": {\n        \"resourceType\": \"Observation\"\
        ,\n        \"id\": \"presence\",\n        \"status\": \"final\",\n        \"code\": {\n          \"coding\": [\n \
        \           {\n              \"system\": \"https://sleepiz.com/fhir/CodeSystem/observation-codes\",\n            \
        \  \"code\": \"presence-detection\",\n              \"display\": \"Presence detection\"\n            }\n         \
        \ ]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n      \
        \  \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\":\
        \ \"2026-04-22T10:00:00.000Z\",\n        \"valueBoolean\": true\n      }\n    },\n    {\n      \"resource\": {\n \
        \       \"resourceType\": \"Observation\",\n        \"id\": \"heartRate\",\n        \"status\": \"final\",\n     \
        \   \"code\": {\n          \"coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"8867-4\", \"display\": \"\
        Heart rate\" }]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\"\
        \ },\n        \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\"\
        : \"2026-04-22T10:00:00.000Z\",\n        \"valueQuantity\": { \"value\": 72, \"unit\": \"beats/min\", \"system\":\
        \ \"http://unitsofmeasure.org\", \"code\": \"/min\" }\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"id\": \"respiratoryRate\",\n        \"status\": \"final\",\n        \"code\": {\n  \
        \        \"coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"9279-1\", \"display\": \"Respiratory rate\"\
        \ }]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n     \
        \   \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\"\
        : \"2026-04-22T10:00:00.000Z\",\n        \"valueQuantity\": { \"value\": 14, \"unit\": \"breaths/min\", \"system\"\
        : \"http://unitsofmeasure.org\", \"code\": \"/min\" }\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"id\": \"sleep\",\n        \"status\": \"final\",\n        \"code\": {\n          \"\
        coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"107145-5\", \"display\": \"Sleep status\" }]\n        },\n\
        \        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"device\": { \"\
        reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\": \"2026-04-22T10:00:00.000Z\"\
        ,\n        \"valueCodeableConcept\": { \"text\": \"asleep\" }\n      }\n    }\n  ]\n}\n```\n"
      operationId: FhirController_getDeviceTelemetry[0]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Device id whose latest telemetry observations should be returned.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTelemetryResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get device telemetry
      tags:
      - FHIR Operations
  /fhir/R4/Device/{id}/telemetry:
    get:
      description: "Returns the current effective telemetry for a device as a FHIR searchset Bundle of Observations, derived\
        \ from the device's state machine snapshot. One Observation per metric is included: presence, heart rate (when a fresh\
        \ value is cached), respiratory rate (when a fresh value is cached), and sleep status. Each Observation uses its own\
        \ `effectiveInstant` so clients can reason about staleness per metric.\n\n## Example cURL request\n\n```bash\ncurl\
        \ -X GET \\\n 'https://api.dev.ovok.com/fhir/R4/Device/87ea5dfc-8b8e-384d-8489-79496e706390/telemetry' \\\n -H 'Authorization:\
        \ Bearer <token>'\n```\n\n## Example JSON response\n\n```json\n{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"\
        searchset\",\n  \"total\": 4,\n  \"entry\": [\n    {\n      \"resource\": {\n        \"resourceType\": \"Observation\"\
        ,\n        \"id\": \"presence\",\n        \"status\": \"final\",\n        \"code\": {\n          \"coding\": [\n \
        \           {\n              \"system\": \"https://sleepiz.com/fhir/CodeSystem/observation-codes\",\n            \
        \  \"code\": \"presence-detection\",\n              \"display\": \"Presence detection\"\n            }\n         \
        \ ]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n      \
        \  \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\":\
        \ \"2026-04-22T10:00:00.000Z\",\n        \"valueBoolean\": true\n      }\n    },\n    {\n      \"resource\": {\n \
        \       \"resourceType\": \"Observation\",\n        \"id\": \"heartRate\",\n        \"status\": \"final\",\n     \
        \   \"code\": {\n          \"coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"8867-4\", \"display\": \"\
        Heart rate\" }]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\"\
        \ },\n        \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\"\
        : \"2026-04-22T10:00:00.000Z\",\n        \"valueQuantity\": { \"value\": 72, \"unit\": \"beats/min\", \"system\":\
        \ \"http://unitsofmeasure.org\", \"code\": \"/min\" }\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"id\": \"respiratoryRate\",\n        \"status\": \"final\",\n        \"code\": {\n  \
        \        \"coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"9279-1\", \"display\": \"Respiratory rate\"\
        \ }]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n     \
        \   \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\"\
        : \"2026-04-22T10:00:00.000Z\",\n        \"valueQuantity\": { \"value\": 14, \"unit\": \"breaths/min\", \"system\"\
        : \"http://unitsofmeasure.org\", \"code\": \"/min\" }\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"id\": \"sleep\",\n        \"status\": \"final\",\n        \"code\": {\n          \"\
        coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"107145-5\", \"display\": \"Sleep status\" }]\n        },\n\
        \        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"device\": { \"\
        reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\": \"2026-04-22T10:00:00.000Z\"\
        ,\n        \"valueCodeableConcept\": { \"text\": \"asleep\" }\n      }\n    }\n  ]\n}\n```\n"
      operationId: FhirController_getDeviceTelemetry[1]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Device id whose latest telemetry observations should be returned.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTelemetryResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get device telemetry
      tags:
      - FHIR Operations
  /fhir/R5/Device/{id}/telemetry:
    get:
      description: "Returns the current effective telemetry for a device as a FHIR searchset Bundle of Observations, derived\
        \ from the device's state machine snapshot. One Observation per metric is included: presence, heart rate (when a fresh\
        \ value is cached), respiratory rate (when a fresh value is cached), and sleep status. Each Observation uses its own\
        \ `effectiveInstant` so clients can reason about staleness per metric.\n\n## Example cURL request\n\n```bash\ncurl\
        \ -X GET \\\n 'https://api.dev.ovok.com/fhir/R4/Device/87ea5dfc-8b8e-384d-8489-79496e706390/telemetry' \\\n -H 'Authorization:\
        \ Bearer <token>'\n```\n\n## Example JSON response\n\n```json\n{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"\
        searchset\",\n  \"total\": 4,\n  \"entry\": [\n    {\n      \"resource\": {\n        \"resourceType\": \"Observation\"\
        ,\n        \"id\": \"presence\",\n        \"status\": \"final\",\n        \"code\": {\n          \"coding\": [\n \
        \           {\n              \"system\": \"https://sleepiz.com/fhir/CodeSystem/observation-codes\",\n            \
        \  \"code\": \"presence-detection\",\n              \"display\": \"Presence detection\"\n            }\n         \
        \ ]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n      \
        \  \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\":\
        \ \"2026-04-22T10:00:00.000Z\",\n        \"valueBoolean\": true\n      }\n    },\n    {\n      \"resource\": {\n \
        \       \"resourceType\": \"Observation\",\n        \"id\": \"heartRate\",\n        \"status\": \"final\",\n     \
        \   \"code\": {\n          \"coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"8867-4\", \"display\": \"\
        Heart rate\" }]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\"\
        \ },\n        \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\"\
        : \"2026-04-22T10:00:00.000Z\",\n        \"valueQuantity\": { \"value\": 72, \"unit\": \"beats/min\", \"system\":\
        \ \"http://unitsofmeasure.org\", \"code\": \"/min\" }\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"id\": \"respiratoryRate\",\n        \"status\": \"final\",\n        \"code\": {\n  \
        \        \"coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"9279-1\", \"display\": \"Respiratory rate\"\
        \ }]\n        },\n        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n     \
        \   \"device\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\"\
        : \"2026-04-22T10:00:00.000Z\",\n        \"valueQuantity\": { \"value\": 14, \"unit\": \"breaths/min\", \"system\"\
        : \"http://unitsofmeasure.org\", \"code\": \"/min\" }\n      }\n    },\n    {\n      \"resource\": {\n        \"resourceType\"\
        : \"Observation\",\n        \"id\": \"sleep\",\n        \"status\": \"final\",\n        \"code\": {\n          \"\
        coding\": [{ \"system\": \"http://loinc.org\", \"code\": \"107145-5\", \"display\": \"Sleep status\" }]\n        },\n\
        \        \"subject\": { \"reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"device\": { \"\
        reference\": \"Device/87ea5dfc-8b8e-384d-8489-79496e706390\" },\n        \"effectiveInstant\": \"2026-04-22T10:00:00.000Z\"\
        ,\n        \"valueCodeableConcept\": { \"text\": \"asleep\" }\n      }\n    }\n  ]\n}\n```\n"
      operationId: FhirController_getDeviceTelemetry[2]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Device id whose latest telemetry observations should be returned.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTelemetryResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get device telemetry
      tags:
      - FHIR Operations
  /fhir/Observation/{id}:
    get:
      description: Custom operation on `Observation/:id`. Set `?asTimeseries=true` to get a JSON time-series instead of the
        raw FHIR resource. Useful for plotting Observations whose values are stored as `valueSampledData` (ECG traces, accelerometer
        streams, contiguous vital-sign batches). Requests without the flag pass through to the standard FHIR GET.
      operationId: FhirController_getObservationOrTimeseries[0]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Observation id. The resource must carry `valueSampledData` (top-level or in a `component[]`) for
          the timeseries expansion to succeed.
        schema:
          type: string
      - name: asTimeseries
        required: false
        in: query
        description: Set to `true` to expand the Observation's SampledData into a JSON `{t, v}` time-series. Omit or set to
          anything else to pass through to the standard FHIR GET-by-id.
        schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObservationTimeseriesResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Expand Observation SampledData to a {t,v} time-series
      tags:
      - FHIR Operations
  /fhir/R4/Observation/{id}:
    get:
      description: Custom operation on `Observation/:id`. Set `?asTimeseries=true` to get a JSON time-series instead of the
        raw FHIR resource. Useful for plotting Observations whose values are stored as `valueSampledData` (ECG traces, accelerometer
        streams, contiguous vital-sign batches). Requests without the flag pass through to the standard FHIR GET.
      operationId: FhirController_getObservationOrTimeseries[1]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Observation id. The resource must carry `valueSampledData` (top-level or in a `component[]`) for
          the timeseries expansion to succeed.
        schema:
          type: string
      - name: asTimeseries
        required: false
        in: query
        description: Set to `true` to expand the Observation's SampledData into a JSON `{t, v}` time-series. Omit or set to
          anything else to pass through to the standard FHIR GET-by-id.
        schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObservationTimeseriesResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Expand Observation SampledData to a {t,v} time-series
      tags:
      - FHIR Operations
  /fhir/R5/Observation/{id}:
    get:
      description: Custom operation on `Observation/:id`. Set `?asTimeseries=true` to get a JSON time-series instead of the
        raw FHIR resource. Useful for plotting Observations whose values are stored as `valueSampledData` (ECG traces, accelerometer
        streams, contiguous vital-sign batches). Requests without the flag pass through to the standard FHIR GET.
      operationId: FhirController_getObservationOrTimeseries[2]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Observation id. The resource must carry `valueSampledData` (top-level or in a `component[]`) for
          the timeseries expansion to succeed.
        schema:
          type: string
      - name: asTimeseries
        required: false
        in: query
        description: Set to `true` to expand the Observation's SampledData into a JSON `{t, v}` time-series. Omit or set to
          anything else to pass through to the standard FHIR GET-by-id.
        schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObservationTimeseriesResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Expand Observation SampledData to a {t,v} time-series
      tags:
      - FHIR Operations
  /fhir/Device/{id}/telemetry/history:
    get:
      description: Query observation history for a device from Signals. Defaults to the last 72 hours.
      operationId: FhirController_getDeviceTelemetryHistory[0]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Device id whose historical observations should be returned from Signals.
        schema:
          type: string
      - name: from
        required: false
        in: query
        description: ISO-8601 lower bound (inclusive) on observation effective time. Defaults to 72 hours before `to` when
          omitted.
        schema:
          format: date-time
          type: string
      - name: to
        required: false
        in: query
        description: ISO-8601 upper bound (inclusive) on observation effective time. Defaults to now when omitted.
        schema:
          format: date-time
          type: string
      - name: code
        required: false
        in: query
        description: Observation code to filter the history by (e.g. a LOINC or SNOMED code).
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: 1-indexed page number for paginated results. Defaults to `1`.
        schema:
          minimum: 1
          default: 1
          type: integer
      - name: pageSize
        required: false
        in: query
        description: Number of items per page, between 1 and 100. Defaults to `50`.
        schema:
          minimum: 1
          maximum: 100
          default: 50
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTelemetryHistoryResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get device telemetry history
      tags:
      - FHIR Operations
  /fhir/R4/Device/{id}/telemetry/history:
    get:
      description: Query observation history for a device from Signals. Defaults to the last 72 hours.
      operationId: FhirController_getDeviceTelemetryHistory[1]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Device id whose historical observations should be returned from Signals.
        schema:
          type: string
      - name: from
        required: false
        in: query
        description: ISO-8601 lower bound (inclusive) on observation effective time. Defaults to 72 hours before `to` when
          omitted.
        schema:
          format: date-time
          type: string
      - name: to
        required: false
        in: query
        description: ISO-8601 upper bound (inclusive) on observation effective time. Defaults to now when omitted.
        schema:
          format: date-time
          type: string
      - name: code
        required: false
        in: query
        description: Observation code to filter the history by (e.g. a LOINC or SNOMED code).
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: 1-indexed page number for paginated results. Defaults to `1`.
        schema:
          minimum: 1
          default: 1
          type: integer
      - name: pageSize
        required: false
        in: query
        description: Number of items per page, between 1 and 100. Defaults to `50`.
        schema:
          minimum: 1
          maximum: 100
          default: 50
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTelemetryHistoryResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get device telemetry history
      tags:
      - FHIR Operations
  /fhir/R5/Device/{id}/telemetry/history:
    get:
      description: Query observation history for a device from Signals. Defaults to the last 72 hours.
      operationId: FhirController_getDeviceTelemetryHistory[2]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Device id whose historical observations should be returned from Signals.
        schema:
          type: string
      - name: from
        required: false
        in: query
        description: ISO-8601 lower bound (inclusive) on observation effective time. Defaults to 72 hours before `to` when
          omitted.
        schema:
          format: date-time
          type: string
      - name: to
        required: false
        in: query
        description: ISO-8601 upper bound (inclusive) on observation effective time. Defaults to now when omitted.
        schema:
          format: date-time
          type: string
      - name: code
        required: false
        in: query
        description: Observation code to filter the history by (e.g. a LOINC or SNOMED code).
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: 1-indexed page number for paginated results. Defaults to `1`.
        schema:
          minimum: 1
          default: 1
          type: integer
      - name: pageSize
        required: false
        in: query
        description: Number of items per page, between 1 and 100. Defaults to `50`.
        schema:
          minimum: 1
          maximum: 100
          default: 50
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTelemetryHistoryResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Get device telemetry history
      tags:
      - FHIR Operations
  /fhir/Patient:
    post:
      description: Create a FHIR Patient resource. When withSignals=true, also provisions a corresponding Signals patient.
      operationId: FhirController_createPatient[0]
      parameters:
      - name: withSignals
        required: false
        in: query
        description: Set to `true` to also provision a matching Signals patient alongside the FHIR Patient. Defaults to `false`.
        schema:
          default: false
          type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Create Patient with Signals linking
      tags:
      - FHIR Operations
  /fhir/R4/Patient:
    post:
      description: Create a FHIR Patient resource. When withSignals=true, also provisions a corresponding Signals patient.
      operationId: FhirController_createPatient[1]
      parameters:
      - name: withSignals
        required: false
        in: query
        description: Set to `true` to also provision a matching Signals patient alongside the FHIR Patient. Defaults to `false`.
        schema:
          default: false
          type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Create Patient with Signals linking
      tags:
      - FHIR Operations
  /fhir/R5/Patient:
    post:
      description: Create a FHIR Patient resource. When withSignals=true, also provisions a corresponding Signals patient.
      operationId: FhirController_createPatient[2]
      parameters:
      - name: withSignals
        required: false
        in: query
        description: Set to `true` to also provision a matching Signals patient alongside the FHIR Patient. Defaults to `false`.
        schema:
          default: false
          type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Create Patient with Signals linking
      tags:
      - FHIR Operations
  /fhir/Patient/{id}/threshold:
    put:
      description: Save a patient-level threshold CarePlan. When updateOnSignals=true, also pushes the configuration to Signals.
      operationId: FhirController_updatePatientThreshold[0]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Patient id whose threshold CarePlan should be created or updated.
        schema:
          type: string
      - name: updateOnSignals
        required: false
        in: query
        description: Set to `true` to also push the updated threshold configuration to Signals. Defaults to `false`.
        schema:
          default: false
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientThresholdBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientThresholdResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Update patient threshold
      tags:
      - FHIR Operations
  /fhir/R4/Patient/{id}/threshold:
    put:
      description: Save a patient-level threshold CarePlan. When updateOnSignals=true, also pushes the configuration to Signals.
      operationId: FhirController_updatePatientThreshold[1]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Patient id whose threshold CarePlan should be created or updated.
        schema:
          type: string
      - name: updateOnSignals
        required: false
        in: query
        description: Set to `true` to also push the updated threshold configuration to Signals. Defaults to `false`.
        schema:
          default: false
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientThresholdBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientThresholdResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Update patient threshold
      tags:
      - FHIR Operations
  /fhir/R5/Patient/{id}/threshold:
    put:
      description: Save a patient-level threshold CarePlan. When updateOnSignals=true, also pushes the configuration to Signals.
      operationId: FhirController_updatePatientThreshold[2]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Patient id whose threshold CarePlan should be created or updated.
        schema:
          type: string
      - name: updateOnSignals
        required: false
        in: query
        description: Set to `true` to also push the updated threshold configuration to Signals. Defaults to `false`.
        schema:
          default: false
          type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientThresholdBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientThresholdResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Update patient threshold
      tags:
      - FHIR Operations
  /fhir/Questionnaire/{id}/$populate:
    post:
      description: "This endpoint builds a FHIR QuestionnaireResponse based on provided questionnaire, patient and context.\n\
        \nHere is an example questionnaire and its usage to generate a questionnaire response.\n\nThe questionnaire has some\
        \ variables fetched at runtime:\n\n- `ObsBodyHeight` which is the result of the following query: `Observation?code=8302-2&_count=1&_sort=-date&patient=Patient/{{%patient.id}}`.\n\
        - `patient` which is the patient reference that is fetched at runtime with `launchContext`.\n\nThe other variables\
        \ can be sent from the client side in the request body if desired. See the example request body for more information.\n\
        \n`patient-height` and `patient-weight` are the linkIds of the questionnaire items that will be populated with the\
        \ fetched values and they will be used in the generated questionnaire response.\n\n### Example questionnaire\n\n```json\n\
        {\n  \"resourceType\": \"Questionnaire\",\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\"\
        ,\n      \"valueExpression\": {\n        \"name\": \"ObsBodyHeight\",\n        \"language\": \"application/x-fhir-query\"\
        ,\n        \"expression\": \"Observation?code=8302-2&_count=1&_sort=-date&patient=Patient/patientId\n      }\n   \
        \ },\n    {\n      \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext\",\n\
        \      \"extension\": [\n        {\n          \"url\": \"name\",\n          \"valueCoding\": {\n            \"system\"\
        : \"http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext\",\n            \"code\": \"patient\"\n          }\n     \
        \   },\n        {\n          \"url\": \"type\",\n          \"valueCode\": \"Patient\"\n        },\n        {\n   \
        \       \"url\": \"description\",\n          \"valueString\": \"The patient that is to be used to pre-populate the\
        \ form\"\n        }\n      ]\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap\"\
        ,\n      \"valueCanonical\": \"https://smartforms.csiro.au/docs/StructureMap/extract-bmi\"\n    }\n  ],\n  \"url\"\
        : \"https://fhir.ovok.com/fhir/R4/Questionnaire/example-questionnaire-id\",\n  \"version\": \"0.1.0\",\n  \"name\"\
        : \"CalculatedExpressionBMICalculatorPrepop\",\n  \"title\": \"CalculatedExpression BMI Calculator - Pre-population\"\
        ,\n  \"status\": \"draft\",\n  \"date\": \"2024-12-18\",\n  \"publisher\": \"AEHRC CSIRO\",\n  \"item\": [\n    {\n\
        \      \"extension\": [\n        {\n          \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\",\n   \
        \       \"valueExpression\": {\n            \"name\": \"height\",\n            \"language\": \"text/fhirpath\",\n\
        \            // NOTE: Here it's accessing the global variables\n            // NOTE: Instead you can also use the\
        \ fetched Observation resource with %ObsBodyHeight.entry.resource.valueQuantity.value, and you don't need to use it\
        \ in the request body anymore, however this would mean that the result is coming from the server and not from the\
        \ client (Patient).\n            \"expression\": \"%response.item.where(linkId='bmi-calculation').item.where(linkId='patient-height').answer.valueDecimal\"\
        \n          }\n        },\n        {\n          \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\",\n \
        \         \"valueExpression\": {\n            \"name\": \"weight\",\n            \"language\": \"text/fhirpath\",\n\
        \            // NOTE: Here it's accessing the locally available context\n            \"expression\": \"item.where(linkId='patient-weight').answer.valueDecimal\"\
        \n          }\n        }\n      ],\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n\
        \      \"type\": \"group\",\n      \"repeats\": false,\n      \"item\": [\n        {\n          \"linkId\": \"patient-height\"\
        ,\n          \"text\": \"Height\",\n          \"type\": \"decimal\",\n          \"repeats\": false,\n          \"\
        readOnly\": false\n        },\n        {\n          \"linkId\": \"patient-weight\",\n          \"text\": \"Weight\"\
        ,\n          \"type\": \"decimal\",\n          \"repeats\": false,\n          \"readOnly\": false\n        },\n  \
        \      {\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression\"\
        ,\n              \"valueExpression\": {\n                \"description\": \"BMI calculation\",\n                \"\
        language\": \"text/fhirpath\",\n                \"expression\": \"(%weight/((%height/100).power(2))).round(1)\"\n\
        \              }\n            },\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-unit\"\
        ,\n              \"valueCoding\": {\n                \"system\": \"http://unitsofmeasure.org\",\n                \"\
        code\": \"kg/m2\",\n                \"display\": \"kg/m2\"\n              }\n            },\n            {\n     \
        \         \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract\",\n    \
        \          \"valueBoolean\": true\n            }\n          ],\n          \"linkId\": \"bmi-result\",\n          \"\
        code\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"60621009\"\
        ,\n              \"display\": \"Body mass index\"\n            }\n          ],\n          \"text\": \"Value\",\n \
        \         \"type\": \"decimal\",\n          \"repeats\": false,\n          \"readOnly\": true\n        }\n      ]\n\
        \    }\n  ],\n  \"id\": \"example-questionnaire-id\"\n}\n```\n\n### Example request body\n\n```json\n{\n  \"resourceType\"\
        : \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"context\",\n      \"part\": [\n        {\n       \
        \   \"name\": \"name\",\n          \"valueString\": \"myCustomVariableName\"\n        },\n        {\n          \"\
        name\": \"content\",\n          \"resource\": {\n            // NOTE: This can be accessed within the questionnaire\
        \ response with %context.myCustomVariableName.myCustomDataKey\n            \"myCustomDataKey\": \"myCustomDataValue\"\
        \n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"response\",\n      \"resource\": {\n        \"\
        resourceType\": \"QuestionnaireResponse\",\n        \"status\": \"in-progress\",\n        \"item\": [\n          {\n\
        \            \"linkId\": \"bmi-calculation\",\n            \"text\": \"BMI Calculation\",\n            \"item\": [\n\
        \              {\n                \"linkId\": \"patient-height\",\n                \"text\": \"Height\",\n       \
        \         \"answer\": [\n                  {\n                    // NOTE: You can also use the value of this item\
        \ in the questionnaire response with %response.item.where(linkId='patient-height').answer.valueDecimal\n         \
        \           // OR directly use without the global context with item.where(linkId='patient-height').answer.valueDecimal\n\
        \                    \"valueDecimal\": 175\n                  }\n                ]\n              },\n           \
        \   {\n                \"linkId\": \"patient-weight\",\n                \"text\": \"Weight\",\n                \"\
        answer\": [\n                  {\n                    \"valueDecimal\": 100\n                  }\n               \
        \ ]\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Example cURL request\n\
        \n```bash\ncurl -X POST \\\n --url 'https://api.dev.ovok.com/fhir/Questionnaire/example-questionnaire-id/$populate'\
        \ \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\
        \ \\\n -H 'Content-Type: application/json' \\\n -d @populate-body.json # @populate-body.json is the request body from\
        \ the previous example\n```\n\n### Example response, which is either a QuestionnaireResponse or an OperationOutcome\
        \ (error)\n\n```json\n{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"status\": \"in-progress\",\n  \"item\"\
        : [\n    {\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n      \"item\": [\n    \
        \    {\n          \"linkId\": \"patient-height\",\n          \"text\": \"Height\",\n          \"answer\": [\n    \
        \        {\n              \"valueDecimal\": 175\n            }\n          ]\n        },\n        {\n          \"linkId\"\
        : \"patient-weight\",\n          \"text\": \"Weight\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 100\n            }\n          ]\n        },\n        {\n          \"linkId\": \"bmi-result\",\n          \"answer\"\
        : [\n            {\n              \"valueDecimal\": 32.7\n            }\n          ],\n          \"text\": \"Value\"\
        \n        }\n      ]\n    }\n  ]\n}\n```\n\nNow you can use the response (QuestionnaireResponse) and POST it if you\
        \ want to save it to the server.\n"
      operationId: FhirController_populateQuestionnaire[0]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Questionnaire id to pre-fill against the caller's patient context.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PopulateBodyRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PopulateBodyResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Populate questionnaire
      tags:
      - FHIR Operations
  /fhir/R4/Questionnaire/{id}/$populate:
    post:
      description: "This endpoint builds a FHIR QuestionnaireResponse based on provided questionnaire, patient and context.\n\
        \nHere is an example questionnaire and its usage to generate a questionnaire response.\n\nThe questionnaire has some\
        \ variables fetched at runtime:\n\n- `ObsBodyHeight` which is the result of the following query: `Observation?code=8302-2&_count=1&_sort=-date&patient=Patient/{{%patient.id}}`.\n\
        - `patient` which is the patient reference that is fetched at runtime with `launchContext`.\n\nThe other variables\
        \ can be sent from the client side in the request body if desired. See the example request body for more information.\n\
        \n`patient-height` and `patient-weight` are the linkIds of the questionnaire items that will be populated with the\
        \ fetched values and they will be used in the generated questionnaire response.\n\n### Example questionnaire\n\n```json\n\
        {\n  \"resourceType\": \"Questionnaire\",\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\"\
        ,\n      \"valueExpression\": {\n        \"name\": \"ObsBodyHeight\",\n        \"language\": \"application/x-fhir-query\"\
        ,\n        \"expression\": \"Observation?code=8302-2&_count=1&_sort=-date&patient=Patient/patientId\n      }\n   \
        \ },\n    {\n      \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext\",\n\
        \      \"extension\": [\n        {\n          \"url\": \"name\",\n          \"valueCoding\": {\n            \"system\"\
        : \"http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext\",\n            \"code\": \"patient\"\n          }\n     \
        \   },\n        {\n          \"url\": \"type\",\n          \"valueCode\": \"Patient\"\n        },\n        {\n   \
        \       \"url\": \"description\",\n          \"valueString\": \"The patient that is to be used to pre-populate the\
        \ form\"\n        }\n      ]\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap\"\
        ,\n      \"valueCanonical\": \"https://smartforms.csiro.au/docs/StructureMap/extract-bmi\"\n    }\n  ],\n  \"url\"\
        : \"https://fhir.ovok.com/fhir/R4/Questionnaire/example-questionnaire-id\",\n  \"version\": \"0.1.0\",\n  \"name\"\
        : \"CalculatedExpressionBMICalculatorPrepop\",\n  \"title\": \"CalculatedExpression BMI Calculator - Pre-population\"\
        ,\n  \"status\": \"draft\",\n  \"date\": \"2024-12-18\",\n  \"publisher\": \"AEHRC CSIRO\",\n  \"item\": [\n    {\n\
        \      \"extension\": [\n        {\n          \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\",\n   \
        \       \"valueExpression\": {\n            \"name\": \"height\",\n            \"language\": \"text/fhirpath\",\n\
        \            // NOTE: Here it's accessing the global variables\n            // NOTE: Instead you can also use the\
        \ fetched Observation resource with %ObsBodyHeight.entry.resource.valueQuantity.value, and you don't need to use it\
        \ in the request body anymore, however this would mean that the result is coming from the server and not from the\
        \ client (Patient).\n            \"expression\": \"%response.item.where(linkId='bmi-calculation').item.where(linkId='patient-height').answer.valueDecimal\"\
        \n          }\n        },\n        {\n          \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\",\n \
        \         \"valueExpression\": {\n            \"name\": \"weight\",\n            \"language\": \"text/fhirpath\",\n\
        \            // NOTE: Here it's accessing the locally available context\n            \"expression\": \"item.where(linkId='patient-weight').answer.valueDecimal\"\
        \n          }\n        }\n      ],\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n\
        \      \"type\": \"group\",\n      \"repeats\": false,\n      \"item\": [\n        {\n          \"linkId\": \"patient-height\"\
        ,\n          \"text\": \"Height\",\n          \"type\": \"decimal\",\n          \"repeats\": false,\n          \"\
        readOnly\": false\n        },\n        {\n          \"linkId\": \"patient-weight\",\n          \"text\": \"Weight\"\
        ,\n          \"type\": \"decimal\",\n          \"repeats\": false,\n          \"readOnly\": false\n        },\n  \
        \      {\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression\"\
        ,\n              \"valueExpression\": {\n                \"description\": \"BMI calculation\",\n                \"\
        language\": \"text/fhirpath\",\n                \"expression\": \"(%weight/((%height/100).power(2))).round(1)\"\n\
        \              }\n            },\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-unit\"\
        ,\n              \"valueCoding\": {\n                \"system\": \"http://unitsofmeasure.org\",\n                \"\
        code\": \"kg/m2\",\n                \"display\": \"kg/m2\"\n              }\n            },\n            {\n     \
        \         \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract\",\n    \
        \          \"valueBoolean\": true\n            }\n          ],\n          \"linkId\": \"bmi-result\",\n          \"\
        code\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"60621009\"\
        ,\n              \"display\": \"Body mass index\"\n            }\n          ],\n          \"text\": \"Value\",\n \
        \         \"type\": \"decimal\",\n          \"repeats\": false,\n          \"readOnly\": true\n        }\n      ]\n\
        \    }\n  ],\n  \"id\": \"example-questionnaire-id\"\n}\n```\n\n### Example request body\n\n```json\n{\n  \"resourceType\"\
        : \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"context\",\n      \"part\": [\n        {\n       \
        \   \"name\": \"name\",\n          \"valueString\": \"myCustomVariableName\"\n        },\n        {\n          \"\
        name\": \"content\",\n          \"resource\": {\n            // NOTE: This can be accessed within the questionnaire\
        \ response with %context.myCustomVariableName.myCustomDataKey\n            \"myCustomDataKey\": \"myCustomDataValue\"\
        \n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"response\",\n      \"resource\": {\n        \"\
        resourceType\": \"QuestionnaireResponse\",\n        \"status\": \"in-progress\",\n        \"item\": [\n          {\n\
        \            \"linkId\": \"bmi-calculation\",\n            \"text\": \"BMI Calculation\",\n            \"item\": [\n\
        \              {\n                \"linkId\": \"patient-height\",\n                \"text\": \"Height\",\n       \
        \         \"answer\": [\n                  {\n                    // NOTE: You can also use the value of this item\
        \ in the questionnaire response with %response.item.where(linkId='patient-height').answer.valueDecimal\n         \
        \           // OR directly use without the global context with item.where(linkId='patient-height').answer.valueDecimal\n\
        \                    \"valueDecimal\": 175\n                  }\n                ]\n              },\n           \
        \   {\n                \"linkId\": \"patient-weight\",\n                \"text\": \"Weight\",\n                \"\
        answer\": [\n                  {\n                    \"valueDecimal\": 100\n                  }\n               \
        \ ]\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Example cURL request\n\
        \n```bash\ncurl -X POST \\\n --url 'https://api.dev.ovok.com/fhir/Questionnaire/example-questionnaire-id/$populate'\
        \ \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\
        \ \\\n -H 'Content-Type: application/json' \\\n -d @populate-body.json # @populate-body.json is the request body from\
        \ the previous example\n```\n\n### Example response, which is either a QuestionnaireResponse or an OperationOutcome\
        \ (error)\n\n```json\n{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"status\": \"in-progress\",\n  \"item\"\
        : [\n    {\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n      \"item\": [\n    \
        \    {\n          \"linkId\": \"patient-height\",\n          \"text\": \"Height\",\n          \"answer\": [\n    \
        \        {\n              \"valueDecimal\": 175\n            }\n          ]\n        },\n        {\n          \"linkId\"\
        : \"patient-weight\",\n          \"text\": \"Weight\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 100\n            }\n          ]\n        },\n        {\n          \"linkId\": \"bmi-result\",\n          \"answer\"\
        : [\n            {\n              \"valueDecimal\": 32.7\n            }\n          ],\n          \"text\": \"Value\"\
        \n        }\n      ]\n    }\n  ]\n}\n```\n\nNow you can use the response (QuestionnaireResponse) and POST it if you\
        \ want to save it to the server.\n"
      operationId: FhirController_populateQuestionnaire[1]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Questionnaire id to pre-fill against the caller's patient context.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PopulateBodyRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PopulateBodyResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Populate questionnaire
      tags:
      - FHIR Operations
  /fhir/R5/Questionnaire/{id}/$populate:
    post:
      description: "This endpoint builds a FHIR QuestionnaireResponse based on provided questionnaire, patient and context.\n\
        \nHere is an example questionnaire and its usage to generate a questionnaire response.\n\nThe questionnaire has some\
        \ variables fetched at runtime:\n\n- `ObsBodyHeight` which is the result of the following query: `Observation?code=8302-2&_count=1&_sort=-date&patient=Patient/{{%patient.id}}`.\n\
        - `patient` which is the patient reference that is fetched at runtime with `launchContext`.\n\nThe other variables\
        \ can be sent from the client side in the request body if desired. See the example request body for more information.\n\
        \n`patient-height` and `patient-weight` are the linkIds of the questionnaire items that will be populated with the\
        \ fetched values and they will be used in the generated questionnaire response.\n\n### Example questionnaire\n\n```json\n\
        {\n  \"resourceType\": \"Questionnaire\",\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\"\
        ,\n      \"valueExpression\": {\n        \"name\": \"ObsBodyHeight\",\n        \"language\": \"application/x-fhir-query\"\
        ,\n        \"expression\": \"Observation?code=8302-2&_count=1&_sort=-date&patient=Patient/patientId\n      }\n   \
        \ },\n    {\n      \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext\",\n\
        \      \"extension\": [\n        {\n          \"url\": \"name\",\n          \"valueCoding\": {\n            \"system\"\
        : \"http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext\",\n            \"code\": \"patient\"\n          }\n     \
        \   },\n        {\n          \"url\": \"type\",\n          \"valueCode\": \"Patient\"\n        },\n        {\n   \
        \       \"url\": \"description\",\n          \"valueString\": \"The patient that is to be used to pre-populate the\
        \ form\"\n        }\n      ]\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap\"\
        ,\n      \"valueCanonical\": \"https://smartforms.csiro.au/docs/StructureMap/extract-bmi\"\n    }\n  ],\n  \"url\"\
        : \"https://fhir.ovok.com/fhir/R4/Questionnaire/example-questionnaire-id\",\n  \"version\": \"0.1.0\",\n  \"name\"\
        : \"CalculatedExpressionBMICalculatorPrepop\",\n  \"title\": \"CalculatedExpression BMI Calculator - Pre-population\"\
        ,\n  \"status\": \"draft\",\n  \"date\": \"2024-12-18\",\n  \"publisher\": \"AEHRC CSIRO\",\n  \"item\": [\n    {\n\
        \      \"extension\": [\n        {\n          \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\",\n   \
        \       \"valueExpression\": {\n            \"name\": \"height\",\n            \"language\": \"text/fhirpath\",\n\
        \            // NOTE: Here it's accessing the global variables\n            // NOTE: Instead you can also use the\
        \ fetched Observation resource with %ObsBodyHeight.entry.resource.valueQuantity.value, and you don't need to use it\
        \ in the request body anymore, however this would mean that the result is coming from the server and not from the\
        \ client (Patient).\n            \"expression\": \"%response.item.where(linkId='bmi-calculation').item.where(linkId='patient-height').answer.valueDecimal\"\
        \n          }\n        },\n        {\n          \"url\": \"http://hl7.org/fhir/StructureDefinition/variable\",\n \
        \         \"valueExpression\": {\n            \"name\": \"weight\",\n            \"language\": \"text/fhirpath\",\n\
        \            // NOTE: Here it's accessing the locally available context\n            \"expression\": \"item.where(linkId='patient-weight').answer.valueDecimal\"\
        \n          }\n        }\n      ],\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n\
        \      \"type\": \"group\",\n      \"repeats\": false,\n      \"item\": [\n        {\n          \"linkId\": \"patient-height\"\
        ,\n          \"text\": \"Height\",\n          \"type\": \"decimal\",\n          \"repeats\": false,\n          \"\
        readOnly\": false\n        },\n        {\n          \"linkId\": \"patient-weight\",\n          \"text\": \"Weight\"\
        ,\n          \"type\": \"decimal\",\n          \"repeats\": false,\n          \"readOnly\": false\n        },\n  \
        \      {\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression\"\
        ,\n              \"valueExpression\": {\n                \"description\": \"BMI calculation\",\n                \"\
        language\": \"text/fhirpath\",\n                \"expression\": \"(%weight/((%height/100).power(2))).round(1)\"\n\
        \              }\n            },\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-unit\"\
        ,\n              \"valueCoding\": {\n                \"system\": \"http://unitsofmeasure.org\",\n                \"\
        code\": \"kg/m2\",\n                \"display\": \"kg/m2\"\n              }\n            },\n            {\n     \
        \         \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationExtract\",\n    \
        \          \"valueBoolean\": true\n            }\n          ],\n          \"linkId\": \"bmi-result\",\n          \"\
        code\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"60621009\"\
        ,\n              \"display\": \"Body mass index\"\n            }\n          ],\n          \"text\": \"Value\",\n \
        \         \"type\": \"decimal\",\n          \"repeats\": false,\n          \"readOnly\": true\n        }\n      ]\n\
        \    }\n  ],\n  \"id\": \"example-questionnaire-id\"\n}\n```\n\n### Example request body\n\n```json\n{\n  \"resourceType\"\
        : \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"context\",\n      \"part\": [\n        {\n       \
        \   \"name\": \"name\",\n          \"valueString\": \"myCustomVariableName\"\n        },\n        {\n          \"\
        name\": \"content\",\n          \"resource\": {\n            // NOTE: This can be accessed within the questionnaire\
        \ response with %context.myCustomVariableName.myCustomDataKey\n            \"myCustomDataKey\": \"myCustomDataValue\"\
        \n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"response\",\n      \"resource\": {\n        \"\
        resourceType\": \"QuestionnaireResponse\",\n        \"status\": \"in-progress\",\n        \"item\": [\n          {\n\
        \            \"linkId\": \"bmi-calculation\",\n            \"text\": \"BMI Calculation\",\n            \"item\": [\n\
        \              {\n                \"linkId\": \"patient-height\",\n                \"text\": \"Height\",\n       \
        \         \"answer\": [\n                  {\n                    // NOTE: You can also use the value of this item\
        \ in the questionnaire response with %response.item.where(linkId='patient-height').answer.valueDecimal\n         \
        \           // OR directly use without the global context with item.where(linkId='patient-height').answer.valueDecimal\n\
        \                    \"valueDecimal\": 175\n                  }\n                ]\n              },\n           \
        \   {\n                \"linkId\": \"patient-weight\",\n                \"text\": \"Weight\",\n                \"\
        answer\": [\n                  {\n                    \"valueDecimal\": 100\n                  }\n               \
        \ ]\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n\n### Example cURL request\n\
        \n```bash\ncurl -X POST \\\n --url 'https://api.dev.ovok.com/fhir/Questionnaire/example-questionnaire-id/$populate'\
        \ \\\n -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\
        \ \\\n -H 'Content-Type: application/json' \\\n -d @populate-body.json # @populate-body.json is the request body from\
        \ the previous example\n```\n\n### Example response, which is either a QuestionnaireResponse or an OperationOutcome\
        \ (error)\n\n```json\n{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"status\": \"in-progress\",\n  \"item\"\
        : [\n    {\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n      \"item\": [\n    \
        \    {\n          \"linkId\": \"patient-height\",\n          \"text\": \"Height\",\n          \"answer\": [\n    \
        \        {\n              \"valueDecimal\": 175\n            }\n          ]\n        },\n        {\n          \"linkId\"\
        : \"patient-weight\",\n          \"text\": \"Weight\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 100\n            }\n          ]\n        },\n        {\n          \"linkId\": \"bmi-result\",\n          \"answer\"\
        : [\n            {\n              \"valueDecimal\": 32.7\n            }\n          ],\n          \"text\": \"Value\"\
        \n        }\n      ]\n    }\n  ]\n}\n```\n\nNow you can use the response (QuestionnaireResponse) and POST it if you\
        \ want to save it to the server.\n"
      operationId: FhirController_populateQuestionnaire[2]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR Questionnaire id to pre-fill against the caller's patient context.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PopulateBodyRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PopulateBodyResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Populate questionnaire
      tags:
      - FHIR Operations
  /fhir/QuestionnaireResponse/{id}/$extract:
    post:
      description: "This endpoint builds Observations based on the provided QuestionnaireResponse.\n\nPlease use the `Questionnaire/<id>/$populate`\
        \ endpoint to get the QuestionnaireResponse first, save it and then use the id of the saved QuestionnaireResponse\
        \ in this endpoint.\n\n### Example questionnaire response resource in the database\n\n```json\n{\n  \"resourceType\"\
        : \"QuestionnaireResponse\",\n  \"status\": \"in-progress\",\n  \"questionnaire\": \"https://fhir.ovok.com/fhir/R4/Questionnaire/59d9a1ce-008c-4e4f-97fb-ef598d3f2c34|0.1.0\"\
        ,\n  \"item\": [\n    {\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n      \"item\"\
        : [\n        {\n          \"linkId\": \"bmi-result\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 32.7\n            }\n          ],\n          \"text\": \"Value\"\n        },\n        {\n          \"linkId\": \"\
        patient-height\",\n          \"text\": \"Height\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 175\n            }\n          ]\n        },\n        {\n          \"linkId\": \"patient-weight\",\n          \"\
        text\": \"Weight\",\n          \"answer\": [\n            {\n              \"valueDecimal\": 100\n            }\n\
        \          ]\n        }\n      ]\n    }\n  ],\n  \"subject\": {\n    \"type\": \"Patient\",\n    \"reference\": \"\
        Patient/1684f841-953a-41c2-a298-64af08945349\"\n  },\n  \"id\": \"example-questionnaire-response-id\"\n}\n```\n\n\
        Given that the above questionnaire response is saved in the database, you can use the id of the questionnaire response\
        \ in this endpoint to extract the Observations.\n\n### Example request\n\n```bash\ncurl -X POST \\\n  --url 'https://api.dev.ovok.com/QuestionnaireResponse/example-questionnaire-response-id/$extract'\
        \ \\\n  --header 'Authorization: Bearer example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\n\
        ```\n\n### Example response containing a bundle of Observations (wrapped in a Parameter resource)\n\n```json\n{\n\
        \  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"response\",\n      \"resource\"\
        : {\n        \"resourceType\": \"Bundle\",\n        \"type\": \"transaction\",\n        \"entry\": [\n          {\n\
        \            \"request\": {\n              \"method\": \"POST\",\n              \"url\": \"Observation\"\n       \
        \     },\n            \"resource\": {\n              \"resourceType\": \"Observation\",\n              \"status\"\
        : \"final\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"\
        system\": \"http://snomed.info/sct\",\n                    \"code\": \"60621009\",\n                    \"display\"\
        : \"Body mass index\"\n                  }\n                ]\n              },\n              \"subject\": {\n  \
        \              \"type\": \"Patient\",\n                \"reference\": \"Patient/1684f841-953a-41c2-a298-64af08945349\"\
        \n              },\n              \"derivedFrom\": [\n                {\n                  \"reference\": \"QuestionnaireResponse/26073103-8a48-4fed-8f38-b1b1e39f4083\"\
        \n                }\n              ],\n              \"valueQuantity\": {\n                \"value\": 32.7\n     \
        \         }\n            }\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n"
      operationId: FhirController_extractObservationsFromQuestionnaireResponse[0]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR QuestionnaireResponse id to extract Observations (and other resources) from.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractBodyResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Extract observations from questionnaire response
      tags:
      - FHIR Operations
  /fhir/R4/QuestionnaireResponse/{id}/$extract:
    post:
      description: "This endpoint builds Observations based on the provided QuestionnaireResponse.\n\nPlease use the `Questionnaire/<id>/$populate`\
        \ endpoint to get the QuestionnaireResponse first, save it and then use the id of the saved QuestionnaireResponse\
        \ in this endpoint.\n\n### Example questionnaire response resource in the database\n\n```json\n{\n  \"resourceType\"\
        : \"QuestionnaireResponse\",\n  \"status\": \"in-progress\",\n  \"questionnaire\": \"https://fhir.ovok.com/fhir/R4/Questionnaire/59d9a1ce-008c-4e4f-97fb-ef598d3f2c34|0.1.0\"\
        ,\n  \"item\": [\n    {\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n      \"item\"\
        : [\n        {\n          \"linkId\": \"bmi-result\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 32.7\n            }\n          ],\n          \"text\": \"Value\"\n        },\n        {\n          \"linkId\": \"\
        patient-height\",\n          \"text\": \"Height\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 175\n            }\n          ]\n        },\n        {\n          \"linkId\": \"patient-weight\",\n          \"\
        text\": \"Weight\",\n          \"answer\": [\n            {\n              \"valueDecimal\": 100\n            }\n\
        \          ]\n        }\n      ]\n    }\n  ],\n  \"subject\": {\n    \"type\": \"Patient\",\n    \"reference\": \"\
        Patient/1684f841-953a-41c2-a298-64af08945349\"\n  },\n  \"id\": \"example-questionnaire-response-id\"\n}\n```\n\n\
        Given that the above questionnaire response is saved in the database, you can use the id of the questionnaire response\
        \ in this endpoint to extract the Observations.\n\n### Example request\n\n```bash\ncurl -X POST \\\n  --url 'https://api.dev.ovok.com/QuestionnaireResponse/example-questionnaire-response-id/$extract'\
        \ \\\n  --header 'Authorization: Bearer example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\n\
        ```\n\n### Example response containing a bundle of Observations (wrapped in a Parameter resource)\n\n```json\n{\n\
        \  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"response\",\n      \"resource\"\
        : {\n        \"resourceType\": \"Bundle\",\n        \"type\": \"transaction\",\n        \"entry\": [\n          {\n\
        \            \"request\": {\n              \"method\": \"POST\",\n              \"url\": \"Observation\"\n       \
        \     },\n            \"resource\": {\n              \"resourceType\": \"Observation\",\n              \"status\"\
        : \"final\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"\
        system\": \"http://snomed.info/sct\",\n                    \"code\": \"60621009\",\n                    \"display\"\
        : \"Body mass index\"\n                  }\n                ]\n              },\n              \"subject\": {\n  \
        \              \"type\": \"Patient\",\n                \"reference\": \"Patient/1684f841-953a-41c2-a298-64af08945349\"\
        \n              },\n              \"derivedFrom\": [\n                {\n                  \"reference\": \"QuestionnaireResponse/26073103-8a48-4fed-8f38-b1b1e39f4083\"\
        \n                }\n              ],\n              \"valueQuantity\": {\n                \"value\": 32.7\n     \
        \         }\n            }\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n"
      operationId: FhirController_extractObservationsFromQuestionnaireResponse[1]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR QuestionnaireResponse id to extract Observations (and other resources) from.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractBodyResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Extract observations from questionnaire response
      tags:
      - FHIR Operations
  /fhir/R5/QuestionnaireResponse/{id}/$extract:
    post:
      description: "This endpoint builds Observations based on the provided QuestionnaireResponse.\n\nPlease use the `Questionnaire/<id>/$populate`\
        \ endpoint to get the QuestionnaireResponse first, save it and then use the id of the saved QuestionnaireResponse\
        \ in this endpoint.\n\n### Example questionnaire response resource in the database\n\n```json\n{\n  \"resourceType\"\
        : \"QuestionnaireResponse\",\n  \"status\": \"in-progress\",\n  \"questionnaire\": \"https://fhir.ovok.com/fhir/R4/Questionnaire/59d9a1ce-008c-4e4f-97fb-ef598d3f2c34|0.1.0\"\
        ,\n  \"item\": [\n    {\n      \"linkId\": \"bmi-calculation\",\n      \"text\": \"BMI Calculation\",\n      \"item\"\
        : [\n        {\n          \"linkId\": \"bmi-result\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 32.7\n            }\n          ],\n          \"text\": \"Value\"\n        },\n        {\n          \"linkId\": \"\
        patient-height\",\n          \"text\": \"Height\",\n          \"answer\": [\n            {\n              \"valueDecimal\"\
        : 175\n            }\n          ]\n        },\n        {\n          \"linkId\": \"patient-weight\",\n          \"\
        text\": \"Weight\",\n          \"answer\": [\n            {\n              \"valueDecimal\": 100\n            }\n\
        \          ]\n        }\n      ]\n    }\n  ],\n  \"subject\": {\n    \"type\": \"Patient\",\n    \"reference\": \"\
        Patient/1684f841-953a-41c2-a298-64af08945349\"\n  },\n  \"id\": \"example-questionnaire-response-id\"\n}\n```\n\n\
        Given that the above questionnaire response is saved in the database, you can use the id of the questionnaire response\
        \ in this endpoint to extract the Observations.\n\n### Example request\n\n```bash\ncurl -X POST \\\n  --url 'https://api.dev.ovok.com/QuestionnaireResponse/example-questionnaire-response-id/$extract'\
        \ \\\n  --header 'Authorization: Bearer example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY'\n\
        ```\n\n### Example response containing a bundle of Observations (wrapped in a Parameter resource)\n\n```json\n{\n\
        \  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"response\",\n      \"resource\"\
        : {\n        \"resourceType\": \"Bundle\",\n        \"type\": \"transaction\",\n        \"entry\": [\n          {\n\
        \            \"request\": {\n              \"method\": \"POST\",\n              \"url\": \"Observation\"\n       \
        \     },\n            \"resource\": {\n              \"resourceType\": \"Observation\",\n              \"status\"\
        : \"final\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"\
        system\": \"http://snomed.info/sct\",\n                    \"code\": \"60621009\",\n                    \"display\"\
        : \"Body mass index\"\n                  }\n                ]\n              },\n              \"subject\": {\n  \
        \              \"type\": \"Patient\",\n                \"reference\": \"Patient/1684f841-953a-41c2-a298-64af08945349\"\
        \n              },\n              \"derivedFrom\": [\n                {\n                  \"reference\": \"QuestionnaireResponse/26073103-8a48-4fed-8f38-b1b1e39f4083\"\
        \n                }\n              ],\n              \"valueQuantity\": {\n                \"value\": 32.7\n     \
        \         }\n            }\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n"
      operationId: FhirController_extractObservationsFromQuestionnaireResponse[2]
      parameters:
      - name: id
        required: true
        in: path
        description: FHIR QuestionnaireResponse id to extract Observations (and other resources) from.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractBodyResponseDto'
        '400': *id043
        '401': *id044
        '404': *id045
        '422': *id046
        '500': *id047
      summary: Extract observations from questionnaire response
      tags:
      - FHIR Operations
  /localization/i18next/{language}:
    get:
      description: 'Download the i18next JSON file for applications


        Applications require the i18next JSON file to be downloaded and used to initialize the i18next library.

        The response is a JSON object with the i18next format.


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationI18NextController_getAllI18n
      parameters:
      - name: language
        required: true
        in: path
        description: Locale code to fetch the i18next JSON for (e.g. `en`, `de`). Must be enabled for the project via the
          Locale APIs.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/i18nGetDto'
        '400': &id048
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id049
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id050
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id051
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id052
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security: &id053
      - bearer: []
      summary: i18next - Get JSON
      tags:
      - Localization Keys
    patch:
      description: 'Update the i18next JSON file for applications


        The i18next JSON file is used to update the localization in a frontend application at runtime/compile time.

        The request doesn''t return anything and updating the i18next JSON file is an async process.


        NOTE: All pre-existing and matching localizations will be overwritten, pre-existing and non-matching localizations
        will not be affected and non-pre-existing localizations will be created.


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationI18NextController_patchAllI18n
      parameters:
      - name: language
        required: true
        in: path
        description: Locale code whose i18next JSON should be updated (e.g. `en`, `de`). Must be enabled for the project via
          the Locale APIs.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/i18nPatchDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/i18nPatchDto'
        '400': *id048
        '401': *id049
        '404': *id050
        '422': *id051
        '500': *id052
      security: *id053
      summary: i18next - Update JSON
      tags:
      - Localization Keys
  /localization/map/{target}:
    get:
      description: 'Map a localization to a target language


        All query parameters are FHIR query parameteters.


        ### Parameters


        | Parameter Example            | Description                                                              |

        | ---------------------------- | ------------------------------------------------------------------------ |

        | category=key&#124;home.about | Get all localizations for the key `home.about`                           |

        | title:contains=About Page    | Get all localizations where the value of the title contains `About Page` |

        | \_offset=0                   | Offset of the first localization                                         |

        | \_count=10                   | Count of the localizations                                               |


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationMappedController_mapLocalizations
      parameters:
      - name: target
        required: true
        in: path
        description: Target locale code to map the project default language onto (e.g. `de`, `fr`). Must be enabled for the
          project and cannot equal the default language.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      - name: _count
        required: false
        in: query
        description: Page size. Positive integer; defaults to `10`.
        schema:
          default: '10'
          type: string
      - name: _offset
        required: false
        in: query
        description: Zero-indexed offset into the result set. Defaults to `0`.
        schema:
          default: '0'
          type: string
      - name: _sort
        required: false
        in: query
        description: Sort key. Prefix with `-` for descending order. Defaults to `-date` (newest first).
        schema:
          default: -date
          type: string
      - name: search
        required: false
        in: query
        description: Substring filter applied to the localization keys (case-insensitive).
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMapSearchResponseDto'
        '400':
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401':
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422':
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500':
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: Mapped Localizations
      tags:
      - Localization Keys
  /localization/{language}:
    get:
      description: 'Get all localizations


        All query parameters are FHIR query parameteters and therefore optional.


        ### Parameters


        | Parameter Example            | Description                                                              |

        | ---------------------------- | ------------------------------------------------------------------------ |

        | category=language&#124;en-US | Get all localizations for the language `en-US`                           |

        | category=key&#124;home.about | Get all localizations for the key `home.about`                           |

        | title:contains=About Page    | Get all localizations where the value of the title contains `About Page` |

        | \_offset=0                   | Offset of the first localization                                         |

        | \_count=10                   | Count of the localizations                                               |


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationController_getLocalizations
      parameters:
      - name: language
        required: true
        in: path
        description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
          region, or the full form (`en-US`, `de-DE`) for a specific variant.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      - name: _count
        required: false
        in: query
        description: Page size. Positive integer; defaults to `10`.
        schema:
          default: '10'
          type: string
      - name: _offset
        required: false
        in: query
        description: Zero-indexed offset into the result set. Defaults to `0`.
        schema:
          default: '0'
          type: string
      - name: _sort
        required: false
        in: query
        description: Sort key. Prefix with `-` for descending order. Defaults to `-date` (newest first).
        schema:
          default: -date
          type: string
      - name: search
        required: false
        in: query
        description: Substring filter applied to the localization keys (case-insensitive).
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSearchResponseDto'
        '400': &id054
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id055
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id056
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id057
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id058
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security: &id059
      - bearer: []
      summary: Get all localizations
      tags:
      - Localization Keys
  /localization/{language}/{key}:
    get:
      description: 'Get a single localization by language and key


        The response is a JSON object with the localization.


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationController_getLocalization
      parameters:
      - name: key
        required: true
        in: path
        description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention recommended
          (e.g. `home.screen.title`).
        schema:
          pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
          example: home.screen.title
          type: string
      - name: language
        required: true
        in: path
        description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
          region, or the full form (`en-US`, `de-DE`) for a specific variant.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalizationDto'
        '400': *id054
        '401': *id055
        '404': *id056
        '422': *id057
        '500': *id058
      security: *id059
      summary: Get a single localization
      tags:
      - Localization Keys
    put:
      description: 'Update or create a single localization by language and key


        The request body is a JSON object with the localization.


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationController_updateLocalization
      parameters:
      - name: key
        required: true
        in: path
        description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention recommended
          (e.g. `home.screen.title`).
        schema:
          pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
          example: home.screen.title
          type: string
      - name: language
        required: true
        in: path
        description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
          region, or the full form (`en-US`, `de-DE`) for a specific variant.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LocalizationRequestBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalizationDto'
        '400': *id054
        '401': *id055
        '404': *id056
        '422': *id057
        '500': *id058
      security: *id059
      summary: Update a single localization
      tags:
      - Localization Keys
    delete:
      description: 'Delete a single localization by language and key


        The request doesn''t return anything.


        > NOTE: The provided language must be enabled in the system by calling Locale APIs.

        '
      operationId: LocalizationController_deleteLocalization
      parameters:
      - name: key
        required: true
        in: path
        description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention recommended
          (e.g. `home.screen.title`).
        schema:
          pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
          example: home.screen.title
          type: string
      - name: language
        required: true
        in: path
        description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
          region, or the full form (`en-US`, `de-DE`) for a specific variant.
        schema:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalizationDto'
        '400': *id054
        '401': *id055
        '404': *id056
        '422': *id057
        '500': *id058
      security: *id059
      summary: Delete a single localization
      tags:
      - Localization Keys
  /v1/public/cms/{typeSlug}/items:
    get:
      description: 'List published items from a CMS collection. Authenticates with a project-scoped API key (Authorization:
        Bearer …). Drafts and unpublished items are filtered out server-side.'
      operationId: PublicDeliveryController_listItems_v1
      parameters:
      - name: typeSlug
        required: true
        in: path
        description: Collection slug as defined in the project's Payload schema (e.g. `posts`, `services`). Bounded to 80
          chars; longer values are rejected with 400.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: 1-indexed page number. Defaults to `1`; out-of-range values are clamped.
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Items per page. Defaults to `20`, capped server-side at `100`.
        schema:
          type: string
      - name: locale
        required: false
        in: query
        description: BCP-47-ish locale (e.g. `en`, `en-GB`). Falls back to the project default when unset or unmatched.
        schema:
          type: string
      - name: depth
        required: false
        in: query
        description: Relationship resolve depth, 0–5. Higher values resolve more nested relations at the cost of extra round-trips.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicDeliveryListResponseDto'
      summary: List published items
      tags:
      - CMS Public Delivery
  /v1/public/cms/{typeSlug}/items/{idOrSlug}:
    get:
      description: Fetch a single published item by id or slug. Authenticates with a project-scoped API key. Returns 404 for
        drafts, unpublished items, or items in another project.
      operationId: PublicDeliveryController_getItem_v1
      parameters:
      - name: typeSlug
        required: true
        in: path
        description: Collection slug as defined in the project's Payload schema (e.g. `posts`, `services`).
        schema:
          type: string
      - name: idOrSlug
        required: true
        in: path
        description: Either the Payload item id or the collection's `slug` field. The handler tries id first, then slug.
        schema:
          type: string
      - name: locale
        required: false
        in: query
        description: BCP-47-ish locale (e.g. `en`, `en-GB`). Falls back to the project default when unset or unmatched.
        schema:
          type: string
      - name: depth
        required: false
        in: query
        description: Relationship resolve depth, 0–5. Higher values resolve more nested relations at the cost of extra round-trips.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicDeliveryItemResponseDto'
      summary: Get a published item
      tags:
      - CMS Public Delivery
  /v1/projects:
    get:
      description: "Every FHIR Project the caller has a ProjectMembership on. Each entry carries an `admin` flag (project-admin\
        \ status for the caller) and an `internal` flag (Ovok-managed tenant, hidden from billing).\n\nUse this to render\
        \ a tenant switcher in your dashboard — the sub-project hierarchy is exposed via `GET /v1/internal/sub-project (internal API)`.\n\n### Example\n\
        \n```bash\ncurl '<APP_BASE_URL>/v1/projects' \\\n  -H 'Authorization: Bearer <token>'\n```"
      operationId: ProjectsController_listMyProjects_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectListResponseDto'
        '400': &id060
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id061
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id062
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id063
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id064
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: List my projects
      tags:
      - Projects
  /v1/projects/me/tenant-code:
    get:
      description: Short tenant code on file for the caller’s current project, or null when one has not been assigned yet.
      operationId: ProjectsController_getMyTenantCode_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantCodeResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Get project tenant code
      tags:
      - Projects
  /v1/projects/me/features:
    get:
      description: Returns FHIR-server feature flags for the caller’s current project. Feature flags control opt-in behaviour
        at the FHIR layer (e.g. terminology server, GraphQL).
      operationId: ProjectsController_getMyProjectFeatures_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectFeaturesResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Get project features
      tags:
      - Projects
    patch:
      description: Replace the FHIR-server feature flag list on the caller’s current project. Admin-only. Empty array disables
        every flag.
      operationId: ProjectsController_updateMyProjectFeatures_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectFeaturesBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectFeaturesResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Update project features
      tags:
      - Projects
  /v1/projects/me/cms-locales:
    get:
      description: BCP-47 locale codes the project offers for content items. The first entry is the project default — public
        delivery falls back to it when a requested locale has no value on file.
      operationId: ProjectsController_getMyCmsLocales_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CmsLocalesResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Get CMS locales
      tags:
      - Projects
    patch:
      description: Replace the list of locales the project offers. The first entry becomes the project default. Admin-only.
      operationId: ProjectsController_updateMyCmsLocales_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CmsLocalesBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CmsLocalesResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Update CMS locales
      tags:
      - Projects
  /v1/projects/me/members:
    get:
      description: Members of the caller’s current project, including pending invites (users who have not completed their
        first sign-in).
      operationId: ProjectsController_listMyMembers_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MembersListResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: List project members
      tags:
      - Projects
    post:
      description: Creates the Practitioner profile + ProjectMembership and sends a magic-link invite email. Admin-only.
      operationId: ProjectsController_inviteMember_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteMemberBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Invite a project member
      tags:
      - Projects
  /v1/projects/me/members/{id}:
    patch:
      description: Toggle admin status on an existing membership. Admin-only.
      operationId: ProjectsController_updateMember_v1
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemberBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Update a project member
      tags:
      - Projects
    delete:
      description: Delete a ProjectMembership. Refuses to remove the caller or the last remaining admin. Admin-only.
      operationId: ProjectsController_removeMember_v1
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Remove a project member
      tags:
      - Projects
  /v1/projects/{id}:
    get:
      description: Return summary + settings for a project the caller is a member of. 404 otherwise.
      operationId: ProjectsController_getProject_v1
      parameters:
      - name: id
        required: true
        in: path
        schema:
          format: uuid
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectDetailResponseDto'
        '400': *id060
        '401': *id061
        '404': *id062
        '422': *id063
        '500': *id064
      security:
      - bearer: []
      summary: Get project detail
      tags:
      - Projects
  /v1/wearables/{provider}/connect:
    post:
      description: "**Early Access** — interfaces may change without notice.\n\nGenerates the provider authorization URL the\
        \ dashboard should send the user to. The user authenticates with the provider (Strava, Polar, …), the provider redirects\
        \ back to `/v1/wearables/:provider/callback`, and at that point we exchange the code, persist the tokens on a FHIR\
        \ Endpoint resource, and (optionally) bounce the user to a dashboard URL of your choice.\n\n### Prerequisites\n\n\
        1. The matching project-setting toggle must be ON (`WEARABLE_STRAVA_ENABLED` or `WEARABLE_POLAR_ENABLED`). See `PUT\
        \ /v1/project/settings/:key`.\n2. The provider's OAuth app credentials must be on file in `Project.systemSecret[]`:\n\
        \    - Strava: `WEARABLE_STRAVA_CLIENT_ID`, `WEARABLE_STRAVA_CLIENT_SECRET`, `WEARABLE_STRAVA_WEBHOOK_SECRET`\n  \
        \  - Polar: `WEARABLE_POLAR_CLIENT_ID`, `WEARABLE_POLAR_CLIENT_SECRET`, `WEARABLE_POLAR_WEBHOOK_SECRET`\n   Issue\
        \ them in the provider's developer portal first, then paste into project settings (admin only).\n3. The provider's\
        \ redirect URI registration must point at `<APP_BASE_URL>/v1/wearables/:provider/callback`.\n\n### Example\n\n```bash\n\
        curl -X POST '<APP_BASE_URL>/v1/wearables/strava/connect' \\\n  -H 'Authorization: Bearer <token>' \\\n  -H 'Content-Type:\
        \ application/json' \\\n  -d '{ \"patientId\": \"<patient-uuid>\", \"redirectUri\": \"https://my.dashboard/connect-done\"\
        \ }'\n```\n\nResponse carries an `authorizationUrl` you redirect the user to."
      operationId: WearablesController_startConnect_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug. Currently `strava` or `polar` — must match a slug enabled in `WearableProvider`.
        schema:
          enum:
          - strava
          - polar
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectResponseDto'
        '400': &id065
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id066
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id067
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id068
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id069
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: '[Early Access] Start a wearable OAuth flow'
      tags:
      - Wearables (Early Access)
  /v1/wearables/{provider}/callback:
    get:
      description: '**Early Access** — interfaces may change without notice.


        Endpoint the provider redirects the user to after they authorize. The dashboard does not call this directly — the
        user''s browser does, via a 302 from the provider.


        We exchange the `code` query parameter for an access + refresh token pair, persist them as a FHIR `Endpoint` resource
        (encrypted, keyed on the project), then either redirect the browser to the `redirectUri` the dashboard supplied at
        connect time, or return a `200 { ok: true, provider, patientId }` JSON payload.


        ### Query parameters


        | Name                | Notes                                                               |

        | ------------------- | ------------------------------------------------------------------- |

        | `code`              | Authorization code returned by the provider. Required on success.   |

        | `state`             | Opaque CSRF token we minted at connect time. Required on success.   |

        | `error`             | Set when the user denied or the provider failed. We forward 400.    |

        | `error_description` | Human-readable error context (optional).                            |


        ### Notes


        The state token is single-use (Redis `GETDEL`) — replays return 401. State expires after 600 seconds; if the user
        takes longer to authorize, the flow must be restarted.'
      operationId: WearablesController_oauthCallback_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug. Must match the one passed to `/connect` — mismatch is rejected.
        schema:
          enum:
          - strava
          - polar
          type: string
      - name: error_description
        required: false
        in: query
        description: Optional human-readable error context from the provider.
        schema: {}
      - name: error
        required: false
        in: query
        description: Set by the provider when the user denied or the upstream OAuth failed. Forwarded as a 400.
        schema: {}
      - name: state
        required: false
        in: query
        description: Opaque CSRF token we minted at `/connect`. Single-use (Redis `GETDEL`). Replays return 401.
        schema: {}
      - name: code
        required: false
        in: query
        description: Authorization code returned by the provider on success. Exchanged server-side for tokens.
        schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponseDto'
        '400': *id065
        '401': *id066
        '404': *id067
        '422': *id068
        '500': *id069
      summary: '[Early Access] Wearable OAuth callback'
      tags:
      - Wearables (Early Access)
  /v1/wearables/{provider}/connections/{patientId}:
    delete:
      description: "**Early Access** — interfaces may change without notice.\n\nDeletes the stored OAuth tokens (the FHIR\
        \ Endpoint resource) for the given (patient, provider) pair. The user must re-authenticate with the provider to reconnect.\
        \ Historical Observation / Procedure data already written is **not** deleted — by design, audit history is append-only.\n\
        \n### Example\n\n```bash\ncurl -X DELETE '<APP_BASE_URL>/v1/wearables/strava/connections/<patient-uuid>' \\\n  -H\
        \ 'Authorization: Bearer <token>'\n```\n\nReturns `{ ok: true }` whether or not a connection existed (idempotent)."
      operationId: WearablesController_revoke_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug whose tokens should be deleted.
        schema:
          enum:
          - strava
          - polar
          type: string
      - name: patientId
        required: true
        in: path
        description: 'FHIR Patient id whose connection to revoke. Idempotent — non-existent connections still return `{ ok:
          true }`.'
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponseDto'
        '400': *id065
        '401': *id066
        '404': *id067
        '422': *id068
        '500': *id069
      security:
      - bearer: []
      summary: '[Early Access] Revoke a wearable connection'
      tags:
      - Wearables (Early Access)
  /v1/wearables/connections:
    get:
      description: "**Early Access** — interfaces may change without notice.\n\nEvery active wearable connection in the caller's\
        \ project, across all patients and all providers. The dashboard renders these on the per-resident integrations panel.\n\
        \nToken values themselves are **never** returned — only the metadata (provider, patient id, remote-user id, expiresAt,\
        \ scopes). To get the OAuth tokens for a programmatic API call, read the underlying `Endpoint` resource via the FHIR\
        \ API; tokens are stored as encrypted `extension`s.\n\n### Example\n\n```bash\ncurl '<APP_BASE_URL>/v1/wearables/connections'\
        \ \\\n  -H 'Authorization: Bearer <token>'\n```"
      operationId: WearablesController_listConnections_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionListResponseDto'
        '400': *id065
        '401': *id066
        '404': *id067
        '422': *id068
        '500': *id069
      security:
      - bearer: []
      summary: '[Early Access] List wearable connections'
      tags:
      - Wearables (Early Access)
  /v1/wearables/{provider}/webhook:
    get:
      description: '**Early Access** — interfaces may change without notice.


        Verification handshake endpoint. Some providers (notably Strava) prove they own the callback URL by GETting it with
        a `hub.challenge` parameter and a `hub.verify_token` we agreed on at subscription time. We echo the challenge back
        if the verify token matches the platform-wide `WEARABLES_WEBHOOK_VERIFY_TOKEN` environment variable.


        You will hit this endpoint only when **first registering** a webhook subscription with the provider (e.g. via Strava''s
        `POST /api/v3/push_subscriptions`). After that, the provider POSTs events to the same path — see [Wearable webhook
        ingress] below.


        ### Example response


        ```json

        { "hub.challenge": "<echoed verbatim>" }

        ```


        Returns `400` when the token does not match.'
      operationId: WearablesController_webhookVerify_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug. Verification handshake is currently used by `strava`.
        schema:
          enum:
          - strava
          - polar
          type: string
      - name: hub.verify_token
        required: true
        in: query
        description: Verify token agreed with the provider at subscription time. Must equal `WEARABLES_WEBHOOK_VERIFY_TOKEN`.
        schema: {}
      - name: hub.challenge
        required: true
        in: query
        description: Provider-supplied challenge string. Echoed back verbatim on a successful match.
        schema: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponseDto'
        '400': *id065
        '401': *id066
        '404': *id067
        '422': *id068
        '500': *id069
      summary: '[Early Access] Wearable webhook subscription verification'
      tags:
      - Wearables (Early Access)
    post:
      description: '**Early Access** — interfaces may change without notice.


        Endpoint the wearable provider POSTs activity / sleep / heart-rate events to. Not called by the dashboard — only by
        the provider''s webhook delivery service.


        ### Per-provider behaviour


        **Strava** (`webhookPing` model):


        The payload contains only `{ object_type, object_id, aspect_type, owner_id }`. We follow up with `GET /api/v3/activities/{id}`
        using the connection''s access token, map the result to a FHIR `Procedure` plus summary `Observation`s (distance,
        moving-time, kcal, average HR, max HR), and enqueue them for write.


        Signature verification: Strava does not HMAC-sign events. We accept the payload if (a) the structural shape is correct
        and (b) an optional `x-ovok-signature` HMAC header matches the configured `WEARABLE_STRAVA_WEBHOOK_SECRET` when present.


        **Polar** (`webhookStream` model):


        The payload contains the full event (`EXERCISE`, `SLEEP`, `CONTINUOUS_HEART_RATE`). `EXERCISE` maps to a Procedure
        plus summary Observations; `SLEEP` maps to a duration Observation on LOINC 93832-4. `CONTINUOUS_HEART_RATE` is currently
        a no-op and reserved for a future pass that writes `valueSampledData` so the stream renders via [GET /Observation/:id?asTimeseries=true].


        Signature verification: mandatory. Polar HMAC-SHA256-signs the raw body and sends the hex digest in the `polar-webhook-signature`
        header. We compare against `WEARABLE_POLAR_WEBHOOK_SECRET`; mismatches return 400.


        ### Routing


        The webhook arrives without project context. We look up the matching FHIR Endpoint resource cross-tenant by `(provider,
        remote_user_id)` — provider''s user id is `owner_id` (Strava) or `user_id` (Polar). Webhook events for an unknown
        user are silently 200''d to stop the provider retrying after a revoke.


        ### Body


        `application/json` — raw provider payload. We parse it with the strategy and enqueue the result onto the `wearable-ingest`
        BullMQ queue, then 200 quickly so the provider doesn''t retry. FHIR writes happen off-thread.'
      operationId: WearablesController_webhookIngress_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug delivering the event. Provider-specific payload + signing rules apply (see description).
        schema:
          enum:
          - strava
          - polar
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OkResponseDto'
        '400': *id065
        '401': *id066
        '404': *id067
        '422': *id068
        '500': *id069
      summary: '[Early Access] Wearable webhook ingress'
      tags:
      - Wearables (Early Access)
  /v1/wearables/{provider}/credentials:
    get:
      description: '**Early Access** — interfaces may change without notice.


        Report whether the caller''s project has Strava / Polar OAuth app credentials on file, without ever returning the
        raw values. Use the response to drive a ''configured / not configured'' indicator in the dashboard; the secret fields
        (`hasSecret`, `hasWebhookSecret`) report presence only and `clientIdLast4` lets the UI show ''ends in …XY34'' for
        visual confirmation. Admin-only.'
      operationId: WearableCredentialsController_get_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug whose stored credentials are being read. Currently `strava` or `polar`.
        schema:
          enum:
          - strava
          - polar
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WearableCredentialsStatusDto'
        '400': &id070
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id071
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id072
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id073
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id074
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security: &id075
      - bearer: []
      summary: '[Early Access] Read wearable credentials'
      tags:
      - Wearables (Early Access)
    put:
      description: '**Early Access** — interfaces may change without notice.


        Write (or replace) the project''s OAuth credentials for a wearable provider. Values are encrypted at rest with the
        project id as salt — same envelope as MAIL_API_KEY — so the raw secrets are never persisted in plaintext. The response
        returns the same status view as `GET`, with `configured: true` once both `clientId` and `clientSecret` are on file.
        Admin-only.'
      operationId: WearableCredentialsController_put_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug whose credentials are being written. Currently `strava` or `polar`.
        schema:
          enum:
          - strava
          - polar
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WearableCredentialsBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WearableCredentialsStatusDto'
        '400': *id070
        '401': *id071
        '404': *id072
        '422': *id073
        '500': *id074
      security: *id075
      summary: '[Early Access] Set wearable credentials'
      tags:
      - Wearables (Early Access)
    delete:
      description: '**Early Access** — interfaces may change without notice.


        Remove the stored OAuth credentials for a wearable provider. Existing patient connections that were issued under the
        old credentials keep working until their access tokens expire; the next webhook signature verification (Polar) or
        token refresh (both providers) will start to fail and the patient will need to reconnect. Admin-only.'
      operationId: WearableCredentialsController_clear_v1
      parameters:
      - name: provider
        required: true
        in: path
        description: Wearable provider slug whose stored credentials should be cleared. Currently `strava` or `polar`.
        schema:
          enum:
          - strava
          - polar
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WearableCredentialsStatusDto'
        '400': *id070
        '401': *id071
        '404': *id072
        '422': *id073
        '500': *id074
      security: *id075
      summary: '[Early Access] Clear wearable credentials'
      tags:
      - Wearables (Early Access)
  /v1/project/settings:
    get:
      description: "Returns every boolean setting on the caller's current project as a single map. Settings drive opt-in features\
        \ (Payload CMS, custom mailing, wearable integrations, patient registration policies, …).\n\nDefaults are applied\
        \ for any setting the project has not explicitly set — see `PROJECT_SETTING_DEFAULTS` server-side. Admin only.\n\n\
        ### Example\n\n```bash\ncurl '<APP_BASE_URL>/v1/project/settings' \\\n  -H 'Authorization: Bearer <admin-token>'\n\
        ```"
      operationId: ProjectSettingsController_getSettings_v1
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSettingsResponseDto'
        '400': &id076
          description: The request could not be operated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                  error:
                    type: string
                    example: Bad Request
                required:
                - statusCode
                - message
        '401': &id077
          description: The resource owner or authorization server denied the request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 401
                  message:
                    type: string
                  error:
                    type: string
                    example: Unauthorized
                required:
                - statusCode
                - message
        '404': &id078
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                  error:
                    type: string
                    example: Not Found
                required:
                - statusCode
                - message
        '422': &id079
          description: The request could not be validated by the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 422
                  message:
                    type: string
                  error:
                    type: string
                    example: Unprocessable Entity
                required:
                - statusCode
                - message
        '500': &id080
          description: The server encountered an unexpected condition. Please try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  message:
                    type: string
                  error:
                    type: string
                    example: Internal Server Error
                required:
                - statusCode
                - message
      security:
      - bearer: []
      summary: List project settings
      tags:
      - Project Settings
  /v1/project/settings/{key}:
    put:
      description: "Flip a single boolean setting on the caller's current project. Some keys (`CONTENT_ENABLED`, `MAILING_ENABLED`)\
        \ are paid-tier add-ons and return 402 on Free; flipping them OFF is always allowed so a tier downgrade doesn't strand\
        \ a project. Admin only.\n\n### Body\n\n`{ \"enabled\": true | false }`\n\n### Example\n\n```bash\ncurl -X PUT '<APP_BASE_URL>/v1/project/settings/WEARABLE_STRAVA_ENABLED'\
        \ \\\n  -H 'Authorization: Bearer <admin-token>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{ \"enabled\"\
        : true }'\n```\n\nReturns the full updated settings map."
      operationId: ProjectSettingsController_putSetting_v1
      parameters:
      - name: key
        required: true
        in: path
        schema:
          type: string
          enum:
          - CONTENT_ENABLED
          - MAILING_ENABLED
          - PATIENT_INVITATION_ENABLED
          - PATIENT_REGISTRATION_ENABLED
          - PATIENT_LOGIN_ENABLED
          - PRACTITIONER_INVITATION_ENABLED
          - PRACTITIONER_REGISTRATION_ENABLED
          - PRACTITIONER_LOGIN_ENABLED
          - WEARABLE_STRAVA_ENABLED
          - WEARABLE_POLAR_ENABLED
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutProjectSettingBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSettingsResponseDto'
        '400': *id076
        '401': *id077
        '404': *id078
        '422': *id079
        '500': *id080
      security:
      - bearer: []
      summary: Toggle a project setting
      tags:
      - Project Settings
info:
  title: Public APIs
  description: 'This is the public API for the OVOK platform. It contains all the public

    endpoints for the platform. This API is used by the web application and the

    mobile application. It is also used by the FHIR API to provide a high level

    interface to the FHIR resources. The FHIR API is a lower level API that provides

    direct access to the FHIR resources. Please refer to the FHIR API documentation [here](https://ovok.redocly.app) for more
    information.'
  version: Latest
  contact: {}
tags:
- name: Wearables (Early Access)
  description: '# Wearables — Early Access


    > 🚧  **Early Access** — interfaces, payload shapes, and supported providers may change without notice. Production use
    requires written sign-off from Ovok. Please report issues to wearables-feedback@ovok.com.


    Connect cloud wearable providers (Strava, Polar — more on the way) to your Ovok project. Once a patient authorizes, their
    activity, sleep, and heart-rate data lands as standard FHIR `Procedure` + `Observation` resources on your FHIR server,
    with LOINC coding so the existing FHIR search API is your unified read surface.


    ## How it fits together


    1. **Per-project toggle.** Each provider has a boolean in `Project.setting[]` — `WEARABLE_STRAVA_ENABLED`, `WEARABLE_POLAR_ENABLED`.
    Flip it on through `PUT /v1/project/settings/:key` (admin only).

    2. **Per-project OAuth credentials.** Paste the provider''s client_id / client_secret / webhook_secret into `Project.systemSecret[]`
    via the project-settings dashboard. Encrypted at rest with the same envelope as MAIL_API_KEY.

    3. **Connect a patient.** `POST /v1/wearables/:provider/connect` returns an authorization URL — send the patient there.

    4. **Provider redirects back.** `GET /v1/wearables/:provider/callback` exchanges the code for tokens and writes a FHIR
    `Endpoint` resource on the project. Tokens are encrypted; the resource records (patient, provider, remote_user_id).

    5. **Data arrives via webhook.** `POST /v1/wearables/:provider/webhook` receives provider events, verifies the signature
    (per-provider scheme), maps to FHIR, and enqueues the writes onto the `wearable-ingest` BullMQ queue.

    6. **Read back via FHIR search.** Wearable observations are normal FHIR Observations — `GET /Observation?subject=Patient/:id&code=8867-4`
    returns HR samples regardless of which provider produced them.


    ## Provider-specific notes


    | Provider | OAuth quirks | Webhook delivery | Signature scheme |

    |---|---|---|---|

    | **Strava** | Refresh tokens **rotate** on every refresh — persist the new one. Scopes comma-separated. | `webhookPing`
    — push contains only `{object_id, owner_id, aspect_type}`. We REST GET the activity. | Structural check + optional custom
    `x-ovok-signature` HMAC. |

    | **Polar** | HTTP **Basic auth** on the token endpoint. Refresh tokens **do not rotate**. Requires a post-OAuth `POST
    /v3/users` registration call (we do it for you). | `webhookStream` — full payload arrives inline. | Mandatory HMAC-SHA256
    in `polar-webhook-signature`. Mismatch = 400. |


    ## FHIR shapes you''ll see written


    - **Activities / workouts** → `Procedure` (status: completed) + summary `Observation`s for distance (LOINC 55430-3), duration
    (55411-3), kcal (41981-2), avg HR + max HR (8867-4).

    - **Sleep** → `Observation` (LOINC 93832-4) with `effectivePeriod` covering bedtime→wake.

    - **Continuous HR** (planned) → `Observation.valueSampledData` — readable through `GET /Observation/:id?asTimeseries=true`.


    Every write carries:

    - `meta.project` = the project that owns the connection (tenant isolation),

    - `subject` = `Patient/<patient-id>` reference (the connection''s patientId),

    - `device.display` = `Strava (athlete X)` or `Polar (user X)` (for human attribution),

    - `identifier[]` with the provider''s external id so downstream replays are idempotent.

    '
servers:
- url: http://localhost:4000
  description: Local Environment
- url: https://api.dev.ovok.com
  description: Sandbox server
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
  schemas:
    ResponseBodyAccountsDataDto:
      type: array
      items:
        type: object
        properties:
          email:
            type: string
            format: email
            description: User email.
          name:
            type: string
            description: User name.
        required:
        - email
        - name
        example:
          email: max.mustermann@example.com
          name: Max Mustermann
      example:
      - email: max.mustermann@example.com
        name: Max Mustermann
    RequestB2BInviteDto:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The email of the user registering, must be a valid email in order to send a verification email
        name:
          type: string
          minLength: 1
          maxLength: 128
          description: The name of the user registering.
        surname:
          type: string
          minLength: 1
          maxLength: 128
          description: The surname of the user registering.
        tenantId:
          type: string
          format: uuid
          description: ID of the parent project.
        admin:
          default: false
          type: boolean
          description: Whether the user is an admin.
      required:
      - email
      - name
      - tenantId
      example:
        email: max.mustermann@example.com
        name: Max
        surname: Mustermann
        tenantId: 79762310-6da9-48e3-f18a-8ae1f4a6dc25
        admin: true
    FhirResourceResponseDto:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
      required:
      - resourceType
      - id
      additionalProperties: true
      description: A FHIR resource as stored in the FHIR API.
    RequestLoginV2Dto:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The user's email address.
        password:
          type: string
          minLength: 1
          maxLength: 128
          description: The user's password.
        clientId:
          type: string
          format: uuid
          description: ID of the client.
        tenantId:
          type: string
          format: uuid
          description: ID of the tenant.
      required:
      - email
      - password
      - clientId
      - tenantId
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        clientId: a703da46-ec97-a84a-4573-c50634706367
        tenantId: f6f4da8d-93e8-8a08-220e-03b7810451d3
    ResponseRegisterLoginDto:
      type: object
      properties:
        accessToken:
          type: string
          description: Bearer access token. Expires in 1 hour.
        refreshToken:
          type: string
          description: Refresh token.
        expiresIn:
          default: 3600
          type: integer
          description: Token expiration.
        project:
          type: object
          properties:
            reference:
              type: string
              description: Reference of the project.
            display:
              type: string
              description: Display name of the project.
          required:
          - reference
          - display
        profile:
          type: object
          properties:
            reference:
              type: string
              description: Reference of the profile.
            display:
              type: string
              description: Display name of the profile.
          required:
          - reference
          - display
      required:
      - accessToken
      - project
      - profile
      example:
        accessToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        refreshToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        expiresIn: 3600
        project:
          reference: Project/f6f4da8d-93e8-8a08-220e-03b7810451d3
          display: My Medical Project
        profile:
          reference: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
          display: Max Mustermann
    RequestRegisterV2Dto:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The email of the user registering, must be a valid email in order to send a verification email
        password:
          type: string
          minLength: 1
          maxLength: 128
        name:
          type: string
          minLength: 1
          maxLength: 128
          description: The name of the user registering.
        surname:
          type: string
          minLength: 1
          maxLength: 128
          description: The surname of the user registering.
        tenantId:
          type: string
          format: uuid
          description: ID of the parent project.
        clientId:
          type: string
          format: uuid
          description: ID of the client.
      required:
      - email
      - password
      - name
      - surname
      - tenantId
      - clientId
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        name: Max
        surname: Mustermann
        tenantId: 79762310-6da9-48e3-f18a-8ae1f4a6dc25
        clientId: a703da46-ec97-a84a-4573-c50634706367
    GoogleLoginDto:
      type: object
      properties:
        idToken:
          type: string
        access_token:
          type: string
        expires_in:
          type: number
        scope:
          type: string
        token_type:
          type: string
      required:
      - idToken
      example:
        idToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        access_token: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        expires_in: 3600
        scope: openid
        token_type: bearer
    ResponseTokenDto:
      type: object
      properties:
        access_token:
          type: string
          description: Bearer access token. Expires in 1 hour.
        refresh_token:
          type: string
          description: Refresh token.
        expires_in:
          type: integer
          description: Token expiration.
      required:
      - access_token
      - expires_in
      example:
        access_token: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        refresh_token: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        expires_in: 3600
    AppleLoginDto:
      type: object
      properties:
        identityToken:
          type: string
        realUserStatus:
          oneOf:
          - type: number
          nullable: true
        authorizationCode:
          oneOf:
          - type: string
          nullable: true
        state:
          oneOf:
          - type: string
          nullable: true
        fullName:
          type: object
          properties:
            namePrefix:
              oneOf:
              - type: string
              nullable: true
            givenName:
              oneOf:
              - type: string
              nullable: true
            familyName:
              oneOf:
              - type: string
              nullable: true
            nickname:
              oneOf:
              - type: string
              nullable: true
            middleName:
              oneOf:
              - type: string
              nullable: true
            nameSuffix:
              oneOf:
              - type: string
              nullable: true
          required:
          - namePrefix
          - givenName
          - familyName
          - nickname
          - middleName
          - nameSuffix
        user:
          oneOf:
          - type: string
          nullable: true
        email:
          oneOf:
          - type: string
          nullable: true
      required:
      - identityToken
      - realUserStatus
      - authorizationCode
      - state
      - user
      - email
      example:
        identityToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        realUserStatus: 1
        authorizationCode: hfdwe58hgsj734jh358j632gi954g.0.wfgsfv.krsvEREWF_WRFCVsrbc
        state: null
        fullName:
          namePrefix: Dr.
          givenName: Max
          familyName: Mustermann
          nickname: Maxi
          middleName: John
          nameSuffix: Esq.
        user: 834456.54ltk5mn78n23jrki7k76564edkl64l12qe.3790
        email: max.mustermann@example.com
    ChangePasswordRequestBodyDto:
      type: object
      properties:
        oldPassword:
          type: string
        newPassword:
          type: string
      required:
      - oldPassword
      - newPassword
    NewMemberRequestDto:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
          minLength: 1
        surname:
          type: string
        admin:
          default: false
          type: boolean
        type:
          type: string
          enum:
          - Patient
          - Practitioner
        projectId:
          type: string
      required:
      - email
      - name
      - type
      - projectId
      example:
        email: max.mustermann@example.com
        name: Max
        surname: Mustermann
        admin: false
        type: Patient
        projectId: f6f4da8d-93e8-8a08-220e-03b7810451d3
    RefreshTokenDto:
      type: object
      properties:
        refresh_token:
          type: string
          minLength: 1
          description: Refresh token.
      required:
      - refresh_token
      example:
        refresh_token: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
    RequestDeleteDto:
      type: object
      properties:
        days:
          default: 30
          type: integer
          minimum: 0
          maximum: 90
          description: After how many days the user should be deleted.
        wipe:
          default: false
          type: boolean
          description: Deletes all medical data related to the user. If true, all medical data of the user will be deleted
            at the time of deletion. By default, this is false.
      example:
        days: 30
        wipe: false
    ResponseDeleteDto:
      type: object
      properties:
        scheduled:
          type: string
          description: Has the user account been scheduled for deletion.
        user:
          type: object
          properties:
            resourceType:
              default: User
              type: string
              description: Resource type.
            id:
              type: string
              description: User ID.
            firstName:
              type: string
              description: First name.
            lastName:
              type: string
              description: Last name.
            email:
              type: string
              format: email
              description: Email.
            project:
              type: object
              properties:
                reference:
                  type: string
                  description: Project reference.
                display:
                  type: string
                  description: Project name.
              description: Project containing the User.
            meta:
              type: object
              properties:
                versionId:
                  type: string
                  description: Version ID.
                lastUpdated:
                  type: string
                  description: Date when the resource was last changed.
                author:
                  type: object
                  properties:
                    reference:
                      type: string
                      description: Author reference.
                    display:
                      type: string
                      description: Author name.
                  description: Who changed the resource last.
                project:
                  type: string
                  description: ID of project, which contains this resource.
                compartment:
                  type: array
                  items:
                    type: object
                    properties:
                      reference:
                        type: string
                        description: Resource reference.
                  description: List of compartments that contain this resource.
          required:
          - firstName
          - lastName
          description: User resource.
      example:
        scheduled: 2026-05-21 08:09:31.577000+00:00
        user:
          resourceType: User
          id: 9f8a2389-a20c-a075-2aa9-e95093515517
          firstName: Max
          lastName: Mustermann
          email: max.mustermann@example.com
          project:
            reference: Project/f6f4da8d-93e8-8a08-220e-03b7810451d3
            display: My Medical Project
          meta:
            versionId: 87ea5dfc-8b8e-384d-8489-79496e706390
            lastUpdated: 2026-05-21 08:09:31.577000+00:00
            author:
              reference: cd495e76-8385-ecb1-00a6-7e0381de4e42
              display: John Doe
            project: f6f4da8d-93e8-8a08-220e-03b7810451d3
            compartment:
            - reference: Project/f6f4da8d-93e8-8a08-220e-03b7810451d3
            - reference: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
    LoginDto:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The user's email address.
        password:
          type: string
          minLength: 1
          maxLength: 128
          description: The user's password.
        clientId:
          type: string
          format: uuid
          description: The client ID from the ClientApplication resource.
      required:
      - email
      - password
      - clientId
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        clientId: c3499c27-2973-0a7f-807e-fb8676a92dcb
    ChangePasswordDto:
      type: object
      properties:
        oldPassword:
          type: string
          example: OldPassword
          description: Old password.
        newPassword:
          type: string
          example: Password1234
          description: New password.
        confirmPassword:
          type: string
          example: Password1234
          description: New password confirmation.
      required:
      - oldPassword
      - newPassword
      - confirmPassword
    ResetPasswordDto:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email address.
        clientId:
          type: string
          description: Client ID. Only required for patients.
        type:
          type: string
          enum:
          - Patient
          - Practitioner
          description: The type of the user.
      required:
      - email
      - type
      examples:
      - email: max.mustermann@example.com
        clientId: a703da46-ec97-a84a-4573-c50634706367
        type: Patient
      - email: max.mustermann@example.com
        type: Practitioner
    SetPasswordDto:
      type: object
      properties:
        id:
          type: string
          example: 12345-12345-12345
          description: ID generated in UserSecurityRequest.
        secret:
          type: string
          example: abcde12345
          description: Secret generated in UserSecurityRequest.
        password:
          type: string
          example: MyVerySecretPassword
          description: New password to be assigned to the user.
      required:
      - id
      - secret
      - password
    UpdateEmailDto:
      type: object
      properties:
        newEmailAddress:
          type: string
          example: email@example.com
          description: New email address.
        confirmNewEmailAddress:
          type: string
          example: email@example.com
          description: Confirm new email address.
      required:
      - newEmailAddress
      - confirmNewEmailAddress
    DeregisterDto:
      type: object
      properties:
        deleteAllUserData:
          type: boolean
          example: false
          description: "Delete all user data. Empty value is treated as \"false\" by default.\n    - true: delete ProjectMembership,\
            \ profile (Patient/Practitioner), User.\n    - false: delete ProjectMembership."
    SignupDto:
      type: object
      properties:
        email:
          type: string
          example: email@example.com
          description: Email address.
        firstName:
          type: string
          example: John
          description: First name.
        lastName:
          type: string
          example: Doe
          description: Last name.
        projectId:
          type: string
          example: 12345-12345-12345
          description: Project ID.
        resourceType:
          type: string
          enum:
          - Patient
          - Practitioner
          description: The type of user to be signed up.
        sendDefaultEmail:
          type: boolean
          example: true
          description: Should the default invitation email be sent to the user. If there is a custom E-Mail bot, this should
            be set to false.
        password:
          type: string
          example: Password1234
          description: The user password. If this is not set, the user will be sent a link to set their password. Then it
            is necessary to either set  the parameter `sendDefaultEmail` to `true` or send a custom email to the user with
            a bot.
        clientId:
          type: string
          example: 12345-12345-12345
          description: Provide client ID if the user should be logged in directly after signup.
        organizationId:
          type: string
          example: 12345-12345-12345
          description: Organization ID, to assign the Patient to an organization or to create a PractitionerRole for the Practitioner.
      required:
      - email
      - firstName
      - lastName
      - projectId
      - resourceType
      - sendDefaultEmail
    SocialBodyResponseDto:
      type: object
      properties:
        accessToken:
          type: string
          description: The access token
        refreshToken:
          type: string
          description: The refresh token
        expiresIn:
          type: number
          description: The expires in
        profile:
          type: object
          properties:
            reference:
              type: string
              description: The profile reference
            display:
              type: string
              description: The profile display
          required:
          - reference
          - display
        project:
          type: object
          properties:
            reference:
              type: string
              description: The project reference
            display:
              type: string
              description: The project display
          required:
          - reference
          - display
      required:
      - accessToken
      - refreshToken
      - expiresIn
      - profile
      - project
      example:
        accessToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        refreshToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        expiresIn: 3600
        profile:
          reference: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
          display: Dr. Max John Mustermann
        project:
          reference: Project/f6f4da8d-93e8-8a08-220e-03b7810451d3
          display: Dr. Max John Mustermann
    ResponseMeDto:
      type: object
      properties:
        project:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Project
            id:
              type: string
            name:
              type: string
            strictMode:
              type: boolean
          required:
          - resourceType
          - id
          - name
          - strictMode
        membership:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - ProjectMembership
            id:
              type: string
            user:
              type: object
              properties:
                reference:
                  type: string
                display:
                  type: string
              required:
              - reference
              - display
          required:
          - resourceType
          - id
          - user
        profile:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Patient
            id:
              type: string
            name:
              type: array
              items:
                type: object
                properties:
                  given:
                    type: array
                    items:
                      type: string
                  family:
                    type: string
                required:
                - given
                - family
            telecom:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  use:
                    type: string
                  value:
                    type: string
                required:
                - system
                - use
                - value
          required:
          - resourceType
          - id
          - name
          - telecom
        config:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - UserConfiguration
            menu:
              type: array
              items:
                type: object
                properties:
                  title:
                    type: string
                  link:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        target:
                          type: string
                      required:
                      - name
                      - target
                required:
                - title
                - link
          required:
          - resourceType
          - menu
        accessPolicy:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - AccessPolicy
            resource:
              type: array
              items:
                type: object
                properties:
                  resourceType:
                    type: string
                required:
                - resourceType
            ipAccessRule:
              type: array
              items:
                type: object
                properties:
                  ip:
                    type: string
                required:
                - ip
          required:
          - resourceType
          - resource
          - ipAccessRule
        security:
          type: object
          properties:
            mfaEnrolled:
              type: boolean
            sessions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  lastUpdated:
                    type: string
                  authMethod:
                    type: string
                  remoteAddress:
                    type: string
                required:
                - id
                - lastUpdated
                - authMethod
                - remoteAddress
          required:
          - mfaEnrolled
          - sessions
      required:
      - project
      - membership
      - profile
      - config
      - accessPolicy
      - security
      example:
        project:
          resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
          strictMode: true
        membership:
          resourceType: ProjectMembership
          id: d7f418aa-467d-d1ea-f0fc-d2dd841733e6
          user:
            reference: 9f8a2389-a20c-a075-2aa9-e95093515517
            display: max.mustermann@example.com
        profile:
          resourceType: Patient
          id: de5c57ff-7257-57b0-13ab-aab6f5f91498
          name:
          - given:
            - Example Patient
            family: '1'
          telecom:
          - system: email
            use: work
            value: max.mustermann@example.com
        config:
          resourceType: UserConfiguration
          menu:
          - title: Favorites
            link: []
        accessPolicy:
          resourceType: AccessPolicy
          resource:
          - resourceType: '*'
          ipAccessRule: []
        security:
          mfaEnrolled: false
          sessions: []
    MfaStatusResponseDto:
      type: object
      properties:
        enrolled:
          type: boolean
        otpauthUrl:
          type: string
          description: otpauth:// URI for an authenticator app. Only present when `enrolled=false`.
        qrCodeDataUrl:
          type: string
          description: Pre-rendered data:image/png base64 QR code for the otpauth URI. Only present when `enrolled=false`.
      required:
      - enrolled
      additionalProperties: true
      description: MFA enrolment status for the signed-in user. When not enrolled, includes a fresh otpauth URI + QR so the
        dashboard can render an authenticator-app pairing screen.
    MfaTokenDto:
      type: object
      properties:
        token:
          type: string
          minLength: 6
          maxLength: 10
      required:
      - token
    OkResponseDto:
      type: object
      properties:
        ok:
          type: boolean
          enum:
          - true
      required:
      - ok
      description: 'Side-effect-only acknowledgement. Body is the literal `{ "ok": true }`.'
    RegisterDto:
      type: object
      properties:
        email:
          type: string
          format: email
          description: The email of the user registering, must be a valid email in order to send a verification email
        password:
          type: string
          minLength: 1
          maxLength: 128
        clientId:
          type: string
          format: uuid
          description: The client id of the user registering, must be a client id of an existing client resource in the Project
        name:
          type: string
          minLength: 1
          maxLength: 128
          description: The name of the user registering.
        surname:
          type: string
          minLength: 1
          maxLength: 128
          description: The surname of the user registering.
      required:
      - email
      - password
      - clientId
      - name
      - surname
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        clientId: c3499c27-2973-0a7f-807e-fb8676a92dcb
        name: Max
        surname: Mustermann
    OperationOutcomeV2Dto:
      type: object
      properties:
        resourceType:
          default: OperationOutcome
          type: string
        issue:
          type: array
          items:
            type: object
            properties:
              severity:
                type: string
                enum:
                - fatal
                - error
                - warning
                - information
                description: Outcome severity.
              code:
                type: string
                enum:
                - invalid
                - structure
                - required
                - value
                - invariant
                - security
                - login
                - unknown
                - expired
                - forbidden
                - suppressed
                - processing
                - not-supported
                - duplicate
                - multiple-matches
                - not-found
                - deleted
                - too-long
                - code-invalid
                - extension
                - too-costly
                - business-rule
                - conflict
                - transient
                - lock-error
                - no-store
                - exception
                - timeout
                - incomplete
                - throttled
                - informational
                description: Code.
              details:
                type: object
                properties:
                  text:
                    type: string
                    description: Outcome description.
                required:
                - text
                description: Outcome details.
            required:
            - severity
            - code
            - details
      required:
      - issue
      example:
        resourceType: OperationOutcome
        issue:
        - severity: information
          code: informational
          details:
            text: OK
    ProcessResetPasswordEmailDto:
      type: object
      properties:
        id:
          type: string
          description: The ID UserSecurityRequest.
        secret:
          type: string
          description: The secret of the UserSecurityRequest.
        password:
          type: string
          description: The new password.
      required:
      - id
      - secret
      - password
      example:
        id: 87ea5dfc-8b8e-384d-8489-79496e706390
        secret: gq7cDglqpS
        password: A[.DmUv]2vE|n_+]
    SessionsResponseDto:
      type: object
      properties:
        sessions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              lastUpdated:
                type: string
                format: date-time
              authMethod:
                type: string
              remoteAddress:
                type: string
              browser:
                type: string
              os:
                type: string
            required:
            - id
            - lastUpdated
            - authMethod
            - remoteAddress
            - browser
            - os
            example:
              id: 4e5a2893-bdcc-7d23-9c1d-b72e4c4ffbe4
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
              authMethod: password
              remoteAddress: 192.168.1.1
              browser: Chrome
              os: Mac OS
      required:
      - sessions
      example:
        sessions:
        - id: 4e5a2893-bdcc-7d23-9c1d-b72e4c4ffbe4
          lastUpdated: 2026-05-21 08:09:31.577000+00:00
          authMethod: password
          remoteAddress: 192.168.1.1
          browser: Chrome
          os: Mac OS
    ResponseBodyTanLoginDto:
      type: object
      properties:
        accessToken:
          type: string
          description: Bearer access token. Expires in 1 hour.
        expiresIn:
          default: 3600
          type: integer
          description: Token expiration.
        project:
          type: object
          properties:
            reference:
              type: string
              description: Reference of the project.
            display:
              type: string
              description: Display name of the project.
          required:
          - reference
          - display
        profile:
          type: object
          properties:
            reference:
              type: string
              description: Reference of the profile.
            display:
              type: string
              description: Display name of the profile.
          required:
          - reference
          - display
      required:
      - accessToken
      - project
      - profile
      example:
        accessToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        expiresIn: 3600
        project:
          reference: Project/f6f4da8d-93e8-8a08-220e-03b7810451d3
          display: My Medical Project
        profile:
          reference: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
          display: Max Mustermann
    RequestParamTanLoginDto:
      type: object
      properties:
        tan:
          type: string
          minLength: 1
          maxLength: 256
          pattern: ^[a-zA-Z0-9_-]+$
          description: TAN code for login.
      required:
      - tan
      example:
        tan: SsHQYt2zRufm
    StartPractitionerLoginBodyDto:
      type: object
      properties:
        email:
          type: string
          format: email
        password:
          type: string
        codeChallenge:
          type: string
          description: A randomly generated text that is sent from client application, the client application should generate
            it using the codeVerifier from the challange
      required:
      - email
      - password
      - codeChallenge
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        codeChallenge: 3F8syr8vEYl8jimX5fUejs0DHe5kUl3A
    StartPractitionerLoginResponseDto:
      oneOf:
      - type: object
        properties:
          nextStep:
            type: string
            enum:
            - token
          sessionCode:
            type: string
          tenants:
            type: array
            items:
              type: object
              properties:
                project: {}
                profile: {}
                tenantCode:
                  type: string
              required:
              - tenantCode
        required:
        - nextStep
        - sessionCode
        - tenants
      - type: object
        properties:
          nextStep:
            type: string
            enum:
            - mfa
          loginId:
            type: string
        required:
        - nextStep
        - loginId
      example:
        nextStep: token
        sessionCode: 4YQWUb224nntjcKgLjMO3u9qcqP9iyPe
        tenantCode: big-health-company
    FinishPractitionerLoginBodyDto:
      type: object
      properties:
        sessionCode:
          type: string
        codeVerifier:
          type: string
        tenantCode:
          type: string
      required:
      - sessionCode
      - codeVerifier
      - tenantCode
      example:
        sessionCode: 61NPZQcozdWDLzI3GzzaSz0avmqQagVy
        codeVerifier: B4aCNQKwdhe0dJlmqAF8ArnqgnwMJfuDpY2YBxFNye59xidvu9xFqX2swlQH0bt3
        tenantCode: big-health-company
    StartPractitionerMFABodyDto:
      type: object
      properties:
        mfaToken:
          type: string
          minLength: 6
        loginId:
          type: string
          format: uuid
      required:
      - mfaToken
      - loginId
    StartPractitionerMFAResponseDto:
      type: object
      properties:
        nextStep:
          type: string
          enum:
          - token
        sessionCode:
          type: string
        tenants:
          type: array
          items:
            type: object
            properties:
              project: {}
              profile: {}
              tenantCode:
                type: string
            required:
            - tenantCode
      required:
      - nextStep
      - sessionCode
      - tenants
      example:
        nextStep: token
        sessionCode: nUKpwGLkUqQVkv3cyCFfxBEUl6LxwbdR
    StartPatientLoginBodyDto:
      type: object
      properties:
        email:
          type: string
          format: email
        password:
          type: string
        tenantCode:
          type: string
          description: Tenant code, e.g. "big-health-company"
        codeChallenge:
          type: string
          description: A randomly generated text that is sent from client application, the client application should generate
            it using the codeVerifier from the challange
      required:
      - email
      - password
      - tenantCode
      - codeChallenge
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        codeChallenge: 44J8QEjDVxY5X98Ak8RXusCjnas2OoHd
        tenantCode: big-health-company
    StartPatientLoginResponseDto:
      oneOf:
      - type: object
        properties:
          nextStep:
            type: string
            enum:
            - token
          sessionCode:
            type: string
        required:
        - nextStep
        - sessionCode
      - type: object
        properties:
          nextStep:
            type: string
            enum:
            - mfa
          loginId:
            type: string
        required:
        - nextStep
        - loginId
      example:
        nextStep: token
        sessionCode: OhZEgsMYoWG1ZTzbwezCZMzfikHQRws2
    FinishPatientLoginBodyDto:
      type: object
      properties:
        sessionCode:
          type: string
        codeVerifier:
          type: string
      required:
      - sessionCode
      - codeVerifier
      example:
        sessionCode: x50Sjv1E40IG6nh7gFjwISDixWBSE1ut
        codeVerifier: fw8yVWVvrJ2uXXJt3Uuvqmt9Ji3HwlETXUnBxIyNb2ru9Yw2bMfnWhx4LCL94V4v
    StartPatientMFABodyDto:
      type: object
      properties:
        mfaToken:
          type: string
          minLength: 6
        loginId:
          type: string
          format: uuid
      required:
      - mfaToken
      - loginId
    StartPatientMFAResponseDto:
      type: object
      properties:
        nextStep:
          type: string
          enum:
          - token
        sessionCode:
          type: string
      required:
      - nextStep
      - sessionCode
      example:
        nextStep: token
        sessionCode: xU5keKxDB7gFWcguI5dAwMvti173sNBt
    RegisterPatientBodyDto:
      type: object
      properties:
        email:
          type: string
          format: email
        password:
          type: string
        name:
          type: string
        surname:
          type: string
        tenantCode:
          type: string
      required:
      - email
      - password
      - name
      - surname
      - tenantCode
      example:
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        name: Max
        surname: Mustermann
        tenantCode: big-health-company
    EmailTemplateTemplatesDto:
      type: object
      additionalProperties:
        type: object
        additionalProperties: {}
    LocaleBodyDto:
      type: object
      properties:
        languages:
          type: array
          items:
            type: string
            enum:
            - Cy-az-AZ
            - Cy-sr-SP
            - Cy-uz-UZ
            - Lt-az-AZ
            - Lt-sr-SP
            - Lt-uz-UZ
            - aa
            - ab
            - ae
            - af
            - af-ZA
            - ak
            - am
            - an
            - ar
            - ar-AE
            - ar-BH
            - ar-DZ
            - ar-EG
            - ar-IQ
            - ar-JO
            - ar-KW
            - ar-LB
            - ar-LY
            - ar-MA
            - ar-OM
            - ar-QA
            - ar-SA
            - ar-SY
            - ar-TN
            - ar-YE
            - as
            - av
            - ay
            - az
            - ba
            - be
            - be-BY
            - bg
            - bg-BG
            - bh
            - bi
            - bm
            - bn
            - bo
            - br
            - bs
            - ca
            - ca-ES
            - ce
            - ch
            - co
            - cr
            - cs
            - cs-CZ
            - cu
            - cv
            - cy
            - da
            - da-DK
            - de
            - de-AT
            - de-CH
            - de-DE
            - de-LI
            - de-LU
            - div-MV
            - dv
            - dz
            - ee
            - el
            - el-GR
            - en
            - en-AU
            - en-BZ
            - en-CA
            - en-CB
            - en-GB
            - en-IE
            - en-JM
            - en-NZ
            - en-PH
            - en-TT
            - en-US
            - en-ZA
            - en-ZW
            - eo
            - es
            - es-AR
            - es-BO
            - es-CL
            - es-CO
            - es-CR
            - es-DO
            - es-EC
            - es-ES
            - es-GT
            - es-HN
            - es-MX
            - es-NI
            - es-PA
            - es-PE
            - es-PR
            - es-PY
            - es-SV
            - es-UY
            - es-VE
            - et
            - et-EE
            - eu
            - eu-ES
            - fa
            - fa-IR
            - ff
            - fi
            - fi-FI
            - fj
            - fo
            - fo-FO
            - fr
            - fr-BE
            - fr-CA
            - fr-CH
            - fr-FR
            - fr-LU
            - fr-MC
            - fy
            - ga
            - gd
            - gl
            - gl-ES
            - gn
            - gu
            - gu-IN
            - gv
            - ha
            - he
            - he-IL
            - hi
            - hi-IN
            - ho
            - hr
            - hr-HR
            - ht
            - hu
            - hu-HU
            - hy
            - hy-AM
            - hz
            - ia
            - id
            - id-ID
            - ie
            - ig
            - ii
            - ik
            - io
            - is
            - is-IS
            - it
            - it-CH
            - it-IT
            - iu
            - ja
            - ja-JP
            - jv
            - ka
            - ka-GE
            - kg
            - ki
            - kj
            - kk
            - kk-KZ
            - kl
            - km
            - kn
            - kn-IN
            - ko
            - ko-KR
            - kr
            - ks
            - ku
            - kv
            - kw
            - ky
            - ky-KZ
            - la
            - lb
            - lg
            - li
            - ln
            - lo
            - lt
            - lt-LT
            - lu
            - lv
            - lv-LV
            - mg
            - mh
            - mi
            - mk
            - mk-MK
            - ml
            - mn
            - mn-MN
            - mr
            - mr-IN
            - ms
            - ms-BN
            - ms-MY
            - mt
            - my
            - na
            - nb
            - nb-NO
            - nd
            - ne
            - ng
            - nl
            - nl-BE
            - nl-NL
            - nn
            - nn-NO
            - false
            - nr
            - nv
            - ny
            - oc
            - oj
            - om
            - or
            - os
            - pa
            - pa-IN
            - pi
            - pl
            - pl-PL
            - ps
            - pt
            - pt-BR
            - pt-PT
            - qu
            - rm
            - rn
            - ro
            - ro-RO
            - ru
            - ru-RU
            - rw
            - sa
            - sa-IN
            - sc
            - sd
            - se
            - sg
            - si
            - sk
            - sk-SK
            - sl
            - sl-SI
            - sm
            - sn
            - so
            - sq
            - sq-AL
            - sr
            - ss
            - st
            - su
            - sv
            - sv-FI
            - sv-SE
            - sw
            - sw-KE
            - ta
            - ta-IN
            - te
            - te-IN
            - tg
            - th
            - th-TH
            - ti
            - tk
            - tl
            - tn
            - to
            - tr
            - tr-TR
            - ts
            - tt
            - tt-RU
            - tw
            - ty
            - ug
            - uk
            - uk-UA
            - ur
            - ur-PK
            - uz
            - ve
            - vi
            - vi-VN
            - vo
            - wa
            - wo
            - xh
            - yi
            - yo
            - za
            - zh
            - zh-CHS
            - zh-CHT
            - zh-CN
            - zh-HK
            - zh-MO
            - zh-SG
            - zh-TW
            - zu
            description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
              region, or the full form (`en-US`, `de-DE`) for a specific variant.
          minItems: 1
          description: At least one locale code. Used to register a project's active locale set.
        defaultLanguage:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
          description: The locale to fall back to when a request omits or specifies an unmapped one.
      required:
      - languages
      - defaultLanguage
      example:
        languages:
        - en-US
        - fr-FR
        - de-DE
        defaultLanguage: en-US
    CarehubPolicyListResponseDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              policy:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - AccessPolicy
                  id:
                    type: string
                  name:
                    type: string
                  resource:
                    type: array
                    items:
                      type: string
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      author:
                        type: object
                        properties:
                          reference:
                            type: string
                        required:
                        - reference
                      lastUpdated:
                        type: string
                required:
                - resourceType
                - id
                - name
              members:
                type: array
                items:
                  type: object
                  properties:
                    reference:
                      type: string
                    display:
                      type: string
                  required:
                  - reference
            required:
            - policy
            - members
      required:
      - total
      - resources
      example:
        total: 2
        resources:
        - policy:
            resourceType: AccessPolicy
            id: cca28116-f888-97bf-c336-5b992bd02672
            name: Practitioner Access Policy
            resource:
            - Patient
            - Device
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              author:
                reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          members:
          - reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
            display: Dr. Max John Mustermann
        - policy:
            resourceType: AccessPolicy
            id: 4c8bf5ff-1416-e255-cfe8-4335fa7299d8
            name: Admin Access Policy
            resource:
            - Patient
            - Device
            - Organization
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              author:
                reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          members:
          - reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
            display: Dr. Max John Mustermann
          - reference: Practitioner/19263dc5-b9c6-0f14-af25-193a8e813a1d
            display: Dr. Max Mustermann
    CarehubPolicyResponseDto:
      type: object
      properties:
        policy:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - AccessPolicy
            id:
              type: string
            name:
              type: string
            resource:
              type: array
              items:
                type: string
            meta:
              type: object
              properties:
                project:
                  type: string
                author:
                  type: object
                  properties:
                    reference:
                      type: string
                  required:
                  - reference
                lastUpdated:
                  type: string
          required:
          - resourceType
          - id
          - name
        members:
          type: array
          items:
            type: object
            properties:
              reference:
                type: string
              display:
                type: string
            required:
            - reference
      required:
      - policy
      - members
      example:
        policy:
          resourceType: AccessPolicy
          id: cca28116-f888-97bf-c336-5b992bd02672
          name: Practitioner Access Policy
          resource:
          - Patient
          - Device
          meta:
            project: f6f4da8d-93e8-8a08-220e-03b7810451d3
            author:
              reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
            lastUpdated: 2026-05-21 08:09:31.577000+00:00
        members:
        - reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
          display: Dr. Max John Mustermann
        - reference: Practitioner/19263dc5-b9c6-0f14-af25-193a8e813a1d
          display: Dr. Max Mustermann
    CarehubCreatePolicyDto:
      type: object
      properties:
        policy:
          type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 255
            resourceType:
              type: string
              enum:
              - AccessPolicy
            resource:
              type: array
              items:
                type: object
                properties:
                  resourceType:
                    type: string
                    minLength: 1
                    maxLength: 255
                  interaction:
                    type: array
                    items:
                      type: string
                      enum:
                      - read
                      - create
                      - update
                      - delete
                      - search
                      - history
                      - vread
                required:
                - resourceType
                - interaction
          required:
          - name
          - resourceType
          - resource
        members:
          type: array
          items:
            type: object
            properties:
              reference:
                type: string
              display:
                type: string
            required:
            - reference
            - display
      required:
      - policy
      - members
      description: Create a policy
      example:
        policy:
          resourceType: AccessPolicy
          name: Policy 1
          resource:
          - resourceType: Patient
            interaction:
            - read
            - create
            - update
            - delete
            - search
            - history
            - vread
        members:
        - reference: Patient/1
          display: John Doe
    CarehubUpdatePolicyDto:
      type: object
      properties:
        policy:
          type: object
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 255
            resourceType:
              type: string
              enum:
              - AccessPolicy
            id:
              type: string
              format: uuid
            resource:
              type: array
              items:
                type: object
                properties:
                  resourceType:
                    type: string
                    minLength: 1
                    maxLength: 255
                  interaction:
                    type: array
                    items:
                      type: string
                      enum:
                      - read
                      - create
                      - update
                      - delete
                      - search
                      - history
                      - vread
                required:
                - resourceType
                - interaction
          required:
          - name
          - resourceType
          - id
          - resource
        members:
          type: array
          items:
            type: object
            properties:
              reference:
                type: string
              display:
                type: string
            required:
            - reference
      required:
      - policy
      - members
      description: Create a policy
      example:
        policy:
          resourceType: AccessPolicy
          name: Policy 1
          resource:
          - resourceType: Patient
            interaction:
            - read
            - create
            - update
            - delete
            - search
            - history
            - vread
        members:
        - reference: Patient/1
          display: John Doe
    NoContentResponseDto:
      type: object
      properties: {}
      additionalProperties: true
      description: Empty response body. The endpoint replies 2xx with no payload — do not attempt to JSON-decode.
    SubProjectRequestBodyDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        extension: {}
      required:
      - name
      example:
        name: Actimi
    SubProjectSuccessResponseDto:
      type: object
      properties:
        success:
          type: boolean
          enum:
          - true
      required:
      - success
      description: 'Acknowledgement that the sub-tenant mutation completed. `success: false` is currently unused — failures
        raise 4xx/5xx.'
    SubProjectsResponseDto:
      type: object
      properties:
        currentProjectId:
          type: string
        parentProjectId:
          type: string
          nullable: true
        subProjectIds:
          type: array
          items:
            type: string
      required:
      - currentProjectId
      - parentProjectId
      - subProjectIds
      example:
        parentProjectId: f6f4da8d-93e8-8a08-220e-03b7810451d3
        subProjectIds:
        - 8618c885-485f-614e-f65e-c365e1be0086
        - 06c4d19a-2f20-242f-4194-966ec82b63e2
        - 25654af8-b5de-5060-1e09-ef4fd62e592f
        - 43583c84-f8d2-a31a-3f64-0c545e22d847
    EmailRequestBodyDto:
      type: object
      properties:
        email:
          type: string
          format: email
      required:
      - email
      example:
        email: max.mustermann@example.com
    TenantCodeDto:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        projectId:
          type: string
      required:
      - code
      - projectId
      description: Tenant code
      example:
        id: aa2c96da-cf00-c451-ef46-5f6115a45a20
        code: FHXQ-123
        project: Project/f6f4da8d-93e8-8a08-220e-03b7810451d3
    ContentProxyResponseDto:
      type: object
      properties: {}
      additionalProperties: true
      description: Payload CMS REST response. Concrete shape (fields, pagination, status code) depends on the target collection
        and interaction — see `payloadcms.com/docs/rest-api` and the project-defined collection schema.
      example:
        id: 6650f4a3a1b9e0c8c4f3a3b2
        collection: posts
        title: Hello world
        updatedAt: 2026-05-01 12:00:00+00:00
    EnsureTenantResponseDto:
      type: object
      properties:
        ok:
          type: boolean
          enum:
          - true
        tenantId:
          type: string
          description: Payload tenant id assigned to the project.
        slug:
          type: string
          description: Slug used in the Payload admin URL for this tenant.
        active:
          type: boolean
      required:
      - ok
      - tenantId
      - slug
      - active
      description: Payload tenant assignment for the caller’s current project. Returned both for fresh provisioning and the
        no-op idempotent case.
    AuthRequestDto:
      type: object
      properties:
        apiKey:
          type: string
          description: The API key of the partner.
      required:
      - apiKey
      example:
        apiKey: '1234567890'
    PartnerHealthResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
          - ok
          description: Always "ok" when the handler responds — non-200 surfaces a real failure.
        healthy:
          type: boolean
          enum:
          - true
          description: Boolean mirror of `status` for clients that only inspect this field.
        timestamp:
          type: string
          description: ISO-8601 timestamp the response was generated at, server clock.
      required:
      - status
      - healthy
      - timestamp
      description: Liveness ping for the Partner integration surface.
      example:
        status: ok
        healthy: true
        timestamp: 2026-05-20 08:00:00+00:00
    CreateChatSessionDto:
      type: object
      properties:
        assistant:
          type: object
          properties:
            system:
              type: string
              description: The system message that the AI Assistant will be prompted with.
            context:
              type: array
              items:
                type: string
              description: The context of the AI Assistant.
            history:
              default: 10
              type: number
              minimum: 1
              maximum: 30
              description: Number of messages to consider for context for the AI Assistant.
            participant:
              description: The participant that will be the AI Assistant in the chat session. ie. Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
              type: string
          required:
          - system
          - participant
        participant:
          type: string
          description: The participants in the chat, ie. Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
        title:
          type: string
          description: The title of the chat session.
        messages:
          type: array
          items:
            type: object
            properties:
              sender:
                type: string
                description: The sender of the message, ie. Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
              mode:
                type: string
                enum:
                - user
                - assistant
                - system
                description: The mode of the message, use "system" for hidden prompts to AI. Use "user" for messages that
                  come from user messages. Use "assistant" for messages that come from the AI Assistant. By default you don't
                  need to set this.
              content:
                type: string
                maxLength: 512
                description: The message content.
            required:
            - sender
            - content
      required:
      - assistant
      - participant
      - messages
      example: &id081
        assistant:
          system: You are an AI Assistant, you will be helping the patient with their queries.
          history: 10
          participant: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
        title: My Chat Session
        context:
        - Observation?_count=20&_sort=-date
        - Condition?_count=20&_sort=-onset-date
        participant: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
        messages:
        - sender: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
          mode: user
          content: Hello
    SendChatMessageDto:
      type: object
      properties:
        content:
          type: string
          maxLength: 512
          description: The message content.
        sender:
          type: string
          description: The sender of the message, ie. Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498.
        mode:
          type: string
          enum:
          - user
          - assistant
          - system
          description: 'The mode of the message, ie. user. You don''t have to specify this, it will default to user

            If you want to send a message as a system to hide the sender, you can specify it here too!'
        replyTo:
          type: string
          description: The reply is optional, ie. Communication/ade0d50c-9254-cf0c-9459-bbfe2398553c.
      required:
      - content
      - sender
      example:
        reference: Communication/ade0d50c-9254-cf0c-9459-bbfe2398553c
        content: This is a message
        sender: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
        mode: user
        replyTo: Communication/ade0d50c-9254-cf0c-9459-bbfe2398553c
    CreatedChatMessageDto:
      type: object
      properties:
        reference:
          type: string
        sender:
          type: string
        content:
          type: string
        sentAt:
          type: string
        mode:
          type: string
      required:
      - reference
      - sender
      - content
      - sentAt
      - mode
      example: &id082
        reference: Communication/ade0d50c-9254-cf0c-9459-bbfe2398553c
        sender: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
        content: Hello, how are you?
        sentAt: 2021-01-01 00:00:00+00:00
        mode: user
    GetChatSessionsResponseDto:
      type: object
      properties:
        sessions:
          type: array
          items:
            type: object
            properties:
              assistant:
                type: object
                properties:
                  system:
                    type: string
                    description: The system message that the AI Assistant will be prompted with.
                  context:
                    type: array
                    items:
                      type: string
                    description: The context of the AI Assistant.
                  history:
                    default: 10
                    type: number
                    minimum: 1
                    maximum: 30
                    description: Number of messages to consider for context for the AI Assistant.
                  participant:
                    description: The participant that will be the AI Assistant in the chat session. ie. Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
                    type: string
                required:
                - system
                - participant
              participant:
                type: string
                description: The participants in the chat, ie. Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
              title:
                type: string
                description: The title of the chat session.
              messages:
                type: array
                items:
                  type: object
                  properties:
                    sender:
                      type: string
                      description: The sender of the message, ie. Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
                    mode:
                      type: string
                      enum:
                      - user
                      - assistant
                      - system
                      description: The mode of the message, use "system" for hidden prompts to AI. Use "user" for messages
                        that come from user messages. Use "assistant" for messages that come from the AI Assistant. By default
                        you don't need to set this.
                    content:
                      type: string
                      maxLength: 512
                      description: The message content.
                  required:
                  - sender
                  - content
            required:
            - assistant
            - participant
            - messages
            example: *id081
      required:
      - sessions
      example:
        sessions:
        - assistant:
            system: You are an AI Assistant, you will be helping the patient with their queries.
            history: 10
            participant: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
          title: My Chat Session
          context:
          - Observation?_count=20&_sort=-date
          - Condition?_count=20&_sort=-onset-date
          participant: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
          messages:
          - sender: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
            mode: user
            content: Hello
    CreatedChatMessagesDto:
      type: object
      properties:
        messages:
          type: array
          items:
            type: object
            properties:
              reference:
                type: string
              sender:
                type: string
              content:
                type: string
              sentAt:
                type: string
              mode:
                type: string
            required:
            - reference
            - sender
            - content
            - sentAt
            - mode
            example: *id082
      required:
      - messages
      example:
        messages:
        - reference: Communication/ade0d50c-9254-cf0c-9459-bbfe2398553c
          sender: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
          content: Hello, how are you?
          sentAt: 2021-01-01 00:00:00+00:00
          mode: user
    AIFhirSimpleStreamRequestBodyDto:
      type: object
      properties:
        text:
          type: string
          minLength: 1
          maxLength: 10000
        fhirVersion:
          type: string
          enum:
          - R4
          - R5
      required:
      - text
      example:
        text: Find me a patient with the name "John Doe"
        fhirVersion: R4
    AIFhirSearchResponseDto:
      type: object
      properties:
        markdown:
          type: string
          description: Human-readable answer rendered from the matched FHIR resources.
        performance:
          type: object
          properties:
            plan:
              type: number
              description: ms spent generating the search plan.
            results:
              type: number
              description: ms spent fetching FHIR results.
            markdown:
              type: number
              description: ms spent on the final markdown synthesis.
          required:
          - plan
          - results
          - markdown
        plan:
          type: object
          additionalProperties: {}
          description: Search plan that was executed against the FHIR server.
        results:
          type: array
          items:
            type: object
            additionalProperties: {}
          description: Raw FHIR resources returned by the planner.
      required:
      - markdown
      - performance
      - plan
      - results
      description: AI-assisted FHIR query result. The `markdown` field is the user-facing answer; `plan` + `results` are surfaced
        for debugging and follow-up queries.
    StreamedTextResponseDto:
      type: object
      properties: {}
      additionalProperties: true
      description: Streamed `text/plain; charset=utf-8` chunks. Body is not a JSON document — consume the response as a UTF-8
        byte stream and concatenate chunks. SDK generators will see this DTO but the actual wire format is text.
    AIFhirStreamRequestBodyDto:
      type: object
      properties:
        messages:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                - system
                - user
                - assistant
              content:
                type: string
                maxLength: 10000
            required:
            - role
            - content
          minItems: 1
          maxItems: 100
      required:
      - messages
      example:
        text: Find me a patient with the name "John Doe"
    AIFhirBundleResponseDto:
      type: object
      properties:
        result:
          type: object
          additionalProperties: {}
          description: A FHIR Bundle (transaction/searchset) produced by the FHIR agent for the supplied natural-language
            query.
      required:
      - result
      description: Bundle response produced by the FHIR agent.
    CreateTranslationRequestDto:
      type: object
      properties:
        sourceLanguage:
          type: string
          minLength: 2
          maxLength: 100
        targetLanguage:
          type: string
          minLength: 2
          maxLength: 100
        text:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 10000
          minItems: 1
      required:
      - sourceLanguage
      - targetLanguage
      - text
      example:
        sourceLanguage: en
        targetLanguage: de
        text:
        - Hello {{name}}, how are you?
        - Doing well, thank you {{ anotherName }}. I am glad you picked up the phone.
        - <p>No worries sir, I will take <b>care</b> of it.</p>
    CreateTranslationResponseDto:
      type: object
      properties:
        sourceLanguage:
          type: string
          minLength: 2
          maxLength: 100
        targetLanguage:
          type: string
          minLength: 2
          maxLength: 100
        text:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 10000
          minItems: 1
      required:
      - sourceLanguage
      - targetLanguage
      - text
      example:
        sourceLanguage: en
        targetLanguage: de
        text:
        - Hallo {{ name }}, wie geht es Ihnen?
        - Mir geht es gut, danke {{ anotherName }}. Ich freue mich, dass Sie ans Telefon gegangen sind.
        - <p>Keine Sorge, Sir, ich werde mich darum <b>kümmern</b>.</p>
    CarehubProjectUsersResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              user:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - User
                  id:
                    type: string
                  firstName:
                    type: string
                  lastName:
                    type: string
                  email:
                    type: string
                  project:
                    type: string
                required:
                - resourceType
                - id
              profile:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - Practitioner
                  id:
                    type: string
                  name:
                    type: array
                    items: {}
                required:
                - resourceType
                - id
              membership:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - ProjectMembership
                  id:
                    type: string
                  project: {}
                  user: {}
                  profile: {}
                  accessPolicy: {}
                required:
                - resourceType
                - id
              status:
                type: string
                enum:
                - Active
                - Pending
              accessPolicy:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - AccessPolicy
                  id:
                    type: string
                  name:
                    type: string
                required:
                - resourceType
                - id
            required:
            - user
            - profile
            - membership
            - status
            example:
              user:
                resourceType: User
                id: 9f8a2389-a20c-a075-2aa9-e95093515517
                firstName: Max
                lastName: Mustermann
                email: max.mustermann@example.com
              profile:
                resourceType: Practitioner
                id: cd495e76-8385-ecb1-00a6-7e0381de4e42
              membership:
                resourceType: ProjectMembership
                id: d7f418aa-467d-d1ea-f0fc-d2dd841733e6
              status: Active
              accessPolicy:
                resourceType: AccessPolicy
                id: cca28116-f888-97bf-c336-5b992bd02672
                name: Practitioner access
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 20
        resources:
        - user:
            resourceType: User
            id: 9f8a2389-a20c-a075-2aa9-e95093515517
            firstName: Max
            lastName: Mustermann
            email: max.mustermann@example.com
          profile:
            resourceType: Practitioner
            id: cd495e76-8385-ecb1-00a6-7e0381de4e42
          membership:
            resourceType: ProjectMembership
            id: d7f418aa-467d-d1ea-f0fc-d2dd841733e6
          status: Active
    CarehubProjectRequestBodyDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        contact:
          type: array
          items:
            type: object
            properties:
              telecom:
                type: array
                items:
                  type: object
                  properties:
                    system:
                      type: string
                      enum:
                      - email
                      - phone
                      - fax
                      - pager
                      - url
                      - sms
                      - other
                    use:
                      type: string
                      enum:
                      - work
                      - temp
                      - old
                      - mobile
                    value:
                      type: string
                      minLength: 1
              name:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - temp
                    - old
                    - official
                    - usual
                    - nickname
                    - anonymous
                    - maiden
                  prefix:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  given:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  family:
                    type: string
                    minLength: 1
                  suffix:
                    type: array
                    items:
                      type: string
                      minLength: 1
              address:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - work
                    - temp
                    - old
                    - billing
                  type:
                    type: string
                    enum:
                    - postal
                    - physical
                    - both
                  text:
                    type: string
                    minLength: 1
                  line:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  city:
                    type: string
                    minLength: 1
                  district:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postalCode:
                    type: string
                    minLength: 1
                  country:
                    type: string
                    minLength: 1
        address:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                - work
                - temp
                - old
                - billing
              type:
                type: string
                enum:
                - postal
                - physical
                - both
              text:
                type: string
                minLength: 1
              line:
                type: array
                items:
                  type: string
                  minLength: 1
              city:
                type: string
                minLength: 1
              district:
                type: string
                minLength: 1
              state:
                type: string
                minLength: 1
              postalCode:
                type: string
                minLength: 1
              country:
                type: string
                minLength: 1
        extension: {}
        settings:
          type: object
          properties:
            timeZone:
              type: string
            trendsPeriod:
              type: object
              properties:
                start:
                  type: string
                  pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                durationSeconds:
                  type: number
                  minimum: 0
              required:
              - start
              - durationSeconds
      required:
      - name
      example:
        id: f6f4da8d-93e8-8a08-220e-03b7810451d3
        name: Actimi
        contact:
        - telecom:
          - system: email
            use: work
            value: info@actimi.com
          gender: male
          name:
            use: official
            given:
            - John
            family: Doe
          address:
            line:
            - 123 Main St
            city: Anytown
            state: NY
            postalCode: '12345'
            country: USA
        address:
        - line:
          - 123 Main St
          city: Anytown
          state: NY
          postalCode: '12345'
          country: USA
    CarehubProjectCreateChildResponseDto:
      type: object
      properties:
        projectId:
          type: string
          description: New child project id.
        success:
          type: boolean
          enum:
          - true
      required:
      - projectId
      - success
      description: 'Acknowledgement for child-project creation. The admin user is auto-joined to the new project as a practitioner.
        `success: false` is currently unreachable.'
    CarehubProjectsResponseDto:
      type: object
      properties:
        currentProject:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Project
            id:
              type: string
            name:
              type: string
            address:
              type: array
              items:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - work
                    - temp
                    - old
                    - billing
                  type:
                    type: string
                    enum:
                    - postal
                    - physical
                    - both
                  text:
                    type: string
                    minLength: 1
                  line:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  city:
                    type: string
                    minLength: 1
                  district:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postalCode:
                    type: string
                    minLength: 1
                  country:
                    type: string
                    minLength: 1
            contact:
              type: array
              items:
                type: object
                properties:
                  telecom:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                          enum:
                          - email
                          - phone
                          - fax
                          - pager
                          - url
                          - sms
                          - other
                        use:
                          type: string
                          enum:
                          - work
                          - temp
                          - old
                          - mobile
                        value:
                          type: string
                          minLength: 1
                  name:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - temp
                        - old
                        - official
                        - usual
                        - nickname
                        - anonymous
                        - maiden
                      prefix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      given:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      family:
                        type: string
                        minLength: 1
                      suffix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                  address:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - work
                        - temp
                        - old
                        - billing
                      type:
                        type: string
                        enum:
                        - postal
                        - physical
                        - both
                      text:
                        type: string
                        minLength: 1
                      line:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      city:
                        type: string
                        minLength: 1
                      district:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        minLength: 1
                      postalCode:
                        type: string
                        minLength: 1
                      country:
                        type: string
                        minLength: 1
            settings:
              type: object
              properties:
                timeZone:
                  type: string
                trendsPeriod:
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                  required:
                  - start
                  - durationSeconds
          required:
          - resourceType
          - id
          - name
        parentProject:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Project
            id:
              type: string
            name:
              type: string
            address:
              type: array
              items:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - work
                    - temp
                    - old
                    - billing
                  type:
                    type: string
                    enum:
                    - postal
                    - physical
                    - both
                  text:
                    type: string
                    minLength: 1
                  line:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  city:
                    type: string
                    minLength: 1
                  district:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postalCode:
                    type: string
                    minLength: 1
                  country:
                    type: string
                    minLength: 1
            contact:
              type: array
              items:
                type: object
                properties:
                  telecom:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                          enum:
                          - email
                          - phone
                          - fax
                          - pager
                          - url
                          - sms
                          - other
                        use:
                          type: string
                          enum:
                          - work
                          - temp
                          - old
                          - mobile
                        value:
                          type: string
                          minLength: 1
                  name:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - temp
                        - old
                        - official
                        - usual
                        - nickname
                        - anonymous
                        - maiden
                      prefix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      given:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      family:
                        type: string
                        minLength: 1
                      suffix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                  address:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - work
                        - temp
                        - old
                        - billing
                      type:
                        type: string
                        enum:
                        - postal
                        - physical
                        - both
                      text:
                        type: string
                        minLength: 1
                      line:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      city:
                        type: string
                        minLength: 1
                      district:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        minLength: 1
                      postalCode:
                        type: string
                        minLength: 1
                      country:
                        type: string
                        minLength: 1
            settings:
              type: object
              properties:
                timeZone:
                  type: string
                trendsPeriod:
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                  required:
                  - start
                  - durationSeconds
          required:
          - resourceType
          - id
          - name
          nullable: true
        childProjects:
          type: array
          items:
            type: object
            properties:
              resourceType:
                type: string
                enum:
                - Project
              id:
                type: string
              name:
                type: string
              address:
                type: array
                items:
                  type: object
                  properties:
                    use:
                      type: string
                      enum:
                      - work
                      - temp
                      - old
                      - billing
                    type:
                      type: string
                      enum:
                      - postal
                      - physical
                      - both
                    text:
                      type: string
                      minLength: 1
                    line:
                      type: array
                      items:
                        type: string
                        minLength: 1
                    city:
                      type: string
                      minLength: 1
                    district:
                      type: string
                      minLength: 1
                    state:
                      type: string
                      minLength: 1
                    postalCode:
                      type: string
                      minLength: 1
                    country:
                      type: string
                      minLength: 1
              contact:
                type: array
                items:
                  type: object
                  properties:
                    telecom:
                      type: array
                      items:
                        type: object
                        properties:
                          system:
                            type: string
                            enum:
                            - email
                            - phone
                            - fax
                            - pager
                            - url
                            - sms
                            - other
                          use:
                            type: string
                            enum:
                            - work
                            - temp
                            - old
                            - mobile
                          value:
                            type: string
                            minLength: 1
                    name:
                      type: object
                      properties:
                        use:
                          type: string
                          enum:
                          - temp
                          - old
                          - official
                          - usual
                          - nickname
                          - anonymous
                          - maiden
                        prefix:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        given:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        family:
                          type: string
                          minLength: 1
                        suffix:
                          type: array
                          items:
                            type: string
                            minLength: 1
                    address:
                      type: object
                      properties:
                        use:
                          type: string
                          enum:
                          - work
                          - temp
                          - old
                          - billing
                        type:
                          type: string
                          enum:
                          - postal
                          - physical
                          - both
                        text:
                          type: string
                          minLength: 1
                        line:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        city:
                          type: string
                          minLength: 1
                        district:
                          type: string
                          minLength: 1
                        state:
                          type: string
                          minLength: 1
                        postalCode:
                          type: string
                          minLength: 1
                        country:
                          type: string
                          minLength: 1
              settings:
                type: object
                properties:
                  timeZone:
                    type: string
                  trendsPeriod:
                    type: object
                    properties:
                      start:
                        type: string
                        pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                      durationSeconds:
                        type: number
                        minimum: 0
                    required:
                    - start
                    - durationSeconds
            required:
            - resourceType
            - id
            - name
      required:
      - currentProject
      - parentProject
      - childProjects
      example:
        currentProject:
          resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
        parentProject:
          resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
        subProjects:
        - resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
    CarehubProjectsV2ResponseDto:
      type: object
      properties:
        currentProject:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Project
            id:
              type: string
            name:
              type: string
            address:
              type: array
              items:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - work
                    - temp
                    - old
                    - billing
                  type:
                    type: string
                    enum:
                    - postal
                    - physical
                    - both
                  text:
                    type: string
                    minLength: 1
                  line:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  city:
                    type: string
                    minLength: 1
                  district:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postalCode:
                    type: string
                    minLength: 1
                  country:
                    type: string
                    minLength: 1
            contact:
              type: array
              items:
                type: object
                properties:
                  telecom:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                          enum:
                          - email
                          - phone
                          - fax
                          - pager
                          - url
                          - sms
                          - other
                        use:
                          type: string
                          enum:
                          - work
                          - temp
                          - old
                          - mobile
                        value:
                          type: string
                          minLength: 1
                  name:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - temp
                        - old
                        - official
                        - usual
                        - nickname
                        - anonymous
                        - maiden
                      prefix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      given:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      family:
                        type: string
                        minLength: 1
                      suffix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                  address:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - work
                        - temp
                        - old
                        - billing
                      type:
                        type: string
                        enum:
                        - postal
                        - physical
                        - both
                      text:
                        type: string
                        minLength: 1
                      line:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      city:
                        type: string
                        minLength: 1
                      district:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        minLength: 1
                      postalCode:
                        type: string
                        minLength: 1
                      country:
                        type: string
                        minLength: 1
            settings:
              type: object
              properties:
                timeZone:
                  type: string
                trendsPeriod:
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                  required:
                  - start
                  - durationSeconds
            deviceCount:
              type: number
          required:
          - resourceType
          - id
          - name
          - deviceCount
        parentProject:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Project
            id:
              type: string
            name:
              type: string
            address:
              type: array
              items:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - work
                    - temp
                    - old
                    - billing
                  type:
                    type: string
                    enum:
                    - postal
                    - physical
                    - both
                  text:
                    type: string
                    minLength: 1
                  line:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  city:
                    type: string
                    minLength: 1
                  district:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postalCode:
                    type: string
                    minLength: 1
                  country:
                    type: string
                    minLength: 1
            contact:
              type: array
              items:
                type: object
                properties:
                  telecom:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                          enum:
                          - email
                          - phone
                          - fax
                          - pager
                          - url
                          - sms
                          - other
                        use:
                          type: string
                          enum:
                          - work
                          - temp
                          - old
                          - mobile
                        value:
                          type: string
                          minLength: 1
                  name:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - temp
                        - old
                        - official
                        - usual
                        - nickname
                        - anonymous
                        - maiden
                      prefix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      given:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      family:
                        type: string
                        minLength: 1
                      suffix:
                        type: array
                        items:
                          type: string
                          minLength: 1
                  address:
                    type: object
                    properties:
                      use:
                        type: string
                        enum:
                        - work
                        - temp
                        - old
                        - billing
                      type:
                        type: string
                        enum:
                        - postal
                        - physical
                        - both
                      text:
                        type: string
                        minLength: 1
                      line:
                        type: array
                        items:
                          type: string
                          minLength: 1
                      city:
                        type: string
                        minLength: 1
                      district:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        minLength: 1
                      postalCode:
                        type: string
                        minLength: 1
                      country:
                        type: string
                        minLength: 1
            settings:
              type: object
              properties:
                timeZone:
                  type: string
                trendsPeriod:
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                  required:
                  - start
                  - durationSeconds
            deviceCount:
              type: number
          required:
          - resourceType
          - id
          - name
          - deviceCount
          nullable: true
        childProjects:
          type: array
          items:
            type: object
            properties:
              resourceType:
                type: string
                enum:
                - Project
              id:
                type: string
              name:
                type: string
              address:
                type: array
                items:
                  type: object
                  properties:
                    use:
                      type: string
                      enum:
                      - work
                      - temp
                      - old
                      - billing
                    type:
                      type: string
                      enum:
                      - postal
                      - physical
                      - both
                    text:
                      type: string
                      minLength: 1
                    line:
                      type: array
                      items:
                        type: string
                        minLength: 1
                    city:
                      type: string
                      minLength: 1
                    district:
                      type: string
                      minLength: 1
                    state:
                      type: string
                      minLength: 1
                    postalCode:
                      type: string
                      minLength: 1
                    country:
                      type: string
                      minLength: 1
              contact:
                type: array
                items:
                  type: object
                  properties:
                    telecom:
                      type: array
                      items:
                        type: object
                        properties:
                          system:
                            type: string
                            enum:
                            - email
                            - phone
                            - fax
                            - pager
                            - url
                            - sms
                            - other
                          use:
                            type: string
                            enum:
                            - work
                            - temp
                            - old
                            - mobile
                          value:
                            type: string
                            minLength: 1
                    name:
                      type: object
                      properties:
                        use:
                          type: string
                          enum:
                          - temp
                          - old
                          - official
                          - usual
                          - nickname
                          - anonymous
                          - maiden
                        prefix:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        given:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        family:
                          type: string
                          minLength: 1
                        suffix:
                          type: array
                          items:
                            type: string
                            minLength: 1
                    address:
                      type: object
                      properties:
                        use:
                          type: string
                          enum:
                          - work
                          - temp
                          - old
                          - billing
                        type:
                          type: string
                          enum:
                          - postal
                          - physical
                          - both
                        text:
                          type: string
                          minLength: 1
                        line:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        city:
                          type: string
                          minLength: 1
                        district:
                          type: string
                          minLength: 1
                        state:
                          type: string
                          minLength: 1
                        postalCode:
                          type: string
                          minLength: 1
                        country:
                          type: string
                          minLength: 1
              settings:
                type: object
                properties:
                  timeZone:
                    type: string
                  trendsPeriod:
                    type: object
                    properties:
                      start:
                        type: string
                        pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                      durationSeconds:
                        type: number
                        minimum: 0
                    required:
                    - start
                    - durationSeconds
              deviceCount:
                type: number
            required:
            - resourceType
            - id
            - name
            - deviceCount
      required:
      - currentProject
      - parentProject
      - childProjects
      example:
        currentProject:
          resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
          deviceCount: 0
        parentProject:
          resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
          deviceCount: 0
        subProjects:
        - resourceType: Project
          id: f6f4da8d-93e8-8a08-220e-03b7810451d3
          name: Example Project
          deviceCount: 0
    CarehubProjectDeleteResponseDto:
      type: object
      properties:
        success:
          type: boolean
          enum:
          - true
      required:
      - success
      description: Acknowledgement that the child project was deleted.
    CarehubProjectDeviceCountsResponseDto:
      type: object
      properties:
        projectId:
          type: string
        totalDeviceCount:
          type: number
          minimum: 0
        assignedResidentDeviceCount:
          type: number
          minimum: 0
        unassignedDeviceCount:
          type: number
          minimum: 0
        activeDeviceCount:
          type: number
          minimum: 0
        inactiveDeviceCount:
          type: number
          minimum: 0
        radarDeviceCount:
          type: number
          minimum: 0
        withingsDeviceCount:
          type: number
          minimum: 0
      required:
      - projectId
      - totalDeviceCount
      - assignedResidentDeviceCount
      - unassignedDeviceCount
      - activeDeviceCount
      - inactiveDeviceCount
      - radarDeviceCount
      - withingsDeviceCount
      example:
        projectId: f6f4da8d-93e8-8a08-220e-03b7810451d3
        totalDeviceCount: 14
        assignedResidentDeviceCount: 11
        unassignedDeviceCount: 3
        activeDeviceCount: 12
        inactiveDeviceCount: 2
        radarDeviceCount: 10
        withingsDeviceCount: 4
    CarehubProjectPatientCountsResponseDto:
      type: object
      properties:
        projectId:
          type: string
        totalPatientCount:
          type: number
          minimum: 0
        activePatientCount:
          type: number
          minimum: 0
        dischargedRecentPatientCount:
          type: number
          minimum: 0
        dischargedPatientCount:
          type: number
          minimum: 0
        archivedPatientCount:
          type: number
          minimum: 0
      required:
      - projectId
      - totalPatientCount
      - activePatientCount
      - dischargedRecentPatientCount
      - dischargedPatientCount
      - archivedPatientCount
      example:
        projectId: f6f4da8d-93e8-8a08-220e-03b7810451d3
        totalPatientCount: 36
        activePatientCount: 34
        dischargedRecentPatientCount: 2
        dischargedPatientCount: 0
        archivedPatientCount: 0
    CarehubProjectResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Project
        id:
          type: string
        name:
          type: string
        address:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                - work
                - temp
                - old
                - billing
              type:
                type: string
                enum:
                - postal
                - physical
                - both
              text:
                type: string
                minLength: 1
              line:
                type: array
                items:
                  type: string
                  minLength: 1
              city:
                type: string
                minLength: 1
              district:
                type: string
                minLength: 1
              state:
                type: string
                minLength: 1
              postalCode:
                type: string
                minLength: 1
              country:
                type: string
                minLength: 1
        contact:
          type: array
          items:
            type: object
            properties:
              telecom:
                type: array
                items:
                  type: object
                  properties:
                    system:
                      type: string
                      enum:
                      - email
                      - phone
                      - fax
                      - pager
                      - url
                      - sms
                      - other
                    use:
                      type: string
                      enum:
                      - work
                      - temp
                      - old
                      - mobile
                    value:
                      type: string
                      minLength: 1
              name:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - temp
                    - old
                    - official
                    - usual
                    - nickname
                    - anonymous
                    - maiden
                  prefix:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  given:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  family:
                    type: string
                    minLength: 1
                  suffix:
                    type: array
                    items:
                      type: string
                      minLength: 1
              address:
                type: object
                properties:
                  use:
                    type: string
                    enum:
                    - work
                    - temp
                    - old
                    - billing
                  type:
                    type: string
                    enum:
                    - postal
                    - physical
                    - both
                  text:
                    type: string
                    minLength: 1
                  line:
                    type: array
                    items:
                      type: string
                      minLength: 1
                  city:
                    type: string
                    minLength: 1
                  district:
                    type: string
                    minLength: 1
                  state:
                    type: string
                    minLength: 1
                  postalCode:
                    type: string
                    minLength: 1
                  country:
                    type: string
                    minLength: 1
        settings:
          type: object
          properties:
            timeZone:
              type: string
            trendsPeriod:
              type: object
              properties:
                start:
                  type: string
                  pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                durationSeconds:
                  type: number
                  minimum: 0
              required:
              - start
              - durationSeconds
      required:
      - resourceType
      - id
      - name
      example:
        resourceType: Project
        id: f6f4da8d-93e8-8a08-220e-03b7810451d3
        name: Example Project
    CarehubThresholdResponseDto:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        status:
          type: string
          enum:
          - active
          - retired
        date:
          type: string
          format: date-time
        settings:
          type: object
          properties:
            heartRate:
              type: object
              properties:
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - absolute
            meanHeartRate:
              type: object
              properties:
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - relative
            respiratoryRate:
              type: object
              properties:
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - absolute
            meanRespiratoryRate:
              type: object
              properties:
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - relative
            durationOfOutOfBed:
              type: object
              properties:
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000000
                  required:
                  - enabled
                  - max
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 100
                  required:
                  - enabled
                  - max
              required:
              - enabled
            sleepDuration:
              type: object
              properties:
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - absolute
            numberOfTimesGettingOutOfBed:
              type: object
              properties:
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - max
              required:
              - enabled
              - absolute
      required:
      - status
      - settings
      example:
        id: c51f7b72-279e-26fd-7cf6-6d9d61e7f720
        projectId: f6f4da8d-93e8-8a08-220e-03b7810451d3
        status: active
        date: 2026-05-21 08:09:31.577000+00:00
        settings:
          heartRate:
            enabled: true
            absolute:
              enabled: true
              min: 60
              max: 100
          meanHeartRate:
            enabled: false
            relative:
              enabled: false
              min: 0.8
              max: 1.2
          respiratoryRate:
            enabled: true
            absolute:
              enabled: true
              min: 12
              max: 20
          meanRespiratoryRate:
            enabled: false
            relative:
              enabled: false
              min: 0.8
              max: 1.2
          durationOfOutOfBed:
            enabled: true
            absolute:
              enabled: true
              max: 600
          sleepDuration:
            enabled: true
            absolute:
              enabled: true
              min: 7
              max: 10
          numberOfTimesGettingOutOfBed:
            enabled: true
            absolute:
              enabled: true
              max: 0
    ThresholdBodyDto:
      type: object
      properties:
        id:
          type: string
        projectId:
          type: string
        status:
          type: string
          enum:
          - active
          - retired
        date:
          type: string
          format: date-time
        settings:
          type: object
          properties:
            heartRate:
              default:
                enabled: false
                absolute:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - absolute
            meanHeartRate:
              default:
                enabled: false
                relative:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - relative
            respiratoryRate:
              default:
                enabled: false
                absolute:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - absolute
            meanRespiratoryRate:
              default:
                enabled: false
                relative:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - relative
            durationOfOutOfBed:
              default:
                enabled: false
                absolute:
                  enabled: false
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                period:
                  default:
                    start: 09:00:00
                    durationSeconds: 86400
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000000
                  required:
                  - enabled
                  - max
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 100
                  required:
                  - enabled
                  - max
              required:
              - enabled
            sleepDuration:
              default:
                enabled: false
                absolute:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - enabled
              - absolute
            numberOfTimesGettingOutOfBed:
              default:
                enabled: false
                absolute:
                  enabled: false
                  max: 0
              type: object
              properties:
                mode:
                  default: organization
                  type: string
                  enum:
                  - organization
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - max
              required:
              - enabled
              - absolute
      required:
      - status
      - settings
      example:
        id: '123'
        date: 2021-01-01 00:00:00+00:00
        metrics:
          heartRate:
            unit: bpm
            thresholds:
              type: relative
              values:
                min: 60
                max: 100
          respiratoryRate:
            unit: bpm
            thresholds:
              type: absolute
              values:
                min: 60
                max: 100
          durationOfOutOfBed:
            unit: min
            thresholds:
              type: absolute
              values:
                min: 60
                max: 100
    PatientThresholdDto:
      type: object
      properties:
        id:
          type: string
        patientId:
          type: string
        projectId:
          type: string
        status:
          type: string
          enum:
          - active
          - revoked
        date:
          type: string
          format: date-time
        period:
          type: object
          properties:
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
        settings:
          type: object
          properties:
            heartRate:
              type: object
              properties:
                period:
                  default: &id083
                    start: 09:00:00
                    durationSeconds: 86400
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
            meanHeartRate:
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - relative
            respiratoryRate:
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - absolute
            meanRespiratoryRate:
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - relative
            durationOfOutOfBed:
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000000
                  required:
                  - enabled
                  - max
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 100
                  required:
                  - enabled
                  - max
              required:
              - mode
              - enabled
            sleepDuration:
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - absolute
            numberOfTimesGettingOutOfBed:
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - max
              required:
              - mode
              - enabled
              - absolute
      required:
      - patientId
      - status
      - settings
      example:
        id: '123'
        patientId: patient-123
        date: 2021-01-01 00:00:00+00:00
        settings:
          heartRate:
            mode: patient
            enabled: true
            absolute:
              enabled: true
              min: 60
              max: 100
          meanHeartRate:
            mode: organization
            enabled: true
            relative:
              enabled: true
              min: 0.8
              max: 1.2
            average: 65.5
    PatientThresholdBodyDto:
      type: object
      properties:
        id:
          type: string
        patientId:
          type: string
        projectId:
          type: string
        status:
          type: string
          enum:
          - active
          - revoked
        date:
          type: string
          format: date-time
        settings:
          type: object
          properties:
            heartRate:
              default:
                mode: organization
                enabled: false
                absolute:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
            meanHeartRate:
              default:
                mode: organization
                enabled: false
                relative:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - relative
            respiratoryRate:
              default:
                mode: organization
                enabled: false
                absolute:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - absolute
            meanRespiratoryRate:
              default:
                mode: organization
                enabled: false
                relative:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - relative
            durationOfOutOfBed:
              default:
                mode: organization
                enabled: false
                absolute:
                  enabled: false
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000000
                  required:
                  - enabled
                  - max
                relative:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 100
                  required:
                  - enabled
                  - max
              required:
              - mode
              - enabled
            sleepDuration:
              default:
                mode: organization
                enabled: false
                absolute:
                  enabled: false
                  min: 0
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    min:
                      type: number
                      minimum: 0
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - min
                  - max
              required:
              - mode
              - enabled
              - absolute
            numberOfTimesGettingOutOfBed:
              default:
                mode: organization
                enabled: false
                absolute:
                  enabled: false
                  max: 0
              type: object
              properties:
                period:
                  default: *id083
                  type: object
                  properties:
                    start:
                      type: string
                      pattern: ^([01]\d|2[0-3]):([0-5]\d:([0-5]\d))$
                    durationSeconds:
                      type: number
                      minimum: 0
                      maximum: 86400
                  required:
                  - start
                  - durationSeconds
                average:
                  type: number
                averageRange:
                  type: object
                  properties:
                    min:
                      type: number
                    max:
                      type: number
                mode:
                  type: string
                  enum:
                  - organization
                  - patient
                  - patient-auto
                enabled:
                  type: boolean
                absolute:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    max:
                      type: number
                      maximum: 1000
                  required:
                  - enabled
                  - max
              required:
              - mode
              - enabled
              - absolute
      required:
      - patientId
      - status
      - settings
      example:
        id: '123'
        patientId: patient-123
        date: 2021-01-01 00:00:00+00:00
        settings:
          heartRate:
            mode: patient
            enabled: true
            absolute:
              enabled: true
              min: 60
              max: 100
          respiratoryRate:
            mode: organization
            enabled: false
            absolute:
              enabled: false
              min: 0
              max: 0
    SignalsAlertDto:
      type: object
      properties:
        _id:
          type: string
          description: The id of the alert.
        event:
          type: string
          description: The reason of the alert.
        patient:
          type: string
          description: The patient of the alert.
        observation:
          type: string
          description: The observation of the alert.
        observationRefId:
          type: string
          description: The observation ref id of the alert.
        observationObservedAt:
          type: string
          format: date-time
          description: The observation observed at of the alert.
        observationDevice:
          type: object
          properties:
            reference:
              type: string
              description: The reference of the device.
            display:
              type: string
              description: The display of the device.
          required:
          - reference
        observationEffectivePeriod:
          type: object
          properties:
            start:
              type: string
              format: date-time
              description: The observation effective period start of the alert.
            end:
              type: string
              format: date-time
              description: The observation effective period end of the alert.
          description: The observation effective period of the alert.
        component:
          type: object
          properties:
            code:
              type: object
              properties:
                coding:
                  type: array
                  items:
                    type: object
                    properties:
                      code:
                        type: string
                        description: The code of the code.
                      system:
                        type: string
                        description: The system of the code.
                      display:
                        type: string
                        description: The display of the code.
                      version:
                        type: string
                        description: The version of the code.
                      userSelected:
                        type: boolean
                        description: Whether the code is user selected.
                    required:
                    - code
              required:
              - coding
            valueInteger:
              type: integer
              description: The value of the observation.
            valueQuantity:
              type: object
              properties:
                value:
                  type: number
                  description: The value of the observation.
                unit:
                  type: string
                  description: The unit of the observation.
              required:
              - value
            valueString:
              type: string
              description: The value of the observation.
            valueBoolean:
              type: boolean
              description: The value of the observation.
            valueDateTime:
              type: string
              format: date-time
              description: The value of the observation.
            dataAbsentReason:
              type: string
              description: The data absent reason of the observation.
          required:
          - code
          description: The component of the alert.
        trigger:
          type: object
          properties:
            code:
              type: string
              description: The code of the trigger.
            display:
              type: string
              description: The display of the trigger.
            valueKey:
              type: string
              description: The value key of the trigger.
            logic:
              description: The logic of the trigger.
          description: The trigger of the alert.
        value:
          description: The value of the alert.
        message:
          description: The message of the alert.
        createdAt:
          type: string
          format: date-time
          description: The created at of the alert.
        updatedAt:
          type: string
          format: date-time
          description: The updated at of the alert.
      required:
      - event
      - patient
      - component
    CarehubQueryResponseDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items: {}
      required:
      - total
      - resources
      example:
        total: 25
        resources:
        - device:
            resourceType: Device
            id: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
            deviceName:
            - type: user-friendly-name
              name: 'Patient Monitor #gq7cDglqpS'
          patient:
            resourceType: Patient
            id: de5c57ff-7257-57b0-13ab-aab6f5f91498
            name:
            - given:
              - Max
              family: Mustermann
          location:
            resourceType: Location
            id: d219c681-01f5-32de-10ad-d2cf42fb9dbe
            name: Room 201
          organization:
            resourceType: Organization
            id: 519255ae-1f74-ffc5-ddd2-9979295c7572
            name: My Medical Project
    CarehubQueryTelemetryResponseDto:
      type: object
      properties:
        telemetry:
          type: object
          additionalProperties: {}
        alerts:
          type: object
          additionalProperties: {}
      required:
      - telemetry
      - alerts
      example:
        telemetry:
          11111111-1111-4111-8111-111111111111:
            effectiveHeartRate:
              value: 61
              ts: 1710843420000
        alerts:
          11111111-1111-4111-8111-111111111111:
            heartRate:
              alert: false
              state: normal
              color: null
    CarehubOrganizationCountResponseDto:
      type: object
      properties:
        total:
          type: number
        totalDeviceCount:
          type: number
        totalAssignedResidentDeviceCount:
          type: number
        totalActiveDeviceCount:
          type: number
        totalInactiveDeviceCount:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              organization:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - Organization
                  id:
                    type: string
                  name:
                    type: string
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      lastUpdated:
                        type: string
                required:
                - resourceType
                - id
                - name
              deviceCount:
                type: number
              assignedResidentDeviceCount:
                type: number
              activeDeviceCount:
                type: number
              inactiveDeviceCount:
                type: number
            required:
            - deviceCount
            - assignedResidentDeviceCount
            - activeDeviceCount
            - inactiveDeviceCount
      required:
      - total
      - totalDeviceCount
      - totalAssignedResidentDeviceCount
      - totalActiveDeviceCount
      - totalInactiveDeviceCount
      - resources
      example:
        total: 2
        totalDeviceCount: 18
        totalAssignedResidentDeviceCount: 18
        totalActiveDeviceCount: 16
        totalInactiveDeviceCount: 2
        resources:
        - organization:
            resourceType: Organization
            id: 519255ae-1f74-ffc5-ddd2-9979295c7572
            name: My Medical Project
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          deviceCount: 12
          assignedResidentDeviceCount: 12
          activeDeviceCount: 11
          inactiveDeviceCount: 1
        - organization:
            resourceType: Organization
            id: fa48d626-f96b-dbe0-056b-48a353dbd2ed
            name: My Medical Project - Branch
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          deviceCount: 6
          assignedResidentDeviceCount: 6
          activeDeviceCount: 5
          inactiveDeviceCount: 1
    CarehubUserQueryResponseDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              user:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - User
                  id:
                    type: string
                  firstName:
                    type: string
                  lastName:
                    type: string
                  email:
                    type: string
                    format: email
                  project:
                    type: string
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      lastUpdated:
                        type: string
                required:
                - resourceType
                - id
                - email
              profile:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - Practitioner
                  id:
                    type: string
                  name:
                    type: array
                    items: {}
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      lastUpdated:
                        type: string
                required:
                - resourceType
                - id
              membership:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - ProjectMembership
                  id:
                    type: string
                  project:
                    type: string
                  user:
                    type: object
                    properties:
                      reference:
                        type: string
                    required:
                    - reference
                  profile:
                    type: object
                    properties:
                      reference:
                        type: string
                    required:
                    - reference
                  accessPolicy:
                    type: object
                    properties:
                      reference:
                        type: string
                    required:
                    - reference
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      lastUpdated:
                        type: string
                required:
                - resourceType
                - id
              status:
                type: string
                enum:
                - Active
                - Pending
              accessPolicy:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - AccessPolicy
                  id:
                    type: string
                  name:
                    type: string
                  resource:
                    type: array
                    items:
                      type: string
                  meta:
                    type: object
                    properties:
                      project:
                        type: string
                      lastUpdated:
                        type: string
                required:
                - resourceType
                - id
                - name
            required:
            - user
            - profile
            - membership
            - status
      required:
      - total
      - resources
      example:
        total: 1
        resources:
        - user:
            resourceType: User
            id: 9f8a2389-a20c-a075-2aa9-e95093515517
            firstName: Max
            lastName: Mustermann
            email: max.mustermann@example.com
            project: f6f4da8d-93e8-8a08-220e-03b7810451d3
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          profile:
            resourceType: Practitioner
            id: cd495e76-8385-ecb1-00a6-7e0381de4e42
            name:
            - given:
              - Max
              family: Mustermann
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          membership:
            resourceType: ProjectMembership
            id: d7f418aa-467d-d1ea-f0fc-d2dd841733e6
            project: f6f4da8d-93e8-8a08-220e-03b7810451d3
            user:
              reference: User/9f8a2389-a20c-a075-2aa9-e95093515517
            profile:
              reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
            accessPolicy:
              reference: AccessPolicy/cca28116-f888-97bf-c336-5b992bd02672
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
          status: Active
          accessPolicy:
            resourceType: AccessPolicy
            id: cca28116-f888-97bf-c336-5b992bd02672
            name: Practitioner Access Policy
            resource:
            - Patient
            - Device
            meta:
              project: f6f4da8d-93e8-8a08-220e-03b7810451d3
              lastUpdated: 2026-05-21 08:09:31.577000+00:00
    BinaryDto:
      type: object
      properties:
        file:
          type: string
          format: binary
          description: File to upload.
      required:
      - file
    IdentifierDto:
      type: object
      properties:
        system:
          type: string
          example: www.example.com
          description: Namespace (URL) of the identifier value.
        value:
          type: string
          example: externalId
          description: Identifier value.
    DocumentReferenceMetaDto:
      type: object
      properties:
        versionId:
          type: string
          description: The version ID of the document reference.
        publicResourceToken:
          type: string
          description: The public resource token of the document reference.
    AttachmentDto:
      type: object
      properties:
        contentType:
          type: string
          example: image/jpeg
          description: Mime type.
        url:
          type: string
          example: www.example.com
          description: URL pointing to the file location.
        title:
          type: string
          example: my_image.jpeg
          description: Name of the file.
      required:
      - contentType
      - url
    DocumentReferenceSubjectDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Patient
          - Practitioner
          - Group
          - Device
          description: Type of subject.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of subject.
      required:
      - id
    DocumentReferenceAuthorDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Practitioner
          - PractitionerRole
          - Organization
          - Device
          - Patient
          - RelatedPerson
          description: Type of author.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of author.
      required:
      - type
      - id
    DocumentReferenceEncounterDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Encounter
          - EpisodeOfCare
          description: Type of encounter.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of encounter.
      required:
      - type
      - id
    PeriodDto:
      type: object
      properties:
        start:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Start date.
        end:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: End date.
    ReferenceDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Account
          - ActivityDefinition
          - ActorDefinition
          - AdministrableProductDefinition
          - AdverseEvent
          - AllergyIntolerance
          - Appointment
          - AppointmentResponse
          - ArtifactAssessment
          - AuditEvent
          - Basic
          - Binary
          - BiologicallyDerivedProduct
          - BiologicallyDerivedProductDispense
          - BodyStructure
          - Bundle
          - CapabilityStatement
          - CarePlan
          - CareTeam
          - ChargeItem
          - ChargeItemDefinition
          - Citation
          - Claim
          - ClaimResponse
          - ClientApplication
          - ClinicalImpression
          - ClinicalUseDefinition
          - CodeSystem
          - Communication
          - CommunicationRequest
          - CompartmentDefinition
          - Composition
          - ConceptMap
          - Condition
          - ConditionDefinition
          - Consent
          - Contract
          - Coverage
          - CoverageEligibilityRequest
          - CoverageEligibilityResponse
          - DetectedIssue
          - Device
          - DeviceAssociation
          - DeviceDefinition
          - DeviceDispense
          - DeviceMetric
          - DeviceRequest
          - DeviceUsage
          - DiagnosticReport
          - DocumentReference
          - Encounter
          - EncounterHistory
          - Endpoint
          - EnrollmentRequest
          - EnrollmentResponse
          - EpisodeOfCare
          - EventDefinition
          - Evidence
          - EvidenceReport
          - EvidenceVariable
          - ExampleScenario
          - ExplanationOfBenefit
          - FamilyMemberHistory
          - Flag
          - FormularyItem
          - GenomicStudy
          - Goal
          - GraphDefinition
          - Group
          - GuidanceResponse
          - HealthcareService
          - ImagingSelection
          - ImagingStudy
          - Immunization
          - ImmunizationEvaluation
          - ImmunizationRecommendation
          - ImplementationGuide
          - Ingredient
          - InsurancePlan
          - InventoryItem
          - InventoryReport
          - Invoice
          - Library
          - Linkage
          - List
          - Location
          - ManufacturedItemDefinition
          - Measure
          - MeasureReport
          - Media
          - Medication
          - MedicationAdministration
          - MedicationDispense
          - MedicationKnowledge
          - MedicationRequest
          - MedicationStatement
          - MedicinalProductDefinition
          - MessageDefinition
          - MessageHeader
          - MolecularSequence
          - NamingSystem
          - NutritionIntake
          - NutritionOrder
          - NutritionProduct
          - Observation
          - ObservationDefinition
          - OperationDefinition
          - OperationOutcome
          - Organization
          - OrganizationAffiliation
          - PackagedProductDefinition
          - Parameters
          - Patient
          - PaymentNotice
          - PaymentReconciliation
          - Permission
          - Person
          - PlanDefinition
          - Practitioner
          - PractitionerRole
          - Procedure
          - ProjectMembership
          - Provenance
          - Questionnaire
          - QuestionnaireResponse
          - RegulatedAuthorization
          - RelatedPerson
          - RequestGroup
          - RequestOrchestration
          - Requirements
          - ResearchStudy
          - ResearchSubject
          - RiskAssessment
          - Schedule
          - SearchParameter
          - ServiceRequest
          - Slot
          - Specimen
          - SpecimenDefinition
          - StructureDefinition
          - StructureMap
          - Subscription
          - SubscriptionStatus
          - SubscriptionTopic
          - Substance
          - SubstanceDefinition
          - SubstanceNucleicAcid
          - SubstancePolymer
          - SubstanceProtein
          - SubstanceReferenceInformation
          - SubstanceSourceMaterial
          - SupplyDelivery
          - SupplyRequest
          - Task
          - TerminologyCapabilities
          - TestPlan
          - TestReport
          - TestScript
          - Transport
          - User
          - ValueSet
          - VerificationResult
          - VisionPrescription
          description: Type of reference.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of reference.
        display:
          type: string
          example: abc123
          description: Alternative text of reference.
    DocumentReferenceContextDto:
      type: object
      properties:
        encounter:
          description: Encounter context of the document.
          type: array
          items:
            $ref: '#/components/schemas/DocumentReferenceEncounterDto'
        period:
          description: Time period being documented.
          allOf:
          - $ref: '#/components/schemas/PeriodDto'
        related:
          description: Resource/s that the document reference is related to.
          type: array
          items:
            $ref: '#/components/schemas/ReferenceDto'
    DocumentReferenceDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        meta:
          description: The meta information of the document reference.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceMetaDto'
        status:
          type: string
          enum: &id103
          - current
          - superseded
          - entered-in-error
          description: The status of the document reference.
        content:
          description: Attachment data.
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
        type:
          type: string
          example: 11111-1
          description: Type of the document reference.
        category:
          example: &id104
          - imagingreport
          description: A category assigned to the document reference.
          type: array
          items:
            type: string
        subject:
          description: Subject of the document.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceSubjectDto'
        date:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Creation date of the document.
        author:
          description: Author of the document.
          type: array
          items:
            $ref: '#/components/schemas/DocumentReferenceAuthorDto'
        custodian:
          type: string
          example: 12345-12345-12345
          description: Organisation that maintains the document.
        context:
          description: Context of the document.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceContextDto'
        resourceType:
          type: string
          example: DocumentReference
          description: DocumentReference resource type.
          enum:
          - DocumentReference
        id:
          type: string
          example: 12345-12345-12345
          description: DocumentReference resource ID.
      required:
      - status
      - content
      - resourceType
      - id
    BinariesDto:
      type: object
      properties:
        files:
          description: Files to upload.
          type: array
          items:
            type: string
            format: binary
      required:
      - files
    ResponseDocumentReferenceDto:
      type: object
      properties:
        data:
          description: List of DocumentReference resources
          type: array
          items:
            $ref: '#/components/schemas/DocumentReferenceDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    StreamableFile:
      type: object
      properties: {}
    PublicResourceReadResponseDto:
      type: object
      properties:
        resourceType:
          type: string
        id:
          type: string
      required:
      - resourceType
      - id
      additionalProperties: true
      description: The FHIR resource the public token resolves to. Token-scoped — the response includes only the resource
        itself, no cross-resource references.
    PublicTokenMutateResponseDto:
      type: object
      properties:
        token:
          type: string
          nullable: true
          description: The new public-access token, or null after deleteToken (token is removed from the resource).
        resource:
          type: object
          properties:
            resourceType:
              type: string
            id:
              type: string
          required:
          - resourceType
          - id
          additionalProperties: true
          description: A FHIR resource as stored in the FHIR API.
      required:
      - token
      - resource
      description: Result of a token mutation. `changeToken` rotates the token; `deleteToken` removes it (token=null). The
        resource is returned with its updated meta.extension list either way.
    PostFileUploadDto:
      type: object
      properties:
        fileName:
          type: string
          minLength: 1
          description: The name of the file.
        contentType:
          description: The MIME type of the file.
          type: string
        isPublic:
          description: Whether the file is public. If true file will be publicly accessable with the token defined in the
            DocumentReference.extension
          default: 'false'
          type: string
          enum:
          - 'true'
          - 'false'
      required:
      - fileName
      - contentType
      example:
        fileName: my-image.png
        contentType: image/png
        isPublic: false
    FileEntryDto:
      type: object
      properties:
        id:
          type: string
          description: The ID of the DocumentReference resource.
        meta:
          type: object
          properties:
            lastUpdated:
              type: string
              description: The last updated date of the document.
          required:
          - lastUpdated
          description: The metadata of the document.
        author:
          type: object
          properties:
            reference:
              type: string
              description: The reference of the author.
            display:
              type: string
              description: The display name of the author.
          description: The author of the document.
        fileName:
          type: string
          description: The name of the document.
        contentType:
          type: string
          description: The content type of the document.
        uploadOptions:
          type: object
          properties:
            url:
              type: string
              description: The upload URL of the document.
            fields:
              type: object
              additionalProperties:
                type: string
              description: The fields of the document.
          required:
          - url
          - fields
          description: The upload options of the document.
        publicToken:
          type: string
          description: The public token of the document.
      required:
      - id
      example: &id084
        id: 87ea5dfc-8b8e-384d-8489-79496e706390
        fileName: test.txt
        contentType: text/plain
        publicToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        uploadOptions:
          url: https://example.com/upload
          fields:
            key: value
    GetSearchFilesResponseDto:
      type: object
      properties:
        total:
          type: number
          description: Total number of documents in the system.
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The ID of the DocumentReference resource.
              meta:
                type: object
                properties:
                  lastUpdated:
                    type: string
                    description: The last updated date of the document.
                required:
                - lastUpdated
                description: The metadata of the document.
              author:
                type: object
                properties:
                  reference:
                    type: string
                    description: The reference of the author.
                  display:
                    type: string
                    description: The display name of the author.
                description: The author of the document.
              fileName:
                type: string
                description: The name of the document.
              contentType:
                type: string
                description: The content type of the document.
              uploadOptions:
                type: object
                properties:
                  url:
                    type: string
                    description: The upload URL of the document.
                  fields:
                    type: object
                    additionalProperties:
                      type: string
                    description: The fields of the document.
                required:
                - url
                - fields
                description: The upload options of the document.
              publicToken:
                type: string
                description: The public token of the document.
            required:
            - id
            example: *id084
      required:
      - total
      - resources
      example:
        total: 100
        resources:
        - id: 87ea5dfc-8b8e-384d-8489-79496e706390
          fileName: test.txt
          contentType: text/plain
          publicToken: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
    RedirectResponseDto:
      type: object
      properties: {}
      additionalProperties: true
      description: 'No JSON body — endpoint replies with HTTP 307 redirect to a short-lived signed object-storage URL. Body
        is empty; follow the `Location` header. The redirect target expires (typical TTL: a few minutes).'
    DocumentDeletedResponseDto:
      type: object
      properties:
        message:
          type: string
          enum:
          - Document deleted successfully
      required:
      - message
      description: Document deletion acknowledgement.
    UpdateDocumentMetadataDto:
      type: object
      properties:
        fileName:
          type: string
          minLength: 1
          description: The new name of the file.
        isPublic:
          type: boolean
          description: Whether the file should be public or private.
        contentType:
          description: The MIME type of the file.
          type: string
      example:
        fileName: updated-image.png
        isPublic: false
    ReplaceDocumentFileDto:
      type: object
      properties:
        fileName:
          type: string
          minLength: 1
          description: The filename of the resource to be saved with.
        contentType:
          description: The MIME type of the file.
          type: string
        isPublic:
          type: boolean
          description: Whether the file should be public or private.
      required:
      - fileName
      - contentType
      example:
        fileName: new-cat.png
        contentType: image/png
    BotExecResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          description: Present when the bot returns a FHIR resource (often Parameters or OperationOutcome).
      additionalProperties: true
      description: Whatever the bot script returns. Shape is bot-specific — typically a FHIR Parameters/OperationOutcome resource
        or an arbitrary JSON object. SDK consumers should treat this as `unknown` and narrow per bot.
    CarehubChangeHistoryResponseDto:
      type: object
      properties:
        total:
          type: number
          description: Total number of matching rows across all pages.
        page:
          type: number
          description: Zero-based page index returned.
        count:
          type: number
          description: Number of rows returned in this page.
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Stable identifier for this audit row — the FHIR version id of the resource that changed.
              type:
                type: string
                enum:
                - threshold
                - patient-threshold
                - location
                - device-location
                - device-zone
                - patient-status
                - create-user
                - create-location
                - create-zone
              user:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
                nullable: true
                description: The user who made the change. Null for system-triggered changes (cron, webhook).
              resident:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
                nullable: true
                description: The resident affected by the change, if applicable.
              device:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
                nullable: true
                description: The device affected by the change, if applicable.
              time:
                type: string
                format: date-time
                description: ISO timestamp when the change was recorded.
              details:
                type: string
                description: Human-readable summary of what changed. Computed server-side so frontend stays presentation-only.
              diff:
                type: object
                additionalProperties: {}
                description: Optional structured payload (old/new values per field) for a future drill-in view.
            required:
            - id
            - type
            - user
            - resident
            - device
            - time
            - details
            example:
              id: 88fc0a0a-e653-43c9-aba9-b4eaa47a002f
              type: threshold
              user:
                id: a3d80fcd-b228-4d89-b8ef-a8d7f0cfdc92
                name: Sarwagya Singh
              resident: null
              device: null
              time: 2026-05-18 11:51:37.195000+00:00
              details: Heart rate max threshold changed from 100 to 95
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 0
        page: 0
        count: 50
        resources: []
    CarehubPatientListResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              nickname:
                type: string
                nullable: true
              residentState:
                type: string
                enum:
                - active
                - discharged-recent
                - discharged
                - archived
              admissionDate:
                type: string
                nullable: true
              dischargeDate:
                type: string
                nullable: true
              organizationId:
                type: string
                nullable: true
              organizationName:
                type: string
                nullable: true
              locationId:
                type: string
                nullable: true
              locationName:
                type: string
                nullable: true
              deviceId:
                type: string
                nullable: true
              deviceName:
                type: string
                nullable: true
            required:
            - id
            - name
            - nickname
            - residentState
            - admissionDate
            - dischargeDate
            - organizationId
            - organizationName
            - locationId
            - locationName
            - deviceId
            - deviceName
            example:
              id: de5c57ff-7257-57b0-13ab-aab6f5f91498
              name: Maxi
              nickname: Maxi
              residentState: active
              admissionDate: 2026-05-21 08:09:31.577000+00:00
              dischargeDate: null
              organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
              organizationName: My Medical Project
              locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
              locationName: Room 201 Bed 1
              deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
              deviceName: Sleepiz/3001472
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 20
        resources:
        - id: de5c57ff-7257-57b0-13ab-aab6f5f91498
          name: Maxi
          nickname: Maxi
          residentState: active
          admissionDate: 2026-05-21 08:09:31.577000+00:00
          dischargeDate: null
          organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
          organizationName: My Medical Project
          locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
          locationName: Room 201 Bed 1
          deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
          deviceName: Sleepiz/3001472
    CarehubPatientCurrentVitalsResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        resources:
          type: array
          items:
            type: object
            properties:
              device:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
              patient:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  nickname:
                    type: string
                    nullable: true
                required:
                - id
                - name
              organization:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
              telemetry:
                type: object
                properties:
                  active:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  effectiveHeartRate:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  effectiveRespiratoryRate:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  effectiveSleepStatus:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  lastMeasurementTime:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  lastActivityTime:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  name:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                required:
                - active
                - effectiveHeartRate
                - effectiveRespiratoryRate
                - effectiveSleepStatus
                - lastMeasurementTime
                - lastActivityTime
                - name
      required:
      - total
      - resources
      example:
        total: 1
        resources:
        - device:
            id: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
            name: Sleepiz/3001472
          patient:
            id: de5c57ff-7257-57b0-13ab-aab6f5f91498
            name: Maxi
            nickname: Maxi
          organization:
            id: 519255ae-1f74-ffc5-ddd2-9979295c7572
            name: My Medical Project
          telemetry:
            active:
              value: true
              ts: 1779350971577
            effectiveHeartRate:
              value: 74
              ts: 1779350971577
            effectiveRespiratoryRate:
              value: 16
              ts: 1779350971577
            effectiveSleepStatus:
              value: asleep
              ts: 1779350971577
            lastMeasurementTime:
              value: 2026-05-21 08:09:31.577000+00:00
              ts: 1779350971577
            lastActivityTime:
              value: 2026-05-21 08:09:31.577000+00:00
              ts: 1779350971577
            name:
              value: Sleepiz/3001472
              ts: null
    FhirBundleResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Bundle
        type:
          type: string
        total:
          type: integer
        entry:
          type: array
          items:
            type: object
            properties:
              fullUrl:
                type: string
              resource:
                type: object
                properties:
                  resourceType:
                    type: string
                  id:
                    type: string
                required:
                - resourceType
                - id
                additionalProperties: true
                description: A FHIR resource as stored in the FHIR API.
            additionalProperties: true
      required:
      - resourceType
      - type
      additionalProperties: true
      description: A FHIR Bundle (typically searchset or transaction-response).
    CarehubPatientResponseDto:
      type: object
      properties:
        name:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                - official
                - nickname
                - maiden
              given:
                type: array
                items:
                  type: string
              family:
                type: string
            required:
            - use
            - given
            - family
        gender:
          type: string
          enum:
          - male
          - female
          - other
          - unknown
        birthDate:
          type: string
        deviceId:
          type: array
          items:
            type: string
        organizationId:
          type: string
        locationId:
          type: string
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
        residentState:
          type: string
          enum:
          - active
          - discharged-recent
          - discharged
          - archived
        admissionDate:
          type: string
        dischargeDate:
          type: string
      required:
      - name
      - residentState
      example:
        name:
        - use: official
          given:
          - Max
          family: Mustermann
        gender: male
        birthDate: 1990-01-01
        deviceId:
        - a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
        organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
        locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
        floor: '2'
        room: '201'
        bed: A
        residentState: active
        admissionDate: 2025-12-01 12:33:33.162000+00:00
    CarehubPatientAuditResponseDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              timestamp:
                type: string
              message:
                type: string
            required:
            - timestamp
            - message
      required:
      - total
      - resources
      example:
        total: 3
        resources:
        - timestamp: 2026-03-26 09:30:00+00:00
          message: Resident discharged
        - timestamp: 2026-03-20 08:15:00+00:00
          message: Device Sleep Sensor 12 assigned to resident
        - timestamp: 2026-03-18 07:00:00+00:00
          message: Resident created
    CarehubCheckNameExistsDto:
      type: object
      properties:
        name:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                - official
                - nickname
                - maiden
              given:
                type: array
                items:
                  type: string
                  minLength: 1
                minItems: 1
              family:
                type: string
                minLength: 1
            required:
            - use
          minItems: 1
        excludePatientId:
          type: string
      required:
      - name
      example:
        name:
        - use: nickname
          given:
          - RW
    CarehubCheckNameExistsResponseDto:
      type: object
      properties:
        exists:
          type: boolean
      required:
      - exists
      example:
        exists: true
    CarehubCreatePatientDto:
      type: object
      properties:
        name:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                - official
                - nickname
                - maiden
              given:
                type: array
                items:
                  type: string
                  minLength: 1
                minItems: 1
              family:
                type: string
                minLength: 1
            required:
            - use
          minItems: 1
        gender:
          type: string
          enum:
          - male
          - female
          - other
          - unknown
        birthDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        deviceId:
          oneOf:
          - type: string
            format: uuid
          - type: array
            items:
              type: string
              format: uuid
          nullable: true
        organizationId:
          type: string
          format: uuid
        locationId:
          type: string
          format: uuid
        admissionDate:
          type: string
          format: date-time
      required:
      - name
      additionalProperties: false
      example:
        name:
        - use: official
          given:
          - John
          family: Doe
        deviceId: '123'
        organizationId: '456'
        locationId: '789'
        admissionDate: 2025-11-28
    CarehubUpdatePatientDto:
      type: object
      properties:
        name:
          type: array
          items:
            type: object
            properties:
              use:
                type: string
                enum:
                - official
                - nickname
                - maiden
              given:
                type: array
                items:
                  type: string
                  minLength: 1
                minItems: 1
              family:
                type: string
                minLength: 1
            required:
            - use
          minItems: 1
        gender:
          type: string
          enum:
          - male
          - female
          - other
          - unknown
        birthDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        deviceId:
          oneOf:
          - type: string
            format: uuid
          - type: array
            items:
              type: string
              format: uuid
          nullable: true
        organizationId:
          type: string
          format: uuid
        locationId:
          type: string
          format: uuid
        residentState:
          type: string
          enum:
          - active
          - discharged
        dischargeDate:
          type: string
          format: date-time
      required:
      - name
      additionalProperties: false
      example:
        name: Patient 1
        gender: male
        birthDate: 1990-01-01
        residentState: discharged
    DeviceAssignmentProjectsResponseDto:
      type: object
      properties:
        total:
          type: integer
        resources:
          type: array
          items:
            type: object
            properties:
              project:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - name
            required:
            - project
      required:
      - total
      - resources
      description: Projects (current + parent + children) a device can be reassigned to. The dashboard renders these as the
        options in the "move device" picker.
    CarehubAssignDeviceDto:
      type: object
      properties:
        deviceId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        locationId:
          type: string
          format: uuid
      required:
      - deviceId
      - projectId
      additionalProperties: false
      example:
        deviceId: '123'
        projectId: '456'
        locationId: '789'
    DeviceAssignProjectResponseDto:
      type: object
      properties:
        success:
          type: boolean
          enum:
          - true
        deviceId:
          type: string
        projectId:
          type: string
        locationId:
          type: string
          nullable: true
      required:
      - success
      - projectId
      - locationId
      description: 'Acknowledgement that the device was moved to the target project (and optionally pinned to a Location).
        `success: false` is currently unreachable — failures raise 4xx/5xx.'
    CarehubDeviceListResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              thingsboardId:
                type: string
              status:
                type: string
                enum:
                - active
                - inactive
              organizationId:
                type: string
                nullable: true
              organizationName:
                type: string
                nullable: true
              locationId:
                type: string
                nullable: true
              locationName:
                type: string
                nullable: true
              patientId:
                type: string
                nullable: true
              patientName:
                type: string
                nullable: true
              lastActivityTime:
                type: string
                nullable: true
              createdAt:
                type: string
                nullable: true
            required:
            - id
            - name
            - status
            - organizationId
            - organizationName
            - locationId
            - locationName
            - patientId
            - patientName
            example:
              id: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
              name: Sleepiz/3001472
              thingsboardId: Sleepiz/3001472
              status: active
              organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
              organizationName: My Medical Project
              locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
              locationName: Room 201 Bed 1
              patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
              patientName: Maxi
              lastActivityTime: 2026-05-21 08:09:31.577000+00:00
              createdAt: 2026-05-21 08:09:31.577000+00:00
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 20
        resources:
        - id: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
          name: Sleepiz/3001472
          thingsboardId: Sleepiz/3001472
          status: active
          organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
          organizationName: My Medical Project
          locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
          locationName: Room 201 Bed 1
          patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
          patientName: Maxi
    CarehubDeviceLiveResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              device:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
              patient:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  nickname:
                    type: string
                    nullable: true
                required:
                - id
                - name
              location:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
              organization:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                required:
                - id
                - name
              telemetry:
                type: object
                properties:
                  active:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  effectiveHeartRate:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  effectiveRespiratoryRate:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  effectiveSleepStatus:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  lastMeasurementTime:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  lastActivityTime:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                  name:
                    type: object
                    properties:
                      value:
                        oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                        nullable: true
                      ts:
                        type: number
                        nullable: true
                    required:
                    - value
                    - ts
                required:
                - active
                - effectiveHeartRate
                - effectiveRespiratoryRate
                - effectiveSleepStatus
                - lastMeasurementTime
                - lastActivityTime
                - name
              alerts:
                type: object
                properties:
                  heartRate:
                    type: object
                    properties:
                      alert:
                        type: boolean
                      color:
                        type: string
                        nullable: true
                      message:
                        nullable: true
                      state:
                        type: string
                        enum:
                        - alert
                        - normal
                      updatedAt:
                        type: string
                        nullable: true
                    required:
                    - alert
                  respiratoryRate:
                    type: object
                    properties:
                      alert:
                        type: boolean
                      color:
                        type: string
                        nullable: true
                      message:
                        nullable: true
                      state:
                        type: string
                        enum:
                        - alert
                        - normal
                      updatedAt:
                        type: string
                        nullable: true
                    required:
                    - alert
                required:
                - heartRate
                - respiratoryRate
              calculatedFields:
                type: object
                properties:
                  locationName:
                    type: string
                  patientName:
                    type: string
                  patientNickname:
                    type: string
                  organizationName:
                    type: string
                  residentState:
                    type: string
                    enum:
                    - active
                    - discharged-recent
                    - discharged
                    - archived
                    nullable: true
                  effectiveSleepStatus:
                    type: string
                  active:
                    type: boolean
                  admissionDate:
                    type: string
                    nullable: true
                  dischargeDate:
                    type: string
                    nullable: true
            example:
              device:
                id: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
                name: Sleepiz/3001472
              patient:
                id: de5c57ff-7257-57b0-13ab-aab6f5f91498
                name: Maxi
                nickname: Maxi
              location:
                id: d219c681-01f5-32de-10ad-d2cf42fb9dbe
                name: Room 201 Bed 1
              organization:
                id: 519255ae-1f74-ffc5-ddd2-9979295c7572
                name: My Medical Project
              telemetry:
                active:
                  value: true
                  ts: 1779350971577
                effectiveHeartRate:
                  value: 74
                  ts: 1779350971577
                effectiveRespiratoryRate:
                  value: 16
                  ts: 1779350971577
                effectiveSleepStatus:
                  value: asleep
                  ts: 1779350971577
                lastMeasurementTime:
                  value: 2026-05-21 08:09:31.577000+00:00
                  ts: 1779350971577
                lastActivityTime:
                  value: 2026-05-21 08:09:31.577000+00:00
                  ts: 1779350971577
                name:
                  value: Sleepiz/3001472
                  ts: null
              alerts:
                heartRate:
                  alert: false
                  color: null
                  message: null
                  state: normal
                  updatedAt: null
                respiratoryRate:
                  alert: false
                  color: null
                  message: null
                  state: normal
                  updatedAt: null
              calculatedFields:
                locationName: Room 201 Bed 1
                patientName: Maxi
                patientNickname: Maxi
                organizationName: My Medical Project
                residentState: active
                effectiveSleepStatus: asleep
                active: true
                admissionDate: 2026-05-21 08:09:31.577000+00:00
                dischargeDate: null
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 20
        resources:
        - device:
            id: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
            name: Sleepiz/3001472
          patient:
            id: de5c57ff-7257-57b0-13ab-aab6f5f91498
            name: Maxi
            nickname: Maxi
          location:
            id: d219c681-01f5-32de-10ad-d2cf42fb9dbe
            name: Room 201 Bed 1
          organization:
            id: 519255ae-1f74-ffc5-ddd2-9979295c7572
            name: My Medical Project
    CarehubDeviceLiveTelemetryResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        telemetry:
          type: object
          additionalProperties:
            type: object
            properties:
              active:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
              effectiveHeartRate:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
              effectiveRespiratoryRate:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
              effectiveSleepStatus:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
              lastMeasurementTime:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
              lastActivityTime:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
              name:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    nullable: true
                  ts:
                    type: number
                    nullable: true
                required:
                - value
                - ts
            required:
            - active
            - effectiveHeartRate
            - effectiveRespiratoryRate
            - effectiveSleepStatus
            - lastMeasurementTime
            - lastActivityTime
            - name
        alerts:
          type: object
          additionalProperties:
            type: object
            properties:
              heartRate:
                type: object
                properties:
                  alert:
                    type: boolean
                  color:
                    type: string
                    nullable: true
                  message:
                    nullable: true
                  state:
                    type: string
                    enum:
                    - alert
                    - normal
                  updatedAt:
                    type: string
                    nullable: true
                required:
                - alert
              respiratoryRate:
                type: object
                properties:
                  alert:
                    type: boolean
                  color:
                    type: string
                    nullable: true
                  message:
                    nullable: true
                  state:
                    type: string
                    enum:
                    - alert
                    - normal
                  updatedAt:
                    type: string
                    nullable: true
                required:
                - alert
            required:
            - heartRate
            - respiratoryRate
      required:
      - total
      - page
      - count
      - telemetry
      - alerts
      example:
        total: 1
        page: 0
        count: 20
        telemetry:
          a5a74a6d-f092-78b8-8cb6-ea23b7d7f257:
            active:
              value: true
              ts: 1779350971577
            effectiveHeartRate:
              value: 74
              ts: 1779350971577
            effectiveRespiratoryRate:
              value: 16
              ts: 1779350971577
            effectiveSleepStatus:
              value: asleep
              ts: 1779350971577
            lastMeasurementTime:
              value: 2026-05-21 08:09:31.577000+00:00
              ts: 1779350971577
            lastActivityTime:
              value: 2026-05-21 08:09:31.577000+00:00
              ts: 1779350971577
            name:
              value: Sleepiz/3001472
              ts: null
        alerts:
          a5a74a6d-f092-78b8-8cb6-ea23b7d7f257:
            heartRate:
              alert: false
              color: null
              message: null
              state: normal
              updatedAt: null
            respiratoryRate:
              alert: false
              color: null
              message: null
              state: normal
              updatedAt: null
    CarehubDeviceResponseDto:
      type: object
      properties:
        name:
          type: string
        status:
          type: string
          enum:
          - active
          - inactive
          - entered-in-error
          - unknown
        thingsboardId:
          type: string
        organizationId:
          type: string
        locationId:
          type: string
        patientId:
          type: string
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
      required:
      - name
      example:
        name: 'Patient Monitor Device #gq7cDglqpS'
        status: active
        thingsboardId: TB_DEVICE_gq7cDglqpS
        organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
        locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
        patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
        floor: '2'
        room: '201'
        bed: A
    CarehubCreateDeviceDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        thingsboardId:
          type: string
          minLength: 1
        organizationId:
          type: string
          format: uuid
        locationId:
          type: string
          format: uuid
        patientId:
          type: string
          format: uuid
      required:
      - name
      additionalProperties: false
      example:
        name: Device 1
        thingsboardId: '123'
        organizationId: '456'
        locationId: '789'
        patientId: '101'
    CarehubUpdateDeviceDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        thingsboardId:
          type: string
          minLength: 1
        organizationId:
          type: string
          format: uuid
          nullable: true
        locationId:
          type: string
          format: uuid
          nullable: true
        patientId:
          type: string
          format: uuid
          nullable: true
      required:
      - name
      additionalProperties: false
      example:
        name: Device 1
        thingsboardId: '123'
        organizationId: '456'
        locationId: '789'
        patientId: '101'
    FhirObservationIngestDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Observation
          description: Must be "Observation" for FHIR R4.
        status:
          type: string
        identifier:
          type: array
          items:
            type: object
            properties:
              system:
                type: string
              value:
                type: string
            required:
            - value
          minItems: 1
          description: At least one identifier; used for deduplication (e.g. LOINC + effective time).
        effectiveDateTime:
          type: string
          description: ISO 8601 date-time; one of effectiveDateTime, effectivePeriod, or effectiveInstant required.
        effectivePeriod:
          type: object
          properties:
            start:
              type: string
            end:
              type: string
          required:
          - start
        effectiveInstant:
          type: string
        code:
          type: object
          properties:
            coding:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
                required:
                - code
              minItems: 1
          required:
          - coding
          description: LOINC or other observation code (e.g. 8867-4 heart rate).
        category:
          type: array
          items:
            type: object
            properties:
              coding:
                type: array
                items:
                  type: object
                  properties:
                    system:
                      type: string
                    code:
                      type: string
                    display:
                      type: string
                  required:
                  - code
              text:
                type: string
        valueQuantity:
          type: object
          properties:
            value:
              type: number
            unit:
              type: string
            system:
              type: string
            code:
              type: string
        valueInteger:
          type: number
        valueSampledData:
          type: object
          properties:
            origin:
              type: object
              properties:
                value:
                  type: number
                unit:
                  type: string
                system:
                  type: string
                code:
                  type: string
              required:
              - value
            period:
              type: number
            factor:
              type: number
            dimensions:
              type: number
            data:
              type: string
          required:
          - origin
          - period
        valueCodeableConcept:
          type: object
          properties:
            coding:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
                required:
                - code
            text:
              type: string
        component:
          type: array
          items:
            type: object
            properties:
              code:
                type: object
                properties:
                  coding:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                        code:
                          type: string
                        display:
                          type: string
                      required:
                      - code
                  text:
                    type: string
              valueQuantity:
                type: object
                properties:
                  value:
                    type: number
                  unit:
                    type: string
                  system:
                    type: string
                  code:
                    type: string
              valueCodeableConcept:
                type: object
                properties:
                  coding:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                        code:
                          type: string
                        display:
                          type: string
                      required:
                      - code
                  text:
                    type: string
              valueString:
                type: string
              valueDateTime:
                type: string
              valueInteger:
                type: number
        device:
          type: object
          properties:
            reference:
              type: string
          required:
          - reference
          description: Device reference (e.g. Device/3001468); device id is extracted for routing.
        subject:
          type: object
          properties:
            reference:
              type: string
          required:
          - reference
      required:
      - resourceType
      - code
      - device
    FhirIngestAckResponseDto:
      type: object
      properties:
        jobId:
          type: string
          description: ID of the enqueued job.
        requestId:
          type: string
          description: Request ID from context when present.
      required:
      - jobId
    FhirBundleIngestDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Bundle
          description: Must be "Bundle" for FHIR R4.
        type:
          type: string
          description: Bundle type (e.g. collection, transaction).
        entry:
          type: array
          items:
            type: object
            properties:
              resource:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - Observation
                    description: Must be "Observation" for FHIR R4.
                  status:
                    type: string
                  identifier:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                        value:
                          type: string
                      required:
                      - value
                    minItems: 1
                    description: At least one identifier; used for deduplication (e.g. LOINC + effective time).
                  effectiveDateTime:
                    type: string
                    description: ISO 8601 date-time; one of effectiveDateTime, effectivePeriod, or effectiveInstant required.
                  effectivePeriod:
                    type: object
                    properties:
                      start:
                        type: string
                      end:
                        type: string
                    required:
                    - start
                  effectiveInstant:
                    type: string
                  code:
                    type: object
                    properties:
                      coding:
                        type: array
                        items:
                          type: object
                          properties:
                            system:
                              type: string
                            code:
                              type: string
                            display:
                              type: string
                          required:
                          - code
                        minItems: 1
                    required:
                    - coding
                    description: LOINC or other observation code (e.g. 8867-4 heart rate).
                  category:
                    type: array
                    items:
                      type: object
                      properties:
                        coding:
                          type: array
                          items:
                            type: object
                            properties:
                              system:
                                type: string
                              code:
                                type: string
                              display:
                                type: string
                            required:
                            - code
                        text:
                          type: string
                  valueQuantity:
                    type: object
                    properties:
                      value:
                        type: number
                      unit:
                        type: string
                      system:
                        type: string
                      code:
                        type: string
                  valueInteger:
                    type: number
                  valueSampledData:
                    type: object
                    properties:
                      origin:
                        type: object
                        properties:
                          value:
                            type: number
                          unit:
                            type: string
                          system:
                            type: string
                          code:
                            type: string
                        required:
                        - value
                      period:
                        type: number
                      factor:
                        type: number
                      dimensions:
                        type: number
                      data:
                        type: string
                    required:
                    - origin
                    - period
                  valueCodeableConcept:
                    type: object
                    properties:
                      coding:
                        type: array
                        items:
                          type: object
                          properties:
                            system:
                              type: string
                            code:
                              type: string
                            display:
                              type: string
                          required:
                          - code
                      text:
                        type: string
                  component:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: object
                          properties:
                            coding:
                              type: array
                              items:
                                type: object
                                properties:
                                  system:
                                    type: string
                                  code:
                                    type: string
                                  display:
                                    type: string
                                required:
                                - code
                            text:
                              type: string
                        valueQuantity:
                          type: object
                          properties:
                            value:
                              type: number
                            unit:
                              type: string
                            system:
                              type: string
                            code:
                              type: string
                        valueCodeableConcept:
                          type: object
                          properties:
                            coding:
                              type: array
                              items:
                                type: object
                                properties:
                                  system:
                                    type: string
                                  code:
                                    type: string
                                  display:
                                    type: string
                                required:
                                - code
                            text:
                              type: string
                        valueString:
                          type: string
                        valueDateTime:
                          type: string
                        valueInteger:
                          type: number
                  device:
                    type: object
                    properties:
                      reference:
                        type: string
                    required:
                    - reference
                    description: Device reference (e.g. Device/3001468); device id is extracted for routing.
                  subject:
                    type: object
                    properties:
                      reference:
                        type: string
                    required:
                    - reference
                required:
                - resourceType
                - code
                - device
            required:
            - resource
          minItems: 1
          description: One or more entries; each entry.resource must be a valid Observation.
      required:
      - resourceType
      - entry
    FhirBundleIngestAckResponseDto:
      type: object
      properties:
        jobIds:
          type: array
          items:
            type: string
          description: IDs of enqueued jobs.
        requestId:
          type: string
          description: Request ID from context when present.
      required:
      - jobIds
    EnvironmentObservationIngestDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Observation
          description: Must be "Observation" for FHIR R4.
        status:
          type: string
        identifier:
          type: array
          items:
            type: object
            properties:
              system:
                type: string
              value:
                type: string
            required:
            - value
          minItems: 1
          description: At least one identifier; used for deduplication (e.g. LOINC + effective time).
        effectiveDateTime:
          type: string
          description: ISO 8601 date-time; one of effectiveDateTime, effectivePeriod, or effectiveInstant required.
        effectivePeriod:
          type: object
          properties:
            start:
              type: string
            end:
              type: string
          required:
          - start
        effectiveInstant:
          type: string
        code:
          type: object
          properties:
            coding:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
                required:
                - code
              minItems: 1
          required:
          - coding
          description: LOINC or other observation code (e.g. 8867-4 heart rate).
        category:
          type: array
          items:
            type: object
            properties:
              coding:
                type: array
                items:
                  type: object
                  properties:
                    system:
                      type: string
                    code:
                      type: string
                    display:
                      type: string
                  required:
                  - code
              text:
                type: string
        valueQuantity:
          type: object
          properties:
            value:
              type: number
            unit:
              type: string
            system:
              type: string
            code:
              type: string
        valueInteger:
          type: number
        valueSampledData:
          type: object
          properties:
            origin:
              type: object
              properties:
                value:
                  type: number
                unit:
                  type: string
                system:
                  type: string
                code:
                  type: string
              required:
              - value
            period:
              type: number
            factor:
              type: number
            dimensions:
              type: number
            data:
              type: string
          required:
          - origin
          - period
        valueCodeableConcept:
          type: object
          properties:
            coding:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  code:
                    type: string
                  display:
                    type: string
                required:
                - code
            text:
              type: string
        component:
          type: array
          items:
            type: object
            properties:
              code:
                type: object
                properties:
                  coding:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                        code:
                          type: string
                        display:
                          type: string
                      required:
                      - code
                  text:
                    type: string
              valueQuantity:
                type: object
                properties:
                  value:
                    type: number
                  unit:
                    type: string
                  system:
                    type: string
                  code:
                    type: string
              valueCodeableConcept:
                type: object
                properties:
                  coding:
                    type: array
                    items:
                      type: object
                      properties:
                        system:
                          type: string
                        code:
                          type: string
                        display:
                          type: string
                      required:
                      - code
                  text:
                    type: string
              valueString:
                type: string
              valueDateTime:
                type: string
              valueInteger:
                type: number
        device:
          type: object
          properties:
            reference:
              type: string
          required:
          - reference
          description: Device reference (e.g. Device/3001468); device id is extracted for routing.
        subject:
          type: object
          properties:
            reference:
              type: string
          required:
          - reference
      required:
      - resourceType
      - code
      - device
      example:
        resourceType: Observation
        status: final
        code:
          coding:
          - system: https://api.ovok.com/StructuredDefinition
            code: room_temperature
          - system: http://loinc.org
            code: 8310-5
            display: Room temperature
        effectiveInstant: 2026-04-25 09:00:00+00:00
        valueQuantity:
          value: 23.5
          unit: °C
          system: http://unitsofmeasure.org
          code: Cel
        device:
          reference: Device/MC01-demo-device
    ThingsboardInitializeDeviceDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        serialNumber:
          type: string
        manufacturer:
          type: string
      required:
      - name
      additionalProperties: false
      example:
        name: Device 1
    ThingsboardTelemetryUpdateRequestBodyDto:
      type: object
      properties:
        ts:
          type: number
        data:
          type: object
          properties:
            heartRate:
              type: number
            respiratoryRate:
              type: number
            sleepStatus:
              type: string
            presenceStatus:
              oneOf:
              - type: string
              - type: boolean
            online:
              type: boolean
            sleepDuration:
              type: object
              properties:
                value:
                  type: number
                period:
                  type: object
                  properties:
                    start:
                      type: number
                    end:
                      type: number
                  required:
                  - start
                  - end
              required:
              - value
              - period
            numberOfTimesGettingOutOfBed:
              type: object
              properties:
                value:
                  type: number
                period:
                  type: object
                  properties:
                    start:
                      type: number
                    end:
                      type: number
                  required:
                  - start
                  - end
              required:
              - value
              - period
            meanHeartRate:
              type: object
              properties:
                value:
                  type: number
                period:
                  type: object
                  properties:
                    start:
                      type: number
                    end:
                      type: number
                  required:
                  - start
                  - end
              required:
              - value
              - period
            meanRespiratoryRate:
              type: object
              properties:
                value:
                  type: number
                period:
                  type: object
                  properties:
                    start:
                      type: number
                    end:
                      type: number
                  required:
                  - start
                  - end
              required:
              - value
              - period
        metadata:
          type: object
          properties:
            effectiveSleepStatus:
              type: object
              properties:
                value:
                  type: string
                ts:
                  type: number
              required:
              - value
              - ts
            effectivePresenceStatus:
              type: object
              properties:
                value:
                  type: string
                ts:
                  type: number
                boolValue:
                  type: boolean
      required:
      - ts
      - data
    ThingsboardFhirUpdateRequestBodyDto:
      type: object
      properties:
        ts:
          type: number
        data:
          type: object
          additionalProperties: {}
        metadata:
          type: object
          properties:
            effectiveSleepStatus:
              type: object
              properties:
                value:
                  type: string
                ts:
                  type: number
      required:
      - ts
      - data
      additionalProperties: true
    ExportPdfBodyDto:
      type: object
      properties:
        code:
          type: string
        mailTo:
          default: []
          type: array
          items:
            type: string
            format: email
        timeZone:
          default: Europe/Berlin
          type: string
        language:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
        patientId:
          type: string
          format: uuid
        period:
          type: object
          properties:
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
          required:
          - start
          - end
      required:
      - code
      - language
      - patientId
      - period
    CarehubExportPdfResponseDto:
      type: object
      properties:
        documentReference:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - DocumentReference
            id:
              type: string
              format: uuid
            status:
              type: string
              enum:
              - current
              - superseded
              - entered-in-error
            type:
              type: object
              properties:
                coding:
                  type: array
                  items:
                    type: object
                    properties:
                      system:
                        type: string
                      code:
                        type: string
                      display:
                        type: string
                    required:
                    - system
                    - code
                    - display
              required:
              - coding
            subject:
              type: object
              properties:
                reference:
                  type: string
                display:
                  type: string
              required:
              - reference
              - display
            content:
              type: array
              items:
                type: object
                properties:
                  attachment:
                    type: object
                    properties:
                      contentType:
                        type: string
                        enum:
                        - application/pdf
                      url:
                        type: string
                      size:
                        type: number
                      title:
                        type: string
                    required:
                    - contentType
                    - url
                required:
                - attachment
            created:
              type: string
          required:
          - resourceType
          - id
          - status
          - type
          - subject
          - content
          - created
        binary:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Binary
            id:
              type: string
              format: uuid
            contentType:
              type: string
              enum:
              - application/pdf
            data:
              type: string
          required:
          - resourceType
          - id
          - contentType
        downloadUrl:
          type: string
        expiresAt:
          type: string
      required:
      - documentReference
      - binary
      - downloadUrl
      example:
        documentReference:
          resourceType: DocumentReference
          id: a399fd4d-cbed-5726-8f61-3e8fd866d47d
          status: current
          type:
            coding:
            - system: http://loinc.org
              code: 11502-2
              display: Laboratory report
          subject:
            reference: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
            display: Max Mustermann
          content:
          - attachment:
              contentType: application/pdf
              url: https://api.example.com/binary/66639f7d-455d-d71f-aa91-47f5d69e5ce8
              size: 1024000
              title: Patient Data Export - Max Mustermann
          created: 2026-05-21 08:09:31.577000+00:00
        binary:
          resourceType: Binary
          id: 66639f7d-455d-d71f-aa91-47f5d69e5ce8
          contentType: application/pdf
        downloadUrl: https://api.example.com/binary/66639f7d-455d-d71f-aa91-47f5d69e5ce8/download
        expiresAt: 2026-05-22 08:09:31+00:00
    MappedContentSearchResponseDto:
      type: object
      properties:
        total:
          type: integer
        resources:
          type: array
          items:
            type: object
            properties:
              source:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    type: string
                  author:
                    type: object
                    properties:
                      reference:
                        type: string
                      display:
                        type: string
                    required:
                    - reference
                  key:
                    type: string
                    description: A random UUID that is used to identify the content, not ID!
                  language:
                    type: string
                    enum:
                    - Cy-az-AZ
                    - Cy-sr-SP
                    - Cy-uz-UZ
                    - Lt-az-AZ
                    - Lt-sr-SP
                    - Lt-uz-UZ
                    - aa
                    - ab
                    - ae
                    - af
                    - af-ZA
                    - ak
                    - am
                    - an
                    - ar
                    - ar-AE
                    - ar-BH
                    - ar-DZ
                    - ar-EG
                    - ar-IQ
                    - ar-JO
                    - ar-KW
                    - ar-LB
                    - ar-LY
                    - ar-MA
                    - ar-OM
                    - ar-QA
                    - ar-SA
                    - ar-SY
                    - ar-TN
                    - ar-YE
                    - as
                    - av
                    - ay
                    - az
                    - ba
                    - be
                    - be-BY
                    - bg
                    - bg-BG
                    - bh
                    - bi
                    - bm
                    - bn
                    - bo
                    - br
                    - bs
                    - ca
                    - ca-ES
                    - ce
                    - ch
                    - co
                    - cr
                    - cs
                    - cs-CZ
                    - cu
                    - cv
                    - cy
                    - da
                    - da-DK
                    - de
                    - de-AT
                    - de-CH
                    - de-DE
                    - de-LI
                    - de-LU
                    - div-MV
                    - dv
                    - dz
                    - ee
                    - el
                    - el-GR
                    - en
                    - en-AU
                    - en-BZ
                    - en-CA
                    - en-CB
                    - en-GB
                    - en-IE
                    - en-JM
                    - en-NZ
                    - en-PH
                    - en-TT
                    - en-US
                    - en-ZA
                    - en-ZW
                    - eo
                    - es
                    - es-AR
                    - es-BO
                    - es-CL
                    - es-CO
                    - es-CR
                    - es-DO
                    - es-EC
                    - es-ES
                    - es-GT
                    - es-HN
                    - es-MX
                    - es-NI
                    - es-PA
                    - es-PE
                    - es-PR
                    - es-PY
                    - es-SV
                    - es-UY
                    - es-VE
                    - et
                    - et-EE
                    - eu
                    - eu-ES
                    - fa
                    - fa-IR
                    - ff
                    - fi
                    - fi-FI
                    - fj
                    - fo
                    - fo-FO
                    - fr
                    - fr-BE
                    - fr-CA
                    - fr-CH
                    - fr-FR
                    - fr-LU
                    - fr-MC
                    - fy
                    - ga
                    - gd
                    - gl
                    - gl-ES
                    - gn
                    - gu
                    - gu-IN
                    - gv
                    - ha
                    - he
                    - he-IL
                    - hi
                    - hi-IN
                    - ho
                    - hr
                    - hr-HR
                    - ht
                    - hu
                    - hu-HU
                    - hy
                    - hy-AM
                    - hz
                    - ia
                    - id
                    - id-ID
                    - ie
                    - ig
                    - ii
                    - ik
                    - io
                    - is
                    - is-IS
                    - it
                    - it-CH
                    - it-IT
                    - iu
                    - ja
                    - ja-JP
                    - jv
                    - ka
                    - ka-GE
                    - kg
                    - ki
                    - kj
                    - kk
                    - kk-KZ
                    - kl
                    - km
                    - kn
                    - kn-IN
                    - ko
                    - ko-KR
                    - kr
                    - ks
                    - ku
                    - kv
                    - kw
                    - ky
                    - ky-KZ
                    - la
                    - lb
                    - lg
                    - li
                    - ln
                    - lo
                    - lt
                    - lt-LT
                    - lu
                    - lv
                    - lv-LV
                    - mg
                    - mh
                    - mi
                    - mk
                    - mk-MK
                    - ml
                    - mn
                    - mn-MN
                    - mr
                    - mr-IN
                    - ms
                    - ms-BN
                    - ms-MY
                    - mt
                    - my
                    - na
                    - nb
                    - nb-NO
                    - nd
                    - ne
                    - ng
                    - nl
                    - nl-BE
                    - nl-NL
                    - nn
                    - nn-NO
                    - false
                    - nr
                    - nv
                    - ny
                    - oc
                    - oj
                    - om
                    - or
                    - os
                    - pa
                    - pa-IN
                    - pi
                    - pl
                    - pl-PL
                    - ps
                    - pt
                    - pt-BR
                    - pt-PT
                    - qu
                    - rm
                    - rn
                    - ro
                    - ro-RO
                    - ru
                    - ru-RU
                    - rw
                    - sa
                    - sa-IN
                    - sc
                    - sd
                    - se
                    - sg
                    - si
                    - sk
                    - sk-SK
                    - sl
                    - sl-SI
                    - sm
                    - sn
                    - so
                    - sq
                    - sq-AL
                    - sr
                    - ss
                    - st
                    - su
                    - sv
                    - sv-FI
                    - sv-SE
                    - sw
                    - sw-KE
                    - ta
                    - ta-IN
                    - te
                    - te-IN
                    - tg
                    - th
                    - th-TH
                    - ti
                    - tk
                    - tl
                    - tn
                    - to
                    - tr
                    - tr-TR
                    - ts
                    - tt
                    - tt-RU
                    - tw
                    - ty
                    - ug
                    - uk
                    - uk-UA
                    - ur
                    - ur-PK
                    - uz
                    - ve
                    - vi
                    - vi-VN
                    - vo
                    - wa
                    - wo
                    - xh
                    - yi
                    - yo
                    - za
                    - zh
                    - zh-CHS
                    - zh-CHT
                    - zh-CN
                    - zh-HK
                    - zh-MO
                    - zh-SG
                    - zh-TW
                    - zu
                  date:
                    type: string
                  projectId:
                    type: string
                    format: uuid
                  type:
                    type: string
                    enum:
                    - blog
                    - video
                    - audio
                    - template
                    - export-template
                  code:
                    type: string
                  category:
                    type: array
                    items:
                      type: string
                  section:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        text:
                          type: string
                        extension:
                          type: object
                          additionalProperties:
                            type: string
                        code:
                          type: array
                          items:
                            type: string
                            minLength: 1
                required:
                - title
                - author
                - key
                - language
                - date
                - type
                example: &id085
                  id: '123'
                  title: My Blog
                  author:
                    reference: '123'
                    display: John Doe
                  date: 2021-01-01
                  project: '123'
                  type: blog
                  category:
                  - '123'
                  - '456'
                  section:
                  - title: My Blog
                    text: My Blog Text
                    extension:
                      covert-media: http://example.com/extensionValue
                description: The default-language source content, if present.
              target:
                type: object
                properties:
                  id:
                    type: string
                  title:
                    type: string
                  author:
                    type: object
                    properties:
                      reference:
                        type: string
                      display:
                        type: string
                    required:
                    - reference
                  key:
                    type: string
                    description: A random UUID that is used to identify the content, not ID!
                  language:
                    type: string
                    enum:
                    - Cy-az-AZ
                    - Cy-sr-SP
                    - Cy-uz-UZ
                    - Lt-az-AZ
                    - Lt-sr-SP
                    - Lt-uz-UZ
                    - aa
                    - ab
                    - ae
                    - af
                    - af-ZA
                    - ak
                    - am
                    - an
                    - ar
                    - ar-AE
                    - ar-BH
                    - ar-DZ
                    - ar-EG
                    - ar-IQ
                    - ar-JO
                    - ar-KW
                    - ar-LB
                    - ar-LY
                    - ar-MA
                    - ar-OM
                    - ar-QA
                    - ar-SA
                    - ar-SY
                    - ar-TN
                    - ar-YE
                    - as
                    - av
                    - ay
                    - az
                    - ba
                    - be
                    - be-BY
                    - bg
                    - bg-BG
                    - bh
                    - bi
                    - bm
                    - bn
                    - bo
                    - br
                    - bs
                    - ca
                    - ca-ES
                    - ce
                    - ch
                    - co
                    - cr
                    - cs
                    - cs-CZ
                    - cu
                    - cv
                    - cy
                    - da
                    - da-DK
                    - de
                    - de-AT
                    - de-CH
                    - de-DE
                    - de-LI
                    - de-LU
                    - div-MV
                    - dv
                    - dz
                    - ee
                    - el
                    - el-GR
                    - en
                    - en-AU
                    - en-BZ
                    - en-CA
                    - en-CB
                    - en-GB
                    - en-IE
                    - en-JM
                    - en-NZ
                    - en-PH
                    - en-TT
                    - en-US
                    - en-ZA
                    - en-ZW
                    - eo
                    - es
                    - es-AR
                    - es-BO
                    - es-CL
                    - es-CO
                    - es-CR
                    - es-DO
                    - es-EC
                    - es-ES
                    - es-GT
                    - es-HN
                    - es-MX
                    - es-NI
                    - es-PA
                    - es-PE
                    - es-PR
                    - es-PY
                    - es-SV
                    - es-UY
                    - es-VE
                    - et
                    - et-EE
                    - eu
                    - eu-ES
                    - fa
                    - fa-IR
                    - ff
                    - fi
                    - fi-FI
                    - fj
                    - fo
                    - fo-FO
                    - fr
                    - fr-BE
                    - fr-CA
                    - fr-CH
                    - fr-FR
                    - fr-LU
                    - fr-MC
                    - fy
                    - ga
                    - gd
                    - gl
                    - gl-ES
                    - gn
                    - gu
                    - gu-IN
                    - gv
                    - ha
                    - he
                    - he-IL
                    - hi
                    - hi-IN
                    - ho
                    - hr
                    - hr-HR
                    - ht
                    - hu
                    - hu-HU
                    - hy
                    - hy-AM
                    - hz
                    - ia
                    - id
                    - id-ID
                    - ie
                    - ig
                    - ii
                    - ik
                    - io
                    - is
                    - is-IS
                    - it
                    - it-CH
                    - it-IT
                    - iu
                    - ja
                    - ja-JP
                    - jv
                    - ka
                    - ka-GE
                    - kg
                    - ki
                    - kj
                    - kk
                    - kk-KZ
                    - kl
                    - km
                    - kn
                    - kn-IN
                    - ko
                    - ko-KR
                    - kr
                    - ks
                    - ku
                    - kv
                    - kw
                    - ky
                    - ky-KZ
                    - la
                    - lb
                    - lg
                    - li
                    - ln
                    - lo
                    - lt
                    - lt-LT
                    - lu
                    - lv
                    - lv-LV
                    - mg
                    - mh
                    - mi
                    - mk
                    - mk-MK
                    - ml
                    - mn
                    - mn-MN
                    - mr
                    - mr-IN
                    - ms
                    - ms-BN
                    - ms-MY
                    - mt
                    - my
                    - na
                    - nb
                    - nb-NO
                    - nd
                    - ne
                    - ng
                    - nl
                    - nl-BE
                    - nl-NL
                    - nn
                    - nn-NO
                    - false
                    - nr
                    - nv
                    - ny
                    - oc
                    - oj
                    - om
                    - or
                    - os
                    - pa
                    - pa-IN
                    - pi
                    - pl
                    - pl-PL
                    - ps
                    - pt
                    - pt-BR
                    - pt-PT
                    - qu
                    - rm
                    - rn
                    - ro
                    - ro-RO
                    - ru
                    - ru-RU
                    - rw
                    - sa
                    - sa-IN
                    - sc
                    - sd
                    - se
                    - sg
                    - si
                    - sk
                    - sk-SK
                    - sl
                    - sl-SI
                    - sm
                    - sn
                    - so
                    - sq
                    - sq-AL
                    - sr
                    - ss
                    - st
                    - su
                    - sv
                    - sv-FI
                    - sv-SE
                    - sw
                    - sw-KE
                    - ta
                    - ta-IN
                    - te
                    - te-IN
                    - tg
                    - th
                    - th-TH
                    - ti
                    - tk
                    - tl
                    - tn
                    - to
                    - tr
                    - tr-TR
                    - ts
                    - tt
                    - tt-RU
                    - tw
                    - ty
                    - ug
                    - uk
                    - uk-UA
                    - ur
                    - ur-PK
                    - uz
                    - ve
                    - vi
                    - vi-VN
                    - vo
                    - wa
                    - wo
                    - xh
                    - yi
                    - yo
                    - za
                    - zh
                    - zh-CHS
                    - zh-CHT
                    - zh-CN
                    - zh-HK
                    - zh-MO
                    - zh-SG
                    - zh-TW
                    - zu
                  date:
                    type: string
                  projectId:
                    type: string
                    format: uuid
                  type:
                    type: string
                    enum:
                    - blog
                    - video
                    - audio
                    - template
                    - export-template
                  code:
                    type: string
                  category:
                    type: array
                    items:
                      type: string
                  section:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        text:
                          type: string
                        extension:
                          type: object
                          additionalProperties:
                            type: string
                        code:
                          type: array
                          items:
                            type: string
                            minLength: 1
                required:
                - title
                - author
                - key
                - language
                - date
                - type
                example: *id085
                description: The translated content in the requested language, if present.
      required:
      - total
      - resources
      description: Paginated source ↔ target content pairs used by the dashboard's translation editor. Either side can be
        missing — a target without a source means the default language item has been deleted, a source without a target means
        no translation exists yet.
    CopyContentsResponseDto:
      type: object
      properties:
        success:
          type: boolean
      required:
      - success
      description: 'Acknowledgement that the child project copied content from its parent project. `success: false` is currently
        unused — failure paths raise 400.'
    ContentBodyDto:
      type: object
      properties:
        title:
          type: string
        category:
          type: array
          items:
            type: string
        section:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              text:
                type: string
              extension:
                type: object
                additionalProperties:
                  type: string
              code:
                type: array
                items:
                  type: string
                  minLength: 1
        code:
          type: string
      required:
      - title
      example:
        title: My Blog
        category: '123'
        section:
        - title: My Section
          text: My Text
          code:
          - main-content
        - title: My Section 2
          text: My Text 2
          code:
          - reading-time
        - title: My Section 3
          text: My Text 3
          code:
          - resource-link
    ContentDto:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        author:
          type: object
          properties:
            reference:
              type: string
            display:
              type: string
          required:
          - reference
        key:
          type: string
          description: A random UUID that is used to identify the content, not ID!
        language:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
        date:
          type: string
        projectId:
          type: string
          format: uuid
        type:
          type: string
          enum:
          - blog
          - video
          - audio
          - template
          - export-template
        code:
          type: string
        category:
          type: array
          items:
            type: string
        section:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              text:
                type: string
              extension:
                type: object
                additionalProperties:
                  type: string
              code:
                type: array
                items:
                  type: string
                  minLength: 1
      required:
      - title
      - author
      - key
      - language
      - date
      - type
      example: *id085
    ContentSearchResponseDto:
      type: object
      properties:
        total:
          type: integer
          description: Total matches across all pages (before slicing by offset/count).
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
              author:
                type: object
                properties:
                  reference:
                    type: string
                  display:
                    type: string
                required:
                - reference
              key:
                type: string
                description: A random UUID that is used to identify the content, not ID!
              language:
                type: string
                enum:
                - Cy-az-AZ
                - Cy-sr-SP
                - Cy-uz-UZ
                - Lt-az-AZ
                - Lt-sr-SP
                - Lt-uz-UZ
                - aa
                - ab
                - ae
                - af
                - af-ZA
                - ak
                - am
                - an
                - ar
                - ar-AE
                - ar-BH
                - ar-DZ
                - ar-EG
                - ar-IQ
                - ar-JO
                - ar-KW
                - ar-LB
                - ar-LY
                - ar-MA
                - ar-OM
                - ar-QA
                - ar-SA
                - ar-SY
                - ar-TN
                - ar-YE
                - as
                - av
                - ay
                - az
                - ba
                - be
                - be-BY
                - bg
                - bg-BG
                - bh
                - bi
                - bm
                - bn
                - bo
                - br
                - bs
                - ca
                - ca-ES
                - ce
                - ch
                - co
                - cr
                - cs
                - cs-CZ
                - cu
                - cv
                - cy
                - da
                - da-DK
                - de
                - de-AT
                - de-CH
                - de-DE
                - de-LI
                - de-LU
                - div-MV
                - dv
                - dz
                - ee
                - el
                - el-GR
                - en
                - en-AU
                - en-BZ
                - en-CA
                - en-CB
                - en-GB
                - en-IE
                - en-JM
                - en-NZ
                - en-PH
                - en-TT
                - en-US
                - en-ZA
                - en-ZW
                - eo
                - es
                - es-AR
                - es-BO
                - es-CL
                - es-CO
                - es-CR
                - es-DO
                - es-EC
                - es-ES
                - es-GT
                - es-HN
                - es-MX
                - es-NI
                - es-PA
                - es-PE
                - es-PR
                - es-PY
                - es-SV
                - es-UY
                - es-VE
                - et
                - et-EE
                - eu
                - eu-ES
                - fa
                - fa-IR
                - ff
                - fi
                - fi-FI
                - fj
                - fo
                - fo-FO
                - fr
                - fr-BE
                - fr-CA
                - fr-CH
                - fr-FR
                - fr-LU
                - fr-MC
                - fy
                - ga
                - gd
                - gl
                - gl-ES
                - gn
                - gu
                - gu-IN
                - gv
                - ha
                - he
                - he-IL
                - hi
                - hi-IN
                - ho
                - hr
                - hr-HR
                - ht
                - hu
                - hu-HU
                - hy
                - hy-AM
                - hz
                - ia
                - id
                - id-ID
                - ie
                - ig
                - ii
                - ik
                - io
                - is
                - is-IS
                - it
                - it-CH
                - it-IT
                - iu
                - ja
                - ja-JP
                - jv
                - ka
                - ka-GE
                - kg
                - ki
                - kj
                - kk
                - kk-KZ
                - kl
                - km
                - kn
                - kn-IN
                - ko
                - ko-KR
                - kr
                - ks
                - ku
                - kv
                - kw
                - ky
                - ky-KZ
                - la
                - lb
                - lg
                - li
                - ln
                - lo
                - lt
                - lt-LT
                - lu
                - lv
                - lv-LV
                - mg
                - mh
                - mi
                - mk
                - mk-MK
                - ml
                - mn
                - mn-MN
                - mr
                - mr-IN
                - ms
                - ms-BN
                - ms-MY
                - mt
                - my
                - na
                - nb
                - nb-NO
                - nd
                - ne
                - ng
                - nl
                - nl-BE
                - nl-NL
                - nn
                - nn-NO
                - false
                - nr
                - nv
                - ny
                - oc
                - oj
                - om
                - or
                - os
                - pa
                - pa-IN
                - pi
                - pl
                - pl-PL
                - ps
                - pt
                - pt-BR
                - pt-PT
                - qu
                - rm
                - rn
                - ro
                - ro-RO
                - ru
                - ru-RU
                - rw
                - sa
                - sa-IN
                - sc
                - sd
                - se
                - sg
                - si
                - sk
                - sk-SK
                - sl
                - sl-SI
                - sm
                - sn
                - so
                - sq
                - sq-AL
                - sr
                - ss
                - st
                - su
                - sv
                - sv-FI
                - sv-SE
                - sw
                - sw-KE
                - ta
                - ta-IN
                - te
                - te-IN
                - tg
                - th
                - th-TH
                - ti
                - tk
                - tl
                - tn
                - to
                - tr
                - tr-TR
                - ts
                - tt
                - tt-RU
                - tw
                - ty
                - ug
                - uk
                - uk-UA
                - ur
                - ur-PK
                - uz
                - ve
                - vi
                - vi-VN
                - vo
                - wa
                - wo
                - xh
                - yi
                - yo
                - za
                - zh
                - zh-CHS
                - zh-CHT
                - zh-CN
                - zh-HK
                - zh-MO
                - zh-SG
                - zh-TW
                - zu
              date:
                type: string
              projectId:
                type: string
                format: uuid
              type:
                type: string
                enum:
                - blog
                - video
                - audio
                - template
                - export-template
              code:
                type: string
              category:
                type: array
                items:
                  type: string
              section:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                    text:
                      type: string
                    extension:
                      type: object
                      additionalProperties:
                        type: string
                    code:
                      type: array
                      items:
                        type: string
                        minLength: 1
            required:
            - title
            - author
            - key
            - language
            - date
            - type
            example: *id085
      required:
      - total
      - resources
      description: Paginated CMS content list. Sorted by `date` desc when no `search` term is supplied; otherwise sorted by
        Fuse fuzzy-match relevance.
    CarehubAssignmentCandidatesResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              locationId:
                type: string
              locationName:
                type: string
              organizationId:
                type: string
                nullable: true
              organizationName:
                type: string
                nullable: true
              deviceId:
                type: string
                nullable: true
              deviceName:
                type: string
                nullable: true
              patientId:
                type: string
                nullable: true
              patientName:
                type: string
                nullable: true
              occupied:
                type: boolean
              assignable:
                type: boolean
              warningCode:
                type: string
                nullable: true
            required:
            - locationId
            - locationName
            - organizationId
            - organizationName
            - deviceId
            - deviceName
            - patientId
            - patientName
            - occupied
            - assignable
            - warningCode
            example:
              locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
              locationName: Room 201 Bed 1
              organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
              organizationName: My Medical Project
              deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
              deviceName: Sleepiz/3001472
              patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
              patientName: Maxi
              occupied: true
              assignable: true
              warningCode: location_has_existing_resident
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 50
        resources:
        - locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
          locationName: Room 201 Bed 1
          organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
          organizationName: My Medical Project
          deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
          deviceName: Sleepiz/3001472
          patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
          patientName: Maxi
          occupied: true
          assignable: true
          warningCode: location_has_existing_resident
    CarehubListLocationResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              name:
                type: string
              floor:
                type: string
              room:
                type: string
              bed:
                type: string
              organizationId:
                type: string
                minLength: 1
              organizationName:
                type: string
              deviceName:
                type: string
              patientName:
                type: string
              deviceId:
                type: string
                minLength: 1
              patientId:
                type: string
                minLength: 1
            required:
            - id
            - name
            description: A location list item enriched with device, patient, and organization data.
            example:
              id: d219c681-01f5-32de-10ad-d2cf42fb9dbe
              name: My Medical Project - Room 201
              floor: '2'
              room: '201'
              bed: A
              organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
              organizationName: My Medical Project North Campus
              deviceName: 'Patient Monitor Device #gq7cDglqpS'
              patientName: Maxi
              deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
              patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 20
        resources:
        - id: d219c681-01f5-32de-10ad-d2cf42fb9dbe
          name: My Medical Project - Room 201
          floor: '2'
          room: '201'
          bed: A
          organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
          organizationName: My Medical Project
          deviceName: Sleepiz/300XXXX
          patientName: Maxi
          deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
          patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
    AdminLocationListResponseDto:
      type: object
      properties:
        total:
          type: integer
          description: 'Coarse total: when the page is full we return `offset + pageSize + 1` (so the UI knows "there are
            more"), otherwise the exact count.'
        page:
          type: integer
        count:
          type: integer
          description: Page size used for this response.
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              floor:
                type: string
              room:
                type: string
              bed:
                type: string
              organizationId:
                type: string
              organizationName:
                type: string
            required:
            - id
            - name
      required:
      - total
      - page
      - count
      - resources
      description: Admin-scoped paginated list of locations for an arbitrary project. Used by the cross-project carehub admin
        UI; ordinary users hit the project-scoped variant instead.
    AdminCreateLocationDto:
      type: object
      properties:
        projectId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
        organizationId:
          type: string
          format: uuid
      required:
      - projectId
      - name
      additionalProperties: false
      example:
        projectId: 9028484d-1cea-48cb-82b4-27b001c3ba0e
        name: Room 18
        floor: '2'
        room: '18'
        organizationId: 123e4567-e89b-12d3-a456-426614174000
    AdminLocationCreateResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        projectId:
          type: string
      required:
      - id
      - name
      - projectId
      description: Newly-created Location identifier surfaced to the admin UI.
    CarehubLocationResponseDto:
      type: object
      properties:
        name:
          type: string
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
        organizationId:
          type: string
        organizationName:
          type: string
        deviceName:
          type: string
        patientName:
          type: string
      required:
      - name
      example:
        name: My Medical Project - Room 201
        floor: '2'
        room: '201'
        bed: A
        organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
        organizationName: My Medical Project North Campus
        deviceName: 'Patient Monitor Device #gq7cDglqpS'
        patientName: Max
    CarehubCreateLocationDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
        organizationId:
          type: string
      required:
      - name
      additionalProperties: false
      example:
        name: Location 1
        floor: '1'
        room: '101'
        bed: '1'
        organizationId: '123'
    CarehubUpdateLocationDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
        organizationId:
          type: string
          nullable: true
        deviceId:
          oneOf:
          - type: string
            format: uuid
          - type: array
            items:
              type: string
              format: uuid
          nullable: true
        patientId:
          type: string
          format: uuid
      required:
      - name
      additionalProperties: false
      example:
        name: Location 1
        floor: '1'
        room: '101'
        bed: '1'
        organizationId: 519255ae-1f74-ffc5-ddd2-9979295c7572
        deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
        patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
    CarehubOrganizationResponseDto:
      type: object
      properties:
        name:
          type: string
        parentOrganizationId:
          type: string
        description:
          type: string
      required:
      - name
      example:
        name: My Medical Project
        parentOrganizationId: 3e20509a-53de-83ad-42ad-73af6f871710
    CarehubCreateOrganizationDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        parentOrganizationId:
          type: string
          format: uuid
        description:
          type: string
          minLength: 1
      required:
      - name
      additionalProperties: false
      example:
        name: Organization 1
        parentOrganizationId: '123'
        description: Description 1
    CarehubUpdateOrganizationDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        parentOrganizationId:
          type: string
          format: uuid
        description:
          type: string
          minLength: 1
      required:
      - name
      additionalProperties: false
      example:
        name: Organization 1
        parentOrganizationId: '123'
        description: Description 1
    CarehubZonesListResponseDto:
      type: object
      properties:
        total:
          type: number
          minimum: 0
        page:
          type: number
          minimum: 0
        count:
          type: number
          minimum: 1
        resources:
          type: array
          items:
            type: object
            properties:
              zoneId:
                type: string
              zoneName:
                type: string
              deviceCount:
                type: number
                minimum: 0
              assignedResidentDeviceCount:
                type: number
                minimum: 0
              activeDeviceCount:
                type: number
                minimum: 0
              inactiveDeviceCount:
                type: number
                minimum: 0
            required:
            - zoneId
            - zoneName
            - deviceCount
            - assignedResidentDeviceCount
            - activeDeviceCount
            - inactiveDeviceCount
            example:
              zoneId: 519255ae-1f74-ffc5-ddd2-9979295c7572
              zoneName: Ward A
              deviceCount: 15
              assignedResidentDeviceCount: 12
              activeDeviceCount: 12
              inactiveDeviceCount: 3
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 1
        page: 0
        count: 20
        resources:
        - zoneId: 519255ae-1f74-ffc5-ddd2-9979295c7572
          zoneName: Ward A
          deviceCount: 15
          assignedResidentDeviceCount: 12
          activeDeviceCount: 12
          inactiveDeviceCount: 3
    ZoneDetailResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        locations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              floor:
                type: string
              room:
                type: string
              bed:
                type: string
              devices:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                  required:
                  - id
              residents:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                  required:
                  - id
            required:
            - id
            - name
            - devices
            - residents
      required:
      - id
      - name
      - locations
      description: Zone detail with nested locations, devices and residents per location.
    CreateLocationInZoneDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
      required:
      - name
      additionalProperties: false
      example:
        name: Location 1
        floor: '1'
        room: '101'
        bed: '1'
    UpdateLocationInZoneDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        floor:
          type: string
        room:
          type: string
        bed:
          type: string
        deviceId:
          oneOf:
          - type: string
            format: uuid
          - type: array
            items:
              type: string
              format: uuid
          nullable: true
        patientId:
          type: string
          format: uuid
      required:
      - name
      additionalProperties: false
      example:
        name: Location 1
        floor: '1'
        room: '101'
        bed: '1'
        deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
        patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
    DeleteLocationPreviewResponseDto:
      type: object
      properties:
        warning:
          type: string
        affected_devices:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
            required:
            - id
        affected_residents:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
            required:
            - id
      required:
      - affected_devices
      - affected_residents
      description: 'Preview of location delete: warning message when devices/residents are affected, and lists of affected
        devices and residents.'
    CarehubInviteNewPractitionerDto:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
          minLength: 1
        surname:
          type: string
          minLength: 1
        accessPolicyId:
          type: string
          format: uuid
        admin:
          default: false
          type: boolean
        projectId:
          type: string
          format: uuid
      required:
      - email
      - name
      - surname
      - accessPolicyId
      additionalProperties: false
    CarehubInviteResponseDto:
      type: object
      properties:
        membership:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - ProjectMembership
            id:
              type: string
            project:
              type: string
            user:
              type: object
              properties:
                reference:
                  type: string
              required:
              - reference
            profile:
              type: object
              properties:
                reference:
                  type: string
              required:
              - reference
            accessPolicy:
              type: object
              properties:
                reference:
                  type: string
                display:
                  type: string
              required:
              - reference
              - display
            meta:
              type: object
              properties:
                project:
                  type: string
                author:
                  type: object
                  properties:
                    reference:
                      type: string
                  required:
                  - reference
                lastUpdated:
                  type: string
          required:
          - resourceType
          - id
        profile:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Practitioner
            id:
              type: string
            name:
              type: array
              items: {}
            meta:
              type: object
              properties:
                project:
                  type: string
                lastUpdated:
                  type: string
          required:
          - resourceType
          - id
        status:
          type: string
          enum:
          - Pending
      required:
      - membership
      - profile
      - status
      example:
        membership:
          resourceType: ProjectMembership
          id: d7f418aa-467d-d1ea-f0fc-d2dd841733e6
          project: f6f4da8d-93e8-8a08-220e-03b7810451d3
          user:
            reference: User/9f8a2389-a20c-a075-2aa9-e95093515517
          profile:
            reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
          accessPolicy:
            reference: AccessPolicy/cca28116-f888-97bf-c336-5b992bd02672
            display: Practitioner Access Policy
          meta:
            project: f6f4da8d-93e8-8a08-220e-03b7810451d3
            author:
              reference: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
            lastUpdated: 2026-05-21 08:09:31.577000+00:00
        profile:
          resourceType: Practitioner
          id: cd495e76-8385-ecb1-00a6-7e0381de4e42
          name:
          - given:
            - Max
            family: Mustermann
          meta:
            project: f6f4da8d-93e8-8a08-220e-03b7810451d3
            lastUpdated: 2026-05-21 08:09:31.577000+00:00
        status: Pending
    FindCustomersResponseDto:
      type: object
      properties:
        total:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The total number of customers in the system.
        resources:
          type: array
          items:
            type: object
            properties:
              customerId:
                type: string
                minLength: 1
                maxLength: 1024
                description: The ID of the customer.
              customerName:
                type: string
                minLength: 1
                maxLength: 1024
                description: The name of the customer.
              customerEmail:
                type: string
                format: email
                description: The email of the customer.
            required:
            - customerId
            - customerName
            - customerEmail
      required:
      - total
      - resources
      example:
        total: 1
        resources:
        - customerId: '123'
          customerName: John Doe
          customerEmail: john.doe@example.com
    FindDevicesByCustomerIdResponseDto:
      type: object
      properties:
        total:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: The total number of devices in the system for the customer.
        resources:
          type: array
          items:
            type: object
            properties:
              projectId:
                type: string
                format: uuid
                description: The ID of the project the device is assigned to.
              customerId:
                type: string
                description: The ID of the customer the device is assigned to.
              serialNumber:
                type: string
                description: The serial number of the device.
              manufacturer:
                type: string
                description: The manufacturer of the device.
            required:
            - projectId
      required:
      - total
      - resources
      example:
        total: 1
        resources:
        - projectId: '123'
          customerId: '123'
          serialNumber: '1234567890'
          manufacturer: Manufacturer 1
    SapDeviceAndCustomerAssignmentDto:
      type: object
      properties:
        customerId:
          type: string
          minLength: 1
          maxLength: 1024
          description: The ID of the customer to assign. SAP Integration Customer ID.
        customerName:
          type: string
          minLength: 1
          maxLength: 1024
          description: The name of the customer to assign.
        customerEmail:
          type: string
          format: email
          description: The email of the customer to assign.
        devices:
          type: array
          items:
            type: object
            properties:
              serialNumber:
                type: string
                minLength: 1
                maxLength: 1024
                description: The serial number of the device to assign.
              manufacturer:
                type: string
                enum:
                - Sleepiz
                description: The manufacturer of the device to assign.
            required:
            - serialNumber
            - manufacturer
          minItems: 0
          maxItems: 100
          description: The devices to assign to the customer.
      required:
      - customerId
      - customerName
      - customerEmail
      - devices
      example:
        customerId: '123'
        customerName: John Doe
        customerEmail: john.doe@example.com
        devices:
        - serialNumber: '1234567890'
          manufacturer: Manufacturer 1
        - serialNumber: '1234567891'
          manufacturer: Manufacturer 2
        - serialNumber: '1234567892'
          manufacturer: Manufacturer 1
    SapDeviceAndCustomerAssignmentResponseDto:
      type: object
      properties:
        customerId:
          type: string
          minLength: 1
          maxLength: 1024
          description: The ID of the customer to assign. SAP Integration Customer ID.
        customerName:
          type: string
          minLength: 1
          maxLength: 1024
          description: The name of the customer to assign.
        customerEmail:
          type: string
          format: email
          description: The email of the customer to assign.
      required:
      - customerId
      - customerName
      - customerEmail
      example:
        customerId: '123'
        customerName: John Doe
        customerEmail: john.doe@example.com
    SleepStatisticsResponseDto:
      type: object
      additionalProperties:
        type: object
        properties:
          totalSleepTimeSeconds:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          sleepEfficiencyPercentage:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          wakeAfterSleepOnsetSeconds:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          totalBedTimeSeconds:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          sleepStartTime:
            type: object
            properties:
              current:
                type: string
                nullable: true
              average:
                type: string
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          sleepEndTime:
            type: object
            properties:
              current:
                type: string
                nullable: true
              average:
                type: string
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          sleepOnsetLatencySeconds:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          outOfBedCount:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
          wakeUpLatencySeconds:
            type: object
            properties:
              current:
                type: number
                nullable: true
              average:
                type: number
                nullable: true
              diff:
                type: number
                nullable: true
            required:
            - current
            - average
            - diff
        required:
        - totalSleepTimeSeconds
        - sleepEfficiencyPercentage
        - wakeAfterSleepOnsetSeconds
        - totalBedTimeSeconds
        - sleepStartTime
        - sleepEndTime
        - sleepOnsetLatencySeconds
        - outOfBedCount
        - wakeUpLatencySeconds
      example:
        device-123:
          totalSleepTimeSeconds:
            current: 28800
            average: 28000
            diff: 800
          sleepEfficiencyPercentage:
            current: 95
            average: 90
            diff: 5
          wakeAfterSleepOnsetSeconds:
            current: 300
            average: 400
            diff: -100
          totalBedTimeSeconds:
            current: 30000
            average: 30000
            diff: 0
          sleepStartTime:
            current: 2023-10-27 22:00:00+00:00
            average: 2023-10-27 22:10:00+00:00
            diff: -600
          sleepEndTime:
            current: 2023-10-28 06:00:00+00:00
            average: 2023-10-28 06:05:00+00:00
            diff: -300
          sleepOnsetLatencySeconds:
            current: 600
            average: 900
            diff: -300
          outOfBedCount:
            current: 1
            average: 1
            diff: 0
          wakeUpLatencySeconds:
            current: 300
            average: 300
            diff: 0
    CarehubPractitionerDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        surname:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        address:
          type: object
          properties:
            line:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
        photo:
          type: string
          format: uri
        meta:
          type: object
          properties:
            author:
              type: string
              pattern: ^[A-Za-z]+\/[A-Za-z0-9-]+$
      example:
        name: John
        surname: Doe
        email: john.doe@example.com
        phone: '+491234567890'
        address:
          line: 123 Main St
          city: Anytown
          state: NY
          postalCode: '12345'
          country: USA
    CarehubNotificationsResponseDto:
      type: object
      properties:
        total:
          type: number
        page:
          type: number
        count:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              commId:
                type: string
              patientId:
                type: string
              patientName:
                type: string
              deviceId:
                type: string
              deviceName:
                type: string
              deviceStatus:
                type: string
              locationId:
                type: string
              locationName:
                type: string
              color:
                type: string
              trigger:
                type: string
              type:
                type: string
                enum:
                - hr
                - br
                - outOfBed
              status:
                type: string
              details:
                type: object
                properties:
                  threshold:
                    type: number
                  value:
                    type: number
                  level:
                    type: string
              authoredOn:
                type: string
                format: date-time
              alertCount:
                type: integer
                minimum: 0
                exclusiveMinimum: true
              occurrenceDateTime:
                type: string
                format: date-time
              episodeEndedAt:
                type: string
                format: date-time
            required:
            - commId
            example: &id086
              commId: 2adae28d-6664-74a9-3f4c-cad5f551ce1e
              patientId: de5c57ff-7257-57b0-13ab-aab6f5f91498
              patientName: Jane Doe
              deviceId: a5a74a6d-f092-78b8-8cb6-ea23b7d7f257
              deviceName: Sleepiz/300SM06
              deviceStatus: active
              locationId: d219c681-01f5-32de-10ad-d2cf42fb9dbe
              locationName: Room 401
              color: '#E5254B'
              trigger: above
              type: outOfBed
              status: active
              details:
                threshold: 600
                value: 602
                level: high
              authoredOn: 2026-05-21 08:09:31.577000+00:00
              alertCount: 5
              occurrenceDateTime: 2026-05-21 08:09:31.577000+00:00
      required:
      - total
      - page
      - count
      - resources
      example:
        total: 2
        page: 0
        count: 20
        resources:
        - commId: 2adae28d-6664-74a9-3f4c-cad5f551ce1e
          status: active
          authoredOn: 2026-05-21 08:09:31.577000+00:00
          type: hr
    CarehubNotificationResponseDto:
      type: object
      properties:
        commId:
          type: string
        patientId:
          type: string
        patientName:
          type: string
        deviceId:
          type: string
        deviceName:
          type: string
        deviceStatus:
          type: string
        locationId:
          type: string
        locationName:
          type: string
        color:
          type: string
        trigger:
          type: string
        type:
          type: string
          enum:
          - hr
          - br
          - outOfBed
        status:
          type: string
        details:
          type: object
          properties:
            threshold:
              type: number
            value:
              type: number
            level:
              type: string
        authoredOn:
          type: string
          format: date-time
        alertCount:
          type: integer
          minimum: 0
          exclusiveMinimum: true
        occurrenceDateTime:
          type: string
          format: date-time
        episodeEndedAt:
          type: string
          format: date-time
      required:
      - commId
      example: *id086
    MedicalSettingsNotificationsConsentDto:
      type: object
      properties:
        medicalSettingsNotificationsConsent:
          type: boolean
      required:
      - medicalSettingsNotificationsConsent
      example:
        medicalSettingsNotificationsConsent: true
    SupportEmailRequestDto:
      type: object
      properties:
        message:
          type: string
          minLength: 1
        version:
          type: string
          minLength: 1
        environment:
          type: string
          minLength: 1
      required:
      - message
      - version
      - environment
    CarehubUserDeleteResponseDto:
      type: object
      properties:
        success:
          type: boolean
      required:
      - success
      example:
        success: true
    GetGraphsDataResponseDto:
      type: object
      additionalProperties:
        type: object
        additionalProperties:
          type: object
          properties:
            dataPoints:
              type: array
              items:
                type: object
                properties:
                  timestamp:
                    type: string
                  timestampMs:
                    type: number
                  data:
                    type: number
                    nullable: true
                  maxThreshold:
                    type: number
                  minThreshold:
                    type: number
                  maxBaseLine:
                    type: number
                  minBaseLine:
                    type: number
                  pointTimestamp:
                    type: string
                  pointTimestampRange:
                    type: object
                    properties:
                      start:
                        type: string
                      end:
                        type: string
                required:
                - timestamp
                - timestampMs
                - data
            stats:
              type: object
              properties:
                average:
                  type: number
                max:
                  type: number
                min:
                  type: number
                total:
                  type: number
              required:
              - average
              - max
              - min
              - total
          required:
          - dataPoints
          - stats
      description: Trends data grouped by graph type and device ID
    CarehubHealthResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
          - healthy
          - degraded
          - unhealthy
        environment:
          type: string
        version:
          type: string
          nullable: true
        uptimeSeconds:
          type: number
        timestamp:
          type: string
        endpoints:
          type: object
          properties:
            api:
              type: string
            fhir:
              type: string
          required:
          - api
          - fhir
        externalSystems:
          type: object
          properties:
            medplum:
              type: object
              properties: {}
              additionalProperties: true
            redis:
              type: object
              properties: {}
              additionalProperties: true
          required:
          - medplum
          - redis
          additionalProperties: true
        cache:
          type: object
          properties: {}
          additionalProperties: true
        ovok:
          type: object
          properties: {}
          additionalProperties: true
        system:
          type: object
          properties: {}
          additionalProperties: true
        observability:
          type: object
          properties:
            signoz:
              type: string
              nullable: true
          required:
          - signoz
      required:
      - status
      - environment
      - version
      - uptimeSeconds
      - timestamp
      - endpoints
      - externalSystems
      - observability
      additionalProperties: true
      description: 'Aggregated CareHub health: pipeline gauges, FHIR server stats, Redis status, optional system + cache metrics.
        `status` summarizes the worst of the dependency states.'
    RequestSignatureResponseDto:
      type: object
      properties:
        numberOfPages:
          type: integer
          description: Pages in the generated PDF.
        title:
          type: string
          nullable: true
        author:
          type: string
          nullable: true
        subject:
          type: string
          nullable: true
        documentId:
          type: string
          description: Documenso document id for the upload — used to poll signing status.
        email:
          type: string
          description: Email Documenso will send the signing invite to (extracted from the Consent resource).
      required:
      - numberOfPages
      - title
      - author
      - subject
      - documentId
      - email
      description: Acknowledgement that the Consent PDF has been generated and uploaded to Documenso for signing. Documenso
        emails the signer separately; check `documentId` for the signing status afterwards.
    DocumensoDocumentStatusDto:
      type: object
      properties:
        event:
          type: string
          enum:
          - DOCUMENT_COMPLETED
          - DOCUMENT_REJECTED
        payload:
          type: object
          properties:
            externalId:
              type: string
              description: The external ID of the document, we use it to identify the resource in our system! ie. ResourceType/ResourceId
          required:
          - externalId
      required:
      - event
      - payload
      additionalProperties: true
    DocportChangePatientDto:
      type: object
      properties:
        serialNumber:
          type: string
          minLength: 1
          description: Device serial number
        patientNumber:
          type: string
          minLength: 1
          description: Unique patient number
        patientName:
          type: object
          properties:
            suffix:
              type: string
              minLength: 1
              description: Name suffix
            firstName:
              type: string
              minLength: 1
              description: First name
            surname:
              type: string
              minLength: 1
              description: Surname
          required:
          - suffix
          - firstName
          - surname
        dateOfBirth:
          type: string
          minLength: 1
          description: Date of birth
        gender:
          type: string
          enum:
          - male
          - female
          - other
          - unknown
          description: Gender
        examinationDateTime:
          type: string
          minLength: 1
          format: date-time
          description: Examination datetime
        examinationLocation:
          type: string
          minLength: 1
          description: Examination location
        examinationRoom:
          type: string
          minLength: 1
          description: Examination room
        scheduledMeasurement:
          type: array
          items:
            type: string
            enum:
            - ECG
            - WEIGHT
            - BP
            - SPO2
          minItems: 1
          description: Scheduled measurement
      required:
      - serialNumber
      - patientNumber
      - patientName
      - dateOfBirth
      - gender
      - examinationDateTime
      - examinationLocation
      - examinationRoom
      - scheduledMeasurement
      example:
        serialNumber: HGR4NJW8
        patientNumber: '12345'
        patientName:
          suffix: Dr.
          firstName: John
          surname: Doe
        dateOfBirth: 1980-01-01
        gender: male
        examinationDateTime: 2025-09-23 10:00:00+00:00
        examinationLocation: Hospital A
        examinationRoom: Room 101
        scheduledMeasurement:
        - ECG
        - WEIGHT
        - BP
    ChangePatientResponseDto:
      type: object
      properties:
        patient:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Patient
            id:
              type: string
              description: Resource ID
            meta:
              type: object
              properties: {}
              description: Resource metadata
            name:
              type: array
              items:
                type: object
                properties:
                  suffix:
                    type: array
                    items:
                      type: string
                  given:
                    type: array
                    items:
                      type: string
                  family:
                    type: string
                  text:
                    type: string
              description: Patient names
            gender:
              type: string
              enum:
              - male
              - female
              - other
              - unknown
              description: Patient gender
            birthDate:
              type: string
              description: Date of birth
            identifier:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  value:
                    type: string
              description: Patient identifiers
          required:
          - resourceType
          additionalProperties: true
          description: The created or updated patient resource
        serviceRequest:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - ServiceRequest
            id:
              type: string
              description: Resource ID
            meta:
              type: object
              properties: {}
              description: Resource metadata
            status:
              type: string
              description: Request status
            intent:
              type: string
              description: Request intent
            subject:
              type: object
              properties:
                reference:
                  type: string
              required:
              - reference
              description: Subject reference
            occurrenceDateTime:
              type: string
              description: Occurrence date and time
          required:
          - resourceType
          - status
          - intent
          - subject
          additionalProperties: true
          description: The created or updated service request for measurements
        device:
          type: object
          properties:
            resourceType:
              type: string
              enum:
              - Device
            id:
              type: string
              description: Resource ID
            meta:
              type: object
              properties: {}
              description: Resource metadata
            patient:
              type: object
              properties:
                reference:
                  type: string
              required:
              - reference
              description: Associated patient reference
            identifier:
              type: array
              items:
                type: object
                properties:
                  system:
                    type: string
                  value:
                    type: string
              description: Device identifiers
          required:
          - resourceType
          additionalProperties: true
          description: The updated device resource associated with the patient
      required:
      - patient
      - serviceRequest
      - device
      example:
        patient:
          resourceType: Patient
          id: patient-123
          name:
          - suffix:
            - Dr.
            given:
            - John
            family: Doe
            text: Dr. John Doe
          gender: male
          birthDate: 1980-01-01
          identifier:
          - system: https://actimi.com/patient-number
            value: '12345'
        serviceRequest:
          resourceType: ServiceRequest
          id: service-request-456
          status: active
          intent: order
          subject:
            reference: Patient/patient-123
          occurrenceDateTime: 2025-09-23 10:00:00+00:00
        device:
          resourceType: Device
          id: device-789
          patient:
            reference: Patient/patient-123
          identifier:
          - system: https://actimi.com/device-serial
            value: HGR4NJW8
    DocportGetPatientPDFDto:
      type: object
      properties:
        patientNumber:
          type: string
          minLength: 1
          description: Unique patient number
        dateRange:
          type: object
          properties:
            start:
              type: string
              minLength: 1
              format: date-time
              description: Start date
            end:
              type: string
              minLength: 1
              format: date-time
              description: End date
          required:
          - start
          - end
      required:
      - patientNumber
      - dateRange
      example:
        patientNumber: '12'
        dateRange:
          start: 2025-01-01 00:00:00+00:00
          end: 2025-01-01 00:00:00+00:00
    CreatePatientPDFResponseDto:
      type: object
      properties:
        pdfUrl:
          type: string
          format: uri
          description: Public URL to access the generated ECG PDF report
      required:
      - pdfUrl
      example:
        pdfUrl: https://api.example.com/document/public/abc123-def456-ghi789
    DocportCreateClinicDto:
      type: object
      properties:
        clinic:
          type: object
          properties:
            name:
              type: string
              minLength: 1
          required:
          - name
        devices:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                minLength: 1
              serialNumber:
                type: string
                minLength: 1
            required:
            - name
            - serialNumber
        userAccount:
          type: object
          properties:
            email:
              type: string
              format: email
            password:
              type: string
              minLength: 8
            firstName:
              type: string
              minLength: 1
            lastName:
              type: string
              minLength: 1
          required:
          - email
          - password
          - firstName
          - lastName
      required:
      - clinic
      - userAccount
      example:
        clinic:
          name: Medical Center Alpha
        userAccount:
          email: admin@medicalcenter.com
          password: SecurePassword123!
          firstName: John
          lastName: Smith
        devices:
        - name: ECG Monitor Station 1
          serialNumber: HGR4NJW8
        - name: Blood Pressure Monitor
          serialNumber: BP001234
    CreateClinicResponseDto:
      type: object
      properties:
        clientId:
          type: string
          description: OAuth2 client ID for the created clinic
        clientSecret:
          type: string
          description: OAuth2 client secret for the created clinic
      required:
      - clientId
      - clientSecret
      example:
        clientId: cl_1234567890abcdef
        clientSecret: cs_abcdef1234567890fedcba0987654321
    PatientObservationResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Bundle
        type:
          type: string
          enum:
          - searchset
        entry:
          type: array
          items:
            type: object
            properties:
              resource:
                type: object
                properties:
                  id:
                    default: 87ea5dfc-8b8e-384d-8489-79496e706390
                    type: string
                  resourceType:
                    type: string
                    enum:
                    - Observation
                required:
                - resourceType
                example:
                  id: 87ea5dfc-8b8e-384d-8489-79496e706390
                  resourceType: Observation
              fullUrl:
                type: string
            required:
            - resource
            - fullUrl
      required:
      - resourceType
      - type
      - entry
      example:
        resourceType: Bundle
        type: searchset
        entry:
        - resource:
            id: 87ea5dfc-8b8e-384d-8489-79496e706390
            resourceType: Observation
          fullUrl: https://fhir.ovok.com/fhir/R4/Observation/87ea5dfc-8b8e-384d-8489-79496e706390
    DeviceTelemetryResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Bundle
        type:
          type: string
          enum:
          - searchset
        total:
          type: number
        entry:
          type: array
          items:
            type: object
            properties:
              resource:
                type: object
                properties:
                  resourceType:
                    type: string
                    enum:
                    - Observation
                  id:
                    type: string
                  status:
                    type: string
                required:
                - resourceType
                - id
                - status
                additionalProperties: true
                example:
                  resourceType: Observation
                  id: heartRate
                  status: final
                  code:
                    coding:
                    - system: http://loinc.org
                      code: 8867-4
                      display: Heart rate
                  subject:
                    reference: Device/87ea5dfc-8b8e-384d-8489-79496e706390
                  effectiveInstant: 2026-04-22 10:00:00+00:00
                  valueQuantity:
                    value: 72
                    unit: beats/min
                    system: http://unitsofmeasure.org
                    code: /min
              fullUrl:
                type: string
            required:
            - resource
      required:
      - resourceType
      - type
      - entry
      example:
        resourceType: Bundle
        type: searchset
        total: 4
        entry:
        - resource:
            resourceType: Observation
            id: presence
            status: final
            code:
              coding:
              - system: https://sleepiz.com/fhir/CodeSystem/observation-codes
                code: presence-detection
                display: Presence detection
            subject:
              reference: Device/87ea5dfc-8b8e-384d-8489-79496e706390
            effectiveInstant: 2026-04-22 10:00:00+00:00
            valueBoolean: true
        - resource:
            resourceType: Observation
            id: heartRate
            status: final
            code:
              coding:
              - system: http://loinc.org
                code: 8867-4
                display: Heart rate
            subject:
              reference: Device/87ea5dfc-8b8e-384d-8489-79496e706390
            effectiveInstant: 2026-04-22 10:00:00+00:00
            valueQuantity:
              value: 72
              unit: beats/min
              system: http://unitsofmeasure.org
              code: /min
        - resource:
            resourceType: Observation
            id: respiratoryRate
            status: final
            code:
              coding:
              - system: http://loinc.org
                code: 9279-1
                display: Respiratory rate
            subject:
              reference: Device/87ea5dfc-8b8e-384d-8489-79496e706390
            effectiveInstant: 2026-04-22 10:00:00+00:00
            valueQuantity:
              value: 14
              unit: breaths/min
              system: http://unitsofmeasure.org
              code: /min
        - resource:
            resourceType: Observation
            id: sleep
            status: final
            code:
              coding:
              - system: http://loinc.org
                code: 107145-5
                display: Sleep status
            subject:
              reference: Device/87ea5dfc-8b8e-384d-8489-79496e706390
            effectiveInstant: 2026-04-22 10:00:00+00:00
            valueCodeableConcept:
              text: asleep
    ObservationTimeseriesResponseDto:
      type: object
      properties:
        observationId:
          type: string
        effectiveStart:
          type: string
          description: ISO-8601 anchor for the first sample (t0).
        periodMs:
          type: number
          description: Milliseconds between consecutive samples.
        series:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                nullable: true
                description: For component-bearing Observations the component primary code (LOINC etc.). Null for series taken
                  from the root SampledData.
              unit:
                type: string
                nullable: true
                description: Display unit from SampledData.origin.unit.
              origin:
                type: number
                description: Base value (data points are added to this after factor scaling).
              dimension:
                type: integer
                description: Which interleaved dimension this series represents. 0..dimensions-1.
              count:
                type: integer
              points:
                type: array
                items:
                  type: object
                  properties:
                    t:
                      type: string
                      description: ISO-8601 UTC timestamp for this sample.
                    v:
                      oneOf:
                      - type: number
                      - type: string
                        enum:
                        - E
                      - type: string
                        enum:
                        - L
                      - type: string
                        enum:
                        - U
                      description: Numeric value after factor + origin offset are applied, or a preserved E/L/U token from
                        the source SampledData.
                  required:
                  - t
                  - v
            required:
            - code
            - unit
            - origin
            - dimension
            - count
            - points
      required:
      - observationId
      - effectiveStart
      - periodMs
      - series
      description: Expanded {timestamp, value} view of an Observation's SampledData. Returned when GET Observation/:id is
        called with ?asTimeseries=true. One entry per (component × dimension) combination; the root SampledData (if any) emits
        one entry with code=null.
    DeviceTelemetryHistoryResponseDto:
      type: object
      properties:
        deviceId:
          type: string
          description: FHIR Device id whose telemetry history was queried.
        patientId:
          type: string
          description: FHIR Patient id linked to the Device.
        signalsPatientId:
          type: string
          description: Internal Signals patient id used to fetch the history.
      required:
      - deviceId
      - patientId
      - signalsPatientId
      additionalProperties: true
      description: Observation history for a Device, fetched via the Signals service. Defaults to the last 72 hours when `from`/`to`
        are omitted. Pagination and shape beyond the three fixed ids depend on the upstream Signals response.
      example:
        deviceId: 87ea5dfc-8b8e-384d-8489-79496e706390
        patientId: 87ea5dfc-8b8e-384d-8489-79496e706390
        signalsPatientId: signals-abc-123
        page: 1
        pageSize: 100
        total: 4
        entries:
        - resourceType: Observation
          status: final
          code:
            coding:
            - system: http://loinc.org
              code: 8867-4
              display: Heart rate
          effectiveInstant: 2026-04-22 10:00:00+00:00
          valueQuantity:
            value: 72
            unit: beats/min
    PatientResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Patient
        id:
          type: string
      required:
      - resourceType
      - id
      additionalProperties: true
      description: A FHIR Patient resource as stored in the FHIR API. When created with `?withSignals=true` the resource is
        re-read after Signals provisioning so any identifiers stamped by the link step are reflected.
      example:
        resourceType: Patient
        id: 87ea5dfc-8b8e-384d-8489-79496e706390
        meta:
          versionId: '1'
          lastUpdated: 2026-05-19 12:00:00+00:00
        name:
        - given:
          - Ada
          family: Lovelace
        birthDate: 1815-12-10
        gender: female
    PatientThresholdResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - CarePlan
          description: Patient thresholds are persisted as a FHIR CarePlan.
        id:
          type: string
        subject:
          type: object
          properties:
            reference:
              type: string
          required:
          - reference
          additionalProperties: true
      required:
      - resourceType
      - id
      - subject
      additionalProperties: true
      description: Persisted patient threshold configuration. Stored as a FHIR CarePlan whose detail extensions encode per-observation
        min/max bounds. When `?updateOnSignals=true` was sent, the same configuration has been pushed to Signals (failures
        are logged, not surfaced — the saved CarePlan is still returned).
      example:
        resourceType: CarePlan
        id: 87ea5dfc-8b8e-384d-8489-79496e706390
        status: active
        intent: plan
        subject:
          reference: Patient/87ea5dfc-8b8e-384d-8489-79496e706390
        category:
        - coding:
          - system: https://ovok.com/fhir/CodeSystem/care-plan-category
            code: thresholds
    PopulateBodyRequestDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Parameters
        parameter:
          type: array
          items:
            oneOf:
            - type: object
              properties:
                name:
                  type: string
                  enum:
                  - context
                part:
                  type: array
                  items:
                    oneOf:
                    - type: object
                      properties:
                        name:
                          type: string
                          enum:
                          - name
                        valueString:
                          type: string
                          minLength: 1
                      required:
                      - name
                      - valueString
                    - type: object
                      properties:
                        name:
                          type: string
                          enum:
                          - content
                        resource:
                          type: object
                          properties: {}
                          additionalProperties: true
                      required:
                      - name
                      - resource
                  minItems: 2
                  maxItems: 2
              required:
              - name
              - part
            - type: object
              properties:
                name:
                  type: string
                  enum:
                  - response
                resource:
                  type: object
                  properties: {}
                  additionalProperties: true
              required:
              - name
              - resource
      required:
      - resourceType
      - parameter
      additionalProperties: true
      example:
        resourceType: Parameters
        parameter:
        - name: context
          part:
          - name: name
            valueString: patientWeight
          - name: content
            resource:
              valueDecimal: 66.5
    PopulateBodyResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - QuestionnaireResponse
        questionnaire:
          type: string
        subject:
          type: object
          properties: {}
        item:
          type: array
          items:
            type: object
            properties: {}
      required:
      - resourceType
      - questionnaire
      - subject
      - item
      additionalProperties: true
      example:
        resourceType: Parameters
        parameter:
        - name: response
          resource:
            resourceType: QuestionnaireResponse
            status: in-progress
            questionnaire: https://fhir.ovok.com/fhir/Questionnaire/59d9a1ce-008c-4e4f-97fb-ef598d3f2c34|0.1.0
            item:
            - linkId: bmi-calculation
              text: BMI Calculation
              item:
              - linkId: bmi-result
                answer:
                - valueDecimal: 32.7
                text: Value
              - linkId: patient-height
                text: Height
                answer:
                - valueDecimal: 175
              - linkId: patient-weight
                text: Weight
                answer:
                - valueDecimal: 100
            subject:
              type: Patient
              reference: Patient/1684f841-953a-41c2-a298-64af08945349
            meta:
              profile:
              - http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse
    ExtractBodyResponseDto:
      type: object
      properties:
        resourceType:
          type: string
          enum:
          - Observation
        id:
          type: string
      required:
      - resourceType
      - id
      additionalProperties: true
      example:
        resourceType: Parameters
        parameter:
        - name: response
          resource:
            resourceType: Bundle
            type: transaction
            entry:
            - request:
                method: POST
                url: Observation
              resource:
                resourceType: Observation
                status: final
                code:
                  coding:
                  - system: http://snomed.info/sct
                    code: '60621009'
                    display: Body mass index
                subject:
                  type: Patient
                  reference: Patient/1684f841-953a-41c2-a298-64af08945349
                derivedFrom:
                - reference: QuestionnaireResponse/26073103-8a48-4fed-8f38-b1b1e39f4083
                valueQuantity:
                  value: 32.7
    InternalProjectResponseDto:
      type: object
      properties:
        projectId:
          type: string
        internal:
          type: boolean
      required:
      - projectId
      - internal
      description: Internal-project flag state for a Medplum project.
    PutInternalProjectBodyDto:
      type: object
      properties:
        internal:
          type: boolean
      required:
      - internal
      description: Set or clear the internal-project flag.
      example:
        internal: true
    i18nGetDto:
      type: object
      properties:
        key:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
          description: Alphabetic key
        language:
          type: string
      required:
      - key
      - language
      example:
        page:
          about: about
          contact: contact
          home:
            title: home
    i18nPatchDto:
      type: object
      additionalProperties:
        oneOf:
        - type: string
          minLength: 1
          maxLength: 4096
        - {}
        description: Either a string value or a nested object that can only contain alphabetic keys (or nested objects...)
      example:
        page:
          about: about
          contact: contact
          phone: null
          home:
            title: home
    PaginatedMapSearchResponseDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              source:
                type: object
                properties:
                  id:
                    type: string
                  key:
                    description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention
                      recommended (e.g. `home.screen.title`).
                    type: string
                    pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
                    example: home.screen.title
                  language:
                    type: string
                    enum:
                    - Cy-az-AZ
                    - Cy-sr-SP
                    - Cy-uz-UZ
                    - Lt-az-AZ
                    - Lt-sr-SP
                    - Lt-uz-UZ
                    - aa
                    - ab
                    - ae
                    - af
                    - af-ZA
                    - ak
                    - am
                    - an
                    - ar
                    - ar-AE
                    - ar-BH
                    - ar-DZ
                    - ar-EG
                    - ar-IQ
                    - ar-JO
                    - ar-KW
                    - ar-LB
                    - ar-LY
                    - ar-MA
                    - ar-OM
                    - ar-QA
                    - ar-SA
                    - ar-SY
                    - ar-TN
                    - ar-YE
                    - as
                    - av
                    - ay
                    - az
                    - ba
                    - be
                    - be-BY
                    - bg
                    - bg-BG
                    - bh
                    - bi
                    - bm
                    - bn
                    - bo
                    - br
                    - bs
                    - ca
                    - ca-ES
                    - ce
                    - ch
                    - co
                    - cr
                    - cs
                    - cs-CZ
                    - cu
                    - cv
                    - cy
                    - da
                    - da-DK
                    - de
                    - de-AT
                    - de-CH
                    - de-DE
                    - de-LI
                    - de-LU
                    - div-MV
                    - dv
                    - dz
                    - ee
                    - el
                    - el-GR
                    - en
                    - en-AU
                    - en-BZ
                    - en-CA
                    - en-CB
                    - en-GB
                    - en-IE
                    - en-JM
                    - en-NZ
                    - en-PH
                    - en-TT
                    - en-US
                    - en-ZA
                    - en-ZW
                    - eo
                    - es
                    - es-AR
                    - es-BO
                    - es-CL
                    - es-CO
                    - es-CR
                    - es-DO
                    - es-EC
                    - es-ES
                    - es-GT
                    - es-HN
                    - es-MX
                    - es-NI
                    - es-PA
                    - es-PE
                    - es-PR
                    - es-PY
                    - es-SV
                    - es-UY
                    - es-VE
                    - et
                    - et-EE
                    - eu
                    - eu-ES
                    - fa
                    - fa-IR
                    - ff
                    - fi
                    - fi-FI
                    - fj
                    - fo
                    - fo-FO
                    - fr
                    - fr-BE
                    - fr-CA
                    - fr-CH
                    - fr-FR
                    - fr-LU
                    - fr-MC
                    - fy
                    - ga
                    - gd
                    - gl
                    - gl-ES
                    - gn
                    - gu
                    - gu-IN
                    - gv
                    - ha
                    - he
                    - he-IL
                    - hi
                    - hi-IN
                    - ho
                    - hr
                    - hr-HR
                    - ht
                    - hu
                    - hu-HU
                    - hy
                    - hy-AM
                    - hz
                    - ia
                    - id
                    - id-ID
                    - ie
                    - ig
                    - ii
                    - ik
                    - io
                    - is
                    - is-IS
                    - it
                    - it-CH
                    - it-IT
                    - iu
                    - ja
                    - ja-JP
                    - jv
                    - ka
                    - ka-GE
                    - kg
                    - ki
                    - kj
                    - kk
                    - kk-KZ
                    - kl
                    - km
                    - kn
                    - kn-IN
                    - ko
                    - ko-KR
                    - kr
                    - ks
                    - ku
                    - kv
                    - kw
                    - ky
                    - ky-KZ
                    - la
                    - lb
                    - lg
                    - li
                    - ln
                    - lo
                    - lt
                    - lt-LT
                    - lu
                    - lv
                    - lv-LV
                    - mg
                    - mh
                    - mi
                    - mk
                    - mk-MK
                    - ml
                    - mn
                    - mn-MN
                    - mr
                    - mr-IN
                    - ms
                    - ms-BN
                    - ms-MY
                    - mt
                    - my
                    - na
                    - nb
                    - nb-NO
                    - nd
                    - ne
                    - ng
                    - nl
                    - nl-BE
                    - nl-NL
                    - nn
                    - nn-NO
                    - false
                    - nr
                    - nv
                    - ny
                    - oc
                    - oj
                    - om
                    - or
                    - os
                    - pa
                    - pa-IN
                    - pi
                    - pl
                    - pl-PL
                    - ps
                    - pt
                    - pt-BR
                    - pt-PT
                    - qu
                    - rm
                    - rn
                    - ro
                    - ro-RO
                    - ru
                    - ru-RU
                    - rw
                    - sa
                    - sa-IN
                    - sc
                    - sd
                    - se
                    - sg
                    - si
                    - sk
                    - sk-SK
                    - sl
                    - sl-SI
                    - sm
                    - sn
                    - so
                    - sq
                    - sq-AL
                    - sr
                    - ss
                    - st
                    - su
                    - sv
                    - sv-FI
                    - sv-SE
                    - sw
                    - sw-KE
                    - ta
                    - ta-IN
                    - te
                    - te-IN
                    - tg
                    - th
                    - th-TH
                    - ti
                    - tk
                    - tl
                    - tn
                    - to
                    - tr
                    - tr-TR
                    - ts
                    - tt
                    - tt-RU
                    - tw
                    - ty
                    - ug
                    - uk
                    - uk-UA
                    - ur
                    - ur-PK
                    - uz
                    - ve
                    - vi
                    - vi-VN
                    - vo
                    - wa
                    - wo
                    - xh
                    - yi
                    - yo
                    - za
                    - zh
                    - zh-CHS
                    - zh-CHT
                    - zh-CN
                    - zh-HK
                    - zh-MO
                    - zh-SG
                    - zh-TW
                    - zu
                    description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the
                      platform-default region, or the full form (`en-US`, `de-DE`) for a specific variant.
                  value:
                    type: string
                  author:
                    type: object
                    properties:
                      reference:
                        type: string
                      display:
                        type: string
                    required:
                    - reference
                  date:
                    type: string
                  projectId:
                    type: string
                required:
                - key
                - language
                - value
                - author
                example: &id087
                  key: home.title
                  language: en
                  value: Home
                  author:
                    reference: Practitioner/123
                    display: John Doe
                  date: 2020-01-01 00:00:00+00:00
              target:
                type: object
                properties:
                  id:
                    type: string
                  key:
                    description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention
                      recommended (e.g. `home.screen.title`).
                    type: string
                    pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
                    example: home.screen.title
                  language:
                    type: string
                    enum:
                    - Cy-az-AZ
                    - Cy-sr-SP
                    - Cy-uz-UZ
                    - Lt-az-AZ
                    - Lt-sr-SP
                    - Lt-uz-UZ
                    - aa
                    - ab
                    - ae
                    - af
                    - af-ZA
                    - ak
                    - am
                    - an
                    - ar
                    - ar-AE
                    - ar-BH
                    - ar-DZ
                    - ar-EG
                    - ar-IQ
                    - ar-JO
                    - ar-KW
                    - ar-LB
                    - ar-LY
                    - ar-MA
                    - ar-OM
                    - ar-QA
                    - ar-SA
                    - ar-SY
                    - ar-TN
                    - ar-YE
                    - as
                    - av
                    - ay
                    - az
                    - ba
                    - be
                    - be-BY
                    - bg
                    - bg-BG
                    - bh
                    - bi
                    - bm
                    - bn
                    - bo
                    - br
                    - bs
                    - ca
                    - ca-ES
                    - ce
                    - ch
                    - co
                    - cr
                    - cs
                    - cs-CZ
                    - cu
                    - cv
                    - cy
                    - da
                    - da-DK
                    - de
                    - de-AT
                    - de-CH
                    - de-DE
                    - de-LI
                    - de-LU
                    - div-MV
                    - dv
                    - dz
                    - ee
                    - el
                    - el-GR
                    - en
                    - en-AU
                    - en-BZ
                    - en-CA
                    - en-CB
                    - en-GB
                    - en-IE
                    - en-JM
                    - en-NZ
                    - en-PH
                    - en-TT
                    - en-US
                    - en-ZA
                    - en-ZW
                    - eo
                    - es
                    - es-AR
                    - es-BO
                    - es-CL
                    - es-CO
                    - es-CR
                    - es-DO
                    - es-EC
                    - es-ES
                    - es-GT
                    - es-HN
                    - es-MX
                    - es-NI
                    - es-PA
                    - es-PE
                    - es-PR
                    - es-PY
                    - es-SV
                    - es-UY
                    - es-VE
                    - et
                    - et-EE
                    - eu
                    - eu-ES
                    - fa
                    - fa-IR
                    - ff
                    - fi
                    - fi-FI
                    - fj
                    - fo
                    - fo-FO
                    - fr
                    - fr-BE
                    - fr-CA
                    - fr-CH
                    - fr-FR
                    - fr-LU
                    - fr-MC
                    - fy
                    - ga
                    - gd
                    - gl
                    - gl-ES
                    - gn
                    - gu
                    - gu-IN
                    - gv
                    - ha
                    - he
                    - he-IL
                    - hi
                    - hi-IN
                    - ho
                    - hr
                    - hr-HR
                    - ht
                    - hu
                    - hu-HU
                    - hy
                    - hy-AM
                    - hz
                    - ia
                    - id
                    - id-ID
                    - ie
                    - ig
                    - ii
                    - ik
                    - io
                    - is
                    - is-IS
                    - it
                    - it-CH
                    - it-IT
                    - iu
                    - ja
                    - ja-JP
                    - jv
                    - ka
                    - ka-GE
                    - kg
                    - ki
                    - kj
                    - kk
                    - kk-KZ
                    - kl
                    - km
                    - kn
                    - kn-IN
                    - ko
                    - ko-KR
                    - kr
                    - ks
                    - ku
                    - kv
                    - kw
                    - ky
                    - ky-KZ
                    - la
                    - lb
                    - lg
                    - li
                    - ln
                    - lo
                    - lt
                    - lt-LT
                    - lu
                    - lv
                    - lv-LV
                    - mg
                    - mh
                    - mi
                    - mk
                    - mk-MK
                    - ml
                    - mn
                    - mn-MN
                    - mr
                    - mr-IN
                    - ms
                    - ms-BN
                    - ms-MY
                    - mt
                    - my
                    - na
                    - nb
                    - nb-NO
                    - nd
                    - ne
                    - ng
                    - nl
                    - nl-BE
                    - nl-NL
                    - nn
                    - nn-NO
                    - false
                    - nr
                    - nv
                    - ny
                    - oc
                    - oj
                    - om
                    - or
                    - os
                    - pa
                    - pa-IN
                    - pi
                    - pl
                    - pl-PL
                    - ps
                    - pt
                    - pt-BR
                    - pt-PT
                    - qu
                    - rm
                    - rn
                    - ro
                    - ro-RO
                    - ru
                    - ru-RU
                    - rw
                    - sa
                    - sa-IN
                    - sc
                    - sd
                    - se
                    - sg
                    - si
                    - sk
                    - sk-SK
                    - sl
                    - sl-SI
                    - sm
                    - sn
                    - so
                    - sq
                    - sq-AL
                    - sr
                    - ss
                    - st
                    - su
                    - sv
                    - sv-FI
                    - sv-SE
                    - sw
                    - sw-KE
                    - ta
                    - ta-IN
                    - te
                    - te-IN
                    - tg
                    - th
                    - th-TH
                    - ti
                    - tk
                    - tl
                    - tn
                    - to
                    - tr
                    - tr-TR
                    - ts
                    - tt
                    - tt-RU
                    - tw
                    - ty
                    - ug
                    - uk
                    - uk-UA
                    - ur
                    - ur-PK
                    - uz
                    - ve
                    - vi
                    - vi-VN
                    - vo
                    - wa
                    - wo
                    - xh
                    - yi
                    - yo
                    - za
                    - zh
                    - zh-CHS
                    - zh-CHT
                    - zh-CN
                    - zh-HK
                    - zh-MO
                    - zh-SG
                    - zh-TW
                    - zu
                    description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the
                      platform-default region, or the full form (`en-US`, `de-DE`) for a specific variant.
                  value:
                    type: string
                  author:
                    type: object
                    properties:
                      reference:
                        type: string
                      display:
                        type: string
                    required:
                    - reference
                  date:
                    type: string
                  projectId:
                    type: string
                required:
                - key
                - language
                - value
                - author
                example: *id087
            required:
            - source
      required:
      - total
      - resources
    PaginatedSearchResponseDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              key:
                description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention recommended
                  (e.g. `home.screen.title`).
                type: string
                pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
                example: home.screen.title
              language:
                type: string
                enum:
                - Cy-az-AZ
                - Cy-sr-SP
                - Cy-uz-UZ
                - Lt-az-AZ
                - Lt-sr-SP
                - Lt-uz-UZ
                - aa
                - ab
                - ae
                - af
                - af-ZA
                - ak
                - am
                - an
                - ar
                - ar-AE
                - ar-BH
                - ar-DZ
                - ar-EG
                - ar-IQ
                - ar-JO
                - ar-KW
                - ar-LB
                - ar-LY
                - ar-MA
                - ar-OM
                - ar-QA
                - ar-SA
                - ar-SY
                - ar-TN
                - ar-YE
                - as
                - av
                - ay
                - az
                - ba
                - be
                - be-BY
                - bg
                - bg-BG
                - bh
                - bi
                - bm
                - bn
                - bo
                - br
                - bs
                - ca
                - ca-ES
                - ce
                - ch
                - co
                - cr
                - cs
                - cs-CZ
                - cu
                - cv
                - cy
                - da
                - da-DK
                - de
                - de-AT
                - de-CH
                - de-DE
                - de-LI
                - de-LU
                - div-MV
                - dv
                - dz
                - ee
                - el
                - el-GR
                - en
                - en-AU
                - en-BZ
                - en-CA
                - en-CB
                - en-GB
                - en-IE
                - en-JM
                - en-NZ
                - en-PH
                - en-TT
                - en-US
                - en-ZA
                - en-ZW
                - eo
                - es
                - es-AR
                - es-BO
                - es-CL
                - es-CO
                - es-CR
                - es-DO
                - es-EC
                - es-ES
                - es-GT
                - es-HN
                - es-MX
                - es-NI
                - es-PA
                - es-PE
                - es-PR
                - es-PY
                - es-SV
                - es-UY
                - es-VE
                - et
                - et-EE
                - eu
                - eu-ES
                - fa
                - fa-IR
                - ff
                - fi
                - fi-FI
                - fj
                - fo
                - fo-FO
                - fr
                - fr-BE
                - fr-CA
                - fr-CH
                - fr-FR
                - fr-LU
                - fr-MC
                - fy
                - ga
                - gd
                - gl
                - gl-ES
                - gn
                - gu
                - gu-IN
                - gv
                - ha
                - he
                - he-IL
                - hi
                - hi-IN
                - ho
                - hr
                - hr-HR
                - ht
                - hu
                - hu-HU
                - hy
                - hy-AM
                - hz
                - ia
                - id
                - id-ID
                - ie
                - ig
                - ii
                - ik
                - io
                - is
                - is-IS
                - it
                - it-CH
                - it-IT
                - iu
                - ja
                - ja-JP
                - jv
                - ka
                - ka-GE
                - kg
                - ki
                - kj
                - kk
                - kk-KZ
                - kl
                - km
                - kn
                - kn-IN
                - ko
                - ko-KR
                - kr
                - ks
                - ku
                - kv
                - kw
                - ky
                - ky-KZ
                - la
                - lb
                - lg
                - li
                - ln
                - lo
                - lt
                - lt-LT
                - lu
                - lv
                - lv-LV
                - mg
                - mh
                - mi
                - mk
                - mk-MK
                - ml
                - mn
                - mn-MN
                - mr
                - mr-IN
                - ms
                - ms-BN
                - ms-MY
                - mt
                - my
                - na
                - nb
                - nb-NO
                - nd
                - ne
                - ng
                - nl
                - nl-BE
                - nl-NL
                - nn
                - nn-NO
                - false
                - nr
                - nv
                - ny
                - oc
                - oj
                - om
                - or
                - os
                - pa
                - pa-IN
                - pi
                - pl
                - pl-PL
                - ps
                - pt
                - pt-BR
                - pt-PT
                - qu
                - rm
                - rn
                - ro
                - ro-RO
                - ru
                - ru-RU
                - rw
                - sa
                - sa-IN
                - sc
                - sd
                - se
                - sg
                - si
                - sk
                - sk-SK
                - sl
                - sl-SI
                - sm
                - sn
                - so
                - sq
                - sq-AL
                - sr
                - ss
                - st
                - su
                - sv
                - sv-FI
                - sv-SE
                - sw
                - sw-KE
                - ta
                - ta-IN
                - te
                - te-IN
                - tg
                - th
                - th-TH
                - ti
                - tk
                - tl
                - tn
                - to
                - tr
                - tr-TR
                - ts
                - tt
                - tt-RU
                - tw
                - ty
                - ug
                - uk
                - uk-UA
                - ur
                - ur-PK
                - uz
                - ve
                - vi
                - vi-VN
                - vo
                - wa
                - wo
                - xh
                - yi
                - yo
                - za
                - zh
                - zh-CHS
                - zh-CHT
                - zh-CN
                - zh-HK
                - zh-MO
                - zh-SG
                - zh-TW
                - zu
                description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
                  region, or the full form (`en-US`, `de-DE`) for a specific variant.
              value:
                type: string
              author:
                type: object
                properties:
                  reference:
                    type: string
                  display:
                    type: string
                required:
                - reference
              date:
                type: string
              projectId:
                type: string
            required:
            - key
            - language
            - value
            - author
            example: *id087
      required:
      - total
      - resources
    LocalizationDto:
      type: object
      properties:
        id:
          type: string
        key:
          description: Dot-separated localization key. Alphanumerics, `_`, `-`, `.` only. Hierarchical convention recommended
            (e.g. `home.screen.title`).
          type: string
          pattern: ^[a-zA-Z0-9_-][a-zA-Z0-9_\-.]*$
          example: home.screen.title
        language:
          type: string
          enum:
          - Cy-az-AZ
          - Cy-sr-SP
          - Cy-uz-UZ
          - Lt-az-AZ
          - Lt-sr-SP
          - Lt-uz-UZ
          - aa
          - ab
          - ae
          - af
          - af-ZA
          - ak
          - am
          - an
          - ar
          - ar-AE
          - ar-BH
          - ar-DZ
          - ar-EG
          - ar-IQ
          - ar-JO
          - ar-KW
          - ar-LB
          - ar-LY
          - ar-MA
          - ar-OM
          - ar-QA
          - ar-SA
          - ar-SY
          - ar-TN
          - ar-YE
          - as
          - av
          - ay
          - az
          - ba
          - be
          - be-BY
          - bg
          - bg-BG
          - bh
          - bi
          - bm
          - bn
          - bo
          - br
          - bs
          - ca
          - ca-ES
          - ce
          - ch
          - co
          - cr
          - cs
          - cs-CZ
          - cu
          - cv
          - cy
          - da
          - da-DK
          - de
          - de-AT
          - de-CH
          - de-DE
          - de-LI
          - de-LU
          - div-MV
          - dv
          - dz
          - ee
          - el
          - el-GR
          - en
          - en-AU
          - en-BZ
          - en-CA
          - en-CB
          - en-GB
          - en-IE
          - en-JM
          - en-NZ
          - en-PH
          - en-TT
          - en-US
          - en-ZA
          - en-ZW
          - eo
          - es
          - es-AR
          - es-BO
          - es-CL
          - es-CO
          - es-CR
          - es-DO
          - es-EC
          - es-ES
          - es-GT
          - es-HN
          - es-MX
          - es-NI
          - es-PA
          - es-PE
          - es-PR
          - es-PY
          - es-SV
          - es-UY
          - es-VE
          - et
          - et-EE
          - eu
          - eu-ES
          - fa
          - fa-IR
          - ff
          - fi
          - fi-FI
          - fj
          - fo
          - fo-FO
          - fr
          - fr-BE
          - fr-CA
          - fr-CH
          - fr-FR
          - fr-LU
          - fr-MC
          - fy
          - ga
          - gd
          - gl
          - gl-ES
          - gn
          - gu
          - gu-IN
          - gv
          - ha
          - he
          - he-IL
          - hi
          - hi-IN
          - ho
          - hr
          - hr-HR
          - ht
          - hu
          - hu-HU
          - hy
          - hy-AM
          - hz
          - ia
          - id
          - id-ID
          - ie
          - ig
          - ii
          - ik
          - io
          - is
          - is-IS
          - it
          - it-CH
          - it-IT
          - iu
          - ja
          - ja-JP
          - jv
          - ka
          - ka-GE
          - kg
          - ki
          - kj
          - kk
          - kk-KZ
          - kl
          - km
          - kn
          - kn-IN
          - ko
          - ko-KR
          - kr
          - ks
          - ku
          - kv
          - kw
          - ky
          - ky-KZ
          - la
          - lb
          - lg
          - li
          - ln
          - lo
          - lt
          - lt-LT
          - lu
          - lv
          - lv-LV
          - mg
          - mh
          - mi
          - mk
          - mk-MK
          - ml
          - mn
          - mn-MN
          - mr
          - mr-IN
          - ms
          - ms-BN
          - ms-MY
          - mt
          - my
          - na
          - nb
          - nb-NO
          - nd
          - ne
          - ng
          - nl
          - nl-BE
          - nl-NL
          - nn
          - nn-NO
          - false
          - nr
          - nv
          - ny
          - oc
          - oj
          - om
          - or
          - os
          - pa
          - pa-IN
          - pi
          - pl
          - pl-PL
          - ps
          - pt
          - pt-BR
          - pt-PT
          - qu
          - rm
          - rn
          - ro
          - ro-RO
          - ru
          - ru-RU
          - rw
          - sa
          - sa-IN
          - sc
          - sd
          - se
          - sg
          - si
          - sk
          - sk-SK
          - sl
          - sl-SI
          - sm
          - sn
          - so
          - sq
          - sq-AL
          - sr
          - ss
          - st
          - su
          - sv
          - sv-FI
          - sv-SE
          - sw
          - sw-KE
          - ta
          - ta-IN
          - te
          - te-IN
          - tg
          - th
          - th-TH
          - ti
          - tk
          - tl
          - tn
          - to
          - tr
          - tr-TR
          - ts
          - tt
          - tt-RU
          - tw
          - ty
          - ug
          - uk
          - uk-UA
          - ur
          - ur-PK
          - uz
          - ve
          - vi
          - vi-VN
          - vo
          - wa
          - wo
          - xh
          - yi
          - yo
          - za
          - zh
          - zh-CHS
          - zh-CHT
          - zh-CN
          - zh-HK
          - zh-MO
          - zh-SG
          - zh-TW
          - zu
          description: BCP-47 locale code drawn from the i18n ISO list. Use the short form (`en`, `de`) for the platform-default
            region, or the full form (`en-US`, `de-DE`) for a specific variant.
        value:
          type: string
        author:
          type: object
          properties:
            reference:
              type: string
            display:
              type: string
          required:
          - reference
        date:
          type: string
        projectId:
          type: string
      required:
      - key
      - language
      - value
      - author
      example: *id087
    LocalizationRequestBodyDto:
      type: object
      properties:
        value:
          type: string
      required:
      - value
      example:
        value: Home
    CmsApiKeyListResponseDto:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: Basic resource id holding this key.
          label:
            type: string
            description: Human-readable label set at issuance.
          prefix:
            type: string
            description: First few cleartext characters — surfaced so the dashboard can identify the key without storing the
              secret.
          createdAt:
            type: string
          lastUsedAt:
            type: string
            nullable: true
        required:
        - id
        - label
        - prefix
        - createdAt
        - lastUsedAt
      description: Issued CMS API keys for the caller’s current project. The cleartext secret is NEVER returned here — only
        `prefix` and `lastUsedAt` for identification.
    CmsApiKeyCreateResponseDto:
      type: object
      properties:
        key:
          type: object
          properties:
            id:
              type: string
              description: Basic resource id holding this key.
            label:
              type: string
              description: Human-readable label set at issuance.
            prefix:
              type: string
              description: First few cleartext characters — surfaced so the dashboard can identify the key without storing
                the secret.
            createdAt:
              type: string
            lastUsedAt:
              type: string
              nullable: true
          required:
          - id
          - label
          - prefix
          - createdAt
          - lastUsedAt
        secret:
          type: string
          description: Cleartext API key. Echoed back ONCE — store it now; it is not recoverable from the server afterwards.
      required:
      - key
      - secret
      description: Newly-issued CMS API key plus its one-time cleartext secret.
    PublicDeliveryListResponseDto:
      type: object
      properties:
        docs:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Stable Payload item id.
              slug:
                type: string
                description: Slug for the item, when the collection defines a `slug` field.
              publishedAt:
                type: string
                description: ISO-8601 timestamp the item was last published. Items without this field are filtered out of
                  the response.
            required:
            - id
            additionalProperties: true
            description: Published CMS item. Shape is project- and collection-specific — the documented fields are the envelope
              guaranteed by the delivery API; everything else comes from the Payload collection schema.
            example: &id088
              id: 87ea5dfc-8b8e-384d-8489-79496e706390
              slug: welcome-banner
              publishedAt: 2026-05-01 12:00:00+00:00
              title: Welcome to Ovok
              body: Long-form content authored in the Console.
          description: Published items in the current page, oldest-first unless sorted otherwise.
        totalDocs:
          type: integer
          minimum: 0
          description: Total matching items across all pages.
        limit:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Items per page (caller-supplied, capped at 100 server-side).
        totalPages:
          type: integer
          minimum: 0
          description: Total page count at the current limit.
        page:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: 1-indexed current page.
        pagingCounter:
          type: integer
          description: 1-indexed position of the first item on this page across the full result set.
        hasPrevPage:
          type: boolean
        hasNextPage:
          type: boolean
        prevPage:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          nullable: true
        nextPage:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          nullable: true
      required:
      - docs
      - totalDocs
      - limit
      - totalPages
      - page
      description: Paginated envelope of published items in a CMS collection. Items in `docs` follow the project-defined collection
        schema; the envelope fields (`totalDocs`, `limit`, `totalPages`, `page`) are fixed.
      example:
        docs:
        - id: 87ea5dfc-8b8e-384d-8489-79496e706390
          slug: welcome-banner
          publishedAt: 2026-05-01 12:00:00+00:00
          title: Welcome to Ovok
        totalDocs: 1
        limit: 20
        totalPages: 1
        page: 1
        pagingCounter: 1
        hasPrevPage: false
        hasNextPage: false
        prevPage: null
        nextPage: null
    PublicDeliveryItemResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Stable Payload item id.
        slug:
          type: string
          description: Slug for the item, when the collection defines a `slug` field.
        publishedAt:
          type: string
          description: ISO-8601 timestamp the item was last published. Items without this field are filtered out of the response.
      required:
      - id
      additionalProperties: true
      description: Published CMS item. Shape is project- and collection-specific — the documented fields are the envelope
        guaranteed by the delivery API; everything else comes from the Payload collection schema.
      example: *id088
    ProjectListResponseDto:
      type: object
      properties:
        projects:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              slug:
                type: string
                nullable: true
              parentProjectId:
                type: string
                nullable: true
              isAdmin:
                type: boolean
              isInternal:
                type: boolean
            required:
            - id
            - name
            - slug
            - parentProjectId
            - isAdmin
            - isInternal
      required:
      - projects
      description: All Medplum projects the caller is a member of.
    TenantCodeResponseDto:
      type: object
      properties:
        tenantCode:
          type: string
          nullable: true
          description: Short tenant code on file, or null when not assigned yet.
        projectId:
          type: string
      required:
      - tenantCode
      - projectId
      description: Tenant code lookup for the caller’s current project. Tenant codes are short, project-scoped identifiers
        used in URLs.
      example:
        tenantCode: acme
        projectId: 7cb8a325-…
    ProjectFeaturesResponseDto:
      type: object
      properties:
        features:
          type: array
          items:
            type: string
      required:
      - features
      description: Current project-level feature flags.
    ProjectFeaturesBodyDto:
      type: object
      properties:
        features:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 80
          maxItems: 64
      required:
      - features
      description: 'Replace the project-level Medplum feature flags. Common values: bots, cron, websocket-subscriptions, email,
        mfa, graphql-introspection, transaction-bundles. Empty array disables everything.'
      example:
        features:
        - bots
        - cron
        - websocket-subscriptions
    CmsLocalesResponseDto:
      type: object
      properties:
        locales:
          type: array
          items:
            type: string
          description: BCP-47 codes ordered as configured. Empty when the project has none set yet.
        default:
          type: string
          description: The project default locale — equal to `locales[0]` (or "" when no locales are configured).
      required:
      - locales
      - default
      description: CMS locale configuration for the caller’s current project. Public content delivery falls back to `default`
        when a requested locale has no value on file.
      example:
        locales:
        - en
        - de
        - fr
        default: en
    CmsLocalesBodyDto:
      type: object
      properties:
        locales:
          type: array
          items:
            type: string
            pattern: ^[a-z]{2,3}(-[A-Za-z]{2,4})?$
          minItems: 1
          maxItems: 20
      required:
      - locales
      description: Replace the CMS locale list. BCP-47 codes (e.g. "en", "de", "pt-BR"). First entry becomes the project default.
      example:
        locales:
        - en
        - de
        - fr
    MembersListResponseDto:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: ProjectMembership resource id.
          email:
            type: string
            nullable: true
          displayName:
            type: string
            nullable: true
          firstName:
            type: string
            nullable: true
          lastName:
            type: string
            nullable: true
          admin:
            type: boolean
          profileType:
            type: string
            enum:
            - Practitioner
            - Patient
            - RelatedPerson
            nullable: true
          profileId:
            type: string
            nullable: true
          pending:
            type: boolean
            description: True when the user has never completed the invite (no password set yet).
          invitedAt:
            type: string
            nullable: true
            description: ISO-8601 timestamp of the invite, or null when not known.
        required:
        - id
        - email
        - displayName
        - firstName
        - lastName
        - admin
        - profileType
        - profileId
        - pending
        - invitedAt
      description: Team members on the caller’s current project, including pending invites (users who have not completed their
        first sign-in).
    InviteMemberBodyDto:
      type: object
      properties:
        email:
          type: string
          format: email
          maxLength: 320
        firstName:
          type: string
          minLength: 1
          maxLength: 80
        lastName:
          type: string
          minLength: 1
          maxLength: 80
        admin:
          default: false
          type: boolean
      required:
      - email
      description: 'Invite a new Practitioner to the caller’s current project. Sends a magic-link email; the user sets a password
        and lands signed in. `admin: true` grants project-admin rights from the start.'
      example:
        email: alex@acme.com
        firstName: Alex
        lastName: Lee
        admin: false
    MemberResponseDto:
      type: object
      properties:
        id:
          type: string
          description: ProjectMembership resource id.
        email:
          type: string
          nullable: true
        displayName:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        admin:
          type: boolean
        profileType:
          type: string
          enum:
          - Practitioner
          - Patient
          - RelatedPerson
          nullable: true
        profileId:
          type: string
          nullable: true
        pending:
          type: boolean
          description: True when the user has never completed the invite (no password set yet).
        invitedAt:
          type: string
          nullable: true
          description: ISO-8601 timestamp of the invite, or null when not known.
      required:
      - id
      - email
      - displayName
      - firstName
      - lastName
      - admin
      - profileType
      - profileId
      - pending
      - invitedAt
      description: A team member on the caller’s current project — admin or practitioner.
    UpdateMemberBodyDto:
      type: object
      properties:
        admin:
          type: boolean
      description: Update an existing membership. Currently only the admin flag is mutable.
      example:
        admin: true
    ProjectDetailResponseDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
          nullable: true
        parentProjectId:
          type: string
          nullable: true
        isAdmin:
          type: boolean
        isInternal:
          type: boolean
        settings:
          type: object
          additionalProperties:
            type: boolean
      required:
      - id
      - name
      - slug
      - parentProjectId
      - isAdmin
      - isInternal
      - settings
      description: Project detail including settings map.
    RequestSetupStripeProjectDTO:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: User name.
        email:
          type: string
          format: email
          description: User email.
        password:
          type: string
          minLength: 8
          description: User password.
        projectPurpose:
          type: string
          minLength: 1
          description: Project purpose.
        organizationName:
          type: string
          minLength: 1
          description: Organization name.
      required:
      - name
      - email
      - password
      - projectPurpose
      - organizationName
      example:
        name: Dr. Max John Mustermann
        email: max.mustermann@example.com
        password: A[.DmUv]2vE|n_+]
        projectPurpose: ''
        organizationName: My Organization
    StripeProductsDto:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
          name:
            type: string
          description:
            type: string
          images:
            type: array
            items:
              type: string
          currency:
            type: string
          amount:
            type: number
          interval:
            type: string
        required:
        - id
        - name
        - description
        - images
        - currency
        - amount
        - interval
      example:
      - id: prod_....
        name: Professional
        description: Jetzt anfragen
        images:
        - https://files.stripe.com/links/M...
        currency: eur
        amount: 195000
        interval: month
    SubscriptionResponseDto:
      type: object
      properties:
        id:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        currentPeriodStart:
          type: string
          nullable: true
        currentPeriodEnd:
          type: string
          nullable: true
        trialEnd:
          type: string
          nullable: true
        cancelAtPeriodEnd:
          type: boolean
          nullable: true
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              priceId:
                type: string
              productId:
                type: string
              productName:
                type: string
                nullable: true
              amount:
                type: number
                nullable: true
              currency:
                type: string
                nullable: true
              interval:
                type: string
                nullable: true
              quantity:
                type: number
                nullable: true
            required:
            - id
            - priceId
            - productId
            - productName
            - amount
            - currency
            - interval
            - quantity
      required:
      - id
      - status
      - currentPeriodStart
      - currentPeriodEnd
      - trialEnd
      - cancelAtPeriodEnd
      - items
      description: Current Stripe subscription for the caller’s project.
    CustomerPortalRequestDto:
      type: object
      properties:
        returnUrl:
          type: string
          format: uri
      required:
      - returnUrl
      description: Where Stripe should send the user after the portal session.
    CustomerPortalResponseDto:
      type: object
      properties:
        url:
          type: string
          format: uri
      required:
      - url
      description: Single-use Stripe-hosted billing portal URL.
    AttachPlanRequestDto:
      type: object
      properties:
        tier:
          type: string
          enum:
          - free
          - startup
          - growth
          - enterprise
          description: Tier to subscribe the caller’s project to.
      required:
      - tier
      description: Pick a usage-based billing tier for the caller's project. Used by the dashboard's billing gate after signup.
        Enterprise is not self-serve — clients should send users to a contact-sales flow instead of calling this endpoint
        with tier='enterprise'.
    AttachPlanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Stripe subscription id.
        status:
          type: string
          description: Subscription status — typically "trialing" or "active".
        trialEnd:
          type: string
          nullable: true
          description: ISO timestamp when the trial ends, or null.
        tier:
          type: string
          enum:
          - free
          - startup
          - growth
          - enterprise
      required:
      - id
      - status
      - trialEnd
      - tier
    TiersResponseDto:
      type: object
      properties:
        tiers:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                enum:
                - free
                - startup
                - growth
                - enterprise
              label:
                type: string
              description:
                type: string
              monthlyIncludedRequests:
                type: integer
              hardCap:
                type: boolean
              selfServe:
                type: boolean
              displayFlatFee:
                type: string
              displayOverage:
                type: string
            required:
            - name
            - label
            - description
            - monthlyIncludedRequests
            - hardCap
            - selfServe
            - displayFlatFee
            - displayOverage
        mode:
          type: string
          enum:
          - stripe
          - internal
        currentTier:
          type: string
          enum:
          - free
          - startup
          - growth
          - enterprise
          nullable: true
        currentUsage:
          type: integer
      required:
      - tiers
      - mode
      - currentTier
      - currentUsage
      description: Self-serve billing tiers + the caller's current tier and current-period FHIR-API request count. The dashboard
        renders this on /billing/choose-plan and /billing. Internal projects (carehub etc.) get mode='internal' and currentTier=null
        — UI should hide the picker.
    InvoicesResponseDto:
      discriminator:
        propertyName: mode
      oneOf:
      - type: object
        properties:
          mode:
            type: string
            enum:
            - internal
          hasMore:
            type: boolean
            enum:
            - false
          data:
            type: array
            items:
              type: object
              properties:
                id:
                  type: string
                number:
                  type: string
                  nullable: true
                status:
                  type: string
                  nullable: true
                amountDue:
                  type: integer
                  description: Amount due in the smallest currency unit (cents for USD).
                amountPaid:
                  type: integer
                  description: Amount paid in the smallest currency unit.
                currency:
                  type: string
                  description: ISO-4217 lowercase currency code, as returned by Stripe.
                createdAt:
                  type: string
                  description: ISO-8601 UTC timestamp.
                periodStart:
                  type: string
                  nullable: true
                  description: Billing period start (ISO-8601) or null when Stripe omitted it.
                periodEnd:
                  type: string
                  nullable: true
                  description: Billing period end (ISO-8601) or null when Stripe omitted it.
                hostedInvoiceUrl:
                  type: string
                  nullable: true
                  description: Login-gated Stripe-hosted invoice page. Null until Stripe finalizes the invoice.
                invoicePdf:
                  type: string
                  nullable: true
                  description: Direct PDF link (also login-gated through Stripe).
              required:
              - id
              - number
              - status
              - amountDue
              - amountPaid
              - currency
              - createdAt
              - periodStart
              - periodEnd
              - hostedInvoiceUrl
              - invoicePdf
            minItems: 0
            maxItems: 0
        required:
        - mode
        - hasMore
        - data
      - type: object
        properties:
          mode:
            type: string
            enum:
            - stripe
          hasMore:
            type: boolean
          data:
            type: array
            items:
              type: object
              properties:
                id:
                  type: string
                number:
                  type: string
                  nullable: true
                status:
                  type: string
                  nullable: true
                amountDue:
                  type: integer
                  description: Amount due in the smallest currency unit (cents for USD).
                amountPaid:
                  type: integer
                  description: Amount paid in the smallest currency unit.
                currency:
                  type: string
                  description: ISO-4217 lowercase currency code, as returned by Stripe.
                createdAt:
                  type: string
                  description: ISO-8601 UTC timestamp.
                periodStart:
                  type: string
                  nullable: true
                  description: Billing period start (ISO-8601) or null when Stripe omitted it.
                periodEnd:
                  type: string
                  nullable: true
                  description: Billing period end (ISO-8601) or null when Stripe omitted it.
                hostedInvoiceUrl:
                  type: string
                  nullable: true
                  description: Login-gated Stripe-hosted invoice page. Null until Stripe finalizes the invoice.
                invoicePdf:
                  type: string
                  nullable: true
                  description: Direct PDF link (also login-gated through Stripe).
              required:
              - id
              - number
              - status
              - amountDue
              - amountPaid
              - currency
              - createdAt
              - periodStart
              - periodEnd
              - hostedInvoiceUrl
              - invoicePdf
        required:
        - mode
        - hasMore
        - data
      description: Paginated invoice list. Internal projects have no Stripe customer, so they get `mode='internal'` and an
        empty list — UI should hide the invoices panel. Pass the last invoice id back as `startingAfter` for the next page
        when `hasMore=true`.
    PaymentMethodsResponseDto:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
          brand:
            type: string
            nullable: true
            description: Stripe card brand (visa, mastercard, …) or null when not surfaced.
          last4:
            type: string
            nullable: true
          expMonth:
            type: integer
            nullable: true
          expYear:
            type: integer
            nullable: true
          isDefault:
            type: boolean
            description: True when this method is the customer's invoice default — i.e. the source Stripe uses to charge the
              subscription.
        required:
        - id
        - brand
        - last4
        - expMonth
        - expYear
        - isDefault
      description: Card payment methods attached to the project's Stripe customer. Only cards are returned (SEPA/ACH are filtered)
        because the dashboard only renders card UI. Internal projects (no Stripe customer) get an empty array.
    SetupIntentResponseDto:
      type: object
      properties:
        clientSecret:
          type: string
          nullable: true
          description: Single-use Stripe Elements client_secret. Null in unusual error paths.
        intentId:
          type: string
      required:
      - clientSecret
      - intentId
      description: A Stripe SetupIntent for collecting a new card client-side. The dashboard mounts Stripe Elements with `clientSecret`,
        confirms, and the resulting PaymentMethod is attached to the customer.
    ConnectRequestDto:
      type: object
      properties:
        patientId:
          type: string
          format: uuid
          description: FHIR Patient id to connect.
        redirectUri:
          type: string
          format: uri
          description: Where to send the user after the OAuth callback completes. Defaults to a JSON success page.
      required:
      - patientId
      description: Body for POST /v1/wearables/:provider/connect. Returns a one-time authorization URL the dashboard hands
        to the user; the user authenticates with the provider, gets redirected back to our /callback route, and at that point
        the access + refresh tokens are persisted.
    ConnectResponseDto:
      type: object
      properties:
        provider:
          type: string
          enum:
          - strava
          - polar
        authorizationUrl:
          type: string
          format: uri
        state:
          type: string
      required:
      - provider
      - authorizationUrl
      - state
      description: Authorization URL the dashboard should redirect the user to. `state` is opaque — the provider echoes it
        back to us; you do not need to interpret it.
    ConnectionListResponseDto:
      type: object
      properties:
        connections:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Endpoint resource id holding the connection.
              provider:
                type: string
                enum:
                - strava
                - polar
              patientId:
                type: string
              remoteUserId:
                type: string
                description: Provider-assigned user id (athlete_id, user_id…).
              expiresAt:
                type: number
                description: Epoch ms when the current access token expires.
              scopes:
                type: array
                items:
                  type: string
            required:
            - id
            - provider
            - patientId
            - remoteUserId
            - expiresAt
            - scopes
      required:
      - connections
      description: All wearable connections for the caller’s project.
    WearableCredentialsStatusDto:
      type: object
      properties:
        configured:
          type: boolean
          description: True when both clientId and clientSecret are on file for this provider.
        clientIdLast4:
          type: string
          nullable: true
          description: Last 4 characters of the stored clientId, for visual confirmation. `null` when no clientId is on file.
        hasSecret:
          type: boolean
          description: True when a clientSecret is on file. The value itself is never returned.
        hasWebhookSecret:
          type: boolean
          description: True when a webhookSecret is on file. Required for inbound signature verification on Polar; optional
            on Strava.
      required:
      - configured
      - clientIdLast4
      - hasSecret
      - hasWebhookSecret
      description: Status view of a project's wearable OAuth credentials. Returned by GET / PUT / DELETE — raw secrets are
        never surfaced, only their presence and the last 4 chars of the stored clientId.
      example:
        configured: true
        clientIdLast4: XY34
        hasSecret: true
        hasWebhookSecret: true
    WearableCredentialsBodyDto:
      type: object
      properties:
        clientId:
          type: string
          minLength: 1
          description: OAuth client_id from the provider's developer portal.
        clientSecret:
          type: string
          minLength: 1
          description: OAuth client_secret from the provider's developer portal.
        webhookSecret:
          type: string
          description: Webhook signing secret (required for signature verification on inbound events).
      required:
      - clientId
      - clientSecret
      example:
        clientId: abc123
        clientSecret: supersecret
        webhookSecret: whsec_xyz
    ProjectSettingsResponseDto:
      type: object
      properties:
        projectId:
          type: string
        settings:
          type: object
          additionalProperties:
            type: boolean
      required:
      - projectId
      - settings
      description: Boolean toggle state for every known project setting
      example:
        projectId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        settings:
          CONTENT_ENABLED: false
          PATIENT_INVITATION_ENABLED: true
          PATIENT_REGISTRATION_ENABLED: true
          PATIENT_LOGIN_ENABLED: true
          PRACTITIONER_INVITATION_ENABLED: true
          PRACTITIONER_REGISTRATION_ENABLED: false
          PRACTITIONER_LOGIN_ENABLED: true
    PutProjectSettingBodyDto:
      type: object
      properties:
        enabled:
          type: boolean
      required:
      - enabled
      description: Toggle body for a boolean project setting
      example:
        enabled: true
    SetupIotDeviceDto:
      type: object
      properties:
        serialNumber:
          type: string
          minLength: 1
          description: The unique serial number of the device
          example: SN123456789
        apiKey:
          type: string
          minLength: 1
          description: The API key for authentication
          example: wahjeeviyahr8ohL1ooshee2Zah9Ied5
      required:
      - serialNumber
      - apiKey
    SetupIotDeviceResponseDto:
      type: object
      properties:
        mqtt:
          type: object
          properties:
            clientId:
              type: string
            username:
              type: string
            password:
              type: string
            url:
              type: string
          required:
          - clientId
          - username
          - password
          - url
        wifi:
          type: object
          properties:
            SSID:
              type: string
            password:
              type: string
            method:
              type: string
          required:
          - SSID
          - password
          - method
        pairing:
          type: object
          properties:
            method:
              type: string
            H10Address:
              type: string
            O2RingAddress:
              type: string
          required:
          - method
          - H10Address
          - O2RingAddress
      required:
      - mqtt
      - wifi
      - pairing
    SimplifiedPatientDto:
      type: object
      properties:
        id:
          type: string
        deceased:
          type: boolean
        name:
          type: string
        surname:
          type: string
        dateOfBirth:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        gender:
          type: string
          enum:
          - male
          - female
          - unknown
          - other
        email:
          type: string
          format: email
        phone:
          type: string
        organization:
          type: string
        practitioner:
          type: string
        photo:
          type: string
          format: uri
        address:
          type: object
          properties:
            line:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
        contact:
          type: object
          properties:
            name:
              type: string
            email:
              type: string
              format: email
            phone:
              type: string
            address:
              type: object
              properties:
                line:
                  type: string
                city:
                  type: string
                state:
                  type: string
                postalCode:
                  type: string
                country:
                  type: string
      example: &id089
        name: John
        surname: Doe
        dateOfBirth: 1990-01-01
        gender: male
        email: john.doe@example.com
        phone: '+491234567890'
        address:
          line: 123 Main St
          city: Anytown
          state: NY
          postalCode: '12345'
          country: USA
        organization: Organization/123
    SimplifiedPatientsDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              deceased:
                type: boolean
              name:
                type: string
              surname:
                type: string
              dateOfBirth:
                type: string
                pattern: ^\d{4}-\d{2}-\d{2}$
              gender:
                type: string
                enum:
                - male
                - female
                - unknown
                - other
              email:
                type: string
                format: email
              phone:
                type: string
              organization:
                type: string
              practitioner:
                type: string
              photo:
                type: string
                format: uri
              address:
                type: object
                properties:
                  line:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  postalCode:
                    type: string
                  country:
                    type: string
              contact:
                type: object
                properties:
                  name:
                    type: string
                  email:
                    type: string
                    format: email
                  phone:
                    type: string
                  address:
                    type: object
                    properties:
                      line:
                        type: string
                      city:
                        type: string
                      state:
                        type: string
                      postalCode:
                        type: string
                      country:
                        type: string
            example: *id089
      required:
      - total
      - resources
      example:
        total: 2
        resources:
        - name: John
          surname: Doe
          dateOfBirth: 1990-01-01
          gender: male
          email: john.doe@example.com
          phone: '+491234567890'
          organization: Organization/123
    SimplifiedPractitionerDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        surname:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        address:
          type: object
          properties:
            line:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
        photo:
          type: string
          format: uri
      example: &id090
        name: John
        surname: Doe
        email: john.doe@example.com
        phone: '+491234567890'
        address:
          line: 123 Main St
          city: Anytown
          state: NY
          postalCode: '12345'
          country: USA
    SimplifiedPractitionersDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              surname:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              address:
                type: object
                properties:
                  line:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  postalCode:
                    type: string
                  country:
                    type: string
              photo:
                type: string
                format: uri
            example: *id090
      required:
      - total
      - resources
      example:
        total: 2
        resources:
        - name: John
          surname: Doe
          email: john.doe@example.com
          phone: '+491234567890'
        - name: Jane
          surname: Doe
          email: jane.doe@example.com
          phone: '+491234567890'
    SimplifiedOrganizationDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        address:
          type: object
          properties:
            line:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
        contact:
          type: object
          properties:
            name:
              type: string
            email:
              type: string
              format: email
            phone:
              type: string
            address:
              type: object
              properties:
                line:
                  type: string
                city:
                  type: string
                state:
                  type: string
                postalCode:
                  type: string
                country:
                  type: string
      example: &id091
        name: Organization 1
        email: organization1@example.com
        phone: '+491234567890'
        address:
          line: 123 Main St
          city: Anytown
          state: NY
          postalCode: '12345'
          country: USA
    SimplifiedOrganizationsDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              email:
                type: string
                format: email
              phone:
                type: string
              address:
                type: object
                properties:
                  line:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  postalCode:
                    type: string
                  country:
                    type: string
              contact:
                type: object
                properties:
                  name:
                    type: string
                  email:
                    type: string
                    format: email
                  phone:
                    type: string
                  address:
                    type: object
                    properties:
                      line:
                        type: string
                      city:
                        type: string
                      state:
                        type: string
                      postalCode:
                        type: string
                      country:
                        type: string
            example: *id091
      required:
      - total
      - resources
      example:
        total: 2
        resources:
        - name: Organization 1
          email: organization1@example.com
          phone: '+491234567890'
          address: 123 Main St, Anytown, USA
        - name: Organization 2
          email: organization2@example.com
          phone: '+491234567890'
          address: 456 Main St, Anytown, USA
    SimplifiedObservationDto:
      type: object
      properties:
        id:
          type: string
        subject:
          type: string
        code:
          type: string
        system:
          default: http://loinc.org
          type: string
        data:
          type: object
          properties:
            value:
              oneOf:
              - type: string
              - type: number
              - type: boolean
              - type: array
                items:
                  type: number
                minItems: 1
            code:
              type: string
            system:
              default: http://ucum.org
              type: string
            unit:
              type: string
        date:
          type: string
          format: date-time
        performer:
          type: string
        device:
          type: string
      examples: &id092
      - subject: Patient/123
        code: 8867-4
        data:
          value: 120
          code: mg/dL
          system: http://ucum.org
        date: 2021-01-01 00:00:00+00:00
        performer: Practitioner/123
      - subject: Patient/123
        code: '131328'
        data:
          value:
          - 1
          - 2
          - 3
          code: mg/dL
          system: http://ucum.org
        date: 2021-01-01 00:00:00+00:00
        performer: Practitioner/123
    SimplifiedObservationsDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              subject:
                type: string
              code:
                type: string
              system:
                default: http://loinc.org
                type: string
              data:
                type: object
                properties:
                  value:
                    oneOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: array
                      items:
                        type: number
                      minItems: 1
                  code:
                    type: string
                  system:
                    default: http://ucum.org
                    type: string
                  unit:
                    type: string
              date:
                type: string
                format: date-time
              performer:
                type: string
              device:
                type: string
            examples: *id092
      required:
      - total
      - resources
      example:
        total: 2
        resources:
        - subject: Patient/123
          code: 8867-4
          data:
            value: 120
            code: mg/dL
            system: http://ucum.org
          date: 2021-01-01 00:00:00+00:00
          performer: Practitioner/123
        - subject: Patient/123
          code: '131328'
          data:
            value:
            - 1
            - 2
            - 3
            code: mV
            system: http://ucum.org
          date: 2021-01-01 00:00:00+00:00
          performer: Practitioner/123
          device: Device/123
    SimplifiedTaskDto:
      type: object
      properties:
        id:
          type: string
        status:
          default: draft
          type: string
          enum:
          - draft
          - requested
          - received
          - accepted
          - rejected
          - ready
          - cancelled
          - in-progress
          - on-hold
          - completed
          - failed
          - entered-in-error
        priority:
          type: string
          enum:
          - routine
          - urgent
          - asap
          - stat
        description:
          type: string
        for:
          type: string
        focus:
          type: string
        owner:
          description: A reference to a Practitioner, Organization, or Patient
          type: string
        requester:
          description: A reference to a Practitioner, Organization, or Patient
          type: string
        input:
          type: array
          items:
            oneOf:
            - type: string
            - type: object
              properties:
                reference:
                  type: string
        output:
          type: array
          items:
            oneOf:
            - type: string
            - type: object
              properties:
                reference:
                  type: string
    SimplifiedTasksDto:
      type: object
      properties:
        total:
          type: number
        resources:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              status:
                default: draft
                type: string
                enum:
                - draft
                - requested
                - received
                - accepted
                - rejected
                - ready
                - cancelled
                - in-progress
                - on-hold
                - completed
                - failed
                - entered-in-error
              priority:
                type: string
                enum:
                - routine
                - urgent
                - asap
                - stat
              description:
                type: string
              for:
                type: string
              focus:
                type: string
              owner:
                description: A reference to a Practitioner, Organization, or Patient
                type: string
              requester:
                description: A reference to a Practitioner, Organization, or Patient
                type: string
              input:
                type: array
                items:
                  oneOf:
                  - type: string
                  - type: object
                    properties:
                      reference:
                        type: string
              output:
                type: array
                items:
                  oneOf:
                  - type: string
                  - type: object
                    properties:
                      reference:
                        type: string
      required:
      - total
      - resources
    HeartRateRequestDto:
      type: object
      properties:
        heartRateValue:
          type: number
        personExist:
          default: true
          type: boolean
        radarId:
          type: string
        respiratoryValue:
          type: number
      required:
      - heartRateValue
      - radarId
      - respiratoryValue
      example:
        heartRateValue: 72
        personExists: true
        radarId: '123'
        respiratoryValue: 12
    ConnectionStatusDto:
      type: object
      properties:
        timestamp:
          type: number
          minimum: 0
          description: Unix timestamp in milliseconds
        deviceId:
          type: string
          description: The device ID
        eventType:
          type: string
          enum:
          - connection-status
        eventValue:
          type: boolean
      required:
      - timestamp
      - deviceId
      - eventType
      - eventValue
    OccupancyValueDto:
      type: object
      properties:
        timestamp:
          type: number
          minimum: 0
          description: Unix timestamp in milliseconds
        deviceId:
          type: string
          description: The device ID
        eventType:
          type: string
          enum:
          - occupancy-status
        eventValue:
          type: boolean
      required:
      - timestamp
      - deviceId
      - eventType
      - eventValue
    SleepStatusDto:
      type: object
      properties:
        timestamp:
          type: number
          minimum: 0
          description: Unix timestamp in milliseconds
        deviceId:
          type: string
          description: The device ID
        eventType:
          type: string
          enum:
          - sleep-status
        eventValue:
          oneOf:
          - type: string
            enum:
            - deep-sleep
            - light-sleep
            - awake-in-bed
            - left-bed
            - none
          - type: string
      required:
      - timestamp
      - deviceId
      - eventType
      - eventValue
    HeartRateValueDto:
      type: object
      properties:
        timestamp:
          type: number
          minimum: 0
          description: Unix timestamp in milliseconds
        deviceId:
          type: string
          description: The device ID
        eventType:
          type: string
          enum:
          - heart-rate
        eventValue:
          type: number
          minimum: 0
      required:
      - timestamp
      - deviceId
      - eventType
      - eventValue
    BreathRateValueDto:
      type: object
      properties:
        timestamp:
          type: number
          minimum: 0
          description: Unix timestamp in milliseconds
        deviceId:
          type: string
          description: The device ID
        eventType:
          type: string
          enum:
          - breath-rate
        eventValue:
          type: number
          minimum: 0
      required:
      - timestamp
      - deviceId
      - eventType
      - eventValue
    ResponseLivekitVideoCallAccessPermissionDto:
      type: object
      properties:
        resourceType:
          default: CommunicationRequest
          type: string
          description: Resource Type.
        id:
          type: string
          description: Resource ID.
        identifier:
          type: array
          items:
            type: object
            properties:
              system:
                default: https://api.ovok.com/fhir/StructureDefinition/communication-request-type
                type: string
                description: Communication request unique identifier system.
              value:
                default: video-call-access
                type: string
                description: Communication request unique identifier value.
        basedOn:
          type: string
          description: ID of Appointment to which the video call access permission applies to.
        status:
          type: string
          description: Status of the video call access permission.
        recipient:
          type: array
          items:
            type: object
            properties:
              reference:
                type: string
                description: Reference of the video call participant.
              display:
                type: string
                description: Name of the video call participant.
              identifier:
                type: object
                properties:
                  system:
                    default: https://api.ovok.com/fhir/StructureDefinition/user-email
                    type: string
                    description: Email identifier of video call participant.
                  value:
                    type: string
                    description: Email of video call participant.
                required:
                - value
            required:
            - reference
            - display
            - identifier
      required:
      - id
      - identifier
      - basedOn
      - status
      - recipient
      example:
        resourceType: CommunicationRequest
        id: 2adae28d-6664-74a9-3f4c-cad5f551ce1e
        basedOn: 2d05c593-246b-cb2d-aa32-1d075024c362
        status: active
        identifier:
        - system: https://api.ovok.com/fhir/StructureDefinition/communication-request-type
          value: video-call-access
        recipient:
        - reference: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
          display: Max Mustermann
          identifier:
            system: https://api.ovok.com/fhir/StructureDefinition/user-email
            value: max.mustermann@example.com
    RequestLivekitVideoCallGuestAccessDto:
      type: object
      properties:
        guestEmail:
          type: string
          format: email
          description: Guest email.
      required:
      - guestEmail
      example:
        guestEmail: max.mustermann@example.com
    ResponseVideoCallAccessDto:
      type: object
      properties:
        videoCallUrl:
          type: string
          example: https://call.ovok.online/room?token=abc123#def456
          description: Video call URL.
        livekitJwt:
          type: string
          example: abc123
          description: LiveKit JWT.
        passphrase:
          type: string
          example: def456
          description: Passphrase for e2e encryption.
      required:
      - videoCallUrl
      - livekitJwt
      - passphrase
    ResponseLivekitVideoCallAccessDto:
      type: object
      properties:
        videoCallUrl:
          type: string
          description: URL to join video call.
        livekitJwt:
          type: string
          description: LiveKit JWT.
        passphrase:
          type: string
          description: Passphrase for video call.
      required:
      - videoCallUrl
      - livekitJwt
      - passphrase
      example:
        videoCallUrl: https://call.ovok.online/room?token=example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY#m_pmt6dt0fLWkVeBj8X6
        livekitJwt: example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
        passphrase: m_pmt6dt0fLWkVeBj8X6
    RequestBodyLivekitVideoCallAppointmentDto:
      type: object
      properties:
        id:
          type: string
          description: Appointment ID.
        start:
          type: string
          format: date-time
          description: "Start date-time of the video call appointment.\n    ATTENTION: Start date must be provided in UTC+0\
            \ (GMT+0) time."
        end:
          type: string
          format: date-time
          description: "End date-time of the video call appointment.\n    ATTENTION: End date must be provided in UTC+0 (GMT+0)\
            \ time."
        comment:
          type: string
          minLength: 1
          description: Title of the video call appointment.
        description:
          type: string
          description: Brief description of the video call appointment.
        videoCallParticipants:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
                format: email
                description: Participant email.
            required:
            - email
          minItems: 1
          description: Video call participants.
      required:
      - start
      - end
      - comment
      - videoCallParticipants
      example:
        start: 2025-01-01 14:00:00+00:00
        end: 2025-01-01 15:00:00+00:00
        comment: Appointment on 31.01.2025
        description: Check-up appointment
        videoCallParticipants:
        - email: max.mustermann@example.com
    ResponseBodyLivekitVideoCallAppointmentDto:
      type: object
      properties:
        id:
          type: string
          description: Appointment ID.
        resourceType:
          default: Appointment
          type: string
          description: Appointment resource type.
        status:
          type: string
          enum:
          - proposed
          - pending
          - booked
          - arrived
          - fulfilled
          - cancelled
          - noshow
          - entered-in-error
          - checked-in
          - waitlist
          description: Appointment status.
        start:
          type: string
          format: date-time
          description: "Start date-time of the video call appointment.\n    ATTENTION: Start date is provided in UTC+0 (GMT+0)\
            \ time."
        end:
          type: string
          format: date-time
          description: "End date-time of the video call appointment.\n    ATTENTION: End date is provided in UTC+0 (GMT+0)\
            \ time."
        comment:
          type: string
          minLength: 1
          description: Title of the video call appointment.
        description:
          type: string
          description: Brief description of the video call appointment.
        videoCallParticipants:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
                format: email
                description: Participant email.
              status:
                type: string
                enum:
                - accepted
                - declined
                - tentative
                - needs-action
              profileRef:
                type: string
                description: Practitioner or patient resource reference.
            required:
            - email
            - status
            - profileRef
        passphrase:
          type: string
          description: Passphrase for the video call appointment.
      required:
      - id
      - status
      - start
      - end
      - comment
      - videoCallParticipants
      - passphrase
      example: &id093
        status: booked
        start: 2026-05-21 08:09:31+00:00
        end: 2026-05-22 08:09:31+00:00
        comment: Appointment on 31.01.2025
        description: Check-up appointment
        videoCallParticipants:
        - email: max.mustermann@example.com
          status: accepted
          profileRef: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
        passphrase: gq7cDglqpS
    ResponseBodyLivekitVideoCallAppointmentArrayDto:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: Appointment ID.
          resourceType:
            default: Appointment
            type: string
            description: Appointment resource type.
          status:
            type: string
            enum:
            - proposed
            - pending
            - booked
            - arrived
            - fulfilled
            - cancelled
            - noshow
            - entered-in-error
            - checked-in
            - waitlist
            description: Appointment status.
          start:
            type: string
            format: date-time
            description: "Start date-time of the video call appointment.\n    ATTENTION: Start date is provided in UTC+0 (GMT+0)\
              \ time."
          end:
            type: string
            format: date-time
            description: "End date-time of the video call appointment.\n    ATTENTION: End date is provided in UTC+0 (GMT+0)\
              \ time."
          comment:
            type: string
            minLength: 1
            description: Title of the video call appointment.
          description:
            type: string
            description: Brief description of the video call appointment.
          videoCallParticipants:
            type: array
            items:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  description: Participant email.
                status:
                  type: string
                  enum:
                  - accepted
                  - declined
                  - tentative
                  - needs-action
                profileRef:
                  type: string
                  description: Practitioner or patient resource reference.
              required:
              - email
              - status
              - profileRef
          passphrase:
            type: string
            description: Passphrase for the video call appointment.
        required:
        - id
        - status
        - start
        - end
        - comment
        - videoCallParticipants
        - passphrase
        example: *id093
      example:
      - status: booked
        start: 2026-05-21 08:09:31+00:00
        end: 2026-05-22 08:09:31+00:00
        description: Check-up appointment
        videoCallParticipants:
        - email: max.mustermann@example.com
          name: Max Mustermann
          status: accepted
          profileRef: Practitioner/cd495e76-8385-ecb1-00a6-7e0381de4e42
        passphrase: gq7cDglqpS
    RequestBodyLivekitVideoCallMailDto:
      type: object
      properties:
        appointmentId:
          type: string
          minLength: 1
          description: Video call Appointment ID.
        emailRecipients:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
                format: email
                description: Participant email.
              profileRef:
                description: Reference to participant resource.
                type: string
            required:
            - email
            - profileRef
          minItems: 1
          maxItems: 20
          description: List of email recipients.
      required:
      - appointmentId
      - emailRecipients
      example:
        appointmentId: 87ea5dfc-8b8e-384d-8489-79496e706390
        emailRecipients:
        - email: max.mustermann@example.com
          profileRef: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
    ResponseBodyLivekitVideoCallMailDto:
      type: object
      properties:
        appointmentId:
          type: string
          minLength: 1
          description: Video call Appointment ID.
        emailRecipientsResult:
          type: array
          items:
            type: object
            properties:
              email:
                type: string
                format: email
                description: Participant email.
              profileRef:
                description: Reference to participant resource.
                type: string
              isEmailSent:
                type: boolean
                description: Email sent status.
            required:
            - email
            - profileRef
            - isEmailSent
      required:
      - appointmentId
      - emailRecipientsResult
      example:
        appointmentId: 87ea5dfc-8b8e-384d-8489-79496e706390
        emailRecipientsResult:
        - email: max.mustermann@example.com
          profileRef: Patient/de5c57ff-7257-57b0-13ab-aab6f5f91498
          isEmailSent: true
    AppointmentActorDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Patient
          - Practitioner
          - PractitionerRole
          - RelatedPerson
          - Device
          - HealthcareService
          - Location
          description: Type of actor.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of actor.
        display:
          type: string
          example: John Doe
          description: Display name of actor.
      required:
      - id
    AppointmentParticipantDto:
      type: object
      properties:
        status:
          type: string
          enum:
          - accepted
          - declined
          - tentative
          - needs-action
          description: Status of the participant.
        type:
          example:
          - abc123
          description: Role of participant in the appointment.
          type: array
          items:
            type: string
        actor:
          description: Actor participating in the appointment.
          allOf:
          - $ref: '#/components/schemas/AppointmentActorDto'
      required:
      - status
    CreateAppointmentVideoCallDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum:
          - proposed
          - pending
          - booked
          - arrived
          - fulfilled
          - cancelled
          - noshow
          - entered-in-error
          - checked-in
          - waitlist
          description: Status of the video call appointment.
        participant:
          description: Participants of the video call appointment.
          type: array
          items:
            $ref: '#/components/schemas/AppointmentParticipantDto'
        startDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: "Start date of the video call appointment.\n    ATTENTION: Start date must be provided in UTC+0 (GMT+0)\
            \ time."
        endDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: "End date of the video call appointment.\n    ATTENTION: End date must be provided in UTC+0 (GMT+0)\
            \ time."
        description:
          type: string
          example: abc123
          description: Description of the video call appointment.
        serviceType:
          example:
          - CONSULTATION
          description: The service that is performed during the video call appointment.
          type: array
          items:
            type: string
        appointmentType:
          type: string
          example: 11111-1
          description: Type of the booked video call appointment.
      required:
      - status
      - participant
      - startDate
      - endDate
    AppointmentDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: &id096
          - proposed
          - pending
          - booked
          - arrived
          - fulfilled
          - cancelled
          - noshow
          - entered-in-error
          - checked-in
          - waitlist
          description: Status of the appointment.
        participant:
          description: The participants of the appointment.
          type: array
          items:
            $ref: '#/components/schemas/AppointmentParticipantDto'
        description:
          type: string
          example: abc123
          description: Description of the appointment.
        startDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Start date of the appointment.
        endDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: End date of the appointment.
        serviceType:
          example: &id097
          - CONSULTATION
          description: The service that is performed during the appointment.
          type: array
          items:
            type: string
        appointmentType:
          type: string
          example: 11111-1
          description: Type of the booked appointment.
        resourceType:
          type: Appointment
          example: Appointment
          description: Appointment resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Appointment resource ID.
      required:
      - status
      - participant
      - resourceType
      - id
    ResponseAppointmentVideoCallDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        resourceType:
          type: string
          example: Appointment
          description: Video call appointment resource type.
          enum:
          - Appointment
        id:
          type: string
          example: 12345-12345-12345
          description: Video call appointment resource ID.
        status:
          type: string
          enum:
          - proposed
          - pending
          - booked
          - arrived
          - fulfilled
          - cancelled
          - noshow
          - entered-in-error
          - checked-in
          - waitlist
          description: Status of the video call appointment.
        participant:
          description: Participants of the video call appointment.
          type: array
          items:
            $ref: '#/components/schemas/AppointmentParticipantDto'
        startDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: "Start date of the video call appointment.\n    ATTENTION: Start date must be provided in UTC+0 (GMT+0)\
            \ time."
        endDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: "End date of the video call appointment.\n    ATTENTION: End date must be provided in UTC+0 (GMT+0)\
            \ time."
        videoCallJoinUrl:
          type: string
          example: https://call.ovok.online/join?room=abc123&client=def456
          description: Video call join URL.
        videoCallPassphrase:
          type: string
          example: abc123
          description: Video call room passphrase.
        description:
          type: string
          example: abc123
          description: Description of the video call appointment.
        serviceType:
          example:
          - CONSULTATION
          description: The service that is performed during the video call appointment.
          type: array
          items:
            type: string
        appointmentType:
          type: string
          example: 11111-1
          description: Type of the booked video call appointment.
      required:
      - resourceType
      - id
      - status
      - participant
      - startDate
      - endDate
      - videoCallJoinUrl
    CreateUserAccessVideoCallDto:
      type: object
      properties:
        roomId:
          type: string
          example: 12345-12345-12345
          description: Room ID, which is also an Appointment ID.
      required:
      - roomId
    CreateGuestAccessVideoCallDto:
      type: object
      properties:
        roomId:
          type: string
          example: 12345-12345-12345
          description: Room ID, which is also an Appointment ID.
        guestName:
          type: string
          example: John Doe
          description: Guest name.
      required:
      - roomId
    PatchOperationDto:
      type: object
      properties:
        op:
          type: string
          enum:
          - add
          - remove
          - replace
          - copy
          - move
          - test
          description: Operation to be performed on the parameter.
        path:
          type: string
          description: Path of the parameter on the resource.
        value:
          type: object
          description: Value that should be added/removed/replaced.
      required:
      - op
      - path
    AccountSubjectDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Patient
          - Device
          - Practitioner
          - PractitionerRole
          - Location
          - HealthcareService
          - Organization
          description: Type of the account subject.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of the account subject.
      required:
      - type
      - id
    AccountCoverageDto:
      type: object
      properties:
        coverage:
          type: string
          example: 12345-12345-12345
          description: ID of the coverage.
        priority:
          type: number
          example: 1
          description: The priority of the coverage in the context of this account.
      required:
      - coverage
    CreateAccountDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: &id094
          - active
          - inactive
          - on-hold
          - unknown
          - entered-in-error
          description: Status of the account.
        type:
          type: string
          enum: &id095
          - _ActAccountCode
          - ACCTRECEIVABLE
          - CASH
          - CC
          - AE
          - DN
          - DV
          - MC
          - V
          - PBILLACCT
          description: Type of the account. See https://hl7.org/fhir/valueset-account-type.html
        name:
          type: string
          example: 'Patient: John Doe'
          description: Name of the account.
        subject:
          description: The entity that caused the expenses. E.g. Patient, Practitioner, Organization, Device, etc.
          type: array
          items:
            $ref: '#/components/schemas/AccountSubjectDto'
        description:
          type: string
          example: Patient deposit
          description: Description of the account.
        coverage:
          description: The party(s) such as insurances, that may contribute to the payment of this account.
          type: array
          items:
            $ref: '#/components/schemas/AccountCoverageDto'
      required:
      - status
    AccountDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: *id094
          description: Status of the account.
        type:
          type: string
          enum: *id095
          description: Type of the account. See https://hl7.org/fhir/valueset-account-type.html
        name:
          type: string
          example: 'Patient: John Doe'
          description: Name of the account.
        subject:
          description: The entity that caused the expenses. E.g. Patient, Practitioner, Organization, Device, etc.
          type: array
          items:
            $ref: '#/components/schemas/AccountSubjectDto'
        description:
          type: string
          example: Patient deposit
          description: Description of the account.
        coverage:
          description: The party(s) such as insurances, that may contribute to the payment of this account.
          type: array
          items:
            $ref: '#/components/schemas/AccountCoverageDto'
        resourceType:
          type: Account
          example: Account
          description: Account resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Account resource ID.
      required:
      - status
      - resourceType
      - id
    Object:
      type: object
      properties: {}
    ResponseAccountDto:
      type: object
      properties:
        data:
          description: List of Account resources.
          type: array
          items:
            $ref: '#/components/schemas/AccountDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    CodeableConceptDto:
      type: object
      properties:
        text:
          type: string
          example: All OK
          description: Text representation.
    OperationOutcomeIssueDto:
      type: object
      properties:
        severity:
          type: string
          enum:
          - fatal
          - error
          - warning
          - information
          example: information
          description: Severity of the issue.
        code:
          type: string
          example: informational
          description: Type of the issue.
        details:
          description: Additional details about the issue.
          allOf:
          - $ref: '#/components/schemas/CodeableConceptDto'
      required:
      - severity
      - code
    OperationOutcomeDto:
      type: object
      properties:
        resourceType:
          type: OperationOutcome
          example: OperationOutcome
          description: Resource type.
        id:
          type: string
          example: ok
          description: Logical ID of the resource.
        issue:
          description: 'Single issue associated with the action: error, warning or information message.'
          type: array
          items:
            $ref: '#/components/schemas/OperationOutcomeIssueDto'
      required:
      - resourceType
      - id
      - issue
    CreateAppointmentDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: *id096
          description: Status of the appointment.
        participant:
          description: The participants of the appointment.
          type: array
          items:
            $ref: '#/components/schemas/AppointmentParticipantDto'
        description:
          type: string
          example: abc123
          description: Description of the appointment.
        startDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Start date of the appointment.
        endDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: End date of the appointment.
        serviceType:
          example: *id097
          description: The service that is performed during the appointment.
          type: array
          items:
            type: string
        appointmentType:
          type: string
          example: 11111-1
          description: Type of the booked appointment.
      required:
      - status
      - participant
    ResponseAppointmentDto:
      type: object
      properties:
        data:
          description: The requested data.
          type: array
          items:
            $ref: '#/components/schemas/AppointmentDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    DeviceUdiCarrierDto:
      type: object
      properties:
        deviceIdentifier:
          type: string
          example: abc123
          description: 'Device identifier: portion of the UDI identifying the labeler and the version of the device model.'
        carrierHRF:
          type: string
          example: abc123
          description: Human Readable Form (HRF) of the barcode.
    DeviceDeviceNameDto:
      type: object
      properties:
        name:
          type: string
          example: Digital Scale
          description: Name of the device.
        type:
          type: string
          enum:
          - udi-label-name
          - user-friendly-name
          - patient-reported-name
          - manufacturer-name
          - model-name
          - other
          description: Type of the device name.
      required:
      - name
    CreateDeviceDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        udiCarrier:
          description: Unique Device Identifier (UDI) of the barcode.
          type: array
          items:
            $ref: '#/components/schemas/DeviceUdiCarrierDto'
        status:
          type: string
          enum: &id098
          - active
          - inactive
          - entered-in-error
          - unknown
          description: Status of the device availability.
        distinctIdentifier:
          type: string
          example: abc123
          description: Distinct identification of the device.
        manufacturer:
          type: string
          example: Medtronic
          description: Name of the device manufacturer.
        manufactureDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Date when the device was manufactured.
        expirationDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Expiration date of the device.
        lotNumber:
          type: string
          example: '12345'
          description: Lot number assigned by the manufacturer.
        serialNumber:
          type: string
          example: '12345'
          description: Serial number of the device.
        deviceName:
          description: Device name as given by the manufacturer.
          type: array
          items:
            $ref: '#/components/schemas/DeviceDeviceNameDto'
        modelNumber:
          type: string
          example: '12345'
          description: Model number of the device.
        type:
          type: string
          example: 11111-1
          description: Type of the device.
        patient:
          type: string
          example: 12345-12345-12345
          description: ID of the patient to whom the device is affixed.
        location:
          type: string
          example: 12345-12345-12345
          description: ID of the location where the device can be found.
    DeviceDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        udiCarrier:
          description: Unique Device Identifier (UDI) of the barcode.
          type: array
          items:
            $ref: '#/components/schemas/DeviceUdiCarrierDto'
        status:
          type: string
          enum: *id098
          description: Status of the device availability.
        distinctIdentifier:
          type: string
          example: abc123
          description: Distinct identification of the device.
        manufacturer:
          type: string
          example: Medtronic
          description: Name of the device manufacturer.
        manufactureDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Date when the device was manufactured.
        expirationDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Expiration date of the device.
        lotNumber:
          type: string
          example: '12345'
          description: Lot number assigned by the manufacturer.
        serialNumber:
          type: string
          example: '12345'
          description: Serial number of the device.
        deviceName:
          description: Device name as given by the manufacturer.
          type: array
          items:
            $ref: '#/components/schemas/DeviceDeviceNameDto'
        modelNumber:
          type: string
          example: '12345'
          description: Model number of the device.
        type:
          type: string
          example: 11111-1
          description: Type of the device.
        patient:
          type: string
          example: 12345-12345-12345
          description: ID of the patient to whom the device is affixed.
        location:
          type: string
          example: 12345-12345-12345
          description: ID of the location where the device can be found.
        resourceType:
          type: Device
          example: Device
          description: Device resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Device resource ID.
      required:
      - resourceType
      - id
    ResponseDeviceDto:
      type: object
      properties:
        data:
          description: List of Device resources
          type: array
          items:
            $ref: '#/components/schemas/DeviceDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    LocationPositionDto:
      type: object
      properties:
        latitude:
          type: number
          example: 48.783333
          description: Latitude.
        longitude:
          type: number
          example: 9.183333
          description: Longitude.
      required:
      - latitude
      - longitude
    CreateLocationDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: &id099
          - active
          - suspended
          - inactive
          description: Status of the location.
        name:
          type: string
          example: Hospital ABC
          description: Name of the location.
        position:
          description: The absolute geographic position of the location.
          allOf:
          - $ref: '#/components/schemas/LocationPositionDto'
        managingOrganization:
          type: string
          example: 12345-12345-12345
          description: ID of the organization responsible for provisioning/upkeep of the location.
    LocationDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: *id099
          description: Status of the location.
        name:
          type: string
          example: Hospital ABC
          description: Name of the location.
        position:
          description: The absolute geographic position of the location.
          allOf:
          - $ref: '#/components/schemas/LocationPositionDto'
        managingOrganization:
          type: string
          example: 12345-12345-12345
          description: ID of the organization responsible for provisioning/upkeep of the location.
        resourceType:
          type: Location
          example: Location
          description: Location resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Location resource ID.
      required:
      - resourceType
      - id
    ResponseLocationDto:
      type: object
      properties:
        data:
          description: List of Location resources
          type: array
          items:
            $ref: '#/components/schemas/LocationDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    ScheduleActorDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Patient
          - Practitioner
          - PractitionerRole
          - RelatedPerson
          - Device
          - HealthcareService
          - Location
          description: Type of actor.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of actor.
      required:
      - type
      - id
    LocationScheduleDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        actor:
          description: Resource for which the schedule is provided.
          type: array
          items:
            $ref: '#/components/schemas/ScheduleActorDto'
        serviceType:
          example: &id100
          - 11111-1
          description: Specific service to be performed during the appointment.
          type: array
          items:
            type: string
        comment:
          type: string
          example: available in the morning
          description: Comments on availability.
        id:
          type: string
          description: The id of the schedule
      required:
      - actor
      - id
    LocationDataWithScheduleDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: *id099
          description: Status of the location.
        name:
          type: string
          example: Hospital ABC
          description: Name of the location.
        position:
          description: The absolute geographic position of the location.
          allOf:
          - $ref: '#/components/schemas/LocationPositionDto'
        managingOrganization:
          type: string
          example: 12345-12345-12345
          description: ID of the organization responsible for provisioning/upkeep of the location.
        resourceType:
          type: Location
          example: Location
          description: Location resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Location resource ID.
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/LocationScheduleDto'
      required:
      - resourceType
      - id
      - schedules
    ResponseLocationWithScheduleDto:
      type: object
      properties:
        data:
          description: List of Location resources
          type: array
          items:
            $ref: '#/components/schemas/LocationDataWithScheduleDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    CreateScheduleDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        actor:
          description: Resource for which the schedule is provided.
          type: array
          items:
            $ref: '#/components/schemas/ScheduleActorDto'
        serviceType:
          example: *id100
          description: Specific service to be performed during the appointment.
          type: array
          items:
            type: string
        comment:
          type: string
          example: available in the morning
          description: Comments on availability.
      required:
      - actor
    ScheduleDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        actor:
          description: Resource for which the schedule is provided.
          type: array
          items:
            $ref: '#/components/schemas/ScheduleActorDto'
        serviceType:
          example: *id100
          description: Specific service to be performed during the appointment.
          type: array
          items:
            type: string
        comment:
          type: string
          example: available in the morning
          description: Comments on availability.
        resourceType:
          type: Schedule
          example: Schedule
          description: Schedule resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Schedule resource ID.
      required:
      - actor
      - resourceType
      - id
    ResponseScheduleDto:
      type: object
      properties:
        data:
          description: List of Schedule resources
          type: array
          items:
            $ref: '#/components/schemas/ScheduleDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    HumanNameDto:
      type: object
      properties:
        use:
          type: string
          enum:
          - anonymous
          - maiden
          - nickname
          - official
          - old
          - temp
          - usual
          description: Purpose of the name.
        firstName:
          example:
          - John
          description: First name/s.
          type: array
          items:
            type: string
        lastName:
          type: string
          example: Doe
          description: Last name.
    TelecomDto:
      type: object
      properties:
        system:
          type: string
          description: Telecom system.
          example: phone
          enum:
          - email
          - phone
          - fax
          - sms
          - pager
          - url
          - other
        use:
          type: string
          description: Telecom use.
          example: mobile
          enum:
          - home
          - work
          - temp
          - old
          - mobile
        value:
          type: string
          example: '+1234567890'
          description: Telecom value.
    AddressDto:
      type: object
      properties:
        use:
          type: string
          enum:
          - home
          - work
          - temp
          - old
          - billing
          description: Address use.
        type:
          type: string
          enum:
          - postal
          - physical
          - both
          description: Address type.
        country:
          type: string
          example: United States
          description: Country name.
        state:
          type: string
          example: California
          description: State name.
        city:
          type: string
          example: Los Angeles
          description: City name.
        postalCode:
          type: string
          example: '12345'
          description: Postal code.
        streetAddress:
          type: string
          example: 123 Main St
          description: Street address.
    CreatePatientDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        name:
          description: Name of the patient.
          type: array
          items:
            $ref: '#/components/schemas/HumanNameDto'
        telecom:
          description: Contact details of the patient.
          type: array
          items:
            $ref: '#/components/schemas/TelecomDto'
        gender:
          type: string
          enum: &id101
          - male
          - female
          - other
          - unknown
          description: Gender of the patient.
        birthDate:
          type: string
          format: date-time
          example: 2000-01-30
          description: Birth date of the patient.
        address:
          description: Address of the patient.
          type: array
          items:
            $ref: '#/components/schemas/AddressDto'
        photo:
          description: Attachment data.
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
        communicationLanguage:
          type: array
          description: Language to be used to communicate with the patient.
          items: &id102
            type: string
            enum:
            - en
            - de
            - tr
        managingOrganization:
          type: string
          example: abc123
          description: Organization managing the patient record.
        active:
          type: boolean
          example: false
          description: Active status of the patient.
    PatientDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        name:
          description: Name of the patient.
          type: array
          items:
            $ref: '#/components/schemas/HumanNameDto'
        telecom:
          description: Contact details of the patient.
          type: array
          items:
            $ref: '#/components/schemas/TelecomDto'
        gender:
          type: string
          enum: *id101
          description: Gender of the patient.
        birthDate:
          type: string
          format: date-time
          example: 2000-01-30
          description: Birth date of the patient.
        address:
          description: Address of the patient.
          type: array
          items:
            $ref: '#/components/schemas/AddressDto'
        photo:
          description: Attachment data.
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
        communicationLanguage:
          type: array
          description: Language to be used to communicate with the patient.
          items: *id102
        managingOrganization:
          type: string
          example: abc123
          description: Organization managing the patient record.
        active:
          type: boolean
          example: false
          description: Active status of the patient.
        resourceType:
          type: Patient
          example: Patient
          description: Patient resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Patient resource ID.
      required:
      - resourceType
      - id
    ResponsePatientDto:
      type: object
      properties:
        data:
          description: List of Patient resources
          type: array
          items:
            $ref: '#/components/schemas/PatientDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    PatchPatientDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        name:
          description: Name of the patient.
          type: array
          items:
            $ref: '#/components/schemas/HumanNameDto'
        telecom:
          description: Contact details of the patient.
          type: array
          items:
            $ref: '#/components/schemas/TelecomDto'
        gender:
          type: string
          enum: *id101
          description: Gender of the patient.
        birthDate:
          type: string
          format: date-time
          example: 2000-01-30
          description: Birth date of the patient.
        address:
          description: Address of the patient.
          type: array
          items:
            $ref: '#/components/schemas/AddressDto'
        photo:
          description: Attachment data.
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
        communicationLanguage:
          type: array
          description: Language to be used to communicate with the patient.
          items: *id102
        managingOrganization:
          type: string
          example: abc123
          description: Organization managing the patient record.
        active:
          type: boolean
          example: false
          description: Active status of the patient.
    CreateDocumentReferenceDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        meta:
          description: The meta information of the document reference.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceMetaDto'
        status:
          type: string
          enum: *id103
          description: The status of the document reference.
        content:
          description: Attachment data.
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
        type:
          type: string
          example: 11111-1
          description: Type of the document reference.
        category:
          example: *id104
          description: A category assigned to the document reference.
          type: array
          items:
            type: string
        subject:
          description: Subject of the document.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceSubjectDto'
        date:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Creation date of the document.
        author:
          description: Author of the document.
          type: array
          items:
            $ref: '#/components/schemas/DocumentReferenceAuthorDto'
        custodian:
          type: string
          example: 12345-12345-12345
          description: Organisation that maintains the document.
        context:
          description: Context of the document.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceContextDto'
      required:
      - status
      - content
    PatchDocumentReferenceDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum:
          - current
          - superseded
          - entered-in-error
          description: The status of the document reference.
        type:
          type: string
          example: 11111-1
          description: Type of the document reference.
        category:
          example:
          - imagingreport
          description: A category assigned to the document reference.
          type: array
          items:
            type: string
        subject:
          description: Subject of the document.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceSubjectDto'
        date:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Creation date of the document.
        author:
          description: Author of the document.
          type: array
          items:
            $ref: '#/components/schemas/DocumentReferenceAuthorDto'
        custodian:
          type: string
          example: 12345-12345-12345
          description: Organisation that maintains the document.
        context:
          description: Context of the document.
          allOf:
          - $ref: '#/components/schemas/DocumentReferenceContextDto'
    ObservationSubjectDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Patient
          - Group
          - Device
          - Location
          description: Type of subject.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of subject.
      required:
      - id
    ObservationPerformerDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Practitioner
          - PractitionerRole
          - Organization
          - CareTeam
          - Patient
          - RelatedPerson
          description: Type of performer.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of performer.
      required:
      - type
      - id
    ObservationMeasurementDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Attachment
          - Boolean
          - CodeableConcept
          - DateTime
          - Integer
          - Period
          - Quantity
          - Range
          - Ratio
          - Reference
          - SampledData
          - String
          - Time
          description: Measurement type.
        value:
          type: string
          example: '100'
          description: Measurement value.
      required:
      - value
    ObservationDeviceDto:
      type: object
      properties:
        type:
          type: string
          enum:
          - Device
          - DeviceMetric
          description: Device type.
        id:
          type: string
          example: 12345-12345-12345
          description: ID of device.
      required:
      - id
    ObservationComponentDto:
      type: object
      properties:
        code:
          type: string
          example: 11111-1
          description: Observation component code.
        measurement:
          description: Observation measurement object.
          allOf:
          - $ref: '#/components/schemas/ObservationMeasurementDto'
      required:
      - code
    CreateObservationDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: &id105
          - registered
          - preliminary
          - final
          - amended
          - corrected
          - cancelled
          - entered-in-error
          - unknown
          description: Status of the observation.
        code:
          type: string
          example: 2340-8
          description: Observation code.
        codeName:
          type: string
          example: Body Height
          description: Observation code system name.
        category:
          type: array
          description: Observation category.
          items: &id106
            type: string
            enum:
            - activity
            - exam
            - imaging
            - laboratory
            - procedure
            - social-history
            - survey
            - therapy
            - vital-signs
        subject:
          description: Who the observation is about.
          allOf:
          - $ref: '#/components/schemas/ObservationSubjectDto'
        effectiveDateTime:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: The date the observed value is asserted as being true
        performer:
          description: Who performs the observation.
          type: array
          items:
            $ref: '#/components/schemas/ObservationPerformerDto'
        measurement:
          description: Observation measurement object.
          allOf:
          - $ref: '#/components/schemas/ObservationMeasurementDto'
        interpretation:
          type: array
          description: Observation interpretation.
          items: &id107
            type: string
            enum:
            - low
            - normal
            - high
        note:
          example: &id108
          - Patient is doing well.
          description: Observation note.
          type: array
          items:
            type: string
        method:
          type: string
          example: Measured by device
          description: Observation method.
        device:
          description: Device used to generate observation data.
          allOf:
          - $ref: '#/components/schemas/ObservationDeviceDto'
        component:
          description: Observation measurement object.
          type: array
          items:
            $ref: '#/components/schemas/ObservationComponentDto'
      required:
      - status
      - code
    ObservationDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: *id105
          description: Status of the observation.
        code:
          type: string
          example: 2340-8
          description: Observation code.
        codeName:
          type: string
          example: Body Height
          description: Observation code system name.
        category:
          type: array
          description: Observation category.
          items: *id106
        subject:
          description: Who the observation is about.
          allOf:
          - $ref: '#/components/schemas/ObservationSubjectDto'
        effectiveDateTime:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: The date the observed value is asserted as being true
        performer:
          description: Who performs the observation.
          type: array
          items:
            $ref: '#/components/schemas/ObservationPerformerDto'
        measurement:
          description: Observation measurement object.
          allOf:
          - $ref: '#/components/schemas/ObservationMeasurementDto'
        interpretation:
          type: array
          description: Observation interpretation.
          items: *id107
        note:
          example: *id108
          description: Observation note.
          type: array
          items:
            type: string
        method:
          type: string
          example: Measured by device
          description: Observation method.
        device:
          description: Device used to generate observation data.
          allOf:
          - $ref: '#/components/schemas/ObservationDeviceDto'
        component:
          description: Observation measurement object.
          type: array
          items:
            $ref: '#/components/schemas/ObservationComponentDto'
        resourceType:
          type: Observation
          example: Observation
          description: Observation resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Observation resource ID.
      required:
      - status
      - code
      - resourceType
      - id
    ResponseObservationDto:
      type: object
      properties:
        data:
          description: List of Observation resources
          type: array
          items:
            $ref: '#/components/schemas/ObservationDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    QuestionnaireAnswerOptionDto:
      type: object
      properties:
        valueInteger:
          type: number
          example: 123
          description: Answer value as a number.
        valueDate:
          type: string
          format: date-time
          example: 2000-01-30 23:59:59+00:00
          description: Answer value as a date.
        valueString:
          type: string
          example: abc
          description: Answer value as a string.
        valueCoding:
          type: string
          example: 11111-1
          description: Answer value as a code.
    QuestionnaireItemDto:
      type: object
      properties:
        linkId:
          type: string
          example: abc123
          description: Question identifier, unique within the Questionnaire.
        type:
          type: string
          enum:
          - choice
          - group
          - open-choice
          description: "Type of question.\n    Attention:\n    - \"Group\" item type must have nested items."
        code:
          example:
          - 11111-1
          description: 'Code which corresponds to this question and uses the LOINC terminology: http://loinc.org'
          type: array
          items:
            type: string
        text:
          type: string
          example: abc123
          description: Question text.
        repeats:
          type: boolean
          example: true
          description: Indicates whether the question may occur multiple times.
        answerOption:
          description: "Permitted answers.\n    Attention:\n    - Only \"Choice\"/\"Open-Choice\" item type can use the \"\
            answerOption\" parameter."
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireAnswerOptionDto'
        item:
          description: Questions and sections within the questionnaire.
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireItemDto'
      required:
      - linkId
      - type
    CreateQuestionnaireDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: &id109
          - active
          - draft
          - retired
          - unknown
          description: Status of the Questionnaire.
        name:
          type: string
          example: questionnaire ABC
          description: Natural language name to identify the Questionnaire.
        description:
          type: string
          example: abc123
          description: Description of the Questionnaire from the consumer's perspective.
        code:
          example: &id110
          - 11111-1
          description: 'Identifier for questions/s using the LOINC terminology: http://loinc.org'
          type: array
          items:
            type: string
        item:
          description: Questions and sections within the questionnaire.
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireItemDto'
      required:
      - status
    QuestionnaireDto:
      type: object
      properties:
        identifier:
          description: Additional identifier/s for the resource.
          type: array
          items:
            $ref: '#/components/schemas/IdentifierDto'
        status:
          type: string
          enum: *id109
          description: Status of the Questionnaire.
        name:
          type: string
          example: questionnaire ABC
          description: Natural language name to identify the Questionnaire.
        description:
          type: string
          example: abc123
          description: Description of the Questionnaire from the consumer's perspective.
        code:
          example: *id110
          description: 'Identifier for questions/s using the LOINC terminology: http://loinc.org'
          type: array
          items:
            type: string
        item:
          description: Questions and sections within the questionnaire.
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireItemDto'
        resourceType:
          type: Questionnaire
          example: Questionnaire
          description: Questionnaire resource type.
        id:
          type: string
          example: 12345-12345-12345
          description: Questionnaire resource ID.
      required:
      - status
      - resourceType
      - id
    ResponseQuestionnaireDto:
      type: object
      properties:
        data:
          description: List of Questionnaire resources
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireDto'
            format: array
        total:
          type: number
          example: 50
          format: number
          description: The total amount of resources.
      required:
      - data
      - total
    OvokHealthcheckResponseDto:
      type: object
      properties:
        ok:
          type: boolean
          example: true
          description: Ovok state.
        version:
          type: object
          example: 0.0.1
        buildEnv:
          type: object
          example: development
        commitHash:
          type: object
          example: abc123
        buildDate:
          type: object
          example: 2026-04-12 17:00:00+00:00
          nullable: true
        runningSince:
          type: object
          example: 2026-04-12 17:21:21.410000+00:00
          nullable: true
      required:
      - ok
    RedisHealthResponseDto:
      type: object
      properties:
        ok:
          type: boolean
      required:
      - ok
      description: Redis ping result. `false` when the Redis instance is unreachable.
    FhirServerHealthResponseDto:
      type: object
      properties:
        ok:
          type: boolean
        version:
          type: string
          description: FHIR server build version.
        platform:
          type: string
          description: Host platform (linux, darwin, …).
        runtime:
          type: string
          description: Node.js runtime version.
        postgres:
          type: boolean
        redis:
          type: boolean
      required:
      - ok
      - version
      - platform
      - runtime
      - postgres
      - redis
      description: FHIR server health summary, including its own Postgres/Redis status checks.
    EmailHealthResponseDto:
      type: object
      properties:
        ok:
          type: boolean
        skipped:
          type: boolean
          description: '`true` when the email provider is not configured for this deployment — `ok` reflects that no provider
            is wired, not an outage.'
      required:
      - ok
      description: Email service health.
    WorkerStatsResponseDto:
      type: object
      properties:
        workerCount:
          type: integer
        workers:
          type: array
          items:
            type: object
            properties:
              pid:
                type: integer
              workerId:
                type: integer
              cpuPercent:
                type: number
              heapUsedMb:
                type: number
              rssMb:
                type: number
            required:
            - pid
            - workerId
            - cpuPercent
            - heapUsedMb
            - rssMb
        totals:
          type: object
          properties:
            cpuPercent:
              type: number
            heapUsedMb:
              type: number
            rssMb:
              type: number
          required:
          - cpuPercent
          - heapUsedMb
          - rssMb
      required:
      - workerCount
      - workers
      - totals
      description: Per-worker CPU/memory snapshot aggregated from Redis. Each worker self-reports every 10s. Disabled in production
        (returns 404).
    QueueStatsResponseDto:
      type: object
      additionalProperties:
        type: object
        properties:
          waiting:
            type: integer
          active:
            type: integer
          delayed:
            type: integer
          failed:
            type: integer
        required:
        - waiting
        - active
        - delayed
        - failed
      description: BullMQ queue depths keyed by queue name. Polled by k6 to track backend queue depth during load tests. Disabled
        in production (returns 404).
    TelemetryStateResponseDto:
      type: object
      properties:
        lastUpdatedMs:
          type: integer
          description: Epoch ms of the last telemetry update.
        effectiveHeartRate:
          type: number
          nullable: true
        effectiveRespiratoryRate:
          type: number
          nullable: true
        effectiveSleepStatus:
          type: string
      required:
      - lastUpdatedMs
      - effectiveHeartRate
      - effectiveRespiratoryRate
      - effectiveSleepStatus
      description: Effective device telemetry state for end-to-end lag measurement during load tests. Disabled in production
        (returns 404); 404 also when no state is cached for the device.
    PayloadHealthResponseDto:
      type: object
      properties:
        ok:
          type: boolean
          description: True when the Payload sidecar accepted the probe with a 2xx response.
        baseUrl:
          type: string
          description: The `PAYLOAD_INTERNAL_URL` we attempted to reach. Useful for spotting wrong port or wrong hostname.
        statusCode:
          type: integer
          nullable: true
          description: Upstream HTTP status from the probe, or null when the connection itself failed before any response.
        upstreamBody:
          type: string
          nullable: true
          description: First 500 bytes of the upstream response body, when present. Useful for spotting 401 (api-key mismatch)
            vs 502 (gateway).
        error:
          type: string
          nullable: true
          description: Underlying connection error (ECONNREFUSED, ENOTFOUND, EAI_AGAIN, timeout, …). Null when the connection
            itself succeeded.
      required:
      - ok
      - baseUrl
      - statusCode
      - upstreamBody
      - error
      description: Diagnostic probe of the Payload CMS sidecar over the internal Railway network. Hits `${PAYLOAD_INTERNAL_URL}/api/access`
        with the internal API key — the cheapest authenticated round-trip Payload exposes. No tenant header sent; we just
        want to confirm the connection is reachable + the internal key is accepted. Open to NoBearerAuth so it can be hit
        from a curl on the operator machine without setting up a Medplum session.
