{
  "openapi": "3.1.1",
  "info": {
    "title": "Ilera Neurohealth API",
    "description": "The backend for a UK private neurodevelopmental (autism / ADHD) assessment service: a public\nwebsite plus three secure portals — patient/parent, clinician, and administration/clinical\ngovernance.\n\nThis document describes shape only. No clinical data passes through it.\n\n## Versioning\n\nEvery route carries its version in the path — `/api/v1/…`. An unversioned request is a\ncaller error rather than something the service guesses at, and responses report the\nversions they support. Enumerations travel as names (`\"Adhd\"`), never as numbers, so\nreordering a member cannot silently change a pathway.\n\n## Authentication\n\nBearer tokens. An access token lives fifteen minutes and the account is revalidated on\nevery request, so deactivating someone, changing their roles or resetting their password\ntakes effect on their next call rather than when the token expires. Refresh tokens rotate,\nand replaying a retired one revokes the whole session.\n\nClinicians, reviewers, coordinators, administrators, finance and governance roles must\ncomplete a TOTP second factor and cannot fall back to a password. Patients and carers are\nnot compelled.\n\n## Reaching a record\n\nAccess is decided by relationship, not by role. A clinician reaches a case through a live\ncase assignment; a parent reaches a child through an active access grant carrying a lawful\nbasis and a scope. A role gate on an endpoint only rejects an obviously wrong caller\ncheaply — it never decides whether a particular record may be reached. Postgres row-level\nsecurity backstops the decision.\n\n## The public endpoints\n\nThe intake forms are unauthenticated: a parent should not need an account to ask for help.\nWhat stands in for a credential is a per-address rate limit and a honeypot, and the fact\nthat nothing on the public side reads anything back. Attaching evidence needs the\nsubmission token issued once at submit time, not the referral's identifier, so knowing an\nid is not enough to add files to someone else's referral.\n\n## Audit\n\nEvery access to a clinical record is recorded, reads included. Entries are chained with\nSHA-256 and the chain is built by a database trigger, so altering or removing one breaks\nits successor. Each entry carries an outcome: `Succeeded`, `Denied` or `Failed` — a refused\nrequest is still recorded.\n\n## Errors and correlation\n\nFailures come back as `application/problem+json`. Every request carries an\n`X-Correlation-Id` header — send your own to have it echoed back, or read the one the\nservice generates — and quoting it lets a request be traced end to end without any\nidentifying detail appearing in a log line.\n\n## Standing rules\n\nThese apply to every endpoint here:\n\n- Reads of clinical data are audited, not only writes.\n- Released clinical records are append-only; a correction creates a new version or an\n  addendum rather than editing what was released.\n- No clinical detail reaches email, SMS, analytics or a log line. Notifications are sent\n  from approved templates carrying a reference and a link, never a message body.\n- No automated diagnosis, clinical outcome or risk decision. The system records decisions\n  made by people.\n- No real patient data in development or test.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://asd-service-dev.seunadanike.com/"
    }
  ],
  "paths": {
    "/api/v1/admin/clinicians": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ApprovedPathway"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianDirectory"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianDirectory"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianDirectory"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/clinicians/{profileId}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminClinicianDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminClinicianDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminClinicianDetail"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/clinicians/{profileId}/credentials/{kind}/evidence/download": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CredentialKind"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/mdt-qa": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PipelineStage"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMdtQaPipeline"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMdtQaPipeline"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMdtQaPipeline"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/reports/{reportId}/qa": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/safeguarding": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SafeguardingStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSafeguardingItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSafeguardingItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSafeguardingItem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/appointments": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "view",
            "in": "query",
            "schema": {
              "default": "All",
              "$ref": "#/components/schemas/AppointmentView"
            }
          },
          {
            "name": "clinicianUserId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAdminAppointment"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAdminAppointment"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAdminAppointment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/allocation": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAllocationQueue"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAllocationQueue"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAllocationQueue"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/dashboard": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfOperationsDashboard"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfOperationsDashboard"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfOperationsDashboard"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/work-queue": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/QueueStage"
            }
          },
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfWorkQueueItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfWorkQueueItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfWorkQueueItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/work-queue/export": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/QueueStage"
            }
          },
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/search": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSearchHit"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSearchHit"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSearchHit"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTeamView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTeamView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTeamView"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/teams/{teamId}": {
      "put": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/service-targets": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfServiceTargetView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfServiceTargetView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfServiceTargetView"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceTargetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceTargetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceTargetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/cases/{caseId}/team": {
      "put": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/clinicians/{profileId}/team": {
      "put": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/clinicians/{profileId}/report-authorisations": {
      "put": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportAuthorisationsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportAuthorisationsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportAuthorisationsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enquiries": {
      "get": {
        "tags": [
          "AdminEnquiries"
        ],
        "parameters": [
          {
            "name": "includeAnswered",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEnquirySummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEnquirySummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEnquirySummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enquiries/{id}": {
      "get": {
        "tags": [
          "AdminEnquiries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/enquiries/{id}/answered": {
      "post": {
        "tags": [
          "AdminEnquiries"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/finance/summary": {
      "get": {
        "tags": [
          "AdminFinance"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfFinanceSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfFinanceSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfFinanceSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/finance/invoices": {
      "get": {
        "tags": [
          "AdminFinance"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/InvoiceStatus"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfFinanceInvoiceItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfFinanceInvoiceItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfFinanceInvoiceItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/finance/timesheets": {
      "get": {
        "tags": [
          "AdminFinance"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfFinanceTimesheetItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfFinanceTimesheetItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfFinanceTimesheetItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/link-requests": {
      "get": {
        "tags": [
          "AdminLinkRequests"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfChildLinkRequestView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfChildLinkRequestView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfChildLinkRequestView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/link-requests/{id}/link": {
      "post": {
        "tags": [
          "AdminLinkRequests"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkChildRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkChildRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LinkChildRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/link-requests/{id}/decline": {
      "post": {
        "tags": [
          "AdminLinkRequests"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/patients": {
      "get": {
        "tags": [
          "AdminPatients"
        ],
        "parameters": [
          {
            "name": "includeClosed",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfAdminPatientItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfAdminPatientItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfAdminPatientItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/patients/export": {
      "get": {
        "tags": [
          "AdminPatients"
        ],
        "parameters": [
          {
            "name": "includeClosed",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/patients/{patientId}": {
      "get": {
        "tags": [
          "AdminPatients"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminPatientDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminPatientDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminPatientDetail"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/cases/{caseId}/timeline": {
      "get": {
        "tags": [
          "AdminPatients"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimelineEntry"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimelineEntry"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimelineEntry"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals/adult": {
      "post": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffAdultReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffAdultReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StaffAdultReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals/child": {
      "post": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffChildReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffChildReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StaffChildReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals/professional": {
      "post": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffProfessionalReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffProfessionalReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StaffProfessionalReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals": {
      "get": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ReferralProgress"
            }
          },
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfAdminReferralItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfAdminReferralItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPageOfAdminReferralItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals/export": {
      "get": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ReferralProgress"
            }
          },
          {
            "name": "pathway",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PathwayType"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals/{id}": {
      "get": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminReferralDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminReferralDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAdminReferralDetail"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/referrals/{id}/files/{fileId}/download": {
      "post": {
        "tags": [
          "AdminReferrals"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/services": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfServiceView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfServiceView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfServiceView"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/services/{serviceId}": {
      "put": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "serviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/services/{serviceId}/prices": {
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "serviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/components": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfComponentView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfComponentView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfComponentView"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomComponentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomComponentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomComponentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/components/{component}": {
      "put": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "component",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PathwayComponent"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ComponentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ComponentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ComponentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/components/additional/{customComponentId}": {
      "put": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "customComponentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomComponentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomComponentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomComponentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/appointment-types": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAppointmentTypeView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAppointmentTypeView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAppointmentTypeView"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAppointmentTypeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAppointmentTypeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAppointmentTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/appointment-types/{kind}": {
      "put": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/AppointmentKind"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentTypeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentTypeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/appointment-types/added/{id}": {
      "put": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAppointmentTypeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAppointmentTypeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CustomAppointmentTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/templates": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTemplateView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTemplateView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTemplateView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/templates/{templateId}": {
      "put": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTemplateVersionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTemplateVersionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTemplateVersionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/templates/{templateId}/versions/{number}/approve": {
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/templates/{templateId}/versions/{number}/reject": {
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectTemplateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectTemplateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/team": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfStaffMember"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfStaffMember"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfStaffMember"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/roles": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRoleView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRoleView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRoleView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/access-reviews": {
      "get": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAccessReviewView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAccessReviewView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAccessReviewView"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/settings/access-reviews/{reviewId}/decisions": {
      "post": {
        "tags": [
          "AdminSettings"
        ],
        "parameters": [
          {
            "name": "reviewId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/allocation/candidates": {
      "get": {
        "tags": [
          "Allocation"
        ],
        "parameters": [
          {
            "name": "component",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PathwayComponent"
              }
            }
          },
          {
            "name": "on",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "customComponentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAllocationCandidate"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAllocationCandidate"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAllocationCandidate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/allocation/cases/{caseId}/unallocated": {
      "get": {
        "tags": [
          "Allocation"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfUnallocatedComponent"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfUnallocatedComponent"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfUnallocatedComponent"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/allocation/cases/{caseId}": {
      "post": {
        "tags": [
          "Allocation"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AllocateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/allocation/cases/{caseId}/assignments/{assignmentId}": {
      "delete": {
        "tags": [
          "Allocation"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointment-changes/appointments/{appointmentId}": {
      "post": {
        "tags": [
          "AppointmentChanges"
        ],
        "parameters": [
          {
            "name": "appointmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestAppointmentChange"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestAppointmentChange"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestAppointmentChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointment-changes/{requestId}/withdraw": {
      "post": {
        "tags": [
          "AppointmentChanges"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointment-changes/open": {
      "get": {
        "tags": [
          "AppointmentChanges"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfChangeRequestSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfChangeRequestSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfChangeRequestSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointment-changes/{requestId}/accept": {
      "post": {
        "tags": [
          "AppointmentChanges"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptChangeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptChangeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointment-changes/{requestId}/decline": {
      "post": {
        "tags": [
          "AppointmentChanges"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineChangeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineChangeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeclineChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleAppointmentApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleAppointmentApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleAppointmentApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAppointmentView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAppointmentView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAppointmentView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/case/{caseId}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAppointmentView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAppointmentView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAppointmentView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/{id}/reschedule": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleAppointmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleAppointmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleAppointmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/{id}/cancel": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelAppointmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelAppointmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelAppointmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/{id}/outcome": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentOutcomeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentOutcomeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AppointmentOutcomeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/{id}/video-meeting": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/{id}/join": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfJoinLinkResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfJoinLinkResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfJoinLinkResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assessments/forms/{component}": {
      "get": {
        "tags": [
          "Assessments"
        ],
        "parameters": [
          {
            "name": "component",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PathwayComponent"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentForm"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentForm"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentForm"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assessments/records": {
      "post": {
        "tags": [
          "Assessments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartAssessmentRecordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartAssessmentRecordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartAssessmentRecordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assessments/records/{id}": {
      "get": {
        "tags": [
          "Assessments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentRecordDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentRecordDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentRecordDetail"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Assessments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAssessmentRecordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAssessmentRecordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAssessmentRecordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfRecordProgress"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfRecordProgress"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfRecordProgress"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assessments/records/{id}/complete": {
      "post": {
        "tags": [
          "Assessments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteAssessmentRecordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteAssessmentRecordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteAssessmentRecordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assessments/records/{id}/reopen": {
      "post": {
        "tags": [
          "Assessments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReopenRecordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReopenRecordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReopenRecordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/assessments/case/{caseId}/records": {
      "get": {
        "tags": [
          "Assessments"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAssessmentRecordView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAssessmentRecordView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAssessmentRecordView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit": {
      "get": {
        "tags": [
          "Audit"
        ],
        "parameters": [
          {
            "name": "ActorId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "EntityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Action",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AuditAction"
            }
          },
          {
            "name": "Outcome",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AuditOutcome"
            }
          },
          {
            "name": "CaseId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "From",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Dir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuditLogPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuditLogPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuditLogPage"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/export": {
      "get": {
        "tags": [
          "Audit"
        ],
        "parameters": [
          {
            "name": "ActorId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "EntityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Action",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AuditAction"
            }
          },
          {
            "name": "Outcome",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/AuditOutcome"
            }
          },
          {
            "name": "CaseId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "From",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Dir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/modules": {
      "get": {
        "tags": [
          "Audit"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfstring"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfstring"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfstring"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/integrity": {
      "get": {
        "tags": [
          "Audit"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuditIntegrityResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuditIntegrityResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuditIntegrityResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/entities/{entityType}/{entityId}": {
      "get": {
        "tags": [
          "Audit"
        ],
        "parameters": [
          {
            "name": "entityType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAuditTrailEntryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAuditTrailEntryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAuditTrailEntryResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/sign-in": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SignInRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/multi-factor": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MultiFactorRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MultiFactorRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MultiFactorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/multi-factor/resend": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendCodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendCodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResendCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/sign-out": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/multi-factor/enrolment": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrolmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrolmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnrolmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMultiFactorEnrolmentResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMultiFactorEnrolmentResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMultiFactorEnrolmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/multi-factor/enrolment/confirm": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEnrolmentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEnrolmentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEnrolmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTokenResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/invitations/lookup": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvitationResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvitationResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvitationResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/invitations/accept": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSignInResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/invitations/renew": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/password-policy": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPasswordPolicyResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPasswordPolicyResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPasswordPolicyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/password-reset": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/password-reset/confirm": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetConfirmation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetConfirmation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordResetConfirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/whoami": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfWhoAmIResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfWhoAmIResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfWhoAmIResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cases/{id}": {
      "get": {
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseSummaryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseSummaryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseSummaryResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cases/{id}/stages": {
      "get": {
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfStageDuration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfStageDuration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfStageDuration"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cases/{id}/stage": {
      "post": {
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveStageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveStageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MoveStageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cases/{id}/close": {
      "post": {
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseCaseRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseCaseRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CloseCaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/changes": {
      "get": {
        "tags": [
          "Changes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfChangeVersion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfChangeVersion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfChangeVersion"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/dashboard": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianDashboard"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianDashboard"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianDashboard"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/tasks": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ClinicianTaskKind"
            }
          },
          {
            "name": "timing",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TaskTiming"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfClinicianTask"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfClinicianTask"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfClinicianTask"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/search": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseloadItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseloadItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseloadItem"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/accepting-new-work": {
      "put": {
        "tags": [
          "ClinicianPortal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptingNewWorkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptingNewWorkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptingNewWorkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/caseload": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseloadPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseloadPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseloadPage"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/alerts": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfClinicianAlert"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfClinicianAlert"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfClinicianAlert"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseOverview"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseOverview"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseOverview"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/referral": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseReferral"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseReferral"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCaseReferral"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/referral/files/{fileId}/download": {
      "post": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/assessments": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseComponent"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseComponent"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseComponent"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/notes": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseNote"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseNote"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseNote"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddNoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/risks": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseConcern"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseConcern"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfCaseConcern"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/audit": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAuditLogEntry"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAuditLogEntry"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAuditLogEntry"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/cases/{caseId}/timeline": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimelineEntry"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimelineEntry"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimelineEntry"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/calendar": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCalendarView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCalendarView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCalendarView"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician/availability": {
      "get": {
        "tags": [
          "ClinicianPortal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWeeklySlot"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWeeklySlot"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWeeklySlot"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ClinicianPortal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAvailabilityRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAvailabilityRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetAvailabilityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/me": {
      "get": {
        "tags": [
          "ClinicianProfiles"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianProfileView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianProfileView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfClinicianProfileView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ClinicianProfiles"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMyProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMyProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMyProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/{profileId}/approvals": {
      "put": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetApprovalsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetApprovalsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetApprovalsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/{profileId}/credentials": {
      "put": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCredentialRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCredentialRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/{profileId}/credentials/{kind}/evidence": {
      "post": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CredentialKind"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/credentials/expiring": {
      "get": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "withinDays",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfExpiringCredential"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfExpiringCredential"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfExpiringCredential"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/{profileId}/pathways": {
      "put": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetApprovedPathwaysRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetApprovedPathwaysRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetApprovedPathwaysRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/me/credentials/{kind}/evidence": {
      "post": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CredentialKind"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/me/credentials/{kind}/evidence/download": {
      "post": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CredentialKind"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/me/leave": {
      "post": {
        "tags": [
          "ClinicianProfiles"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordLeaveRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordLeaveRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordLeaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/clinician-profiles/me/leave/{leaveId}": {
      "delete": {
        "tags": [
          "ClinicianProfiles"
        ],
        "parameters": [
          {
            "name": "leaveId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consent-requests": {
      "post": {
        "tags": [
          "ConsentRequests"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskConsentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AskConsentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AskConsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consent-requests/templates": {
      "get": {
        "tags": [
          "ConsentRequests"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentTemplate"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentTemplate"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentTemplate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consent-requests/patient/{patientId}": {
      "get": {
        "tags": [
          "ConsentRequests"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentRequestView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentRequestView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentRequestView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consent-requests/{id}": {
      "get": {
        "tags": [
          "ConsentRequests"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfConsentRequestView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfConsentRequestView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfConsentRequestView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consent-requests/{id}/sign": {
      "post": {
        "tags": [
          "ConsentRequests"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignConsentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SignConsentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SignConsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consent-requests/{id}/decline": {
      "post": {
        "tags": [
          "ConsentRequests"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consents": {
      "post": {
        "tags": [
          "Consents"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordConsentApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordConsentApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordConsentApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consents/patient/{patientId}": {
      "get": {
        "tags": [
          "Consents"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfConsentView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consents/patient/{patientId}/in-force/{purpose}": {
      "get": {
        "tags": [
          "Consents"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "purpose",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ConsentPurpose"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfConsentStatusResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfConsentStatusResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfConsentStatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/consents/{id}/withdraw": {
      "post": {
        "tags": [
          "Consents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawConsentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawConsentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawConsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/pages/{slug}": {
      "get": {
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPublishedPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPublishedPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPublishedPage"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/faqs": {
      "get": {
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedFaq"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedFaq"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedFaq"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/articles": {
      "get": {
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedArticle"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedArticle"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedArticle"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/articles/{slug}": {
      "get": {
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPublishedArticle"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPublishedArticle"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPublishedArticle"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/team": {
      "get": {
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TeamGroup"
            }
          },
          {
            "name": "featured",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedTeamMember"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedTeamMember"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedTeamMember"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/services": {
      "get": {
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedService"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedService"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedService"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/prices": {
      "get": {
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedPrice"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedPrice"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedPrice"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/site": {
      "get": {
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSiteDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSiteDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSiteDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/media/{id}": {
      "get": {
        "tags": [
          "Content"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content/navigation": {
      "get": {
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedNavigationItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedNavigationItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPublishedNavigationItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/pages": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorPage"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageDraft"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PageDraft"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PageDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/faqs": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorFaq"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorFaq"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorFaq"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaqDraft"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FaqDraft"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FaqDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/articles": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorArticle"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorArticle"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorArticle"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArticleDraft"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ArticleDraft"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ArticleDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/team": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorTeamMember"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorTeamMember"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorTeamMember"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMemberDraft"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMemberDraft"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMemberDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/services": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorService"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorService"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorService"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceDraft"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceDraft"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/prices": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorPrice"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorPrice"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfEditorPrice"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceDraft"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceDraft"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PriceDraft"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/site": {
      "put": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteDetails"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteDetails"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SiteDetails"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/media": {
      "get": {
        "tags": [
          "ContentEditor"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMediaSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMediaSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMediaSummary"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ContentEditor"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "file": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "altText": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMediaSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMediaSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMediaSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/media/{id}": {
      "delete": {
        "tags": [
          "ContentEditor"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/{type}/{id}/publish": {
      "post": {
        "tags": [
          "ContentEditor"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ContentType"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/{type}/{id}/unpublish": {
      "post": {
        "tags": [
          "ContentEditor"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ContentType"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/content-editor/{type}/{id}": {
      "delete": {
        "tags": [
          "ContentEditor"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ContentType"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/subject-requests": {
      "get": {
        "tags": [
          "DataProtection"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSubjectRequestSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSubjectRequestSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfSubjectRequestSummary"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataProtection"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveSubjectRequestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveSubjectRequestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveSubjectRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/subject-requests/{id}/verify-identity": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySubjectIdentityRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySubjectIdentityRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySubjectIdentityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/subject-requests/{id}/extend": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendSubjectRequestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendSubjectRequestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendSubjectRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/subject-requests/{id}/actions": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordSubjectActionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordSubjectActionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordSubjectActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/subject-requests/{id}/fulfil": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfilSubjectRequestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfilSubjectRequestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FulfilSubjectRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/subject-requests/{id}/refuse": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefuseSubjectRequestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefuseSubjectRequestRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefuseSubjectRequestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/patients/{patientId}/subject-access-package": {
      "get": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSubjectAccessPackage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSubjectAccessPackage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfSubjectAccessPackage"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/retention/due": {
      "get": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "asAt",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRetentionCandidate"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRetentionCandidate"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRetentionCandidate"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/patients/{patientId}/anonymise": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnonymisePatientRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AnonymisePatientRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AnonymisePatientRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/data-protection/retention/purge-drafts": {
      "post": {
        "tags": [
          "DataProtection"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfint"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfint"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfint"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents": {
      "post": {
        "tags": [
          "Documents"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "CaseId": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "Kind": {
                        "$ref": "#/components/schemas/DocumentKind"
                      },
                      "Title": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "file": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/case/{caseId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfDocumentView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfDocumentView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfDocumentView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/patient/{patientId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfDocumentView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfDocumentView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfDocumentView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{id}/release": {
      "post": {
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{id}/withdraw": {
      "post": {
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawDocumentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawDocumentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{id}/download": {
      "post": {
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDocumentDownloadResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/content": {
      "get": {
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          {
            "name": "fileName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/enquiries": {
      "post": {
        "tags": [
          "Enquiries"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralEnquiryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralEnquiryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GeneralEnquiryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/enquiries/suitability": {
      "post": {
        "tags": [
          "Enquiries"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuitabilityCheckRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SuitabilityCheckRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SuitabilityCheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/enquiries/call-back": {
      "post": {
        "tags": [
          "Enquiries"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallBackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CallBackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CallBackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/enquiries/training": {
      "post": {
        "tags": [
          "Enquiries"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrainingEnquiryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TrainingEnquiryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TrainingEnquiryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfEnquiryReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/finance/invoicing": {
      "get": {
        "tags": [
          "FinanceReports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvoicingReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvoicingReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvoicingReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/finance/outstanding": {
      "get": {
        "tags": [
          "FinanceReports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfOutstandingReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfOutstandingReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfOutstandingReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/finance/authorised-work": {
      "get": {
        "tags": [
          "FinanceReports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuthorisedWorkReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuthorisedWorkReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAuthorisedWorkReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/governance": {
      "get": {
        "tags": [
          "GovernanceRegister"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/GovernanceKind"
            }
          },
          {
            "name": "includeClosed",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfGovernanceSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfGovernanceSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfGovernanceSummary"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GovernanceRegister"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseGovernanceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseGovernanceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseGovernanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/governance/{id}": {
      "get": {
        "tags": [
          "GovernanceRegister"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfGovernanceEntryView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfGovernanceEntryView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfGovernanceEntryView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/governance/{id}/actions": {
      "post": {
        "tags": [
          "GovernanceRegister"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordGovernanceActionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordGovernanceActionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordGovernanceActionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/governance/{id}/reassess": {
      "post": {
        "tags": [
          "GovernanceRegister"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReassessGovernanceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReassessGovernanceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReassessGovernanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/governance/{id}/close": {
      "post": {
        "tags": [
          "GovernanceRegister"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseGovernanceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseGovernanceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CloseGovernanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvoiceView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvoiceView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfInvoiceView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/patients/{patientId}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfInvoiceSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfInvoiceSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfInvoiceSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftInvoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DraftInvoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DraftInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/service-lines": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddServiceLineRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddServiceLineRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddServiceLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/lines": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddInvoiceLineRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddInvoiceLineRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddInvoiceLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/lines/{lineId}": {
      "delete": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/issue": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInvoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInvoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/checkout": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeginCheckoutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BeginCheckoutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BeginCheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCheckoutResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCheckoutResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCheckoutResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/payment-plans": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentPlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentPlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/receipt": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPaymentReceipt"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPaymentReceipt"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPaymentReceipt"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/refund": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundInvoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundInvoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefundInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{invoiceId}/void": {
      "post": {
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidInvoiceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidInvoiceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VoidInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings": {
      "post": {
        "tags": [
          "Mdt"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConveneMeetingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConveneMeetingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConveneMeetingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "includeConcluded",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtListItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtListItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtListItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings/{id}": {
      "get": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMdtDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMdtDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMdtDetail"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings/{id}/contribution": {
      "put": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MdtContributionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MdtContributionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MdtContributionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings/{id}/contribution/submit": {
      "post": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings/{id}/decision": {
      "put": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MdtDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MdtDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MdtDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings/{id}/sign": {
      "post": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/meetings/{id}/conclude": {
      "post": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/cases/{caseId}/meetings": {
      "get": {
        "tags": [
          "Mdt"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtMeetingView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtMeetingView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtMeetingView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mdt/requests": {
      "post": {
        "tags": [
          "Mdt"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MdtReviewRequestBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MdtReviewRequestBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MdtReviewRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Mdt"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtRequestView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtRequestView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMdtRequestView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAccountProfile"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAccountProfile"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAccountProfile"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/email-change": {
      "post": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/email-change/confirm": {
      "post": {
        "tags": [
          "Me"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEmailChangeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEmailChangeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmEmailChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/keys/me": {
      "get": {
        "tags": [
          "MessagingKeys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMyMessagingKey"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMyMessagingKey"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMyMessagingKey"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "MessagingKeys"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMessagingKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMessagingKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetMessagingKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/keys/team": {
      "get": {
        "tags": [
          "MessagingKeys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTeamKeyView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTeamKeyView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfTeamKeyView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "MessagingKeys"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeamKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/keys/team/waiting": {
      "get": {
        "tags": [
          "MessagingKeys"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWaitingCoordinator"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWaitingCoordinator"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWaitingCoordinator"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/keys/team/grants": {
      "post": {
        "tags": [
          "MessagingKeys"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantTeamKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantTeamKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GrantTeamKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/meta": {
      "get": {
        "tags": [
          "Meta"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfServiceMetadata"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfServiceMetadata"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfServiceMetadata"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notifications": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfNotificationFeed"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfNotificationFeed"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfNotificationFeed"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notifications/{id}/read": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/notifications/read-all": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/waiting-trend": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWeeklyWait"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWeeklyWait"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfWeeklyWait"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/{report}/export": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "parameters": [
          {
            "name": "report",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCsvExportResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/referrals": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/waiting-times": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfWaitingTimeReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfWaitingTimeReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfWaitingTimeReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/capacity": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCapacityReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCapacityReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCapacityReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/pathway-completion": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPathwayCompletionReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPathwayCompletionReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPathwayCompletionReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/operational/report-turnaround": {
      "get": {
        "tags": [
          "OperationalReports"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportTurnaroundReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportTurnaroundReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportTurnaroundReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/patients/{patientId}/login": {
      "post": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkLoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkLoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LinkLoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/patients/{patientId}/access-grants": {
      "get": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAccessGrantView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAccessGrantView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfAccessGrantView"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantAccessRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantAccessRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GrantAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/patients/{patientId}/portal-access": {
      "get": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalAccessView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalAccessView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalAccessView"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/patients/{patientId}/portal-invitations": {
      "post": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitePortalUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitePortalUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InvitePortalUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalInvitation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalInvitation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalInvitation"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/patients/{patientId}/access-grants/{grantId}/permissions": {
      "put": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePermissionsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePermissionsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePermissionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/patients/{patientId}/access-grants/{grantId}/revoke": {
      "post": {
        "tags": [
          "PatientAccess"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeAccessRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeAccessRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeAccessRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfLinkedPatient"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfLinkedPatient"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfLinkedPatient"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/dashboard": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalDashboard"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalDashboard"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalDashboard"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/assessment": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentProgress"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentProgress"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAssessmentProgress"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/appointments": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "when",
            "in": "query",
            "schema": {
              "default": "Upcoming",
              "$ref": "#/components/schemas/AppointmentTimeframe"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalAppointment"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalAppointment"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalAppointment"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/appointments/{appointmentId}": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "appointmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalAppointment"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalAppointment"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalAppointment"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/forms": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "default": "All",
              "$ref": "#/components/schemas/FormFilter"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalForm"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalForm"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalForm"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/documents": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalDocumentLists"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalDocumentLists"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPortalDocumentLists"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "file": {
                        "$ref": "#/components/schemas/IFormFile"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "$ref": "#/components/schemas/SubmittedDocumentType"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/payments": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPaymentsOverview"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPaymentsOverview"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfPaymentsOverview"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/communication-preferences": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCommunicationPreferences"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCommunicationPreferences"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCommunicationPreferences"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationPreferencesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationPreferencesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationPreferencesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/linked-professionals": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfLinkedProfessional"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfLinkedProfessional"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfLinkedProfessional"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/consents": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalConsent"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalConsent"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalConsent"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/consents/{consentId}/withdraw": {
      "post": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "consentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawConsentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawConsentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WithdrawConsentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/link-requests": {
      "post": {
        "tags": [
          "Portal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChildLinkRequestBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChildLinkRequestBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChildLinkRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferenceResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferenceResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferenceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portal/patients/{patientId}/tasks": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalTask"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalTask"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalTask"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/patients/{patientId}": {
      "get": {
        "tags": [
          "PortalMessages"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalThread"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalThread"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalThread"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/inbox": {
      "get": {
        "tags": [
          "PortalMessages"
        ],
        "parameters": [
          {
            "name": "includeClosed",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfInboxThread"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfInboxThread"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfInboxThread"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/patients/{patientId}/recipients": {
      "get": {
        "tags": [
          "PortalMessages"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMessageRecipient"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMessageRecipient"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfMessageRecipient"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/{threadId}": {
      "get": {
        "tags": [
          "PortalMessages"
        ],
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalMessageView"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalMessageView"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfPortalMessageView"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages": {
      "post": {
        "tags": [
          "PortalMessages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartThreadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartThreadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartThreadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/{threadId}/replies": {
      "post": {
        "tags": [
          "PortalMessages"
        ],
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyToThreadRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyToThreadRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyToThreadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/{threadId}/close": {
      "post": {
        "tags": [
          "PortalMessages"
        ],
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires": {
      "get": {
        "tags": [
          "Questionnaires"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfQuestionnaireSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfQuestionnaireSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfQuestionnaireSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/requests": {
      "post": {
        "tags": [
          "Questionnaires"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestQuestionnaireApiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestQuestionnaireApiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestQuestionnaireApiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/responses/{id}": {
      "get": {
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfQuestionnaireForm"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfQuestionnaireForm"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfQuestionnaireForm"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveQuestionnaireProgressRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveQuestionnaireProgressRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveQuestionnaireProgressRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfProgressResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfProgressResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfProgressResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/responses/{id}/submit": {
      "post": {
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitQuestionnaireRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitQuestionnaireRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitQuestionnaireRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/case/{caseId}/respondents": {
      "get": {
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRespondent"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRespondent"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfRespondent"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/questionnaires/case/{caseId}": {
      "get": {
        "tags": [
          "Questionnaires"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfResponseSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfResponseSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfResponseSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/adult": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdultReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdultReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdultReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/child": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChildReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChildReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChildReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/professional": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfessionalReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfessionalReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProfessionalReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReferralReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/attachments": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Submission-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAttachmentReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAttachmentReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAttachmentReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/drafts": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartDraftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartDraftRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftReceiptResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftReceiptResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftReceiptResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDraftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDraftRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/drafts/resume-link": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendResumeLinkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendResumeLinkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendResumeLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/drafts/resume": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResumeDraftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResumeDraftRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResumeDraftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftSnapshotResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftSnapshotResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftSnapshotResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/drafts/files": {
      "post": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftFileResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftFileResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfDraftFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/referrals/drafts/files/{fileId}": {
      "delete": {
        "tags": [
          "Referrals"
        ],
        "parameters": [
          {
            "name": "X-Draft-Token",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports": {
      "post": {
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/mine": {
      "get": {
        "tags": [
          "Reports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}": {
      "put": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SaveReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportProgress"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportProgress"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportProgress"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportDetail"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportDetail"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfReportDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/submit": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitForReviewRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitForReviewRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitForReviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/comments": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCommentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCommentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCommentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/request-amendments": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCommentRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCommentRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportCommentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/approve": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/release": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReleaseReportRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReleaseReportRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReleaseReportRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/qa": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseReportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseReportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/{id}/addendum": {
      "post": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/case/{caseId}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/review-queue": {
      "get": {
        "tags": [
          "Reports"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfReportListItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/risk-flags": {
      "post": {
        "tags": [
          "RiskFlags"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseRiskFlagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseRiskFlagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RaiseRiskFlagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/risk-flags/{id}": {
      "get": {
        "tags": [
          "RiskFlags"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfRiskFlagResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfRiskFlagResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfRiskFlagResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/risk-flags/{id}/escalations": {
      "post": {
        "tags": [
          "RiskFlags"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateRiskFlagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateRiskFlagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateRiskFlagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/risk-flags/{id}/escalations/{escalationId}/acknowledge": {
      "post": {
        "tags": [
          "RiskFlags"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "escalationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/risk-flags/{id}/follow-up": {
      "put": {
        "tags": [
          "RiskFlags"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FollowUpRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FollowUpRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FollowUpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/risk-flags/{id}/close": {
      "post": {
        "tags": [
          "RiskFlags"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseRiskFlagRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseRiskFlagRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CloseRiskFlagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "Sitemap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/xml": { }
            }
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "tags": [
          "Sitemap"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": { }
            }
          }
        }
      }
    },
    "/webhooks/stripe": {
      "post": {
        "tags": [
          "StripeWebhook"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/mine": {
      "get": {
        "tags": [
          "Timesheets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimesheetSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimesheetSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimesheetSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/{year}/{month}": {
      "get": {
        "tags": [
          "Timesheets"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMonthTimesheet"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMonthTimesheet"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfMonthTimesheet"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/{year}/{month}/entries": {
      "post": {
        "tags": [
          "Timesheets"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimWorkRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimWorkRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimWorkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIdResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/{year}/{month}/submit": {
      "post": {
        "tags": [
          "Timesheets"
        ],
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "path",
            "required": true,
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/{timesheetId}/entries/{entryId}": {
      "delete": {
        "tags": [
          "Timesheets"
        ],
        "parameters": [
          {
            "name": "timesheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/awaiting-decision": {
      "get": {
        "tags": [
          "Timesheets"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimesheetSummary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimesheetSummary"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTimesheetSummary"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/{timesheetId}/approve": {
      "post": {
        "tags": [
          "Timesheets"
        ],
        "parameters": [
          {
            "name": "timesheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/timesheets/{timesheetId}/reject": {
      "post": {
        "tags": [
          "Timesheets"
        ],
        "parameters": [
          {
            "name": "timesheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectTimesheetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectTimesheetRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RejectTimesheetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage/queue": {
      "get": {
        "tags": [
          "Triage"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTriageQueueItem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTriageQueueItem"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfIReadOnlyListOfTriageQueueItem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage/{id}/accept": {
      "post": {
        "tags": [
          "Triage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptReferralRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptReferralRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAcceptedReferral"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAcceptedReferral"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfAcceptedReferral"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage/{id}/decline": {
      "post": {
        "tags": [
          "Triage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage/{id}/pause": {
      "post": {
        "tags": [
          "Triage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/triage/{id}/request-information": {
      "post": {
        "tags": [
          "Triage"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TriageDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCreateUserResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCreateUserResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfCreateUserResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{id}/resend-invitation": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{id}/roles": {
      "put": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRolesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRolesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRolesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{id}/deactivate": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{id}/reactivate": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponseOfApiError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/zoom": {
      "post": {
        "tags": [
          "ZoomWebhook"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptChangeRequest": {
        "required": [
          "newStartsAt",
          "note"
        ],
        "type": "object",
        "properties": {
          "newStartsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "overrideAvailability": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "AcceptedReferral": {
        "required": [
          "referralId",
          "patientId",
          "caseId"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AcceptingNewWorkRequest": {
        "required": [
          "accepting"
        ],
        "type": "object",
        "properties": {
          "accepting": {
            "type": "boolean"
          }
        }
      },
      "AcceptInvitationRequest": {
        "required": [
          "token",
          "firstName",
          "lastName",
          "phoneNumber",
          "password"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "password": {
            "type": "string"
          }
        }
      },
      "AcceptReferralRequest": {
        "required": [
          "identityVerified",
          "parentalResponsibilityVerified",
          "fundingRouteConfirmed",
          "checkedForDuplicateRecord",
          "reason"
        ],
        "type": "object",
        "properties": {
          "identityVerified": {
            "type": "boolean"
          },
          "parentalResponsibilityVerified": {
            "type": "boolean"
          },
          "fundingRouteConfirmed": {
            "type": "boolean"
          },
          "checkedForDuplicateRecord": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "teamId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AccessBasis": {
        "enum": [
          "ParentalResponsibility",
          "LawfulAuthority",
          "PatientConsent"
        ]
      },
      "AccessDecision": {
        "enum": [
          "Pending",
          "Confirmed",
          "Revoked"
        ]
      },
      "AccessDecisionRequest": {
        "required": [
          "userId",
          "decision",
          "note"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "decision": {
            "$ref": "#/components/schemas/AccessDecision"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AccessGrantView": {
        "required": [
          "grantId",
          "userId",
          "name",
          "basis",
          "permissions",
          "grantedAt",
          "expiresAt",
          "revokedAt"
        ],
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "basis": {
            "$ref": "#/components/schemas/AccessBasis"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AccessReviewItemView": {
        "required": [
          "userId",
          "name",
          "email",
          "roles",
          "decision",
          "decidedBy",
          "decidedAt",
          "note"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "roles": {
            "type": "string"
          },
          "decision": {
            "$ref": "#/components/schemas/AccessDecision"
          },
          "decidedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "decidedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AccessReviewView": {
        "required": [
          "id",
          "startedBy",
          "startedAt",
          "completedAt",
          "pending",
          "items"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "startedBy": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "pending": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessReviewItemView"
            }
          }
        }
      },
      "AccountProfile": {
        "required": [
          "firstName",
          "lastName",
          "email",
          "phoneNumber"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AccountStatus": {
        "enum": [
          "Invited",
          "Active",
          "Deactivated"
        ]
      },
      "AddInvoiceLineRequest": {
        "required": [
          "description",
          "kind",
          "unitAmountPounds",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ChargeKind"
          },
          "unitAmountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AddNoteRequest": {
        "required": [
          "kind",
          "text"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ClinicalNoteKind"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "AddServiceLineRequest": {
        "required": [
          "serviceId"
        ],
        "type": "object",
        "properties": {
          "serviceId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AdminAppointment": {
        "required": [
          "appointmentId",
          "caseId",
          "caseReference",
          "patientName",
          "kind",
          "startsAt",
          "endsAt",
          "durationMinutes",
          "modality",
          "location",
          "status",
          "clinicians",
          "outcomeReason",
          "typeName",
          "hasVideoMeeting",
          "videoIssue",
          "videoProviderStartsAt",
          "attendanceHint",
          "waitingForHostSince"
        ],
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AppointmentKind"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "modality": {
            "$ref": "#/components/schemas/AppointmentModality"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppointmentStatus"
          },
          "clinicians": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outcomeReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "typeName": {
            "type": "string"
          },
          "hasVideoMeeting": {
            "type": "boolean"
          },
          "videoIssue": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VideoMeetingIssue"
              }
            ]
          },
          "videoProviderStartsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "attendanceHint": {
            "type": [
              "null",
              "string"
            ]
          },
          "waitingForHostSince": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AdminCaseView": {
        "required": [
          "caseId",
          "reference",
          "pathway",
          "status",
          "stage",
          "queueStage",
          "nextAction",
          "teamId",
          "team",
          "funding",
          "referredOn",
          "serviceDeadline",
          "nextAppointment",
          "reasonForReferral",
          "progress",
          "components"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "status": {
            "$ref": "#/components/schemas/CaseStatus"
          },
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "queueStage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/QueueStage"
              }
            ]
          },
          "nextAction": {
            "type": [
              "null",
              "string"
            ]
          },
          "teamId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "team": {
            "type": [
              "null",
              "string"
            ]
          },
          "funding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FundingRoute"
              }
            ]
          },
          "referredOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "serviceDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextAppointment": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reasonForReferral": {
            "type": [
              "null",
              "string"
            ]
          },
          "progress": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProgressStep"
            }
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseComponent"
            }
          }
        }
      },
      "AdminClinicianDetail": {
        "required": [
          "profile",
          "teamId",
          "reportAuthorisations",
          "caseload",
          "components"
        ],
        "type": "object",
        "properties": {
          "profile": {
            "$ref": "#/components/schemas/ClinicianProfileView"
          },
          "teamId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "reportAuthorisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAuthorisation"
            }
          },
          "caseload": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseloadEntry"
            }
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovableComponent"
            }
          }
        }
      },
      "AdminPatientDetail": {
        "required": [
          "patientId",
          "reference",
          "name",
          "preferredName",
          "pronouns",
          "dateOfBirth",
          "age",
          "reasonableAdjustments",
          "interpreterLanguage",
          "communicationNeeds",
          "cases"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "preferredName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pronouns": {
            "type": [
              "null",
              "string"
            ]
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "age": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reasonableAdjustments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "interpreterLanguage": {
            "type": [
              "null",
              "string"
            ]
          },
          "communicationNeeds": {
            "type": [
              "null",
              "string"
            ]
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminCaseView"
            }
          }
        }
      },
      "AdminPatientItem": {
        "required": [
          "patientId",
          "patientReference",
          "name",
          "dateOfBirth",
          "caseId",
          "caseReference",
          "pathway",
          "status",
          "stage",
          "assignedClinicians",
          "team",
          "lastActivity"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "patientReference": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "status": {
            "$ref": "#/components/schemas/CaseStatus"
          },
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "assignedClinicians": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "team": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastActivity": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AdminReferralDetail": {
        "required": [
          "referralId",
          "reference",
          "source",
          "status",
          "progress",
          "received",
          "patientName",
          "dateOfBirth",
          "age",
          "pathway",
          "funding",
          "serviceDeadline",
          "caseId",
          "caseReference",
          "reasonForReferral",
          "areaOfInterest",
          "reasonableAdjustments",
          "schoolOrSetting",
          "hasPreviousAssessments",
          "parentalResponsibilityHeldBy",
          "relationshipToSubject",
          "referrer",
          "contact",
          "consentGivenBy",
          "consentGivenAt",
          "consentMethod",
          "enteredBy",
          "checks",
          "outstandingChecks",
          "decisions",
          "files",
          "possibleDuplicates"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/ReferralSource"
          },
          "status": {
            "$ref": "#/components/schemas/ReferralStatus"
          },
          "progress": {
            "$ref": "#/components/schemas/ReferralProgress"
          },
          "received": {
            "type": "string",
            "format": "date-time"
          },
          "patientName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "age": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "funding": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "serviceDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "caseReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonForReferral": {
            "type": "string"
          },
          "areaOfInterest": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonableAdjustments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "schoolOrSetting": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasPreviousAssessments": {
            "type": "boolean"
          },
          "parentalResponsibilityHeldBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "relationshipToSubject": {
            "type": [
              "null",
              "string"
            ]
          },
          "referrer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProfessionalReferrer"
              }
            ]
          },
          "contact": {
            "$ref": "#/components/schemas/ContactView"
          },
          "consentGivenBy": {
            "type": "string"
          },
          "consentGivenAt": {
            "type": "string",
            "format": "date-time"
          },
          "consentMethod": {
            "$ref": "#/components/schemas/ConsentMethod"
          },
          "enteredBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "checks": {
            "$ref": "#/components/schemas/TriageChecks"
          },
          "outstandingChecks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriageDecisionView"
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AttachmentView"
            }
          },
          "possibleDuplicates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PossibleDuplicate"
            }
          }
        }
      },
      "AdminReferralItem": {
        "required": [
          "referralId",
          "reference",
          "patientName",
          "pathway",
          "received",
          "funding",
          "serviceDeadline",
          "progress",
          "caseId"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "received": {
            "type": "string",
            "format": "date-time"
          },
          "funding": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "serviceDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "progress": {
            "$ref": "#/components/schemas/ReferralProgress"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AdultReferralRequest": {
        "required": [
          "subject",
          "contact",
          "assessment",
          "consent",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/PersonDetailsRequest"
          },
          "contact": {
            "$ref": "#/components/schemas/ContactDetailsRequest"
          },
          "assessment": {
            "$ref": "#/components/schemas/AssessmentDetailsRequest"
          },
          "consent": {
            "$ref": "#/components/schemas/ConsentRequest"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AlertSeverity": {
        "enum": [
          "Information",
          "Attention",
          "Urgent"
        ]
      },
      "AllocateRequest": {
        "required": [
          "clinicianUserId",
          "components"
        ],
        "type": "object",
        "properties": {
          "clinicianUserId": {
            "type": "string",
            "format": "uuid"
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComponentAllocation"
            }
          }
        }
      },
      "AllocationCandidate": {
        "required": [
          "clinicianUserId",
          "profileId",
          "fullName",
          "professionalTitle",
          "canTakeWork",
          "blocker",
          "onLeave",
          "acceptingNewWork",
          "currentCaseload"
        ],
        "type": "object",
        "properties": {
          "clinicianUserId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "fullName": {
            "type": "string"
          },
          "professionalTitle": {
            "type": "string"
          },
          "canTakeWork": {
            "type": "boolean"
          },
          "blocker": {
            "type": [
              "null",
              "string"
            ]
          },
          "onLeave": {
            "type": "boolean"
          },
          "acceptingNewWork": {
            "type": "boolean"
          },
          "currentCaseload": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "teamId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "credentialWarning": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AllocationQueue": {
        "required": [
          "awaiting",
          "awaitingToday",
          "dueToday",
          "overdue",
          "items"
        ],
        "type": "object",
        "properties": {
          "awaiting": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "awaitingToday": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "dueToday": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "overdue": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllocationQueueItem"
            }
          }
        }
      },
      "AllocationQueueItem": {
        "required": [
          "caseId",
          "caseReference",
          "patientName",
          "pathway",
          "component",
          "componentName",
          "requiredBy",
          "suitableClinicians",
          "urgency",
          "team",
          "funding",
          "serviceDeadline",
          "awaitingApproval"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "componentName": {
            "type": "string"
          },
          "requiredBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "suitableClinicians": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "urgency": {
            "$ref": "#/components/schemas/AllocationUrgency"
          },
          "team": {
            "type": [
              "null",
              "string"
            ]
          },
          "funding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FundingRoute"
              }
            ]
          },
          "serviceDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "awaitingApproval": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "AllocationUrgency": {
        "enum": [
          "Unallocated",
          "DueToday",
          "Overdue"
        ]
      },
      "AnonymisePatientRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ApiError": {
        "required": [
          "code",
          "correlationId"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "correlationId": {
            "type": "string"
          },
          "errors": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse": {
        "required": [
          "status",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": { },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAcceptedReferral": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AcceptedReferral"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAccountProfile": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AccountProfile"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAdminClinicianDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AdminClinicianDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAdminPatientDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AdminPatientDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAdminReferralDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AdminReferralDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAllocationQueue": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AllocationQueue"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfApiError": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ApiError"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAppointmentView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AppointmentView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAssessmentForm": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AssessmentForm"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAssessmentProgress": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AssessmentProgress"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAssessmentRecordDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AssessmentRecordDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAttachmentReceiptResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AttachmentReceiptResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAuditIntegrityResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AuditIntegrityResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAuditLogPage": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AuditLogPage"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfAuthorisedWorkReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/AuthorisedWorkReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCalendarView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CalendarView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCapacityReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CapacityReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCaseloadPage": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CaseloadPage"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCaseOverview": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CaseOverview"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCaseReferral": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CaseReferral"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCaseSummaryResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CaseSummaryResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfChangeVersion": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ChangeVersion"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCheckoutResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CheckoutResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfClinicianDashboard": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ClinicianDashboard"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfClinicianDirectory": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ClinicianDirectory"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfClinicianProfileView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ClinicianProfileView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCommunicationPreferences": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CommunicationPreferences"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfConsentRequestView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ConsentRequestView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfConsentStatusResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ConsentStatusResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCreateUserResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CreateUserResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfCsvExportResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/CsvExportResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfDocumentDownloadResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/DocumentDownloadResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfDraftFileResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/DraftFileResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfDraftReceiptResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/DraftReceiptResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfDraftSnapshotResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/DraftSnapshotResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfEnquiryDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/EnquiryDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfEnquiryReceiptResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/EnquiryReceiptResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfFinanceSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/FinanceSummary"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfGovernanceEntryView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/GovernanceEntryView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIdResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/IdResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfint": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfInvitationResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/InvitationResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfInvoiceView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/InvoiceView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfInvoicingReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/InvoicingReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAccessGrantView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AccessGrantView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAccessReviewView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AccessReviewView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAdminAppointment": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AdminAppointment"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAllocationCandidate": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AllocationCandidate"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAppointmentTypeView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AppointmentTypeView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAppointmentView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AppointmentView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAssessmentRecordView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AssessmentRecordView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAuditLogEntry": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AuditLogEntry"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfAuditTrailEntryResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/AuditTrailEntryResponse"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfCaseComponent": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CaseComponent"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfCaseConcern": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CaseConcern"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfCaseloadItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CaseloadItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfCaseNote": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CaseNote"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfChangeRequestSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ChangeRequestSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfChildLinkRequestView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ChildLinkRequestView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfClinicianAlert": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClinicianAlert"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfClinicianTask": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ClinicianTask"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfComponentView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ComponentView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfConsentRequestView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ConsentRequestView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfConsentTemplate": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ConsentTemplate"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfConsentView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ConsentView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfDocumentView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEditorArticle": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EditorArticle"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEditorFaq": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EditorFaq"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEditorPage": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EditorPage"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEditorPrice": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EditorPrice"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEditorService": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EditorService"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEditorTeamMember": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EditorTeamMember"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfEnquirySummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/EnquirySummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfExpiringCredential": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ExpiringCredential"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfFinanceTimesheetItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/FinanceTimesheetItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfGovernanceSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/GovernanceSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfInboxThread": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/InboxThread"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfInvoiceSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/InvoiceSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfLinkedPatient": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/LinkedPatient"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfLinkedProfessional": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/LinkedProfessional"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfMdtListItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MdtListItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfMdtMeetingView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MdtMeetingView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfMdtRequestView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MdtRequestView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfMediaSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MediaSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfMessageRecipient": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MessageRecipient"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPortalAppointment": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PortalAppointment"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPortalConsent": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PortalConsent"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPortalForm": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PortalForm"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPortalMessageView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PortalMessageView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPortalTask": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PortalTask"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPortalThread": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PortalThread"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPublishedArticle": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PublishedArticle"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPublishedFaq": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PublishedFaq"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPublishedNavigationItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PublishedNavigationItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPublishedPrice": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PublishedPrice"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPublishedService": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PublishedService"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfPublishedTeamMember": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PublishedTeamMember"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfQuestionnaireSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/QuestionnaireSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfReportListItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ReportListItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfRespondent": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/Respondent"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfResponseSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ResponseSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfRetentionCandidate": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RetentionCandidate"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfRoleView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RoleView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfSafeguardingItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SafeguardingItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfSearchHit": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SearchHit"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfServiceTargetView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ServiceTargetView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfServiceView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ServiceView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfStaffMember": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/StaffMember"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfStageDuration": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/StageDuration"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfstring": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfSubjectRequestSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SubjectRequestSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfTeamView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TeamView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfTemplateView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TemplateView"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfTimelineEntry": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TimelineEntry"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfTimesheetSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TimesheetSummary"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfTriageQueueItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TriageQueueItem"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfUnallocatedComponent": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/UnallocatedComponent"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfWaitingCoordinator": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/WaitingCoordinator"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfWeeklySlot": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/WeeklySlot"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfIReadOnlyListOfWeeklyWait": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/WeeklyWait"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfJoinLinkResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/JoinLinkResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfMdtDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/MdtDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfMdtQaPipeline": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/MdtQaPipeline"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfMediaSummary": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/MediaSummary"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfMonthTimesheet": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/MonthTimesheet"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfMultiFactorEnrolmentResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/MultiFactorEnrolmentResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfMyMessagingKey": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/MyMessagingKey"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfNotificationFeed": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/NotificationFeed"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfOperationsDashboard": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/OperationsDashboard"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfOutstandingReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/OutstandingReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPageOfAdminPatientItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PageOfAdminPatientItem"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPageOfAdminReferralItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PageOfAdminReferralItem"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPageOfFinanceInvoiceItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PageOfFinanceInvoiceItem"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPageOfWorkQueueItem": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PageOfWorkQueueItem"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPasswordPolicyResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PasswordPolicyResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPathwayCompletionReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PathwayCompletionReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPaymentReceipt": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PaymentReceipt"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPaymentsOverview": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PaymentsOverview"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPortalAccessView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PortalAccessView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPortalAppointment": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PortalAppointment"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPortalDashboard": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PortalDashboard"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPortalDocumentLists": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PortalDocumentLists"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPortalInvitation": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PortalInvitation"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfProgressResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ProgressResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPublishedArticle": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PublishedArticle"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfPublishedPage": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/PublishedPage"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfQuestionnaireForm": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/QuestionnaireForm"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfRecordProgress": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/RecordProgress"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfReferenceResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ReferenceResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfReferralReceiptResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ReferralReceiptResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfReferralReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ReferralReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfReportDetail": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ReportDetail"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfReportProgress": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ReportProgress"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfReportTurnaroundReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ReportTurnaroundReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfRiskFlagResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/RiskFlagResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfServiceMetadata": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/ServiceMetadata"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfSignInResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/SignInResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfSiteDetails": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/SiteDetails"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfSubjectAccessPackage": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/SubjectAccessPackage"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfTeamKeyView": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/TeamKeyView"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfTemplateVersionResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/TemplateVersionResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfTokenResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/TokenResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfWaitingTimeReport": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/WaitingTimeReport"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiResponseOfWhoAmIResponse": {
        "required": [
          "status",
          "body",
          "message"
        ],
        "type": "object",
        "properties": {
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "body": {
            "$ref": "#/components/schemas/WhoAmIResponse"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "AppointmentKind": {
        "enum": [
          "InitialReview",
          "DevelopmentalHistory",
          "ObservationalAssessment",
          "ClinicalInterview",
          "Feedback",
          "FollowUp",
          "Other"
        ]
      },
      "AppointmentModality": {
        "enum": [
          "Remote",
          "InClinic"
        ]
      },
      "AppointmentMode": {
        "enum": [
          "InPerson",
          "RemoteOrInPerson",
          "Internal"
        ]
      },
      "AppointmentOutcomeRequest": {
        "required": [
          "attended"
        ],
        "type": "object",
        "properties": {
          "attended": {
            "type": "boolean"
          }
        }
      },
      "AppointmentStatus": {
        "enum": [
          "Scheduled",
          "Attended",
          "CancelledByService",
          "CancelledByPatient",
          "DidNotAttend"
        ]
      },
      "AppointmentTimeframe": {
        "enum": [
          "Upcoming",
          "Past"
        ]
      },
      "AppointmentTypeRequest": {
        "required": [
          "defaultDurationMinutes",
          "mode",
          "deliveredBy"
        ],
        "type": "object",
        "properties": {
          "defaultDurationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mode": {
            "$ref": "#/components/schemas/AppointmentMode"
          },
          "deliveredBy": {
            "$ref": "#/components/schemas/DeliveredBy"
          },
          "isActive": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "AppointmentTypeView": {
        "required": [
          "kind",
          "id",
          "name",
          "defaultDurationMinutes",
          "mode",
          "deliveredBy",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AppointmentKind"
          },
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "defaultDurationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mode": {
            "$ref": "#/components/schemas/AppointmentMode"
          },
          "deliveredBy": {
            "$ref": "#/components/schemas/DeliveredBy"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "AppointmentView": {
        "enum": [
          "All",
          "Upcoming",
          "Cancelled",
          "DidNotAttend"
        ]
      },
      "ApprovableComponent": {
        "required": [
          "component",
          "name",
          "customComponentId",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "name": {
            "type": "string"
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "ApprovedPathway": {
        "enum": [
          "AutismAdult",
          "AutismChild",
          "AdhdAdult",
          "AdhdChild",
          "Combined"
        ]
      },
      "ArticleDraft": {
        "required": [
          "id",
          "slug",
          "title",
          "summary",
          "body",
          "isClinical",
          "authorName",
          "reviewerName",
          "reviewerRegistration",
          "reviewedOn",
          "nextReviewDue"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "isClinical": {
            "type": "boolean"
          },
          "authorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerRegistration": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextReviewDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "downloadId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AskConsentRequest": {
        "required": [
          "patientId",
          "caseId",
          "purpose",
          "templateId",
          "templateVersion",
          "title",
          "wording",
          "dueBy"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/ConsentPurpose"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "wording": {
            "type": "string"
          },
          "dueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AssessmentDetailsRequest": {
        "required": [
          "pathway",
          "fundingRoute",
          "reasonForReferral",
          "areaOfInterest",
          "hasPreviousAssessments",
          "reasonableAdjustments"
        ],
        "type": "object",
        "properties": {
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "fundingRoute": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "reasonForReferral": {
            "type": "string"
          },
          "areaOfInterest": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasPreviousAssessments": {
            "type": "boolean"
          },
          "reasonableAdjustments": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AssessmentForm": {
        "required": [
          "component",
          "title",
          "sections"
        ],
        "type": "object",
        "properties": {
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "title": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormSection"
            }
          }
        }
      },
      "AssessmentProgress": {
        "required": [
          "summary",
          "stages"
        ],
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/AssessmentSummary"
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProgressStage"
            }
          }
        }
      },
      "AssessmentRecordDetail": {
        "required": [
          "id",
          "caseId",
          "caseReference",
          "patientName",
          "component",
          "componentName",
          "status",
          "isMine",
          "authorName",
          "session",
          "form",
          "answers",
          "progress",
          "stillToComplete",
          "completedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "componentName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AssessmentRecordStatus"
          },
          "isMine": {
            "type": "boolean"
          },
          "authorName": {
            "type": "string"
          },
          "session": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecordSession"
              }
            ]
          },
          "form": {
            "$ref": "#/components/schemas/AssessmentForm"
          },
          "answers": {
            "type": "object"
          },
          "progress": {
            "$ref": "#/components/schemas/RecordProgress"
          },
          "stillToComplete": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "AssessmentRecordStatus": {
        "enum": [
          "Draft",
          "Completed"
        ]
      },
      "AssessmentRecordView": {
        "required": [
          "id",
          "component",
          "customComponentId",
          "status",
          "authorUserId",
          "startedAt",
          "lastSavedAt",
          "completedAt",
          "isOwnDraft"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/AssessmentRecordStatus"
          },
          "authorUserId": {
            "type": "string",
            "format": "uuid"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSavedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isOwnDraft": {
            "type": "boolean"
          }
        }
      },
      "AssessmentSummary": {
        "required": [
          "caseId",
          "reference",
          "pathwayName",
          "statusLabel",
          "subjectName",
          "startedOn"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "pathwayName": {
            "type": "string"
          },
          "statusLabel": {
            "type": "string"
          },
          "subjectName": {
            "type": "string"
          },
          "startedOn": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AssignmentRole": {
        "enum": [
          "Assessor",
          "Reviewer",
          "ReportAuthor"
        ]
      },
      "AssignRolesRequest": {
        "required": [
          "roles"
        ],
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AssignTeamRequest": {
        "required": [
          "teamId"
        ],
        "type": "object",
        "properties": {
          "teamId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AttachmentReceiptResponse": {
        "required": [
          "attachmentId",
          "fileName",
          "scanState"
        ],
        "type": "object",
        "properties": {
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "scanState": {
            "type": "string"
          }
        }
      },
      "AttachmentScanState": {
        "enum": [
          "Quarantined",
          "Clean",
          "Infected",
          "Rejected"
        ]
      },
      "AttachmentView": {
        "required": [
          "id",
          "fileName",
          "sizeBytes",
          "uploadedAt",
          "scanState"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          },
          "scanState": {
            "$ref": "#/components/schemas/AttachmentScanState"
          }
        }
      },
      "AuditAction": {
        "enum": [
          "View",
          "Download",
          "Create",
          "Edit",
          "Approve",
          "Release",
          "Export",
          "Delete",
          "PermissionChange",
          "LoginSucceeded",
          "LoginFailed",
          "MfaChallenged"
        ]
      },
      "AuditIntegrityResponse": {
        "required": [
          "isIntact",
          "entriesChecked",
          "firstBrokenSequence",
          "checkedAt"
        ],
        "type": "object",
        "properties": {
          "isIntact": {
            "type": "boolean"
          },
          "entriesChecked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "firstBrokenSequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AuditLogEntry": {
        "required": [
          "sequence",
          "occurredAt",
          "actorId",
          "actorName",
          "actorRole",
          "action",
          "outcome",
          "entityType",
          "entityId",
          "caseId"
        ],
        "type": "object",
        "properties": {
          "sequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "actorId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "actorName": {
            "type": "string"
          },
          "actorRole": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/AuditAction"
          },
          "outcome": {
            "$ref": "#/components/schemas/AuditOutcome"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AuditLogPage": {
        "required": [
          "total",
          "page",
          "pageSize",
          "entries"
        ],
        "type": "object",
        "properties": {
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogEntry"
            }
          }
        }
      },
      "AuditOutcome": {
        "enum": [
          "Succeeded",
          "Denied",
          "Failed"
        ]
      },
      "AuditTrailEntryResponse": {
        "required": [
          "sequence",
          "occurredAt",
          "actorId",
          "actorRole",
          "action",
          "outcome",
          "entityType",
          "entityId",
          "caseId"
        ],
        "type": "object",
        "properties": {
          "sequence": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "actorId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "actorRole": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/AuditAction"
          },
          "outcome": {
            "$ref": "#/components/schemas/AuditOutcome"
          },
          "entityType": {
            "type": "string"
          },
          "entityId": {
            "type": "string"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AuthorisedWorkReport": {
        "required": [
          "from",
          "to",
          "timesheetsApproved",
          "totalDuration",
          "byClinician"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "timesheetsApproved": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalDuration": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": "string"
          },
          "byClinician": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClinicianWorkTotal"
            }
          }
        }
      },
      "BeginCheckoutRequest": {
        "required": [
          "amountPounds"
        ],
        "type": "object",
        "properties": {
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "BlockDraft": {
        "required": [
          "kind",
          "heading",
          "body",
          "imageId",
          "linkLabel",
          "linkHref",
          "order"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "heading": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "linkLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkHref": {
            "type": [
              "null",
              "string"
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "eyebrow": {
            "type": [
              "null",
              "string"
            ]
          },
          "subheading": {
            "type": [
              "null",
              "string"
            ]
          },
          "icon": {
            "type": [
              "null",
              "string"
            ]
          },
          "secondaryLinkLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "secondaryLinkHref": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CalendarEntry": {
        "required": [
          "appointmentId",
          "caseId",
          "patientName",
          "kind",
          "startsAt",
          "endsAt",
          "durationMinutes",
          "modality",
          "location",
          "status",
          "typeName"
        ],
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "patientName": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AppointmentKind"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "modality": {
            "$ref": "#/components/schemas/AppointmentModality"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppointmentStatus"
          },
          "typeName": {
            "type": "string"
          }
        }
      },
      "CalendarView": {
        "required": [
          "from",
          "to",
          "appointments",
          "leave"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarEntry"
            }
          },
          "leave": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaveView"
            }
          }
        }
      },
      "CallBackRequest": {
        "required": [
          "contact",
          "message",
          "safeContactNote",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/EnquiryContactRequest"
          },
          "message": {
            "type": "string"
          },
          "safeContactNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CancelAppointmentRequest": {
        "required": [
          "byPatient",
          "reason"
        ],
        "type": "object",
        "properties": {
          "byPatient": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "CapacityReport": {
        "required": [
          "openCases",
          "activeClinicians",
          "averageCaseload",
          "unallocatedComponents",
          "clinicansBlockedByCredentials",
          "casesByStage"
        ],
        "type": "object",
        "properties": {
          "openCases": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "activeClinicians": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "averageCaseload": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unallocatedComponents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "clinicansBlockedByCredentials": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "casesByStage": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "CaseComponent": {
        "required": [
          "component",
          "name",
          "clinicians",
          "isMine",
          "appointmentAt",
          "status",
          "myRecordId"
        ],
        "type": "object",
        "properties": {
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "name": {
            "type": "string"
          },
          "clinicians": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isMine": {
            "type": "boolean"
          },
          "appointmentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/ComponentStatus"
          },
          "myRecordId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CaseConcern": {
        "required": [
          "id",
          "category",
          "severity",
          "summary",
          "immediateAction",
          "identifiedAt",
          "raisedAt",
          "raisedBy",
          "escalated",
          "isClosed",
          "outcome"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "severity": {
            "$ref": "#/components/schemas/RiskSeverity"
          },
          "summary": {
            "type": "string"
          },
          "immediateAction": {
            "type": [
              "null",
              "string"
            ]
          },
          "identifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "raisedAt": {
            "type": "string",
            "format": "date-time"
          },
          "raisedBy": {
            "type": "string"
          },
          "escalated": {
            "type": "boolean"
          },
          "isClosed": {
            "type": "boolean"
          },
          "outcome": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CaseloadEntry": {
        "required": [
          "caseId",
          "caseReference",
          "pathway",
          "stage",
          "components"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PathwayComponent"
            }
          }
        }
      },
      "CaseloadItem": {
        "required": [
          "caseId",
          "caseReference",
          "patientId",
          "patientName",
          "pathway",
          "status",
          "stage",
          "myComponents",
          "nextAppointment",
          "myTask",
          "dueOn",
          "openRiskFlags"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "status": {
            "$ref": "#/components/schemas/CaseStatus"
          },
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "myComponents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PathwayComponent"
            }
          },
          "nextAppointment": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "myTask": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "openRiskFlags": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CaseloadPage": {
        "required": [
          "summary",
          "cases"
        ],
        "type": "object",
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/CaseloadSummary"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseloadItem"
            }
          }
        }
      },
      "CaseloadSummary": {
        "required": [
          "todaysAppointments",
          "nextAppointmentAt",
          "activeCases",
          "reportsDue"
        ],
        "type": "object",
        "properties": {
          "todaysAppointments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextAppointmentAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "activeCases": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reportsDue": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CaseNote": {
        "required": [
          "id",
          "kind",
          "text",
          "authorName",
          "isMine",
          "writtenAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/ClinicalNoteKind"
          },
          "text": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "isMine": {
            "type": "boolean"
          },
          "writtenAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CaseOverview": {
        "required": [
          "caseId",
          "caseReference",
          "patientId",
          "patientName",
          "preferredName",
          "pronouns",
          "dateOfBirth",
          "age",
          "pathway",
          "status",
          "stage",
          "nextAppointment",
          "reasonForReferral",
          "reasonableAdjustments",
          "interpreterLanguage",
          "communicationNeeds",
          "progress",
          "openRisks",
          "nextTask",
          "assessmentConsentInForce"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "patientName": {
            "type": "string"
          },
          "preferredName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pronouns": {
            "type": [
              "null",
              "string"
            ]
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "age": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "status": {
            "$ref": "#/components/schemas/CaseStatus"
          },
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "nextAppointment": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reasonForReferral": {
            "type": [
              "null",
              "string"
            ]
          },
          "reasonableAdjustments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "interpreterLanguage": {
            "type": [
              "null",
              "string"
            ]
          },
          "communicationNeeds": {
            "type": [
              "null",
              "string"
            ]
          },
          "progress": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProgressStep"
            }
          },
          "openRisks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextTask": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ClinicianTask"
              }
            ]
          },
          "assessmentConsentInForce": {
            "type": "boolean"
          }
        }
      },
      "CaseReferral": {
        "required": [
          "referralId",
          "receivedAt",
          "source",
          "requestedPathway",
          "fundingRoute",
          "reasonForReferral",
          "areaOfInterest",
          "schoolOrSetting",
          "hasPreviousAssessments",
          "referrer",
          "files",
          "consent"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "$ref": "#/components/schemas/ReferralSource"
          },
          "requestedPathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "fundingRoute": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "reasonForReferral": {
            "type": "string"
          },
          "areaOfInterest": {
            "type": [
              "null",
              "string"
            ]
          },
          "schoolOrSetting": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasPreviousAssessments": {
            "type": "boolean"
          },
          "referrer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ReferrerDetails"
              }
            ]
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferralFile"
            }
          },
          "consent": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ConsentSummary"
              }
            ]
          }
        }
      },
      "CaseStatus": {
        "enum": [
          "Open",
          "Paused",
          "Closed"
        ]
      },
      "CaseSummaryResponse": {
        "required": [
          "id",
          "patientId",
          "pathway",
          "status",
          "openedAt",
          "activeAssignments"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "pathway": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "activeAssignments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ChangePermissionsRequest": {
        "required": [
          "permissions"
        ],
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          }
        }
      },
      "ChangeReason": {
        "enum": [
          "Illness",
          "WorkOrSchool",
          "TravelOrTransport",
          "CaringResponsibilities",
          "NoLongerNeeded",
          "Other"
        ]
      },
      "ChangeRequestKind": {
        "enum": [
          "Reschedule",
          "Cancel"
        ]
      },
      "ChangeRequestSummary": {
        "required": [
          "requestId",
          "appointmentId",
          "patientId",
          "kind",
          "reason",
          "preferredAlternative",
          "requestedAt"
        ],
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/ChangeRequestKind"
          },
          "reason": {
            "type": "string"
          },
          "preferredAlternative": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChangeVersion": {
        "required": [
          "version"
        ],
        "type": "object",
        "properties": {
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ChargeKind": {
        "enum": [
          "Deposit",
          "Assessment",
          "Additional",
          "NonAttendance"
        ]
      },
      "CheckoutResponse": {
        "required": [
          "checkoutUrl"
        ],
        "type": "object",
        "properties": {
          "checkoutUrl": {
            "type": "string"
          }
        }
      },
      "ChildLinkRequestBody": {
        "required": [
          "childFirstName",
          "childLastName",
          "childDateOfBirth",
          "relationship",
          "note"
        ],
        "type": "object",
        "properties": {
          "childFirstName": {
            "type": "string"
          },
          "childLastName": {
            "type": "string"
          },
          "childDateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "relationship": {
            "type": "string"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ChildLinkRequestView": {
        "required": [
          "id",
          "reference",
          "requestedByUserId",
          "requestedBy",
          "requestedByEmail",
          "childFirstName",
          "childLastName",
          "childDateOfBirth",
          "relationship",
          "note",
          "requestedAt",
          "possibleMatches"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "requestedByUserId": {
            "type": "string",
            "format": "uuid"
          },
          "requestedBy": {
            "type": "string"
          },
          "requestedByEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "childFirstName": {
            "type": "string"
          },
          "childLastName": {
            "type": "string"
          },
          "childDateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "relationship": {
            "type": "string"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "possibleMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatientMatch"
            }
          }
        }
      },
      "ChildReferralRequest": {
        "required": [
          "child",
          "contact",
          "assessment",
          "consent",
          "parentalResponsibilityHeldBy",
          "relationshipToChild",
          "schoolOrSetting",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "child": {
            "$ref": "#/components/schemas/PersonDetailsRequest"
          },
          "contact": {
            "$ref": "#/components/schemas/ContactDetailsRequest"
          },
          "assessment": {
            "$ref": "#/components/schemas/AssessmentDetailsRequest"
          },
          "consent": {
            "$ref": "#/components/schemas/ConsentRequest"
          },
          "parentalResponsibilityHeldBy": {
            "type": "string"
          },
          "relationshipToChild": {
            "type": "string"
          },
          "schoolOrSetting": {
            "type": [
              "null",
              "string"
            ]
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClaimableWork": {
        "required": [
          "kind",
          "component",
          "workId",
          "workedOn",
          "caseId",
          "caseReference",
          "work",
          "suggestedMinutes"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/WorkKind"
          },
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "workId": {
            "type": "string",
            "format": "uuid"
          },
          "workedOn": {
            "type": "string",
            "format": "date"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "work": {
            "type": "string"
          },
          "suggestedMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ClaimWorkRequest": {
        "required": [
          "kind",
          "workId",
          "durationMinutes",
          "note"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/WorkKind"
          },
          "workId": {
            "type": "string",
            "format": "uuid"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClinicalNoteKind": {
        "enum": [
          "ClinicalWorking",
          "AssessmentRelated",
          "CaseCoordination"
        ]
      },
      "ClinicianAlert": {
        "required": [
          "kind",
          "severity",
          "caseId",
          "summary",
          "raisedAt"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/AlertSeverity"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "summary": {
            "type": "string"
          },
          "raisedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ClinicianAvailability": {
        "enum": [
          "Available",
          "Limited",
          "Unavailable"
        ]
      },
      "ClinicianCapacity": {
        "required": [
          "scheduledAppointments",
          "availableHours",
          "utilisedPercent"
        ],
        "type": "object",
        "properties": {
          "scheduledAppointments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "availableHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "utilisedPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ClinicianDashboard": {
        "required": [
          "fullName",
          "professionalTitle",
          "acceptingNewWork",
          "assignedCases",
          "todaysAppointments",
          "openTasks",
          "overdueTasks",
          "alerts",
          "todaysSchedule",
          "caseload"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "professionalTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "acceptingNewWork": {
            "type": "boolean"
          },
          "assignedCases": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "todaysAppointments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "openTasks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "overdueTasks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "alerts": {
            "$ref": "#/components/schemas/DashboardAlerts"
          },
          "todaysSchedule": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleItem"
            }
          },
          "caseload": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaseloadItem"
            }
          }
        }
      },
      "ClinicianDirectory": {
        "required": [
          "activeClinicians",
          "credentialsRequiringAttention",
          "unavailable",
          "clinicians"
        ],
        "type": "object",
        "properties": {
          "activeClinicians": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "credentialsRequiringAttention": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unavailable": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "clinicians": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClinicianRow"
            }
          }
        }
      },
      "ClinicianProfileView": {
        "required": [
          "profileId",
          "fullName",
          "professionalTitle",
          "qualifications",
          "isActive",
          "acceptingNewWork",
          "registrationBody",
          "registrationNumber",
          "approvedPathways",
          "approvedComponents",
          "approvedCustomComponents",
          "credentials",
          "missingCredentials",
          "requiredCredentials",
          "leave"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "fullName": {
            "type": "string"
          },
          "professionalTitle": {
            "type": "string"
          },
          "qualifications": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "acceptingNewWork": {
            "type": "boolean"
          },
          "registrationBody": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RegulatoryBody"
              }
            ]
          },
          "registrationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "approvedPathways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovedPathway"
            }
          },
          "approvedComponents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PathwayComponent"
            }
          },
          "approvedCustomComponents": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CredentialStatus"
            }
          },
          "missingCredentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CredentialKind"
            }
          },
          "requiredCredentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CredentialKind"
            }
          },
          "leave": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaveView"
            }
          }
        }
      },
      "ClinicianRow": {
        "required": [
          "profileId",
          "userId",
          "name",
          "professionalTitle",
          "team",
          "approvedPathways",
          "activeCases",
          "availability",
          "needsCredentialAttention",
          "credentials",
          "capacity",
          "approvedForWork"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "professionalTitle": {
            "type": "string"
          },
          "team": {
            "type": [
              "null",
              "string"
            ]
          },
          "approvedPathways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovedPathway"
            }
          },
          "activeCases": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "availability": {
            "$ref": "#/components/schemas/ClinicianAvailability"
          },
          "needsCredentialAttention": {
            "type": "boolean"
          },
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CredentialCell"
            }
          },
          "capacity": {
            "$ref": "#/components/schemas/ClinicianCapacity"
          },
          "approvedForWork": {
            "type": "boolean"
          }
        }
      },
      "ClinicianTask": {
        "required": [
          "kind",
          "title",
          "action",
          "caseId",
          "caseReference",
          "patientId",
          "patientName",
          "dueOn",
          "timing",
          "subjectId"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ClinicianTaskKind"
          },
          "title": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "patientName": {
            "type": "string"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "timing": {
            "$ref": "#/components/schemas/TaskTiming"
          },
          "subjectId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "component": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PathwayComponent"
              }
            ]
          },
          "appointmentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "blockedBy": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClinicianTaskKind": {
        "enum": [
          "Assessment",
          "Report",
          "Review",
          "Mdt"
        ]
      },
      "ClinicianWorkTotal": {
        "required": [
          "clinicianUserId",
          "clinicianName",
          "entries",
          "duration"
        ],
        "type": "object",
        "properties": {
          "clinicianUserId": {
            "type": "string",
            "format": "uuid"
          },
          "clinicianName": {
            "type": "string"
          },
          "entries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "duration": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": "string"
          }
        }
      },
      "CloseCaseRequest": {
        "required": [
          "feedbackGiven",
          "reportReleasedOrNotRequired",
          "outstandingInvoicesSettledOrWaived",
          "riskConcernsClosedOrHandedOver",
          "followUpAgreed",
          "followUpRecord"
        ],
        "type": "object",
        "properties": {
          "feedbackGiven": {
            "type": "boolean"
          },
          "reportReleasedOrNotRequired": {
            "type": "boolean"
          },
          "outstandingInvoicesSettledOrWaived": {
            "type": "boolean"
          },
          "riskConcernsClosedOrHandedOver": {
            "type": "boolean"
          },
          "followUpAgreed": {
            "type": "boolean"
          },
          "followUpRecord": {
            "type": "string"
          }
        }
      },
      "CloseGovernanceRequest": {
        "required": [
          "outcome"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          }
        }
      },
      "CloseRiskFlagRequest": {
        "required": [
          "outcome"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          }
        }
      },
      "CommunicationPreferences": {
        "required": [
          "preferredMethod",
          "preferredContactTime",
          "safeContactNote",
          "wantsAppointmentReminders",
          "wantsServiceUpdates"
        ],
        "type": "object",
        "properties": {
          "preferredMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "preferredContactTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "safeContactNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "wantsAppointmentReminders": {
            "type": "boolean"
          },
          "wantsServiceUpdates": {
            "type": "boolean"
          }
        }
      },
      "CommunicationPreferencesRequest": {
        "required": [
          "preferredMethod",
          "preferredContactTime",
          "safeContactNote",
          "wantsAppointmentReminders",
          "wantsServiceUpdates"
        ],
        "type": "object",
        "properties": {
          "preferredMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "preferredContactTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "safeContactNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "wantsAppointmentReminders": {
            "type": "boolean"
          },
          "wantsServiceUpdates": {
            "type": "boolean"
          }
        }
      },
      "CompleteAssessmentRecordRequest": {
        "required": [
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "confirmed": {
            "type": "boolean"
          }
        }
      },
      "CompletedStage": {
        "required": [
          "heading",
          "completedOn"
        ],
        "type": "object",
        "properties": {
          "heading": {
            "type": "string"
          },
          "completedOn": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ComponentAllocation": {
        "required": [
          "component",
          "role"
        ],
        "type": "object",
        "properties": {
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "role": {
            "$ref": "#/components/schemas/AssignmentRole"
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ComponentRequest": {
        "required": [
          "requiredQualification"
        ],
        "type": "object",
        "properties": {
          "requiredQualification": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ComponentStatus": {
        "enum": [
          "NotStarted",
          "Scheduled",
          "InProgress",
          "Completed"
        ]
      },
      "ComponentView": {
        "required": [
          "component",
          "name",
          "pathways",
          "requiredQualification"
        ],
        "type": "object",
        "properties": {
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "name": {
            "type": "string"
          },
          "pathways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PathwayType"
            }
          },
          "requiredQualification": {
            "type": [
              "null",
              "string"
            ]
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "ConfirmEmailChangeRequest": {
        "required": [
          "newEmail",
          "token"
        ],
        "type": "object",
        "properties": {
          "newEmail": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "ConfirmEnrolmentRequest": {
        "required": [
          "ticket",
          "code"
        ],
        "type": "object",
        "properties": {
          "ticket": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": "string"
          }
        }
      },
      "ConsentMethod": {
        "enum": [
          "OnlineForm",
          "Written",
          "Verbal",
          "ProfessionalReferral"
        ]
      },
      "ConsentPurpose": {
        "enum": [
          "Assessment",
          "InformationRequest",
          "ReportSharing",
          "Recording",
          "ServiceEvaluation"
        ]
      },
      "ConsentRequest": {
        "required": [
          "consentGiven",
          "consentTemplateVersion"
        ],
        "type": "object",
        "properties": {
          "consentGiven": {
            "type": "boolean"
          },
          "consentTemplateVersion": {
            "type": "string"
          }
        }
      },
      "ConsentRequestStatus": {
        "enum": [
          "Pending",
          "Given",
          "Declined",
          "Withdrawn"
        ]
      },
      "ConsentRequestView": {
        "required": [
          "id",
          "patientId",
          "title",
          "wording",
          "purpose",
          "templateVersion",
          "status",
          "requestedAt",
          "dueBy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "wording": {
            "type": "string"
          },
          "purpose": {
            "$ref": "#/components/schemas/ConsentPurpose"
          },
          "templateVersion": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConsentRequestStatus"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "canAnswer": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ConsentStatusResponse": {
        "required": [
          "consented"
        ],
        "type": "object",
        "properties": {
          "consented": {
            "type": "boolean"
          }
        }
      },
      "ConsentSummary": {
        "required": [
          "providedBy",
          "relationship",
          "givenAt",
          "inForce"
        ],
        "type": "object",
        "properties": {
          "providedBy": {
            "type": "string"
          },
          "relationship": {
            "type": [
              "null",
              "string"
            ]
          },
          "givenAt": {
            "type": "string",
            "format": "date-time"
          },
          "inForce": {
            "type": "boolean"
          }
        }
      },
      "ConsentTemplate": {
        "required": [
          "templateId",
          "version",
          "purpose",
          "title",
          "wording"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "purpose": {
            "$ref": "#/components/schemas/ConsentPurpose"
          },
          "title": {
            "type": "string"
          },
          "wording": {
            "type": "string"
          }
        }
      },
      "ConsentView": {
        "required": [
          "id",
          "purpose",
          "templateId",
          "templateVersion",
          "signedByName",
          "signedByRelationship",
          "signedAt",
          "withdrawnAt",
          "isInForce"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/ConsentPurpose"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "signedByName": {
            "type": "string"
          },
          "signedByRelationship": {
            "type": "string"
          },
          "signedAt": {
            "type": "string",
            "format": "date-time"
          },
          "withdrawnAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isInForce": {
            "type": "boolean"
          }
        }
      },
      "ContactDetailsRequest": {
        "required": [
          "firstName",
          "lastName",
          "email",
          "telephone",
          "preferredContactMethod",
          "preferredContactTime",
          "safeContactNote"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "telephone": {
            "type": [
              "null",
              "string"
            ]
          },
          "preferredContactMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "preferredContactTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "safeContactNote": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContactMethod": {
        "enum": [
          "Email",
          "PhoneCall",
          "TextMessage"
        ]
      },
      "ContactView": {
        "required": [
          "name",
          "email",
          "telephone",
          "preferredMethod",
          "preferredTime",
          "safeContactNote"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "telephone": {
            "type": [
              "null",
              "string"
            ]
          },
          "preferredMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "preferredTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "safeContactNote": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ContentState": {
        "required": [
          "isPublished",
          "hasUnpublishedChanges",
          "publishedAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "isPublished": {
            "type": "boolean"
          },
          "hasUnpublishedChanges": {
            "type": "boolean"
          },
          "publishedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContentType": {
        "enum": [
          "Page",
          "Faq",
          "Article",
          "TeamMember",
          "Service"
        ]
      },
      "ConveneMeetingRequest": {
        "required": [
          "caseId",
          "heldAt",
          "participants"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "heldAt": {
            "type": "string",
            "format": "date-time"
          },
          "participants": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "CreatePaymentPlanRequest": {
        "required": [
          "patientId",
          "caseId",
          "title",
          "payerName",
          "payerEmail",
          "totalPounds",
          "instalmentCount",
          "firstDueOn"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "payerName": {
            "type": "string"
          },
          "payerEmail": {
            "type": "string"
          },
          "totalPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "instalmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "firstDueOn": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "CreateTeamKeyRequest": {
        "required": [
          "publicKey",
          "sealedPrivateKey"
        ],
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string"
          },
          "sealedPrivateKey": {
            "type": "string"
          }
        }
      },
      "CreateUserRequest": {
        "required": [
          "email",
          "fullName",
          "roles"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateUserResponse": {
        "required": [
          "userId",
          "invitationExpiresAt"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "invitationExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CredentialCell": {
        "required": [
          "kind",
          "state",
          "daysRemaining",
          "hasEvidence"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/CredentialKind"
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CredentialState"
              }
            ]
          },
          "daysRemaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasEvidence": {
            "type": "boolean"
          }
        }
      },
      "CredentialEvidence": {
        "required": [
          "fileName",
          "sizeBytes",
          "uploadedAt"
        ],
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CredentialKind": {
        "enum": [
          "ProfessionalRegistration",
          "DisclosureAndBarring",
          "Indemnity",
          "Training",
          "ReliabilityEvidence"
        ]
      },
      "CredentialState": {
        "enum": [
          "Valid",
          "ExpiringSoon",
          "Expired",
          null
        ]
      },
      "CredentialStatus": {
        "required": [
          "kind",
          "body",
          "reference",
          "issuedOn",
          "expiresOn",
          "daysRemaining",
          "state",
          "isCurrent",
          "blocksNewWork",
          "evidence"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/CredentialKind"
          },
          "body": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RegulatoryBody"
              }
            ]
          },
          "reference": {
            "type": "string"
          },
          "issuedOn": {
            "type": "string",
            "format": "date"
          },
          "expiresOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "daysRemaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "state": {
            "$ref": "#/components/schemas/CredentialState"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "blocksNewWork": {
            "type": "boolean"
          },
          "evidence": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CredentialEvidence"
              }
            ]
          }
        }
      },
      "CsvExportResponse": {
        "required": [
          "fileName",
          "contentType",
          "content"
        ],
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "CustomAppointmentTypeRequest": {
        "required": [
          "name",
          "defaultDurationMinutes",
          "mode",
          "deliveredBy"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "defaultDurationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mode": {
            "$ref": "#/components/schemas/AppointmentMode"
          },
          "deliveredBy": {
            "$ref": "#/components/schemas/DeliveredBy"
          },
          "isActive": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "CustomComponentRequest": {
        "required": [
          "name",
          "requiredQualification"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "requiredQualification": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathways": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PathwayType"
            }
          },
          "isActive": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "DashboardAlerts": {
        "required": [
          "missingConsent",
          "reportsDueThisWeek",
          "mdtReviewsPending"
        ],
        "type": "object",
        "properties": {
          "missingConsent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reportsDueThisWeek": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "mdtReviewsPending": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DayOfWeek": {
        "enum": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday"
        ]
      },
      "DeadlineState": {
        "enum": [
          "None",
          "OnTrack",
          "DueSoon",
          "Overdue"
        ]
      },
      "DeclineChangeRequest": {
        "required": [
          "note"
        ],
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "DeclineLinkRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "DeliveredBy": {
        "enum": [
          "ApprovedClinician",
          "MdtPanel",
          "QaReviewer"
        ]
      },
      "DocumentDownloadResponse": {
        "required": [
          "fileName",
          "contentType",
          "token",
          "signature",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DocumentKind": {
        "enum": [
          "Correspondence",
          "SubmittedEvidence",
          "ClinicalWorking",
          "Consent",
          "Report",
          "Invoice"
        ]
      },
      "DocumentView": {
        "required": [
          "id",
          "kind",
          "title",
          "fileName",
          "sizeBytes",
          "uploadedAt",
          "isReleasedToPatient",
          "releasedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/DocumentKind"
          },
          "title": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isReleasedToPatient": {
            "type": "boolean"
          },
          "releasedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "DraftFileResponse": {
        "required": [
          "fileId",
          "fileName",
          "sizeBytes",
          "uploadedAt"
        ],
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DraftInvoiceRequest": {
        "required": [
          "patientId",
          "caseId",
          "payerName",
          "payerEmail"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "payerName": {
            "type": "string"
          },
          "payerEmail": {
            "type": "string"
          },
          "fundingRoute": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FundingRoute"
              }
            ]
          }
        }
      },
      "DraftReceiptResponse": {
        "required": [
          "draftId",
          "draftToken",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "draftId": {
            "type": "string",
            "format": "uuid"
          },
          "draftToken": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DraftSnapshotResponse": {
        "required": [
          "draftId",
          "payload",
          "files",
          "lastSavedAt",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "draftId": {
            "type": "string",
            "format": "uuid"
          },
          "payload": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DraftFileResponse"
            }
          },
          "lastSavedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EditorArticle": {
        "required": [
          "id",
          "slug",
          "title",
          "summary",
          "body",
          "isClinical",
          "authorName",
          "reviewerName",
          "reviewerRegistration",
          "reviewedOn",
          "nextReviewDue",
          "category",
          "downloadId",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "isClinical": {
            "type": "boolean"
          },
          "authorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerRegistration": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "nextReviewDue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "downloadId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/ContentState"
          }
        }
      },
      "EditorFaq": {
        "required": [
          "id",
          "slug",
          "title",
          "body",
          "category",
          "order",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "state": {
            "$ref": "#/components/schemas/ContentState"
          }
        }
      },
      "EditorPage": {
        "required": [
          "id",
          "slug",
          "title",
          "body",
          "metaTitle",
          "metaDescription",
          "blocks",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "metaTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "metaDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlockDraft"
            }
          },
          "state": {
            "$ref": "#/components/schemas/ContentState"
          }
        }
      },
      "EditorPrice": {
        "required": [
          "id",
          "serviceName",
          "pathwayCode",
          "amountGbp",
          "priceNote",
          "includes",
          "excludes",
          "depositTerms",
          "cancellationTerms",
          "effectiveFrom",
          "effectiveTo",
          "instalmentMonthlyGbp",
          "instalmentMonths",
          "instalmentInterestPercent",
          "order",
          "inForce"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "serviceName": {
            "type": "string"
          },
          "pathwayCode": {
            "type": "string"
          },
          "amountGbp": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "priceNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "includes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludes": {
            "type": [
              "null",
              "string"
            ]
          },
          "depositTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancellationTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "effectiveTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "instalmentMonthlyGbp": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "instalmentMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "instalmentInterestPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inForce": {
            "type": "boolean"
          }
        }
      },
      "EditorService": {
        "required": [
          "id",
          "slug",
          "title",
          "shortDescription",
          "body",
          "pathwayCode",
          "ageRange",
          "order",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "shortDescription": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathwayCode": {
            "type": "string"
          },
          "ageRange": {
            "type": [
              "null",
              "string"
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "state": {
            "$ref": "#/components/schemas/ContentState"
          }
        }
      },
      "EditorTeamMember": {
        "required": [
          "id",
          "slug",
          "fullName",
          "role",
          "biography",
          "professionalRegistration",
          "qualifications",
          "worksWith",
          "photoId",
          "photoUrl",
          "publicationConsentGiven",
          "group",
          "isFeatured",
          "order",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "biography": {
            "type": "string"
          },
          "professionalRegistration": {
            "type": [
              "null",
              "string"
            ]
          },
          "qualifications": {
            "type": [
              "null",
              "string"
            ]
          },
          "worksWith": {
            "type": [
              "null",
              "string"
            ]
          },
          "photoId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "photoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "publicationConsentGiven": {
            "type": "boolean"
          },
          "group": {
            "$ref": "#/components/schemas/TeamGroup"
          },
          "isFeatured": {
            "type": "boolean"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "state": {
            "$ref": "#/components/schemas/ContentState"
          }
        }
      },
      "EmailChangeRequest": {
        "required": [
          "newEmail"
        ],
        "type": "object",
        "properties": {
          "newEmail": {
            "type": "string"
          }
        }
      },
      "EnquiryContactRequest": {
        "required": [
          "firstName",
          "lastName",
          "email",
          "telephone",
          "preferredContactMethod",
          "preferredContactTime",
          "contactConsentGiven"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "telephone": {
            "type": [
              "null",
              "string"
            ]
          },
          "preferredContactMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "preferredContactTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactConsentGiven": {
            "type": "boolean"
          }
        }
      },
      "EnquiryDetail": {
        "required": [
          "id",
          "reference",
          "kind",
          "name",
          "email",
          "telephone",
          "preferredContactMethod",
          "preferredContactTime",
          "safeContactNote",
          "message",
          "areaOfInterest",
          "suitabilityFor",
          "subjectAge",
          "organisation",
          "audience",
          "requestedTraining",
          "approximateAttendees",
          "locationPreference",
          "preferredTimeframe",
          "receivedAt",
          "respondedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/EnquiryKind"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "telephone": {
            "type": [
              "null",
              "string"
            ]
          },
          "preferredContactMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "preferredContactTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "safeContactNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          },
          "areaOfInterest": {
            "type": [
              "null",
              "string"
            ]
          },
          "suitabilityFor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SuitabilitySubject"
              }
            ]
          },
          "subjectAge": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "organisation": {
            "type": [
              "null",
              "string"
            ]
          },
          "audience": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedTraining": {
            "type": [
              "null",
              "string"
            ]
          },
          "approximateAttendees": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "locationPreference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LocationPreference"
              }
            ]
          },
          "preferredTimeframe": {
            "type": [
              "null",
              "string"
            ]
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "respondedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "EnquiryKind": {
        "enum": [
          "General",
          "CallBack",
          "Training",
          "Suitability"
        ]
      },
      "EnquiryReceiptResponse": {
        "required": [
          "enquiryId",
          "reference",
          "receivedAt"
        ],
        "type": "object",
        "properties": {
          "enquiryId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnquirySummary": {
        "required": [
          "id",
          "reference",
          "kind",
          "name",
          "preferredContactMethod",
          "receivedAt",
          "respondedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/EnquiryKind"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "preferredContactMethod": {
            "$ref": "#/components/schemas/ContactMethod"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "respondedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "EnrolmentRequest": {
        "required": [
          "ticket"
        ],
        "type": "object",
        "properties": {
          "ticket": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EscalateRiskFlagRequest": {
        "required": [
          "role",
          "reason"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "ExpiringCredential": {
        "required": [
          "profileId",
          "userId",
          "clinicianName",
          "kind",
          "expiresOn",
          "daysRemaining",
          "blocksNewWork"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "clinicianName": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/CredentialKind"
          },
          "expiresOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "daysRemaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "blocksNewWork": {
            "type": "boolean"
          }
        }
      },
      "ExtendSubjectRequestRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "FaqDraft": {
        "required": [
          "id",
          "slug",
          "title",
          "body",
          "category",
          "order"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "FieldType": {
        "enum": [
          "ShortText",
          "LongText",
          "DateTime",
          "SingleChoice",
          "MultiChoice",
          "YesNotYet"
        ]
      },
      "FinanceInvoiceItem": {
        "required": [
          "invoiceId",
          "reference",
          "billedTo",
          "amountPounds",
          "balancePounds",
          "route",
          "status",
          "issuedAt",
          "dueOn",
          "isOverdue"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "billedTo": {
            "type": "string"
          },
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "balancePounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "route": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FundingRoute"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "isOverdue": {
            "type": "boolean"
          }
        }
      },
      "FinanceSummary": {
        "required": [
          "from",
          "to",
          "outstandingPounds",
          "outstandingInvoices",
          "collectedPounds",
          "refundedPounds",
          "timesheetsAwaitingDecision"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "outstandingPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "outstandingInvoices": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "collectedPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "refundedPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "timesheetsAwaitingDecision": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "FinanceTimesheetItem": {
        "required": [
          "timesheetId",
          "clinician",
          "periodStart",
          "periodEnd",
          "hours",
          "lines",
          "status",
          "submittedAt"
        ],
        "type": "object",
        "properties": {
          "timesheetId": {
            "type": "string",
            "format": "uuid"
          },
          "clinician": {
            "type": "string"
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "hours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lines": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/TimesheetStatus"
          },
          "submittedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "FollowUpRequest": {
        "required": [
          "followUpOn"
        ],
        "type": "object",
        "properties": {
          "followUpOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "FormField": {
        "required": [
          "key",
          "label",
          "type"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/FieldType"
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "options": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "placeholder": {
            "type": [
              "null",
              "string"
            ]
          },
          "maximumLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "FormFilter": {
        "enum": [
          "All",
          "ToDo",
          "InProgress",
          "Completed"
        ]
      },
      "FormKind": {
        "enum": [
          "Questionnaire",
          "Consent"
        ]
      },
      "FormSection": {
        "required": [
          "key",
          "title",
          "fields"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FormField"
            }
          }
        }
      },
      "FormStatus": {
        "enum": [
          "ToDo",
          "InProgress",
          "Completed",
          "AwaitingOthers",
          "Declined",
          "Withdrawn"
        ]
      },
      "FulfilSubjectRequestRequest": {
        "required": [
          "outcome",
          "exemptionRelied"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          },
          "exemptionRelied": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FundingRoute": {
        "enum": [
          "SelfFunded",
          "Employer",
          "Insurer",
          "LocalAuthority",
          "School",
          "OtherOrganisation",
          null
        ]
      },
      "GeneralEnquiryRequest": {
        "required": [
          "contact",
          "areaOfInterest",
          "message",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/EnquiryContactRequest"
          },
          "areaOfInterest": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GovernanceActionView": {
        "required": [
          "id",
          "description",
          "at"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GovernanceEntryView": {
        "required": [
          "id",
          "reference",
          "kind",
          "severity",
          "status",
          "summary",
          "ownerRole",
          "raisedAt",
          "responseDueBy",
          "outcome",
          "closedAt",
          "actions"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/GovernanceKind"
          },
          "severity": {
            "$ref": "#/components/schemas/GovernanceSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/GovernanceStatus"
          },
          "summary": {
            "type": "string"
          },
          "ownerRole": {
            "type": "string"
          },
          "raisedAt": {
            "type": "string",
            "format": "date-time"
          },
          "responseDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "outcome": {
            "type": [
              "null",
              "string"
            ]
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GovernanceActionView"
            }
          }
        }
      },
      "GovernanceKind": {
        "enum": [
          "Complaint",
          "Incident"
        ]
      },
      "GovernanceSeverity": {
        "enum": [
          "Low",
          "Moderate",
          "High",
          "Reportable"
        ]
      },
      "GovernanceStatus": {
        "enum": [
          "Open",
          "UnderInvestigation",
          "Closed"
        ]
      },
      "GovernanceSummary": {
        "required": [
          "id",
          "reference",
          "kind",
          "severity",
          "status",
          "summary",
          "ownerRole",
          "raisedAt",
          "responseDueBy",
          "isOverdue",
          "actions"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/GovernanceKind"
          },
          "severity": {
            "$ref": "#/components/schemas/GovernanceSeverity"
          },
          "status": {
            "$ref": "#/components/schemas/GovernanceStatus"
          },
          "summary": {
            "type": "string"
          },
          "ownerRole": {
            "type": "string"
          },
          "raisedAt": {
            "type": "string",
            "format": "date-time"
          },
          "responseDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isOverdue": {
            "type": "boolean"
          },
          "actions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "caseReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathway": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PathwayType"
              }
            ]
          }
        }
      },
      "GrantAccessRequest": {
        "required": [
          "userId",
          "basis",
          "permissions",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "basis": {
            "$ref": "#/components/schemas/AccessBasis"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "GrantTeamKeyRequest": {
        "required": [
          "userId",
          "sealedPrivateKey"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "sealedPrivateKey": {
            "type": "string"
          }
        }
      },
      "IdResponse": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "InboxThread": {
        "required": [
          "threadId",
          "patientId",
          "patientName",
          "familyMemberName",
          "subject",
          "key",
          "lastMessageAt",
          "unread",
          "isClosed",
          "awaitingReply",
          "replyDueBy",
          "lastFrom"
        ],
        "type": "object",
        "properties": {
          "threadId": {
            "type": "string",
            "format": "uuid"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "patientName": {
            "type": "string"
          },
          "familyMemberName": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "unread": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isClosed": {
            "type": "boolean"
          },
          "awaitingReply": {
            "type": "boolean"
          },
          "replyDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastFrom": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "InstalmentOption": {
        "required": [
          "monthlyGbp",
          "months",
          "interestPercent"
        ],
        "type": "object",
        "properties": {
          "monthlyGbp": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "months": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "interestPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "InvitationResponse": {
        "required": [
          "email",
          "expiresAt",
          "state"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "$ref": "#/components/schemas/InvitationState"
          }
        }
      },
      "InvitationState": {
        "enum": [
          "Valid",
          "Expired"
        ]
      },
      "InvitationTokenRequest": {
        "required": [
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "InvitePortalUserRequest": {
        "required": [
          "fullName",
          "email",
          "relationship",
          "basis",
          "permissions",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "relationship": {
            "$ref": "#/components/schemas/PortalRelationship"
          },
          "basis": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccessBasis"
              }
            ]
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "InvoiceLineView": {
        "required": [
          "lineId",
          "description",
          "kind",
          "unitAmountPounds",
          "quantity",
          "amountPounds"
        ],
        "type": "object",
        "properties": {
          "lineId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ChargeKind"
          },
          "unitAmountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "InvoiceStatus": {
        "enum": [
          "Draft",
          "Issued",
          "PartiallyPaid",
          "Paid",
          "Void"
        ]
      },
      "InvoiceSummary": {
        "required": [
          "invoiceId",
          "reference",
          "status",
          "totalPounds",
          "balancePounds",
          "issuedAt",
          "dueOn"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "totalPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "balancePounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "InvoiceView": {
        "required": [
          "invoiceId",
          "reference",
          "status",
          "payerName",
          "totalPounds",
          "settledPounds",
          "refundedPounds",
          "balancePounds",
          "issuedAt",
          "dueOn",
          "lines"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "payerName": {
            "type": "string"
          },
          "totalPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "settledPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "refundedPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "balancePounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineView"
            }
          },
          "statusLabel": {
            "type": "string",
            "default": ""
          }
        }
      },
      "InvoicingReport": {
        "required": [
          "from",
          "to",
          "invoiced",
          "invoicedPounds",
          "settledPounds",
          "refundedPounds",
          "outstandingPounds",
          "byStatus",
          "byChargeKind"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "invoiced": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "invoicedPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "settledPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "refundedPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "outstandingPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "byStatus": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "byChargeKind": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          }
        }
      },
      "IssueInvoiceRequest": {
        "required": [
          "dueOn"
        ],
        "type": "object",
        "properties": {
          "dueOn": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "JoinLinkResponse": {
        "required": [
          "joinUrl"
        ],
        "type": "object",
        "properties": {
          "joinUrl": {
            "type": "string"
          }
        }
      },
      "JsonElement": { },
      "Kpi": {
        "required": [
          "count",
          "flagged"
        ],
        "type": "object",
        "properties": {
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "flagged": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "LabelledValue": {
        "required": [
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "LeaveView": {
        "required": [
          "id",
          "from",
          "to",
          "note"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "LinkChildRequest": {
        "required": [
          "patientId",
          "permissions"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          }
        }
      },
      "LinkedPatient": {
        "required": [
          "patientId",
          "displayName",
          "isSelf",
          "permissions"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "isSelf": {
            "type": "boolean"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          }
        }
      },
      "LinkedProfessional": {
        "required": [
          "organisation",
          "role",
          "linkedOn"
        ],
        "type": "object",
        "properties": {
          "organisation": {
            "type": "string"
          },
          "role": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkedOn": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LinkLoginRequest": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "LocationPreference": {
        "enum": [
          "Remote",
          "InPerson",
          "EitherIsFine",
          null
        ]
      },
      "MdtContributionRequest": {
        "required": [
          "findings",
          "additionalConsiderations"
        ],
        "type": "object",
        "properties": {
          "findings": {
            "type": [
              "null",
              "string"
            ]
          },
          "additionalConsiderations": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MdtContributionView": {
        "required": [
          "name",
          "role",
          "findings",
          "additionalConsiderations",
          "submittedAt"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "findings": {
            "type": "string"
          },
          "additionalConsiderations": {
            "type": [
              "null",
              "string"
            ]
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MdtDecisionRequest": {
        "required": [
          "outcome",
          "rationale",
          "recommendations"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/MdtOutcome"
          },
          "rationale": {
            "type": "string"
          },
          "recommendations": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MdtDecisionView": {
        "required": [
          "outcome",
          "rationale",
          "recommendations"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/MdtOutcome"
          },
          "rationale": {
            "type": "string"
          },
          "recommendations": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MdtDetail": {
        "required": [
          "meetingId",
          "caseId",
          "caseReference",
          "patientName",
          "pathway",
          "heldAt",
          "myRole",
          "myStatus",
          "myContribution",
          "participants",
          "contributions",
          "evidence",
          "decision",
          "isConcluded"
        ],
        "type": "object",
        "properties": {
          "meetingId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "heldAt": {
            "type": "string",
            "format": "date-time"
          },
          "myRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "myStatus": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MdtStatus"
              }
            ]
          },
          "myContribution": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MyContribution"
              }
            ]
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MdtParticipantView"
            }
          },
          "contributions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MdtContributionView"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MdtEvidence"
            }
          },
          "decision": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MdtDecisionView"
              }
            ]
          },
          "isConcluded": {
            "type": "boolean"
          }
        }
      },
      "MdtEvidence": {
        "required": [
          "recordId",
          "component",
          "name",
          "authorName",
          "completedAt"
        ],
        "type": "object",
        "properties": {
          "recordId": {
            "type": "string",
            "format": "uuid"
          },
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "name": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "MdtListItem": {
        "required": [
          "meetingId",
          "caseId",
          "caseReference",
          "patientName",
          "pathway",
          "heldAt",
          "myRole",
          "status",
          "contributionsIn",
          "participantCount"
        ],
        "type": "object",
        "properties": {
          "meetingId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "heldAt": {
            "type": "string",
            "format": "date-time"
          },
          "myRole": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/MdtStatus"
          },
          "contributionsIn": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "participantCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "MdtMeetingView": {
        "required": [
          "id",
          "heldAt",
          "outcome",
          "rationale",
          "recommendations",
          "participantCount",
          "signatureCount",
          "isConcluded"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "heldAt": {
            "type": "string",
            "format": "date-time"
          },
          "outcome": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MdtOutcome"
              }
            ]
          },
          "rationale": {
            "type": [
              "null",
              "string"
            ]
          },
          "recommendations": {
            "type": [
              "null",
              "string"
            ]
          },
          "participantCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "signatureCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isConcluded": {
            "type": "boolean"
          }
        }
      },
      "MdtOutcome": {
        "enum": [
          "CriteriaMet",
          "CriteriaNotMet",
          "Inconclusive",
          "FurtherAssessmentNeeded",
          "ReferredOnward"
        ]
      },
      "MdtParticipantView": {
        "required": [
          "name",
          "role",
          "hasContributed",
          "hasSigned",
          "isMe"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "hasContributed": {
            "type": "boolean"
          },
          "hasSigned": {
            "type": "boolean"
          },
          "isMe": {
            "type": "boolean"
          }
        }
      },
      "MdtQaPipeline": {
        "required": [
          "mdtAwaitingInput",
          "reportsAwaitingReview",
          "reportsAwaitingQa",
          "readyForRelease",
          "items"
        ],
        "type": "object",
        "properties": {
          "mdtAwaitingInput": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reportsAwaitingReview": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "reportsAwaitingQa": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "readyForRelease": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PipelineItem"
            }
          }
        }
      },
      "MdtRequestView": {
        "required": [
          "id",
          "caseId",
          "caseReference",
          "patientName",
          "requestedBy",
          "reason",
          "requestedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MdtReviewRequestBody": {
        "required": [
          "caseId",
          "reason"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "MdtStatus": {
        "enum": [
          "Upcoming",
          "InputRequired",
          "Pending",
          "SignatureRequired",
          "Concluded"
        ]
      },
      "MediaSummary": {
        "required": [
          "id",
          "fileName",
          "contentType",
          "sizeBytes",
          "altText",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "altText": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "MessagePreview": {
        "required": [
          "threadId",
          "from",
          "sentAt",
          "unread"
        ],
        "type": "object",
        "properties": {
          "threadId": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "type": "string"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "unread": {
            "type": "boolean"
          }
        }
      },
      "MessageRecipient": {
        "required": [
          "userId",
          "name",
          "publicKey"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "publicKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MonthTimesheet": {
        "required": [
          "year",
          "month",
          "timesheetId",
          "status",
          "decisionNote",
          "totals",
          "lines",
          "claimable"
        ],
        "type": "object",
        "properties": {
          "year": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "month": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "timesheetId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TimesheetStatus"
              }
            ]
          },
          "decisionNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "totals": {
            "$ref": "#/components/schemas/TimesheetTotals"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimesheetLine"
            }
          },
          "claimable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClaimableWork"
            }
          }
        }
      },
      "MoveStageRequest": {
        "required": [
          "stage",
          "reason"
        ],
        "type": "object",
        "properties": {
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MultiFactorEnrolmentResponse": {
        "required": [
          "sharedKey",
          "authenticatorUri"
        ],
        "type": "object",
        "properties": {
          "sharedKey": {
            "type": "string"
          },
          "authenticatorUri": {
            "type": "string"
          }
        }
      },
      "MultiFactorRequest": {
        "required": [
          "ticket",
          "code"
        ],
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "MyContribution": {
        "required": [
          "findings",
          "additionalConsiderations",
          "savedAt",
          "submittedAt"
        ],
        "type": "object",
        "properties": {
          "findings": {
            "type": [
              "null",
              "string"
            ]
          },
          "additionalConsiderations": {
            "type": [
              "null",
              "string"
            ]
          },
          "savedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "submittedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "MyMessagingKey": {
        "required": [
          "publicKey",
          "lockedPrivateKey"
        ],
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string"
          },
          "lockedPrivateKey": {
            "type": "string"
          }
        }
      },
      "NotificationFeed": {
        "required": [
          "unreadCount",
          "items"
        ],
        "type": "object",
        "properties": {
          "unreadCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationItem"
            }
          }
        }
      },
      "NotificationItem": {
        "required": [
          "id",
          "kind",
          "title",
          "body",
          "patientId",
          "linkType",
          "linkId",
          "createdAt",
          "isRead"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/NotificationKind"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "patientId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "linkType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotificationLinkType"
              }
            ]
          },
          "linkId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isRead": {
            "type": "boolean"
          }
        }
      },
      "NotificationKind": {
        "enum": [
          "AppointmentConfirmed",
          "AppointmentRescheduled",
          "AppointmentCancelled",
          "AppointmentReminder",
          "ChangeRequestAnswered",
          "QuestionnaireAvailable",
          "QuestionnaireReminder",
          "DocumentAvailable",
          "DocumentReceived",
          "ReportReady",
          "NewMessage",
          "InvoiceIssued",
          "PaymentReceived",
          "ConsentRequested",
          "CaseAssigned",
          "TaskDueToday",
          "ReportAwaitingReview",
          "ReportChangesRequested",
          "MdtInputRequired",
          "CredentialExpiring",
          "SafeguardingEscalation",
          "MdtReviewRequested"
        ]
      },
      "NotificationLinkType": {
        "enum": [
          "Appointment",
          "Questionnaire",
          "Document",
          "MessageThread",
          "Invoice",
          "ConsentRequest",
          "Case",
          "Report",
          "MdtMeeting",
          "Credential",
          "RiskFlag",
          null
        ]
      },
      "OperationsDashboard": {
        "required": [
          "newReferrals",
          "awaitingTriage",
          "unallocatedCases",
          "reportsAwaitingQa",
          "averageWait",
          "capacity"
        ],
        "type": "object",
        "properties": {
          "newReferrals": {
            "$ref": "#/components/schemas/Kpi"
          },
          "awaitingTriage": {
            "$ref": "#/components/schemas/Kpi"
          },
          "unallocatedCases": {
            "$ref": "#/components/schemas/Kpi"
          },
          "reportsAwaitingQa": {
            "$ref": "#/components/schemas/Kpi"
          },
          "averageWait": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeeklyWait"
            }
          },
          "capacity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamCapacity"
            }
          }
        }
      },
      "OutstandingInvoice": {
        "required": [
          "invoiceId",
          "reference",
          "balancePounds",
          "dueOn",
          "daysOverdue"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "balancePounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "daysOverdue": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "OutstandingReport": {
        "required": [
          "count",
          "totalPounds",
          "overdueCount",
          "overduePounds",
          "invoices"
        ],
        "type": "object",
        "properties": {
          "count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "overdueCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "overduePounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutstandingInvoice"
            }
          }
        }
      },
      "PageDraft": {
        "required": [
          "id",
          "slug",
          "title",
          "body",
          "metaTitle",
          "metaDescription"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "metaTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "metaDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "blocks": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BlockDraft"
            }
          }
        }
      },
      "PageOfAdminPatientItem": {
        "required": [
          "items",
          "total",
          "pageNumber",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminPatientItem"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PageOfAdminReferralItem": {
        "required": [
          "items",
          "total",
          "pageNumber",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminReferralItem"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PageOfFinanceInvoiceItem": {
        "required": [
          "items",
          "total",
          "pageNumber",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FinanceInvoiceItem"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PageOfWorkQueueItem": {
        "required": [
          "items",
          "total",
          "pageNumber",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkQueueItem"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PasswordPolicyResponse": {
        "required": [
          "minimumLength",
          "requiresUppercase",
          "requiresLowercase",
          "requiresDigit",
          "requiresSymbol"
        ],
        "type": "object",
        "properties": {
          "minimumLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requiresUppercase": {
            "type": "boolean"
          },
          "requiresLowercase": {
            "type": "boolean"
          },
          "requiresDigit": {
            "type": "boolean"
          },
          "requiresSymbol": {
            "type": "boolean"
          }
        }
      },
      "PasswordResetConfirmation": {
        "required": [
          "email",
          "resetToken",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "resetToken": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        }
      },
      "PasswordResetRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "PathwayCompletionReport": {
        "required": [
          "from",
          "to",
          "opened",
          "closed",
          "medianDaysToClose",
          "closedByPathway"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "opened": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "closed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "medianDaysToClose": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "closedByPathway": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "PathwayComponent": {
        "enum": [
          "ReferralReview",
          "DevelopmentalHistory",
          "ObservationalAssessment",
          "ClinicalInterview",
          "InformantQuestionnaires",
          "MultidisciplinaryReview",
          "Feedback",
          "ReportAuthoring",
          "Additional"
        ]
      },
      "PathwayStageName": {
        "enum": [
          "Referral",
          "SuitabilityAndConsent",
          "FormsAndEvidence",
          "Appointments",
          "ClinicalIntegration",
          "Feedback",
          "Report",
          "FollowUp",
          "Closed"
        ]
      },
      "PathwayType": {
        "enum": [
          "Autism",
          "Adhd",
          "Combined"
        ]
      },
      "PatientMatch": {
        "required": [
          "patientId",
          "name",
          "dateOfBirth"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "PaymentPlanSummary": {
        "required": [
          "planId",
          "title",
          "totalPounds",
          "collectedPounds",
          "instalmentsPaid",
          "instalmentCount",
          "nextPaymentPounds",
          "nextPaymentDueOn"
        ],
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "totalPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "collectedPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "instalmentsPaid": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "instalmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "nextPaymentPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "nextPaymentDueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "PaymentReceipt": {
        "required": [
          "invoiceId",
          "invoiceReference",
          "paymentReference",
          "description",
          "payerName",
          "amountPaidPounds",
          "paidAt"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "invoiceReference": {
            "type": "string"
          },
          "paymentReference": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "payerName": {
            "type": "string"
          },
          "amountPaidPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PaymentRow": {
        "required": [
          "invoiceId",
          "reference",
          "description",
          "amountPounds",
          "balancePounds",
          "status",
          "dueOn",
          "canPay"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "balancePounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "status": {
            "type": "string"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "canPay": {
            "type": "boolean"
          }
        }
      },
      "PaymentsOverview": {
        "required": [
          "plans",
          "history"
        ],
        "type": "object",
        "properties": {
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentPlanSummary"
            }
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRow"
            }
          }
        }
      },
      "PendingChange": {
        "required": [
          "requestId",
          "kind",
          "requestedAt",
          "message"
        ],
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/ChangeRequestKind"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "PersonDetailsRequest": {
        "required": [
          "firstName",
          "lastName",
          "dateOfBirth"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "PipelineItem": {
        "required": [
          "caseId",
          "caseReference",
          "patientName",
          "pathway",
          "stage",
          "inStageSince",
          "daysInStage",
          "subjectId",
          "action"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "stage": {
            "$ref": "#/components/schemas/PipelineStage"
          },
          "inStageSince": {
            "type": "string",
            "format": "date-time"
          },
          "daysInStage": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string"
          }
        }
      },
      "PipelineStage": {
        "enum": [
          "MdtInput",
          "MdtDecision",
          "ReportReview",
          "AwaitingQa",
          "ReadyForRelease"
        ]
      },
      "PortalAccessView": {
        "required": [
          "patientLogin",
          "grants",
          "suggested"
        ],
        "type": "object",
        "properties": {
          "patientLogin": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PortalLogin"
              }
            ]
          },
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalGrantView"
            }
          },
          "suggested": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PortalSuggestion"
              }
            ]
          }
        }
      },
      "PortalAppointment": {
        "required": [
          "id",
          "what",
          "startsAt",
          "duration",
          "modality",
          "format",
          "location",
          "joinOpensAt",
          "preparationNotes",
          "status",
          "statusLabel",
          "clinicians",
          "pendingChange"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "what": {
            "type": "string"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": "string"
          },
          "modality": {
            "$ref": "#/components/schemas/AppointmentModality"
          },
          "format": {
            "type": "string"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "joinOpensAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "preparationNotes": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppointmentStatus"
          },
          "statusLabel": {
            "type": "string"
          },
          "clinicians": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pendingChange": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PendingChange"
              }
            ]
          }
        }
      },
      "PortalConsent": {
        "required": [
          "id",
          "purpose",
          "templateVersion",
          "signedBy",
          "signedAt",
          "inForce",
          "withdrawnAt",
          "canWithdraw"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "signedBy": {
            "type": "string"
          },
          "signedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inForce": {
            "type": "boolean"
          },
          "withdrawnAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "canWithdraw": {
            "type": "boolean"
          }
        }
      },
      "PortalDashboard": {
        "required": [
          "patientId",
          "displayName",
          "caseId",
          "stageHeading",
          "stageDescription",
          "nextStep",
          "completedStages",
          "outstandingTasks",
          "nextAppointment",
          "unreadMessages",
          "assessment",
          "recentMessages"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "stageHeading": {
            "type": "string"
          },
          "stageDescription": {
            "type": "string"
          },
          "nextStep": {
            "type": "string"
          },
          "completedStages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompletedStage"
            }
          },
          "outstandingTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalTask"
            }
          },
          "nextAppointment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PortalAppointment"
              }
            ]
          },
          "unreadMessages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "assessment": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AssessmentSummary"
              }
            ]
          },
          "recentMessages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessagePreview"
            }
          },
          "waitingOnConsent": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "PortalDocument": {
        "required": [
          "id",
          "title",
          "kind",
          "availableSince"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "availableSince": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PortalDocumentLists": {
        "required": [
          "mine",
          "shared"
        ],
        "type": "object",
        "properties": {
          "mine": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalDocument"
            }
          },
          "shared": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalDocument"
            }
          }
        }
      },
      "PortalForm": {
        "required": [
          "id",
          "kind",
          "title",
          "estimatedMinutes",
          "status",
          "statusLabel",
          "dueBy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/FormKind"
          },
          "title": {
            "type": "string"
          },
          "estimatedMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/FormStatus"
          },
          "statusLabel": {
            "type": "string"
          },
          "dueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PortalGrantView": {
        "required": [
          "grantId",
          "userId",
          "name",
          "email",
          "status",
          "basis",
          "permissions",
          "grantedAt",
          "expiresAt",
          "revokedAt"
        ],
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AccountStatus"
          },
          "basis": {
            "$ref": "#/components/schemas/AccessBasis"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortalPermission"
            }
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PortalInvitation": {
        "required": [
          "userId",
          "invited"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "invited": {
            "type": "boolean"
          }
        }
      },
      "PortalLogin": {
        "required": [
          "userId",
          "name",
          "email",
          "status"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AccountStatus"
          }
        }
      },
      "PortalMessageView": {
        "required": [
          "id",
          "fromService",
          "authorName",
          "isMine",
          "body",
          "sentAt",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fromService": {
            "type": "boolean"
          },
          "authorName": {
            "type": "string"
          },
          "isMine": {
            "type": "boolean"
          },
          "body": {
            "type": "string"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PortalPermission": {
        "enum": [
          "Appointments",
          "Tasks",
          "Messages",
          "ReleasedDocuments"
        ]
      },
      "PortalRelationship": {
        "enum": [
          "Self",
          "ParentCarer",
          "Supporter"
        ]
      },
      "PortalSuggestion": {
        "required": [
          "fullName",
          "email",
          "relationship"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "relationship": {
            "$ref": "#/components/schemas/PortalRelationship"
          }
        }
      },
      "PortalTask": {
        "required": [
          "kind",
          "id",
          "title",
          "description",
          "dueBy"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PortalThread": {
        "required": [
          "threadId",
          "subject",
          "key",
          "lastMessageAt",
          "unread",
          "isClosed",
          "replyDueBy",
          "lastFrom"
        ],
        "type": "object",
        "properties": {
          "threadId": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "unread": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isClosed": {
            "type": "boolean"
          },
          "replyDueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastFrom": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PossibleDuplicate": {
        "required": [
          "patientId",
          "name",
          "dateOfBirth",
          "caseReferences"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "caseReferences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PriceDraft": {
        "required": [
          "id",
          "serviceName",
          "pathwayCode",
          "amountGbp",
          "priceNote",
          "includes",
          "excludes",
          "depositTerms",
          "cancellationTerms",
          "effectiveFrom",
          "effectiveTo"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serviceName": {
            "type": "string"
          },
          "pathwayCode": {
            "type": "string"
          },
          "amountGbp": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "priceNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "includes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludes": {
            "type": [
              "null",
              "string"
            ]
          },
          "depositTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancellationTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "effectiveTo": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "instalmentMonthlyGbp": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "instalmentMonths": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "instalmentInterestPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "PriceRequest": {
        "required": [
          "fundingRoute",
          "amountPounds",
          "effectiveFrom"
        ],
        "type": "object",
        "properties": {
          "fundingRoute": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "PriceView": {
        "required": [
          "id",
          "route",
          "amountPounds",
          "effectiveFrom",
          "inForce"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "route": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date"
          },
          "inForce": {
            "type": "boolean"
          }
        }
      },
      "ProfessionalReferralRequest": {
        "required": [
          "subject",
          "contact",
          "assessment",
          "consent",
          "referrer",
          "schoolOrSetting",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/PersonDetailsRequest"
          },
          "contact": {
            "$ref": "#/components/schemas/ContactDetailsRequest"
          },
          "assessment": {
            "$ref": "#/components/schemas/AssessmentDetailsRequest"
          },
          "consent": {
            "$ref": "#/components/schemas/ConsentRequest"
          },
          "referrer": {
            "$ref": "#/components/schemas/ReferrerRequest"
          },
          "schoolOrSetting": {
            "type": [
              "null",
              "string"
            ]
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProfessionalReferrer": {
        "required": [
          "name",
          "organisation",
          "role",
          "email",
          "informationSharingBasis"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "organisation": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "informationSharingBasis": {
            "type": "string"
          }
        }
      },
      "ProgressResponse": {
        "required": [
          "percentComplete"
        ],
        "type": "object",
        "properties": {
          "percentComplete": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ProgressStage": {
        "required": [
          "key",
          "heading",
          "description",
          "state",
          "completedOn",
          "detail"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "heading": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/StageState"
          },
          "completedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProgressStep": {
        "required": [
          "name",
          "state",
          "stage"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/StepState"
          },
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          }
        }
      },
      "PublishedArticle": {
        "required": [
          "slug",
          "title",
          "summary",
          "body",
          "category",
          "downloadUrl",
          "authorName",
          "reviewerName",
          "reviewerRegistration",
          "reviewedOn",
          "publishedAt"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "downloadUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "authorName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewerRegistration": {
            "type": [
              "null",
              "string"
            ]
          },
          "reviewedOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublishedBlock": {
        "required": [
          "kind",
          "heading",
          "body",
          "imageUrl",
          "linkLabel",
          "linkHref",
          "order",
          "eyebrow",
          "subheading",
          "icon",
          "secondaryLinkLabel",
          "secondaryLinkHref",
          "imageAlt"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "heading": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkHref": {
            "type": [
              "null",
              "string"
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "eyebrow": {
            "type": [
              "null",
              "string"
            ]
          },
          "subheading": {
            "type": [
              "null",
              "string"
            ]
          },
          "icon": {
            "type": [
              "null",
              "string"
            ]
          },
          "secondaryLinkLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "secondaryLinkHref": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageAlt": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PublishedFaq": {
        "required": [
          "slug",
          "title",
          "body",
          "category",
          "order"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": "string"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PublishedNavigationItem": {
        "required": [
          "id",
          "label",
          "href",
          "parentId",
          "order"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "parentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PublishedPage": {
        "required": [
          "slug",
          "title",
          "body",
          "metaTitle",
          "metaDescription",
          "publishedAt",
          "blocks"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "metaTitle": {
            "type": [
              "null",
              "string"
            ]
          },
          "metaDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "blocks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublishedBlock"
            }
          }
        }
      },
      "PublishedPrice": {
        "required": [
          "serviceName",
          "pathwayCode",
          "amountGbp",
          "priceNote",
          "includes",
          "excludes",
          "depositTerms",
          "cancellationTerms",
          "instalments",
          "order"
        ],
        "type": "object",
        "properties": {
          "serviceName": {
            "type": "string"
          },
          "pathwayCode": {
            "type": "string"
          },
          "amountGbp": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "priceNote": {
            "type": [
              "null",
              "string"
            ]
          },
          "includes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludes": {
            "type": [
              "null",
              "string"
            ]
          },
          "depositTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancellationTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "instalments": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/InstalmentOption"
              }
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PublishedService": {
        "required": [
          "slug",
          "title",
          "shortDescription",
          "pathwayCode",
          "ageRange",
          "order"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "shortDescription": {
            "type": "string"
          },
          "pathwayCode": {
            "type": "string"
          },
          "ageRange": {
            "type": [
              "null",
              "string"
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PublishedTeamMember": {
        "required": [
          "slug",
          "fullName",
          "role",
          "professionalRegistration",
          "qualifications",
          "worksWith",
          "body",
          "photoUrl",
          "group",
          "isFeatured",
          "order"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "professionalRegistration": {
            "type": [
              "null",
              "string"
            ]
          },
          "qualifications": {
            "type": [
              "null",
              "string"
            ]
          },
          "worksWith": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "photoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "group": {
            "$ref": "#/components/schemas/TeamGroup"
          },
          "isFeatured": {
            "type": "boolean"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "QuestionnaireAudience": {
        "enum": [
          "Patient",
          "ParentOrCarer",
          "Informant",
          "Clinician"
        ]
      },
      "QuestionnaireForm": {
        "required": [
          "responseId",
          "title",
          "instructions",
          "description",
          "estimatedMinutes",
          "status",
          "percentComplete",
          "sections",
          "questions",
          "answers"
        ],
        "type": "object",
        "properties": {
          "responseId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "instructions": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "estimatedMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/ResponseStatus"
          },
          "percentComplete": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuestionView"
            }
          },
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "QuestionnaireSummary": {
        "required": [
          "id",
          "code",
          "version",
          "title",
          "audience",
          "questionCount",
          "licensingNote"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "audience": {
            "$ref": "#/components/schemas/QuestionnaireAudience"
          },
          "questionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "licensingNote": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "QuestionType": {
        "enum": [
          "ShortText",
          "LongText",
          "Number",
          "Date",
          "YesNo",
          "SingleChoice",
          "MultipleChoice",
          "Score"
        ]
      },
      "QuestionView": {
        "required": [
          "key",
          "prompt",
          "type",
          "isRequired",
          "order",
          "choices",
          "section",
          "helpText"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/QuestionType"
          },
          "isRequired": {
            "type": "boolean"
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "section": {
            "type": [
              "null",
              "string"
            ]
          },
          "helpText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "QueueStage": {
        "enum": [
          "ClinicalTriage",
          "AwaitingInformation",
          "Allocation",
          "Assessment",
          "MdtQa",
          "ReportAwaitingQa"
        ]
      },
      "RaiseGovernanceRequest": {
        "required": [
          "kind",
          "severity",
          "summary",
          "ownerRole",
          "patientId",
          "caseId",
          "raisedByName"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/GovernanceKind"
          },
          "severity": {
            "$ref": "#/components/schemas/GovernanceSeverity"
          },
          "summary": {
            "type": "string"
          },
          "ownerRole": {
            "type": "string"
          },
          "patientId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "raisedByName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RaiseRiskFlagRequest": {
        "required": [
          "patientId",
          "caseId",
          "category",
          "severity",
          "summary"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "severity": {
            "$ref": "#/components/schemas/RiskSeverity"
          },
          "summary": {
            "type": "string"
          },
          "identifiedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "immediateAction": {
            "type": [
              "null",
              "string"
            ]
          },
          "escalateToSafeguardingLead": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ReassessGovernanceRequest": {
        "required": [
          "severity"
        ],
        "type": "object",
        "properties": {
          "severity": {
            "$ref": "#/components/schemas/GovernanceSeverity"
          }
        }
      },
      "ReceiveSubjectRequestRequest": {
        "required": [
          "kind",
          "requesterName",
          "requesterEmail",
          "patientId"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/SubjectRequestKind"
          },
          "requesterName": {
            "type": "string"
          },
          "requesterEmail": {
            "type": "string"
          },
          "patientId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "RecordCategory": {
        "enum": [
          "ClinicalRecord",
          "DeclinedReferral",
          "Enquiry",
          "AbandonedDraft",
          "FinancialRecord",
          "GovernanceRecord",
          "AuditTrail"
        ]
      },
      "RecordConsentApiRequest": {
        "required": [
          "patientId",
          "caseId",
          "purpose",
          "templateId",
          "templateVersion",
          "signedByName",
          "signedByRelationship"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "purpose": {
            "$ref": "#/components/schemas/ConsentPurpose"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "signedByName": {
            "type": "string"
          },
          "signedByRelationship": {
            "type": "string"
          }
        }
      },
      "RecordCredentialRequest": {
        "required": [
          "kind",
          "reference",
          "issuedOn",
          "expiresOn"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/CredentialKind"
          },
          "reference": {
            "type": "string"
          },
          "issuedOn": {
            "type": "string",
            "format": "date"
          },
          "expiresOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "body": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RegulatoryBody"
              }
            ]
          }
        }
      },
      "RecordGovernanceActionRequest": {
        "required": [
          "description"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          }
        }
      },
      "RecordLeaveRequest": {
        "required": [
          "from",
          "to",
          "note"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RecordProgress": {
        "required": [
          "lastSavedAt",
          "sectionsComplete",
          "sectionCount"
        ],
        "type": "object",
        "properties": {
          "lastSavedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sectionsComplete": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sectionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RecordSession": {
        "required": [
          "appointmentId",
          "startsAt",
          "durationMinutes",
          "modality"
        ],
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "modality": {
            "$ref": "#/components/schemas/AppointmentModality"
          }
        }
      },
      "RecordSubjectActionRequest": {
        "required": [
          "description"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          }
        }
      },
      "ReferenceResponse": {
        "required": [
          "reference"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          }
        }
      },
      "ReferralFile": {
        "required": [
          "id",
          "fileName",
          "sizeBytes",
          "uploadedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReferralProgress": {
        "enum": [
          "ClinicalTriage",
          "AwaitingInformation",
          "Allocation",
          "Assessment",
          "MdtQa",
          "ReportAwaitingQa",
          "Completed",
          "Declined",
          "Withdrawn"
        ]
      },
      "ReferralReceiptResponse": {
        "required": [
          "referralId",
          "reference",
          "submissionToken",
          "submittedAt",
          "attachmentCount"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "submissionToken": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "attachmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ReferralReport": {
        "required": [
          "from",
          "to",
          "received",
          "accepted",
          "declined",
          "awaitingTriage",
          "bySource",
          "byPathway"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "received": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "accepted": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "declined": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "awaitingTriage": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "bySource": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "byPathway": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "ReferralSource": {
        "enum": [
          "AdultSelf",
          "ParentOrCarer",
          "Professional"
        ]
      },
      "ReferralStatus": {
        "enum": [
          "Submitted",
          "UnderTriage",
          "MoreInformationRequested",
          "Accepted",
          "Declined",
          "Withdrawn"
        ]
      },
      "ReferrerDetails": {
        "required": [
          "name",
          "organisation",
          "role"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "organisation": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "ReferrerRequest": {
        "required": [
          "name",
          "organisation",
          "role",
          "email",
          "informationSharingBasis"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "organisation": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "informationSharingBasis": {
            "type": "string"
          }
        }
      },
      "RefreshRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "RefundInvoiceRequest": {
        "required": [
          "amountPounds",
          "reason"
        ],
        "type": "object",
        "properties": {
          "amountPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "RefuseSubjectRequestRequest": {
        "required": [
          "outcome",
          "exemptionRelied"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string"
          },
          "exemptionRelied": {
            "type": "string"
          }
        }
      },
      "RegulatoryBody": {
        "enum": [
          "Hcpc",
          "Gmc",
          "Nmc",
          "SocialWorkEngland",
          "Sssc",
          "SocialCareWales",
          "Niscc",
          null
        ]
      },
      "RejectTemplateRequest": {
        "required": [
          "note"
        ],
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "RejectTimesheetRequest": {
        "required": [
          "note"
        ],
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "ReleaseReportRequest": {
        "required": [
          "identityChecked",
          "consentVerified",
          "evidenceReviewed",
          "multidisciplinaryDecisionRecorded",
          "readabilityChecked"
        ],
        "type": "object",
        "properties": {
          "identityChecked": {
            "type": "boolean"
          },
          "consentVerified": {
            "type": "boolean"
          },
          "evidenceReviewed": {
            "type": "boolean"
          },
          "multidisciplinaryDecisionRecorded": {
            "type": "boolean"
          },
          "readabilityChecked": {
            "type": "boolean"
          }
        }
      },
      "ReopenRecordRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ReplyToThreadRequest": {
        "required": [
          "body"
        ],
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          }
        }
      },
      "ReportAction": {
        "enum": [
          "Review",
          "Approve",
          "Release"
        ]
      },
      "ReportAuthorisation": {
        "required": [
          "kind",
          "action"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "action": {
            "$ref": "#/components/schemas/ReportAction"
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReportAuthorisationsRequest": {
        "required": [
          "grants"
        ],
        "type": "object",
        "properties": {
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportAuthorisation"
            }
          }
        }
      },
      "ReportCommentRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          }
        }
      },
      "ReportCommentView": {
        "required": [
          "id",
          "versionNumber",
          "authorName",
          "text",
          "madeAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "versionNumber": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "authorName": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "madeAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReportDetail": {
        "required": [
          "reportId",
          "caseId",
          "caseReference",
          "patientName",
          "pathway",
          "kind",
          "title",
          "status",
          "myRole",
          "authorName",
          "reviewerName",
          "dueOn",
          "progress",
          "canEdit",
          "sections",
          "versions",
          "comments"
        ],
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ReportStatus"
          },
          "myRole": {
            "type": "string"
          },
          "authorName": {
            "type": "string"
          },
          "reviewerName": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "progress": {
            "$ref": "#/components/schemas/ReportProgress"
          },
          "canEdit": {
            "type": "boolean"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportSectionView"
            }
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportVersionView"
            }
          },
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportCommentView"
            }
          }
        }
      },
      "ReportKind": {
        "enum": [
          "FinalAssessment",
          "Assessment"
        ]
      },
      "ReportListItem": {
        "required": [
          "reportId",
          "caseId",
          "caseReference",
          "patientName",
          "pathway",
          "kind",
          "title",
          "status",
          "dueOn",
          "myRole",
          "progress"
        ],
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ReportStatus"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "myRole": {
            "type": "string"
          },
          "progress": {
            "$ref": "#/components/schemas/ReportProgress"
          }
        }
      },
      "ReportProgress": {
        "required": [
          "lastSavedAt",
          "sectionsComplete",
          "sectionCount"
        ],
        "type": "object",
        "properties": {
          "lastSavedAt": {
            "type": "string",
            "format": "date-time"
          },
          "sectionsComplete": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sectionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ReportSectionView": {
        "required": [
          "key",
          "title",
          "content",
          "notes",
          "isComplete"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "isComplete": {
            "type": "boolean"
          }
        }
      },
      "ReportStatus": {
        "enum": [
          "Draft",
          "InReview",
          "Approved",
          "Released",
          "ChangesRequested"
        ]
      },
      "ReportTurnaroundReport": {
        "required": [
          "from",
          "to",
          "released",
          "medianDaysToRelease",
          "awaitingRelease",
          "addenda"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "released": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "medianDaysToRelease": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "awaitingRelease": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "addenda": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ReportVersionView": {
        "required": [
          "number",
          "isAddendum",
          "authorName",
          "submittedAt",
          "approvedAt",
          "releasedAt"
        ],
        "type": "object",
        "properties": {
          "number": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isAddendum": {
            "type": "boolean"
          },
          "authorName": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "approvedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "releasedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "RequestAppointmentChange": {
        "required": [
          "kind",
          "reasonCode",
          "details",
          "preferredAlternative",
          "understood"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ChangeRequestKind"
          },
          "reasonCode": {
            "$ref": "#/components/schemas/ChangeReason"
          },
          "details": {
            "type": [
              "null",
              "string"
            ]
          },
          "preferredAlternative": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "understood": {
            "type": "boolean"
          }
        }
      },
      "RequestQuestionnaireApiRequest": {
        "required": [
          "caseId",
          "questionnaireCode",
          "questionnaireVersion",
          "respondentName",
          "respondentUserId",
          "dueBy"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "questionnaireCode": {
            "type": "string"
          },
          "questionnaireVersion": {
            "type": "string"
          },
          "respondentName": {
            "type": "string"
          },
          "respondentUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "dueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "RescheduleAppointmentRequest": {
        "required": [
          "startsAt",
          "reason"
        ],
        "type": "object",
        "properties": {
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          },
          "overrideAvailability": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ResendCodeRequest": {
        "required": [
          "ticket"
        ],
        "type": "object",
        "properties": {
          "ticket": {
            "type": "string"
          }
        }
      },
      "Respondent": {
        "required": [
          "userId",
          "name"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ResponseStatus": {
        "enum": [
          "Awaiting",
          "InProgress",
          "Submitted",
          "Cancelled"
        ]
      },
      "ResponseSummary": {
        "required": [
          "id",
          "title",
          "respondentName",
          "respondentRole",
          "status",
          "percentComplete",
          "requestedAt",
          "dueBy",
          "submittedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "respondentName": {
            "type": "string"
          },
          "respondentRole": {
            "$ref": "#/components/schemas/QuestionnaireAudience"
          },
          "status": {
            "$ref": "#/components/schemas/ResponseStatus"
          },
          "percentComplete": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dueBy": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "submittedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ResumeDraftRequest": {
        "required": [
          "draftToken"
        ],
        "type": "object",
        "properties": {
          "draftToken": {
            "type": "string"
          }
        }
      },
      "RetentionCandidate": {
        "required": [
          "category",
          "recordId",
          "reference",
          "dueOn",
          "daysOverdue"
        ],
        "type": "object",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/RecordCategory"
          },
          "recordId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "dueOn": {
            "type": "string",
            "format": "date"
          },
          "daysOverdue": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "RevokeAccessRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "RiskCategory": {
        "enum": [
          "SafeguardingChild",
          "SafeguardingAdult",
          "SelfHarmOrSuicide",
          "RiskToOthers",
          "Neglect",
          "DomesticAbuse",
          "Exploitation",
          "Other"
        ]
      },
      "RiskEscalationResponse": {
        "required": [
          "id",
          "escalatedToRole",
          "escalatedAt",
          "isAcknowledged"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "escalatedToRole": {
            "type": "string"
          },
          "escalatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isAcknowledged": {
            "type": "boolean"
          }
        }
      },
      "RiskFlagResponse": {
        "required": [
          "id",
          "patientId",
          "caseId",
          "category",
          "severity",
          "isClosed",
          "raisedAt",
          "escalations"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "severity": {
            "$ref": "#/components/schemas/RiskSeverity"
          },
          "isClosed": {
            "type": "boolean"
          },
          "raisedAt": {
            "type": "string",
            "format": "date-time"
          },
          "escalations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RiskEscalationResponse"
            }
          }
        }
      },
      "RiskSeverity": {
        "enum": [
          "Low",
          "Moderate",
          "High"
        ]
      },
      "RoleView": {
        "required": [
          "role",
          "name",
          "description",
          "permissions",
          "requiresMultiFactor",
          "members"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requiresMultiFactor": {
            "type": "boolean"
          },
          "members": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SafeguardingItem": {
        "required": [
          "riskFlagId",
          "caseReference",
          "pathway",
          "category",
          "severity",
          "raisedAt",
          "status",
          "followUpOn",
          "followUpInDays"
        ],
        "type": "object",
        "properties": {
          "riskFlagId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathway": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PathwayType"
              }
            ]
          },
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "severity": {
            "$ref": "#/components/schemas/RiskSeverity"
          },
          "raisedAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/SafeguardingStatus"
          },
          "followUpOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "followUpInDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SafeguardingStatus": {
        "enum": [
          "Open",
          "Escalated",
          "Closed"
        ]
      },
      "SaveAssessmentRecordRequest": {
        "required": [
          "answers"
        ],
        "type": "object",
        "properties": {
          "answers": {
            "type": "object"
          }
        }
      },
      "SaveDraftRequest": {
        "required": [
          "payload"
        ],
        "type": "object",
        "properties": {
          "payload": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      },
      "SaveQuestionnaireProgressRequest": {
        "required": [
          "answers"
        ],
        "type": "object",
        "properties": {
          "answers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "SaveReportRequest": {
        "required": [
          "sections",
          "notes"
        ],
        "type": "object",
        "properties": {
          "sections": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "notes": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ScheduleAppointmentApiRequest": {
        "required": [
          "caseId",
          "kind",
          "modality",
          "startsAt",
          "durationMinutes",
          "clinicianIds",
          "location",
          "preparationNotes"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/AppointmentKind"
          },
          "modality": {
            "$ref": "#/components/schemas/AppointmentModality"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "clinicianIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "preparationNotes": {
            "type": [
              "null",
              "string"
            ]
          },
          "overrideAvailability": {
            "type": "boolean",
            "default": false
          },
          "customTypeId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ScheduleItem": {
        "required": [
          "appointmentId",
          "caseId",
          "patientName",
          "kind",
          "startsAt",
          "durationMinutes",
          "modality",
          "location",
          "typeName",
          "status",
          "hasVideoMeeting"
        ],
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "patientName": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AppointmentKind"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "modality": {
            "$ref": "#/components/schemas/AppointmentModality"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "typeName": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AppointmentStatus"
          },
          "hasVideoMeeting": {
            "type": "boolean"
          }
        }
      },
      "SearchHit": {
        "required": [
          "kind",
          "id",
          "reference",
          "patientName",
          "dateOfBirth",
          "pathway"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          }
        }
      },
      "SecondFactorMethod": {
        "enum": [
          "Authenticator",
          "EmailCode",
          "AuthenticatorEnrolment",
          null
        ]
      },
      "SendResumeLinkRequest": {
        "required": [
          "email",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ServiceDraft": {
        "required": [
          "id",
          "slug",
          "title",
          "shortDescription",
          "body",
          "pathwayCode",
          "ageRange",
          "order"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "shortDescription": {
            "type": "string"
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathwayCode": {
            "type": "string"
          },
          "ageRange": {
            "type": [
              "null",
              "string"
            ]
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ServiceMetadata": {
        "required": [
          "service",
          "apiVersion",
          "environment",
          "correlationId"
        ],
        "type": "object",
        "properties": {
          "service": {
            "type": "string"
          },
          "apiVersion": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "correlationId": {
            "type": "string"
          }
        }
      },
      "ServiceRequest": {
        "required": [
          "name",
          "description",
          "pathway"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathway": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PathwayType"
              }
            ]
          },
          "isActive": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "ServiceTargetRequest": {
        "required": [
          "pathway",
          "fundingRoute",
          "targetDays"
        ],
        "type": "object",
        "properties": {
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "fundingRoute": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "targetDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ServiceTargetView": {
        "required": [
          "pathway",
          "fundingRoute",
          "targetDays"
        ],
        "type": "object",
        "properties": {
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "fundingRoute": {
            "$ref": "#/components/schemas/FundingRoute"
          },
          "targetDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ServiceView": {
        "required": [
          "id",
          "name",
          "description",
          "pathway",
          "isActive",
          "currentPrices",
          "priceHistory"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "pathway": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PathwayType"
              }
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "currentPrices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceView"
            }
          },
          "priceHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceView"
            }
          }
        }
      },
      "SetApprovalsRequest": {
        "required": [
          "components",
          "customComponentIds"
        ],
        "type": "object",
        "properties": {
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PathwayComponent"
            }
          },
          "customComponentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "SetApprovedPathwaysRequest": {
        "required": [
          "pathways"
        ],
        "type": "object",
        "properties": {
          "pathways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApprovedPathway"
            }
          }
        }
      },
      "SetAvailabilityRequest": {
        "required": [
          "slots"
        ],
        "type": "object",
        "properties": {
          "slots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeeklySlot"
            }
          }
        }
      },
      "SetMessagingKeyRequest": {
        "required": [
          "publicKey",
          "lockedPrivateKey"
        ],
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string"
          },
          "lockedPrivateKey": {
            "type": "string"
          }
        }
      },
      "SignConsentRequest": {
        "required": [
          "signedByName",
          "relationship",
          "agreed"
        ],
        "type": "object",
        "properties": {
          "signedByName": {
            "type": "string"
          },
          "relationship": {
            "type": "string"
          },
          "agreed": {
            "type": "boolean"
          }
        }
      },
      "SignInRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "SignInResponse": {
        "required": [
          "secondStepRequired",
          "ticket",
          "method",
          "codeSentTo",
          "resendAvailableAt",
          "accessToken",
          "accessTokenExpiresAt",
          "refreshToken",
          "refreshTokenExpiresAt"
        ],
        "type": "object",
        "properties": {
          "secondStepRequired": {
            "type": "boolean"
          },
          "ticket": {
            "type": [
              "null",
              "string"
            ]
          },
          "method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SecondFactorMethod"
              }
            ]
          },
          "codeSentTo": {
            "type": [
              "null",
              "string"
            ]
          },
          "resendAvailableAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "accessToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "accessTokenExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "refreshToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "refreshTokenExpiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SiteDetails": {
        "required": [
          "tagline",
          "address",
          "phones",
          "emails",
          "openingHours",
          "registrationNotice",
          "copyrightHolder",
          "socialLinks"
        ],
        "type": "object",
        "properties": {
          "tagline": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelledValue"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelledValue"
            }
          },
          "openingHours": {
            "type": [
              "null",
              "string"
            ]
          },
          "registrationNotice": {
            "type": [
              "null",
              "string"
            ]
          },
          "copyrightHolder": {
            "type": [
              "null",
              "string"
            ]
          },
          "socialLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelledValue"
            }
          }
        }
      },
      "StaffAdultReferralRequest": {
        "required": [
          "referral",
          "consentMethod"
        ],
        "type": "object",
        "properties": {
          "referral": {
            "$ref": "#/components/schemas/AdultReferralRequest"
          },
          "consentMethod": {
            "$ref": "#/components/schemas/ConsentMethod"
          }
        }
      },
      "StaffChildReferralRequest": {
        "required": [
          "referral",
          "consentMethod"
        ],
        "type": "object",
        "properties": {
          "referral": {
            "$ref": "#/components/schemas/ChildReferralRequest"
          },
          "consentMethod": {
            "$ref": "#/components/schemas/ConsentMethod"
          }
        }
      },
      "StaffMember": {
        "required": [
          "userId",
          "name",
          "email",
          "roles",
          "status",
          "createdAt",
          "activatedAt",
          "deactivatedAt"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "$ref": "#/components/schemas/AccountStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "activatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "deactivatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "StaffProfessionalReferralRequest": {
        "required": [
          "referral",
          "consentMethod"
        ],
        "type": "object",
        "properties": {
          "referral": {
            "$ref": "#/components/schemas/ProfessionalReferralRequest"
          },
          "consentMethod": {
            "$ref": "#/components/schemas/ConsentMethod"
          }
        }
      },
      "StageDuration": {
        "required": [
          "stage",
          "days",
          "isCurrent"
        ],
        "type": "object",
        "properties": {
          "stage": {
            "$ref": "#/components/schemas/PathwayStageName"
          },
          "days": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          }
        }
      },
      "StageState": {
        "enum": [
          "Done",
          "Current",
          "Upcoming"
        ]
      },
      "StartAssessmentRecordRequest": {
        "required": [
          "caseId",
          "component"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          },
          "appointmentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "customComponentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "StartDraftRequest": {
        "required": [
          "payload",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "payload": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StartReportRequest": {
        "required": [
          "caseId",
          "kind"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/ReportKind"
          },
          "dueOn": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          }
        }
      },
      "StartThreadRequest": {
        "required": [
          "patientId",
          "caseId",
          "recipientUserId",
          "subject",
          "familyKey",
          "teamKey",
          "body"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "caseId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "recipientUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "subject": {
            "type": "string"
          },
          "familyKey": {
            "type": "string"
          },
          "teamKey": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      },
      "StepState": {
        "enum": [
          "NotStarted",
          "InProgress",
          "Done"
        ]
      },
      "SubjectAccessEntry": {
        "required": [
          "at",
          "action",
          "actorRole",
          "entityType"
        ],
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "action": {
            "type": "string"
          },
          "actorRole": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          }
        }
      },
      "SubjectAccessPackage": {
        "required": [
          "patientId",
          "assembledAt",
          "personal",
          "referrals",
          "cases",
          "appointments",
          "consents",
          "documents",
          "messages",
          "invoices",
          "whoHasAccessed",
          "requiresClinicalReview"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "assembledAt": {
            "type": "string",
            "format": "date-time"
          },
          "personal": {
            "$ref": "#/components/schemas/SubjectPersonalDetails"
          },
          "referrals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectReferral"
            }
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectCase"
            }
          },
          "appointments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectAppointment"
            }
          },
          "consents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectConsent"
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectDocument"
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectMessage"
            }
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectInvoice"
            }
          },
          "whoHasAccessed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectAccessEntry"
            }
          },
          "requiresClinicalReview": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SubjectAppointment": {
        "required": [
          "appointmentId",
          "kind",
          "startsAt",
          "status"
        ],
        "type": "object",
        "properties": {
          "appointmentId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "SubjectCase": {
        "required": [
          "caseId",
          "pathway",
          "status",
          "openedAt",
          "closedAt",
          "stages"
        ],
        "type": "object",
        "properties": {
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "pathway": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "stages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubjectStage"
            }
          }
        }
      },
      "SubjectConsent": {
        "required": [
          "consentId",
          "purpose",
          "templateVersion",
          "signedByName",
          "signedAt",
          "withdrawnAt"
        ],
        "type": "object",
        "properties": {
          "consentId": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "signedByName": {
            "type": "string"
          },
          "signedAt": {
            "type": "string",
            "format": "date-time"
          },
          "withdrawnAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SubjectDocument": {
        "required": [
          "documentId",
          "title",
          "kind",
          "uploadedAt",
          "released"
        ],
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time"
          },
          "released": {
            "type": "boolean"
          }
        }
      },
      "SubjectInvoice": {
        "required": [
          "invoiceId",
          "reference",
          "status",
          "totalPounds",
          "issuedAt"
        ],
        "type": "object",
        "properties": {
          "invoiceId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalPounds": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "issuedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SubjectMessage": {
        "required": [
          "threadId",
          "fromService",
          "sentAt"
        ],
        "type": "object",
        "properties": {
          "threadId": {
            "type": "string",
            "format": "uuid"
          },
          "fromService": {
            "type": "boolean"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubjectPersonalDetails": {
        "required": [
          "fullName",
          "preferredName",
          "pronouns",
          "dateOfBirth",
          "reasonableAdjustments",
          "interpreterLanguage",
          "communicationNeeds"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "preferredName": {
            "type": [
              "null",
              "string"
            ]
          },
          "pronouns": {
            "type": [
              "null",
              "string"
            ]
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "reasonableAdjustments": {
            "type": [
              "null",
              "string"
            ]
          },
          "interpreterLanguage": {
            "type": [
              "null",
              "string"
            ]
          },
          "communicationNeeds": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SubjectReferral": {
        "required": [
          "referralId",
          "reference",
          "source",
          "requestedPathway",
          "status",
          "submittedAt",
          "reasonForReferral"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "requestedPathway": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reasonForReferral": {
            "type": "string"
          }
        }
      },
      "SubjectRequestKind": {
        "enum": [
          "Access",
          "Rectification",
          "Erasure",
          "Portability"
        ]
      },
      "SubjectRequestStatus": {
        "enum": [
          "Received",
          "VerifyingIdentity",
          "InProgress",
          "Fulfilled",
          "Refused"
        ]
      },
      "SubjectRequestSummary": {
        "required": [
          "requestId",
          "kind",
          "status",
          "requesterName",
          "receivedAt",
          "dueBy",
          "isOverdue",
          "identityVerified",
          "patientId"
        ],
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "$ref": "#/components/schemas/SubjectRequestKind"
          },
          "status": {
            "$ref": "#/components/schemas/SubjectRequestStatus"
          },
          "requesterName": {
            "type": "string"
          },
          "receivedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dueBy": {
            "type": "string",
            "format": "date-time"
          },
          "isOverdue": {
            "type": "boolean"
          },
          "identityVerified": {
            "type": "boolean"
          },
          "patientId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "SubjectStage": {
        "required": [
          "stage",
          "enteredAt",
          "leftAt"
        ],
        "type": "object",
        "properties": {
          "stage": {
            "type": "string"
          },
          "enteredAt": {
            "type": "string",
            "format": "date-time"
          },
          "leftAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SubmitForReviewRequest": {
        "required": [
          "confirmed"
        ],
        "type": "object",
        "properties": {
          "confirmed": {
            "type": "boolean"
          },
          "reviewerUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "SubmitQuestionnaireRequest": {
        "required": [
          "confirmedAccurate"
        ],
        "type": "object",
        "properties": {
          "confirmedAccurate": {
            "type": "boolean"
          }
        }
      },
      "SubmittedDocumentType": {
        "enum": [
          "SchoolReport",
          "MedicalLetter",
          "PreviousAssessment",
          "Other"
        ]
      },
      "SuitabilityCheckRequest": {
        "required": [
          "contact",
          "whoIsThisFor",
          "age",
          "whatIsPrompting",
          "areaOfInterest",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/EnquiryContactRequest"
          },
          "whoIsThisFor": {
            "$ref": "#/components/schemas/SuitabilitySubject"
          },
          "age": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "whatIsPrompting": {
            "type": "string"
          },
          "areaOfInterest": {
            "type": [
              "null",
              "string"
            ]
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SuitabilitySubject": {
        "enum": [
          "Myself",
          "MyChild",
          "SomeoneISupportProfessionally",
          null
        ]
      },
      "TaskTiming": {
        "enum": [
          "Overdue",
          "DueToday",
          "Upcoming"
        ]
      },
      "TeamCapacity": {
        "required": [
          "teamId",
          "team",
          "clinicians",
          "wte",
          "utilisedPercent"
        ],
        "type": "object",
        "properties": {
          "teamId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "team": {
            "type": "string"
          },
          "clinicians": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "wte": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "utilisedPercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TeamGroup": {
        "enum": [
          "Leadership",
          "Clinician"
        ]
      },
      "TeamKeyView": {
        "required": [
          "publicKey",
          "sealedPrivateKey"
        ],
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string"
          },
          "sealedPrivateKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TeamMemberDraft": {
        "required": [
          "id",
          "slug",
          "fullName",
          "role",
          "biography",
          "professionalRegistration",
          "qualifications",
          "worksWith",
          "photoId",
          "publicationConsentGiven"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "biography": {
            "type": "string"
          },
          "professionalRegistration": {
            "type": [
              "null",
              "string"
            ]
          },
          "qualifications": {
            "type": [
              "null",
              "string"
            ]
          },
          "worksWith": {
            "type": [
              "null",
              "string"
            ]
          },
          "photoId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "publicationConsentGiven": {
            "type": "boolean"
          },
          "group": {
            "$ref": "#/components/schemas/TeamGroup"
          },
          "isFeatured": {
            "type": "boolean",
            "default": false
          },
          "order": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "TeamRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "TeamView": {
        "required": [
          "id",
          "name",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "TemplateRequest": {
        "required": [
          "subject",
          "body"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      },
      "TemplateVersionResponse": {
        "required": [
          "version"
        ],
        "type": "object",
        "properties": {
          "version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "TemplateVersionStatus": {
        "enum": [
          "PendingApproval",
          "Approved",
          "Rejected",
          "Superseded"
        ]
      },
      "TemplateVersionView": {
        "required": [
          "number",
          "subject",
          "body",
          "status",
          "editedBy",
          "editedAt",
          "decidedBy",
          "decidedAt",
          "decisionNote"
        ],
        "type": "object",
        "properties": {
          "number": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TemplateVersionStatus"
          },
          "editedBy": {
            "type": "string"
          },
          "editedAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedBy": {
            "type": [
              "null",
              "string"
            ]
          },
          "decidedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "decisionNote": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TemplateView": {
        "required": [
          "templateId",
          "name",
          "placeholders",
          "current",
          "pending",
          "history"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "placeholders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "current": {
            "$ref": "#/components/schemas/TemplateVersionView"
          },
          "pending": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TemplateVersionView"
              }
            ]
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateVersionView"
            }
          }
        }
      },
      "TimelineEntry": {
        "required": [
          "at",
          "kind",
          "description"
        ],
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "TimesheetLine": {
        "required": [
          "entryId",
          "workedOn",
          "caseId",
          "caseReference",
          "kind",
          "work",
          "durationMinutes",
          "note"
        ],
        "type": "object",
        "properties": {
          "entryId": {
            "type": "string",
            "format": "uuid"
          },
          "workedOn": {
            "type": "string",
            "format": "date"
          },
          "caseId": {
            "type": "string",
            "format": "uuid"
          },
          "caseReference": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/WorkKind"
          },
          "work": {
            "type": "string"
          },
          "durationMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TimesheetStatus": {
        "enum": [
          "Draft",
          "Submitted",
          "Approved",
          "Rejected",
          "Paid"
        ]
      },
      "TimesheetSummary": {
        "required": [
          "timesheetId",
          "clinicianUserId",
          "periodStart",
          "periodEnd",
          "status",
          "entries",
          "totalDuration",
          "submittedAt"
        ],
        "type": "object",
        "properties": {
          "timesheetId": {
            "type": "string",
            "format": "uuid"
          },
          "clinicianUserId": {
            "type": "string",
            "format": "uuid"
          },
          "periodStart": {
            "type": "string",
            "format": "date"
          },
          "periodEnd": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/TimesheetStatus"
          },
          "entries": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalDuration": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": "string"
          },
          "submittedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "TimesheetTotals": {
        "required": [
          "approvedHours",
          "submittedHours",
          "pendingHours"
        ],
        "type": "object",
        "properties": {
          "approvedHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "submittedHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "pendingHours": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "TokenResponse": {
        "required": [
          "accessToken",
          "accessTokenExpiresAt",
          "refreshToken",
          "refreshTokenExpiresAt"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "accessTokenExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "refreshToken": {
            "type": "string"
          },
          "refreshTokenExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TrainingEnquiryRequest": {
        "required": [
          "contact",
          "organisationName",
          "audience",
          "requestedTraining",
          "approximateAttendees",
          "locationPreference",
          "preferredTimeframe",
          "message",
          "websiteUrl"
        ],
        "type": "object",
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/EnquiryContactRequest"
          },
          "organisationName": {
            "type": "string"
          },
          "audience": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestedTraining": {
            "type": "string"
          },
          "approximateAttendees": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "locationPreference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LocationPreference"
              }
            ]
          },
          "preferredTimeframe": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          },
          "websiteUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TriageChecks": {
        "required": [
          "identityVerified",
          "parentalResponsibilityVerified",
          "fundingRouteConfirmed",
          "checkedForDuplicateRecord"
        ],
        "type": "object",
        "properties": {
          "identityVerified": {
            "type": "boolean"
          },
          "parentalResponsibilityVerified": {
            "type": "boolean"
          },
          "fundingRouteConfirmed": {
            "type": "boolean"
          },
          "checkedForDuplicateRecord": {
            "type": "boolean"
          }
        }
      },
      "TriageDecisionRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "TriageDecisionView": {
        "required": [
          "outcome",
          "reason",
          "decidedBy",
          "decidedAt"
        ],
        "type": "object",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/TriageOutcome"
          },
          "reason": {
            "type": "string"
          },
          "decidedBy": {
            "type": "string"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TriageOutcome": {
        "enum": [
          "Accepted",
          "Declined",
          "Paused",
          "MoreInformationRequested",
          "Withdrawn"
        ]
      },
      "TriageQueueItem": {
        "required": [
          "referralId",
          "reference",
          "source",
          "requestedPathway",
          "submittedAt",
          "daysWaiting",
          "attachmentCount",
          "outstandingChecks"
        ],
        "type": "object",
        "properties": {
          "referralId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/ReferralSource"
          },
          "requestedPathway": {
            "type": "string"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time"
          },
          "daysWaiting": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "attachmentCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outstandingChecks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UnallocatedComponent": {
        "required": [
          "component"
        ],
        "type": "object",
        "properties": {
          "component": {
            "$ref": "#/components/schemas/PathwayComponent"
          }
        }
      },
      "UpdateMyProfileRequest": {
        "required": [
          "fullName",
          "professionalTitle",
          "qualifications"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "professionalTitle": {
            "type": "string"
          },
          "qualifications": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateProfileRequest": {
        "required": [
          "firstName",
          "lastName",
          "phoneNumber"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "phoneNumber": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VerifySubjectIdentityRequest": {
        "required": [
          "patientId",
          "how"
        ],
        "type": "object",
        "properties": {
          "patientId": {
            "type": "string",
            "format": "uuid"
          },
          "how": {
            "type": "string"
          }
        }
      },
      "VideoMeetingIssue": {
        "enum": [
          "DeletedInProvider",
          "MovedInProvider",
          null
        ]
      },
      "VoidInvoiceRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "WaitingCoordinator": {
        "required": [
          "userId",
          "name",
          "publicKey"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          }
        }
      },
      "WaitingTimeReport": {
        "required": [
          "from",
          "to",
          "casesMeasured",
          "medianDays",
          "ninetiethPercentileDays",
          "longestWaitDays",
          "stillWaiting"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "casesMeasured": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "medianDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "ninetiethPercentileDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "longestWaitDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "stillWaiting": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "WeeklySlot": {
        "required": [
          "day",
          "startsAt",
          "endsAt"
        ],
        "type": "object",
        "properties": {
          "day": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "startsAt": {
            "type": "string",
            "format": "time"
          },
          "endsAt": {
            "type": "string",
            "format": "time"
          }
        }
      },
      "WeeklyWait": {
        "required": [
          "weekStarting",
          "averageDays",
          "cases"
        ],
        "type": "object",
        "properties": {
          "weekStarting": {
            "type": "string",
            "format": "date"
          },
          "averageDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "cases": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "WhoAmIResponse": {
        "required": [
          "userId",
          "roles"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WithdrawConsentRequest": {
        "required": [
          "withdrawnByName",
          "reason"
        ],
        "type": "object",
        "properties": {
          "withdrawnByName": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "WithdrawDocumentRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "WorkKind": {
        "enum": [
          "Session",
          "WriteUp",
          "ReportDrafting"
        ]
      },
      "WorkQueueItem": {
        "required": [
          "kind",
          "id",
          "reference",
          "patientName",
          "pathway",
          "funding",
          "team",
          "serviceDeadline",
          "daysToDeadline",
          "deadlineState",
          "stage",
          "action"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "patientName": {
            "type": "string"
          },
          "pathway": {
            "$ref": "#/components/schemas/PathwayType"
          },
          "funding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FundingRoute"
              }
            ]
          },
          "team": {
            "type": [
              "null",
              "string"
            ]
          },
          "serviceDeadline": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "daysToDeadline": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "deadlineState": {
            "$ref": "#/components/schemas/DeadlineState"
          },
          "stage": {
            "$ref": "#/components/schemas/QueueStage"
          },
          "action": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Admin"
    },
    {
      "name": "AdminEnquiries"
    },
    {
      "name": "AdminFinance"
    },
    {
      "name": "AdminLinkRequests"
    },
    {
      "name": "AdminPatients"
    },
    {
      "name": "AdminReferrals"
    },
    {
      "name": "AdminSettings"
    },
    {
      "name": "Allocation"
    },
    {
      "name": "AppointmentChanges"
    },
    {
      "name": "Appointments"
    },
    {
      "name": "Assessments"
    },
    {
      "name": "Audit"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Cases"
    },
    {
      "name": "Changes"
    },
    {
      "name": "ClinicianPortal"
    },
    {
      "name": "ClinicianProfiles"
    },
    {
      "name": "ConsentRequests"
    },
    {
      "name": "Consents"
    },
    {
      "name": "Content"
    },
    {
      "name": "ContentEditor"
    },
    {
      "name": "DataProtection"
    },
    {
      "name": "Documents"
    },
    {
      "name": "Enquiries"
    },
    {
      "name": "FinanceReports"
    },
    {
      "name": "GovernanceRegister"
    },
    {
      "name": "Invoices"
    },
    {
      "name": "Mdt"
    },
    {
      "name": "Me"
    },
    {
      "name": "MessagingKeys"
    },
    {
      "name": "Meta"
    },
    {
      "name": "Notifications"
    },
    {
      "name": "OperationalReports"
    },
    {
      "name": "PatientAccess"
    },
    {
      "name": "Portal"
    },
    {
      "name": "PortalMessages"
    },
    {
      "name": "Questionnaires"
    },
    {
      "name": "Referrals"
    },
    {
      "name": "Reports"
    },
    {
      "name": "RiskFlags"
    },
    {
      "name": "Sitemap"
    },
    {
      "name": "StripeWebhook"
    },
    {
      "name": "Timesheets"
    },
    {
      "name": "Triage"
    },
    {
      "name": "Users"
    },
    {
      "name": "ZoomWebhook"
    }
  ]
}