{
  "openapi": "3.0.0",
  "info": {
    "title": "vital_friend_app_api",
    "version": "0.0.1",
    "description": "VitalFriend Health App API",
    "contact": {
      "name": "VitalFriend Team",
      "email": "deploy@vitalfrnd.com"
    }
  },
  "paths": {
    "/admin/v1/licenses/{licenseId}/activations/{sdkActivationId}/revoke": {
      "post": {
        "x-controller-name": "SdkActivationController",
        "x-operation-name": "revoke",
        "tags": [
          "SdkActivationController"
        ],
        "responses": {
          "200": {
            "description": "Success - Device activation revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SdkActivation"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - Activation not found"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Conflict - Activation already revoked"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "sdkActivationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SdkActivationController.revoke"
      }
    },
    "/admin/v1/licenses/{licenseId}/activations": {
      "get": {
        "x-controller-name": "SdkActivationController",
        "x-operation-name": "listByLicense",
        "tags": [
          "SdkActivationController"
        ],
        "responses": {
          "200": {
            "description": "Success - Paginated list of devices activated under a license",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SdkActivation"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "SdkActivationController.listByLicense"
      }
    },
    "/admin/v1/licenses/{licenseId}/buddy-devices": {
      "get": {
        "x-controller-name": "SdkBuddyDeviceController",
        "x-operation-name": "listByLicense",
        "tags": [
          "SdkBuddyDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Success - Paginated list of paired/allowlisted watches for a license",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SdkBuddyDevice"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "SdkBuddyDeviceController.listByLicense"
      }
    },
    "/admin/v1/licenses/{licenseId}/regenerate-key": {
      "post": {
        "x-controller-name": "LicenseController",
        "x-operation-name": "regenerateKey",
        "tags": [
          "LicenseController"
        ],
        "responses": {
          "200": {
            "description": "Success - License key regenerated. The new licenseKey is returned once and never retrievable again; the old key stops working immediately.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LicenseCreateResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - License not found"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Conflict - License is not active"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "LicenseController.regenerateKey"
      }
    },
    "/admin/v1/licenses/{licenseId}/revoke": {
      "post": {
        "x-controller-name": "LicenseController",
        "x-operation-name": "revoke",
        "tags": [
          "LicenseController"
        ],
        "responses": {
          "200": {
            "description": "Success - License revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LicenseResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - License not found"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Conflict - License already revoked"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseRevokeRequest"
              }
            }
          },
          "required": false,
          "x-parameter-index": 1
        },
        "operationId": "LicenseController.revoke"
      }
    },
    "/admin/v1/licenses/{licenseId}": {
      "patch": {
        "x-controller-name": "LicenseController",
        "x-operation-name": "updateById",
        "tags": [
          "LicenseController"
        ],
        "responses": {
          "200": {
            "description": "Success - License updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LicenseResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - License not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseUpdateRequestPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "LicenseController.updateById"
      },
      "get": {
        "x-controller-name": "LicenseController",
        "x-operation-name": "findById",
        "tags": [
          "LicenseController"
        ],
        "responses": {
          "200": {
            "description": "Success - License instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LicenseResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - License not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "licenseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "LicenseController.findById"
      }
    },
    "/admin/v1/licenses": {
      "post": {
        "x-controller-name": "LicenseController",
        "x-operation-name": "create",
        "tags": [
          "LicenseController"
        ],
        "responses": {
          "201": {
            "description": "Success - License created. licenseKey is returned once and never retrievable again.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 201
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LicenseCreateResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseCreateRequest"
              }
            }
          }
        },
        "operationId": "LicenseController.create"
      },
      "get": {
        "x-controller-name": "LicenseController",
        "x-operation-name": "list",
        "tags": [
          "LicenseController"
        ],
        "responses": {
          "200": {
            "description": "Success - Paginated list of licenses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LicenseResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deviceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "LicenseController.list"
      }
    },
    "/admin/{userId}/resetUserPassword": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "resetUserPasswordByAdmin",
        "tags": [
          "UserController"
        ],
        "responses": {
          "204": {
            "description": "User password reset successfully by admin"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "newPassword": {
                    "type": "string"
                  }
                },
                "required": [
                  "newPassword"
                ]
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "UserController.resetUserPasswordByAdmin"
      }
    },
    "/alerts/batch": {
      "get": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "findByIds",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Fetch multiple alerts by IDs in a single query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AlertsController.findByIds"
      }
    },
    "/alerts/count/{userId}": {
      "get": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "countUserAlerts",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of AlertsController.countUserAlerts"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AlertsController.countUserAlerts"
      }
    },
    "/alerts/count": {
      "get": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "count",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Alerts model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Alerts.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Alerts>"
                }
              }
            }
          }
        ],
        "operationId": "AlertsController.count"
      }
    },
    "/alerts/delete-duplicates": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "deleteDuplicateAlerts",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.deleteDuplicateAlerts"
          }
        },
        "operationId": "BLEController.deleteDuplicateAlerts"
      }
    },
    "/alerts/duplicates": {
      "get": {
        "x-controller-name": "BLEController",
        "x-operation-name": "getDuplicateAlerts",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.getDuplicateAlerts"
          }
        },
        "operationId": "BLEController.getDuplicateAlerts"
      }
    },
    "/alerts/{id}/update-status": {
      "patch": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "updateAlertStatusWithEscalation",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Alert status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid status provided",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number"
                        },
                        "name": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Alert not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number"
                        },
                        "name": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "controlled",
                      "resolved"
                    ],
                    "description": "The new status for the alert"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AlertsController.updateAlertStatusWithEscalation"
      }
    },
    "/alerts/{id}": {
      "put": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "replaceById",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "204": {
            "description": "Alerts PUT success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Alerts"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AlertsController.replaceById"
      },
      "patch": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "updateById",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "204": {
            "description": "Alerts PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertsPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AlertsController.updateById"
      },
      "get": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "findById",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Alerts model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertsWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Alerts.Filter"
                }
              }
            }
          }
        ],
        "operationId": "AlertsController.findById"
      },
      "delete": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "deleteById",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "204": {
            "description": "Alerts DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AlertsController.deleteById"
      }
    },
    "/alerts/{userId}": {
      "get": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "findByUserId",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Array of Alerts model instances filtered by userId (supports optional pagination)",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AlertsWithRelations"
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AlertsWithRelations"
                          }
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categories",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AlertsController.findByUserId"
      }
    },
    "/alerts": {
      "post": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "create",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Alerts model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Alerts"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAlerts"
              }
            }
          }
        },
        "operationId": "AlertsController.create"
      },
      "patch": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "updateAll",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Alerts PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Alerts.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Alerts>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertsPartial"
              }
            }
          }
        },
        "operationId": "AlertsController.updateAll"
      },
      "get": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "find",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Array of Alerts model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlertsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Alerts.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "AlertsController.find"
      }
    },
    "/api/bleuseradd": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "saveDeviceName",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.saveDeviceName"
          }
        },
        "parameters": [
          {
            "name": "checkConflict",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "BLEController.saveDeviceName"
      }
    },
    "/api/bleuserautodisconnect": {
      "put": {
        "x-controller-name": "BLEController",
        "x-operation-name": "audoDisconnectDeviceName",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.audoDisconnectDeviceName"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "BLEController.audoDisconnectDeviceName"
      }
    },
    "/api/bleuserautoreconnect": {
      "put": {
        "x-controller-name": "BLEController",
        "x-operation-name": "audoReconnectDeviceName",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.audoReconnectDeviceName"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "BLEController.audoReconnectDeviceName"
      }
    },
    "/api/bleuserdisconnect": {
      "put": {
        "x-controller-name": "BLEController",
        "x-operation-name": "disconnectDeviceName",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.disconnectDeviceName"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "BLEController.disconnectDeviceName"
      }
    },
    "/api/blevitalbulk": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "bulkSaveBPVitals",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.bulkSaveBPVitals"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array"
              }
            }
          }
        },
        "operationId": "BLEController.bulkSaveBPVitals"
      }
    },
    "/api/blevitalsave": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "saveBleVitals",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.saveBleVitals"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "BLEController.saveBleVitals"
      }
    },
    "/api/company/dashboard": {
      "get": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "getDashboardData",
        "tags": [
          "CompanyController"
        ],
        "summary": "Get Company Dashboard Data",
        "description": "Retrieve dashboard data for companies based on user role",
        "responses": {
          "200": {
            "description": "Array of CompanyDetailsResponse with facility statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "company": {
                        "type": "object",
                        "properties": {}
                      },
                      "stats": {
                        "type": "object",
                        "properties": {
                          "totalFacilities": {
                            "type": "number"
                          },
                          "activeFacilities": {
                            "type": "number"
                          },
                          "totalUsers": {
                            "type": "number"
                          },
                          "activeUsers": {
                            "type": "number"
                          },
                          "vitalsToday": {
                            "type": "number"
                          },
                          "alertsToday": {
                            "type": "number"
                          },
                          "notesToday": {
                            "type": "number"
                          },
                          "connectedDevices": {
                            "type": "number"
                          },
                          "patientsWithDataAlerts": {
                            "type": "number"
                          },
                          "patientsWithCriticalAlerts": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "CompanyController.getDashboardData"
      }
    },
    "/api/company/{companyId}/change-password": {
      "patch": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "changeCompanyPassword",
        "tags": [
          "CompanyController"
        ],
        "summary": "Change Company Password",
        "description": "Change the password for a company user. Requires admin authentication.",
        "responses": {
          "204": {
            "description": "Company password changed successfully"
          },
          "403": {
            "description": "Only admin users can change company passwords"
          },
          "404": {
            "description": "Company or company user not found"
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "newPassword": {
                    "type": "string"
                  }
                },
                "required": [
                  "newPassword"
                ]
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "CompanyController.changeCompanyPassword"
      }
    },
    "/api/company/{companyId}/dashboard-summary": {
      "get": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "getCompanyDashboardSummary",
        "tags": [
          "CompanyController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Company-wide aggregated dashboard summary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "CompanyController.getCompanyDashboardSummary"
      }
    },
    "/api/company/{id}": {
      "patch": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "updateById",
        "tags": [
          "CompanyController"
        ],
        "summary": "Update Company by ID",
        "description": "Update a company's details by its ID and return the updated company",
        "responses": {
          "200": {
            "description": "Company updated successfully",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Company not found"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateRequestPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "CompanyController.updateById"
      },
      "get": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "findById",
        "tags": [
          "CompanyController"
        ],
        "summary": "Get Company by ID",
        "description": "Retrieve a single company by its ID",
        "responses": {
          "200": {
            "description": "CompanyDetailsResponse",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "404": {
            "description": "Company not found"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "CompanyController.findById"
      }
    },
    "/api/company": {
      "post": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "create",
        "tags": [
          "CompanyController"
        ],
        "summary": "Create Company",
        "description": "Create Company and return the created Company",
        "responses": {
          "200": {
            "description": "Company created successfully",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCreateRequest"
              }
            }
          },
          "description": "Company Create Request"
        },
        "operationId": "CompanyController.create"
      },
      "get": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "list",
        "tags": [
          "CompanyController"
        ],
        "summary": "Company List",
        "description": "Retrieve a list of all companies",
        "responses": {
          "200": {
            "description": "Array of CompanyDetailsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          }
        },
        "operationId": "CompanyController.list"
      }
    },
    "/api/device-info/{userId}": {
      "get": {
        "x-controller-name": "DeviceInfoController",
        "x-operation-name": "findByUserId",
        "tags": [
          "DeviceInfoController"
        ],
        "responses": {
          "200": {
            "description": "DeviceInfo model instance or null if not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceInfo"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DeviceInfoController.findByUserId"
      }
    },
    "/api/device-info": {
      "post": {
        "x-controller-name": "DeviceInfoController",
        "x-operation-name": "addDeviceInfo",
        "tags": [
          "DeviceInfoController"
        ],
        "responses": {
          "200": {
            "description": "DeviceInfo model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceInfo"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceInfoRequest"
              }
            }
          }
        },
        "operationId": "DeviceInfoController.addDeviceInfo"
      },
      "get": {
        "x-controller-name": "DeviceInfoController",
        "x-operation-name": "findAll",
        "tags": [
          "DeviceInfoController"
        ],
        "responses": {
          "200": {
            "description": "Array of DeviceInfo",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceInfo"
                  }
                }
              }
            }
          }
        },
        "operationId": "DeviceInfoController.findAll"
      }
    },
    "/api/user/company": {
      "get": {
        "x-controller-name": "CompanyController",
        "x-operation-name": "userCompanyList",
        "tags": [
          "CompanyController"
        ],
        "summary": "Get User-Specific Company List",
        "description": "Retrieve list of companies based on user role and permissions",
        "responses": {
          "200": {
            "description": "Array of CompanyDetailsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "403": {
            "description": "User does not have access to company list"
          }
        },
        "operationId": "CompanyController.userCompanyList"
      }
    },
    "/api/v1/access-logs": {
      "get": {
        "x-controller-name": "AccessLogController",
        "x-operation-name": "list",
        "tags": [
          "AccessLogController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of access logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccessLogResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "apiEndPointName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "apiEndPointMethod",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userAgent",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessedBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "imei",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deviceName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "AccessLogController.list"
      }
    },
    "/api/v1/activity/dismiss": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "dismissActivityToaster",
        "tags": [
          "UserController"
        ],
        "summary": "Dismiss Activity Toaster",
        "description": "Store dismissal of activity toaster with specific hash",
        "responses": {
          "200": {
            "description": "Activity toaster dismissed successfully"
          },
          "403": {
            "description": "Forbidden - Only doctors and admins can access this endpoint"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "activityHash"
                ],
                "properties": {
                  "activityHash": {
                    "type": "string",
                    "description": "Hash of the activity being dismissed (format: \"patientsCount-facilitiesCount\")"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.dismissActivityToaster"
      }
    },
    "/api/v1/activity/dismissal-status": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getActivityDismissalStatus",
        "tags": [
          "UserController"
        ],
        "summary": "Get Activity Toaster Dismissal Status",
        "description": "Get the hash of dismissed activity for the current user",
        "responses": {
          "200": {
            "description": "Dismissal status retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "dismissedHash": {
                          "type": "string",
                          "nullable": true,
                          "description": "Hash of dismissed activity, null if not dismissed"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Only doctors and admins can access this endpoint"
          }
        },
        "operationId": "UserController.getActivityDismissalStatus"
      }
    },
    "/api/v1/activity/recent-activity": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getRecentActivity",
        "tags": [
          "UserController"
        ],
        "summary": "Get Recent Activity",
        "description": "Retrieve new patients and facilities added in the last 7 days (Doctor and Admin roles)",
        "responses": {
          "200": {
            "description": "Recent activity retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "patients": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "number"
                            },
                            "companies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "count": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "facilities": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "number"
                            },
                            "companies": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "count": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Only doctors and admins can access this endpoint"
          }
        },
        "operationId": "UserController.getRecentActivity"
      }
    },
    "/api/v1/ai/ask": {
      "post": {
        "x-controller-name": "AiController",
        "x-operation-name": "ask",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Structured AI patient summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "patientName",
                        "patientToken",
                        "condition",
                        "assessment",
                        "priority",
                        "recommendations",
                        "insight",
                        "shortSummary",
                        "reportSummary",
                        "confidence",
                        "evidence",
                        "dataQuality",
                        "keyFindings",
                        "detailedClinicalAnalysis",
                        "telemetryEvidence",
                        "topOutlierReadings",
                        "bpMetrics",
                        "riskProfileMetrics",
                        "dataCompletenessPercentage",
                        "gapSummary",
                        "deviceClassification",
                        "clinicalInterpretation",
                        "reportTimestamp",
                        "retrievalContext",
                        "latestVitalsTable",
                        "criticalAlertsTable",
                        "alertDistributionSummary",
                        "circadianAnalysis",
                        "sleepAnalysis",
                        "tableSections",
                        "charts",
                        "suggestedActionKeys",
                        "version",
                        "disclaimer"
                      ],
                      "properties": {
                        "presetKey": {
                          "type": "string",
                          "enum": [
                            "health_today",
                            "vitals_trend_7d",
                            "vitals_trend_14d",
                            "vitals_trend_30d",
                            "day_vs_night",
                            "show_vitals",
                            "concerning_patterns",
                            "critical_alerts",
                            "sleep_quality"
                          ]
                        },
                        "patientName": {
                          "type": "string"
                        },
                        "patientToken": {
                          "type": "string"
                        },
                        "condition": {
                          "type": "string"
                        },
                        "assessment": {
                          "type": "string"
                        },
                        "priority": {
                          "type": "string",
                          "enum": [
                            "Low",
                            "Medium",
                            "High"
                          ]
                        },
                        "recommendations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "insight": {
                          "type": "string"
                        },
                        "shortSummary": {
                          "type": "string"
                        },
                        "reportSummary": {
                          "type": "string"
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "Low",
                            "Medium",
                            "High"
                          ]
                        },
                        "evidence": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "dataQuality": {
                          "type": "string",
                          "enum": [
                            "Low",
                            "Medium",
                            "High"
                          ]
                        },
                        "keyFindings": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "detailedClinicalAnalysis": {
                          "type": "string"
                        },
                        "telemetryEvidence": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "label",
                              "value",
                              "timestamp"
                            ],
                            "properties": {
                              "label": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "topOutlierReadings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "label",
                              "value",
                              "recordedAt"
                            ],
                            "properties": {
                              "label": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "recordedAt": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "bpMetrics": {
                          "type": "object",
                          "required": [
                            "abnormalDaysCount",
                            "abnormalDaysPercentage",
                            "totalDays",
                            "rollingMean7Day",
                            "slope",
                            "variabilitySD",
                            "variabilityIQR"
                          ],
                          "properties": {
                            "abnormalDaysCount": {
                              "type": "number"
                            },
                            "abnormalDaysPercentage": {
                              "type": "number"
                            },
                            "totalDays": {
                              "type": "number"
                            },
                            "rollingMean7Day": {
                              "type": "number"
                            },
                            "slope": {
                              "type": "string",
                              "enum": [
                                "Rising",
                                "Falling",
                                "Stable"
                              ]
                            },
                            "variabilitySD": {
                              "type": "number"
                            },
                            "variabilityIQR": {
                              "type": "number"
                            },
                            "discardedReadingsCount": {
                              "type": "number"
                            }
                          }
                        },
                        "riskProfileMetrics": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "label",
                              "value",
                              "level"
                            ],
                            "properties": {
                              "label": {
                                "type": "string"
                              },
                              "value": {
                                "type": "number"
                              },
                              "level": {
                                "type": "string",
                                "enum": [
                                  "Low",
                                  "Medium",
                                  "High"
                                ]
                              }
                            }
                          }
                        },
                        "dataCompletenessPercentage": {
                          "type": "number"
                        },
                        "gapSummary": {
                          "type": "string"
                        },
                        "deviceClassification": {
                          "type": "string"
                        },
                        "clinicalInterpretation": {
                          "type": "string"
                        },
                        "reportTimestamp": {
                          "type": "string"
                        },
                        "retrievalContext": {
                          "type": "object",
                          "required": [
                            "mode",
                            "effectiveWindowDays",
                            "fallbackWindowUsed",
                            "sourceSystems",
                            "summary"
                          ],
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "deterministic_db"
                              ]
                            },
                            "effectiveWindowDays": {
                              "type": "number"
                            },
                            "fallbackWindowUsed": {
                              "type": "boolean"
                            },
                            "sourceSystems": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "summary": {
                              "type": "string"
                            }
                          }
                        },
                        "latestVitalsTable": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "vital",
                              "value",
                              "status",
                              "timestamp"
                            ],
                            "properties": {
                              "vital": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "criticalAlertsTable": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "vital",
                              "reading",
                              "status",
                              "timestamp"
                            ],
                            "properties": {
                              "vital": {
                                "type": "string"
                              },
                              "reading": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "escalationLevel": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "alertDistributionSummary": {
                          "type": "object",
                          "required": [
                            "totalAlerts",
                            "vitalTypesInvolved",
                            "mostRecentAlertHoursAgo",
                            "currentStatus",
                            "distribution",
                            "severityBreakdown",
                            "currentVitalStatuses"
                          ],
                          "properties": {
                            "totalAlerts": {
                              "type": "number"
                            },
                            "vitalTypesInvolved": {
                              "type": "number"
                            },
                            "mostRecentAlertHoursAgo": {
                              "type": "number",
                              "nullable": true
                            },
                            "currentStatus": {
                              "type": "string"
                            },
                            "distribution": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "label",
                                  "count"
                                ],
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "count": {
                                    "type": "number"
                                  }
                                }
                              }
                            },
                            "severityBreakdown": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "label",
                                  "count"
                                ],
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "count": {
                                    "type": "number"
                                  }
                                }
                              }
                            },
                            "currentVitalStatuses": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "label",
                                  "status",
                                  "timestamp"
                                ],
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "type": "string"
                                  },
                                  "timestamp": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "circadianAnalysis": {
                          "type": "object",
                          "required": [
                            "periodLabel",
                            "dayWindowLabel",
                            "nightWindowLabel",
                            "nonDipperDetected",
                            "comparisonRows",
                            "keyFindings",
                            "assessment",
                            "priority"
                          ],
                          "properties": {
                            "periodLabel": {
                              "type": "string"
                            },
                            "dayWindowLabel": {
                              "type": "string"
                            },
                            "nightWindowLabel": {
                              "type": "string"
                            },
                            "nonDipperDetected": {
                              "type": "boolean"
                            },
                            "comparisonRows": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "vital",
                                  "daytimeValue",
                                  "nighttimeValue",
                                  "daytimeReadings",
                                  "nighttimeReadings",
                                  "finding"
                                ],
                                "properties": {
                                  "vital": {
                                    "type": "string"
                                  },
                                  "daytimeValue": {
                                    "type": "string"
                                  },
                                  "nighttimeValue": {
                                    "type": "string"
                                  },
                                  "daytimeReadings": {
                                    "type": "number"
                                  },
                                  "nighttimeReadings": {
                                    "type": "number"
                                  },
                                  "finding": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "keyFindings": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "assessment": {
                              "type": "string"
                            },
                            "priority": {
                              "type": "string",
                              "enum": [
                                "Low",
                                "Medium",
                                "High"
                              ]
                            }
                          }
                        },
                        "sleepAnalysis": {
                          "type": "object",
                          "required": [
                            "status",
                            "assessment",
                            "totalSleepMinutes",
                            "averageSleepMinutes",
                            "sleepSessions",
                            "latestSleepEnd",
                            "notes"
                          ],
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "Available",
                                "Insufficient Data"
                              ]
                            },
                            "assessment": {
                              "type": "string"
                            },
                            "totalSleepMinutes": {
                              "type": "number",
                              "nullable": true
                            },
                            "averageSleepMinutes": {
                              "type": "number",
                              "nullable": true
                            },
                            "sleepSessions": {
                              "type": "number"
                            },
                            "latestSleepEnd": {
                              "type": "string",
                              "nullable": true
                            },
                            "notes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "tableSections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "key",
                              "title",
                              "description",
                              "visible"
                            ],
                            "properties": {
                              "key": {
                                "type": "string",
                                "enum": [
                                  "latest_vitals",
                                  "critical_alerts",
                                  "day_night_comparison"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "visible": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "charts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "type",
                              "title",
                              "data"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "line",
                                  "bar"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "data": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "x",
                                    "y"
                                  ],
                                  "properties": {
                                    "x": {
                                      "type": "string"
                                    },
                                    "y": {
                                      "type": "number"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "suggestedActionKeys": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "view_bp_trends",
                              "check_alerts",
                              "analyze_last_7_days",
                              "review_evidence",
                              "monitor_priority",
                              "review_heart_rate_trend",
                              "review_oxygen_trend",
                              "compare_day_night",
                              "show_latest_vitals",
                              "review_sleep_quality",
                              "review_variability",
                              "inspect_outliers",
                              "review_risk_profile"
                            ]
                          }
                        },
                        "version": {
                          "type": "string",
                          "enum": [
                            "v1"
                          ]
                        },
                        "disclaimer": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question",
                  "patientId"
                ],
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "patientId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "presetKey": {
                    "type": "string",
                    "enum": [
                      "health_today",
                      "vitals_trend_7d",
                      "vitals_trend_14d",
                      "vitals_trend_30d",
                      "day_vs_night",
                      "show_vitals",
                      "concerning_patterns",
                      "critical_alerts",
                      "sleep_quality"
                    ]
                  },
                  "previousActionKey": {
                    "type": "string",
                    "enum": [
                      "view_bp_trends",
                      "check_alerts",
                      "analyze_last_7_days",
                      "review_evidence",
                      "monitor_priority",
                      "review_heart_rate_trend",
                      "review_oxygen_trend",
                      "compare_day_night",
                      "show_latest_vitals",
                      "review_sleep_quality",
                      "review_variability",
                      "inspect_outliers",
                      "review_risk_profile"
                    ]
                  },
                  "clientTimezone": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "AiController.ask"
      }
    },
    "/api/v1/ai/audit-log/recent": {
      "get": {
        "x-controller-name": "AiController",
        "x-operation-name": "getRecentAuditLogs",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Recent AI audit log entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "doctorId": {
                                "type": "string"
                              },
                              "patientToken": {
                                "type": "string"
                              },
                              "presetKey": {
                                "type": "string"
                              },
                              "latencyMs": {
                                "type": "number"
                              },
                              "cacheHit": {
                                "type": "boolean"
                              },
                              "cacheSavedCostUsd": {
                                "type": "number"
                              },
                              "totalCost": {
                                "type": "number"
                              },
                              "validatorStatus": {
                                "type": "string"
                              },
                              "error": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "number"
                        },
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "presetKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiController.getRecentAuditLogs"
      }
    },
    "/api/v1/ai/audit-log/{id}": {
      "get": {
        "x-controller-name": "AiController",
        "x-operation-name": "getAuditLogDetails",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Detailed AI audit log entry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AiController.getAuditLogDetails"
      }
    },
    "/api/v1/ai/clinical-summary": {
      "post": {
        "x-controller-name": "ClinicalSummaryController",
        "x-operation-name": "getSummary",
        "tags": [
          "ClinicalSummaryController"
        ],
        "responses": {
          "200": {
            "description": "Deterministic-status, AI-phrased Vital Trend Summary for a single vital chart (Phase 1 — descriptive trend summary, not risk stratification)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "headline": {
                          "type": "string"
                        },
                        "context": {
                          "type": "string"
                        },
                        "pattern": {
                          "type": "string",
                          "nullable": true
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "green",
                            "yellow",
                            "red"
                          ]
                        },
                        "statusLabel": {
                          "type": "string",
                          "enum": [
                            "Within Configured Range",
                            "Outside Configured Range",
                            "Critical Configured Threshold Met",
                            "Insufficient data, stale data, or not clinically configured"
                          ]
                        },
                        "dataQuality": {
                          "type": "string",
                          "enum": [
                            "sufficient",
                            "insufficient_data",
                            "inadequate_baseline",
                            "insufficient_wear_time",
                            "not_clinically_configured",
                            "stale_data"
                          ]
                        },
                        "latestReading": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "recordedAt": {
                              "type": "string"
                            },
                            "diastolicValue": {
                              "type": "number",
                              "nullable": true
                            }
                          }
                        },
                        "windowAverage": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "diastolicValue": {
                              "type": "number",
                              "nullable": true
                            }
                          }
                        },
                        "baseline": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string"
                            },
                            "diastolicValue": {
                              "type": "number",
                              "nullable": true
                            },
                            "windowDays": {
                              "type": "number"
                            },
                            "sampleCount": {
                              "type": "number"
                            },
                            "distinctDayCount": {
                              "type": "number"
                            },
                            "isAdequate": {
                              "type": "boolean"
                            }
                          }
                        },
                        "sampleSize": {
                          "type": "number"
                        },
                        "distinctDayCount": {
                          "type": "number"
                        },
                        "measurementPeriod": {
                          "type": "object",
                          "properties": {
                            "start": {
                              "type": "string"
                            },
                            "end": {
                              "type": "string"
                            }
                          }
                        },
                        "dataFreshnessMinutes": {
                          "type": "number",
                          "nullable": true
                        },
                        "ruleId": {
                          "type": "string"
                        },
                        "ruleName": {
                          "type": "string"
                        },
                        "disclaimer": {
                          "type": "string"
                        },
                        "trendExcludedOutliers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "number"
                              },
                              "recordedAt": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "latestBpGuidelineCategory": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "category": {
                              "type": "string",
                              "enum": [
                                "Normal",
                                "Elevated",
                                "Stage 1",
                                "Stage 2"
                              ]
                            },
                            "label": {
                              "type": "string"
                            },
                            "caveat": {
                              "type": "string"
                            },
                            "source": {
                              "type": "string"
                            }
                          }
                        },
                        "windowAverageBpGuidelineCategory": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "category": {
                              "type": "string",
                              "enum": [
                                "Normal",
                                "Elevated",
                                "Stage 1",
                                "Stage 2"
                              ]
                            },
                            "label": {
                              "type": "string"
                            },
                            "caveat": {
                              "type": "string"
                            },
                            "source": {
                              "type": "string"
                            }
                          }
                        },
                        "bpDipperStatus": {
                          "type": "string",
                          "nullable": true
                        },
                        "bpDipperStatusDiastolic": {
                          "type": "string",
                          "nullable": true
                        },
                        "bpDipperDetail": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "systolic": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "caveat": {
                                  "type": "string"
                                },
                                "percentChange": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "nighttimeReadingCount": {
                                  "type": "number"
                                },
                                "daytimeReadingCount": {
                                  "type": "number"
                                },
                                "nighttimeReadingDates": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "daytimeReadingDates": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "diastolic": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "caveat": {
                                  "type": "string"
                                },
                                "percentChange": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "nighttimeReadingCount": {
                                  "type": "number"
                                },
                                "daytimeReadingCount": {
                                  "type": "number"
                                },
                                "nighttimeReadingDates": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "daytimeReadingDates": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "latestMap": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string",
                              "enum": [
                                "mmHg"
                              ]
                            },
                            "methodology": {
                              "type": "string"
                            }
                          }
                        },
                        "windowAverageMap": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "value": {
                              "type": "number"
                            },
                            "unit": {
                              "type": "string",
                              "enum": [
                                "mmHg"
                              ]
                            },
                            "methodology": {
                              "type": "string"
                            }
                          }
                        },
                        "temperatureBand": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "tier": {
                              "type": "string",
                              "enum": [
                                "T1",
                                "T2",
                                "T3",
                                "T4"
                              ]
                            },
                            "label": {
                              "type": "string"
                            }
                          }
                        },
                        "temperatureBaselineMaturity": {
                          "type": "string",
                          "enum": [
                            "insufficient",
                            "provisional",
                            "stable"
                          ],
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "patientId",
                  "vitalType",
                  "range"
                ],
                "properties": {
                  "patientId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "vitalType": {
                    "type": "string",
                    "enum": [
                      "heartRate",
                      "pulse",
                      "bloodPressure",
                      "spo2",
                      "steps",
                      "sleep",
                      "temperature"
                    ]
                  },
                  "range": {
                    "type": "string",
                    "enum": [
                      "last10",
                      "today",
                      "thisWeek",
                      "thisMonth",
                      "custom"
                    ]
                  },
                  "facilityTimezone": {
                    "type": "string"
                  },
                  "customRangeStart": {
                    "type": "string",
                    "description": "Required when range is \"custom\". ISO date (YYYY-MM-DD)."
                  },
                  "customRangeEnd": {
                    "type": "string",
                    "description": "Required when range is \"custom\". ISO date (YYYY-MM-DD)."
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "ClinicalSummaryController.getSummary"
      }
    },
    "/api/v1/ai/evaluation/runs/{id}/results": {
      "get": {
        "x-controller-name": "AiEvaluationController",
        "x-operation-name": "getRunResults",
        "tags": [
          "AiEvaluationController"
        ],
        "responses": {
          "200": {
            "description": "Get AI Evaluation Run Results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AiEvaluationResult"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AiEvaluationController.getRunResults"
      }
    },
    "/api/v1/ai/evaluation/runs/{id}": {
      "get": {
        "x-controller-name": "AiEvaluationController",
        "x-operation-name": "getRunDetails",
        "tags": [
          "AiEvaluationController"
        ],
        "responses": {
          "200": {
            "description": "Get AI Evaluation Run Details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiEvaluationRun"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AiEvaluationController.getRunDetails"
      }
    },
    "/api/v1/ai/evaluation/runs": {
      "post": {
        "x-controller-name": "AiEvaluationController",
        "x-operation-name": "triggerRun",
        "tags": [
          "AiEvaluationController"
        ],
        "responses": {
          "200": {
            "description": "Trigger AI Evaluation Run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiEvaluationRun"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trigger": {
                    "type": "string",
                    "enum": [
                      "manual",
                      "nightly",
                      "ci_cd"
                    ],
                    "default": "manual"
                  },
                  "limit": {
                    "type": "number"
                  },
                  "presetKey": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "AiEvaluationController.triggerRun"
      }
    },
    "/api/v1/ai/evaluation/test-cases": {
      "post": {
        "x-controller-name": "AiEvaluationController",
        "x-operation-name": "createTestCase",
        "tags": [
          "AiEvaluationController"
        ],
        "responses": {
          "200": {
            "description": "Create AI Clinical Test Case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiClinicalTestCase"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewTestCase"
              }
            }
          }
        },
        "operationId": "AiEvaluationController.createTestCase"
      },
      "get": {
        "x-controller-name": "AiEvaluationController",
        "x-operation-name": "getTestCases",
        "tags": [
          "AiEvaluationController"
        ],
        "responses": {
          "200": {
            "description": "Get AI Clinical Test Cases",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AiClinicalTestCase"
                  }
                }
              }
            }
          }
        },
        "operationId": "AiEvaluationController.getTestCases"
      }
    },
    "/api/v1/ai/evaluation-runs/recent": {
      "get": {
        "x-controller-name": "AiController",
        "x-operation-name": "getRecentEvaluationRuns",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Recent AI evaluation run history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "runs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "startedAt": {
                                "type": "string"
                              },
                              "completedAt": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "triggerType": {
                                "type": "string"
                              },
                              "passedCases": {
                                "type": "number"
                              },
                              "totalCases": {
                                "type": "number"
                              },
                              "passRate": {
                                "type": "number"
                              },
                              "averageGroundingScore": {
                                "type": "number"
                              },
                              "averageLatencyMs": {
                                "type": "number"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "number"
                        },
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "triggerType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiController.getRecentEvaluationRuns"
      }
    },
    "/api/v1/ai/safety-alerts/{id}/update-status": {
      "patch": {
        "x-controller-name": "AiController",
        "x-operation-name": "updateSafetyAlertStatus",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Update AI safety alert status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "resolved"
                    ]
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AiController.updateSafetyAlertStatus"
      }
    },
    "/api/v1/ai/safety-alerts": {
      "get": {
        "x-controller-name": "AiController",
        "x-operation-name": "findSafetyAlerts",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Array of AiSafetyAlert model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "operationId": "AiController.findSafetyAlerts"
      }
    },
    "/api/v1/ai/telemetry/dashboard": {
      "get": {
        "x-controller-name": "AiController",
        "x-operation-name": "getTelemetryDashboard",
        "tags": [
          "AiController"
        ],
        "responses": {
          "200": {
            "description": "Telemetry and quality metrics for AI operations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AiController.getTelemetryDashboard"
      }
    },
    "/api/v1/alerts/acknowledge/bulk": {
      "post": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "acknowledgeAllPatientsAlerts",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Acknowledge active alerts for multiple patients at once",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "patientId": {
                            "type": "string"
                          },
                          "acknowledgedBy": {
                            "type": "string"
                          },
                          "acknowledgedByRole": {
                            "type": "string"
                          },
                          "acknowledgedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "alertCount": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "patientIds"
                ],
                "properties": {
                  "patientIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "description": "List of patient IDs whose alerts should be acknowledged"
        },
        "operationId": "AlertsController.acknowledgeAllPatientsAlerts"
      }
    },
    "/api/v1/alerts/acknowledge/patient/{patientId}": {
      "post": {
        "x-controller-name": "AlertsController",
        "x-operation-name": "acknowledgePatientAlerts",
        "tags": [
          "AlertsController"
        ],
        "responses": {
          "200": {
            "description": "Acknowledge all active alerts for a patient with a date/time stamp",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "patientId": {
                          "type": "string"
                        },
                        "acknowledgedBy": {
                          "type": "string"
                        },
                        "acknowledgedByRole": {
                          "type": "string"
                        },
                        "acknowledgedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "alertCount": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AlertsController.acknowledgePatientAlerts"
      }
    },
    "/api/v1/attendant-privileges": {
      "get": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "listPrivilegeCatalog",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "Active attendant privilege catalog, ordered by sortOrder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "AttendantController.listPrivilegeCatalog"
      }
    },
    "/api/v1/attendants/lookup-contact": {
      "get": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "lookupContact",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "Existing-account probe for the assign-caregiver form (identity + active roles only)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "patientUserId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "AttendantController.lookupContact"
      }
    },
    "/api/v1/attendants/me/access/{patientUserId}": {
      "get": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "myAccess",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "The logged-in attendant's granted capabilities for one patient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "patientUserId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AttendantController.myAccess"
      }
    },
    "/api/v1/attendants/me/patients": {
      "get": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "myPatients",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "Identity cards for the logged-in attendant's assigned patients",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "AttendantController.myPatients"
      }
    },
    "/api/v1/attendants/{id}": {
      "patch": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "update",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "Attendant assignment updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "allowedPrivileges": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "relationship": {
                    "type": "string"
                  },
                  "notificationTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AttendantController.update"
      },
      "delete": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "remove",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "Attendant assignment removed (soft delete)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AttendantController.remove"
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "x-controller-name": "AuthController",
        "x-operation-name": "login",
        "tags": [
          "AuthController"
        ],
        "responses": {
          "200": {
            "description": "Signed in",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "refreshToken": {
                          "type": "string"
                        },
                        "expiresIn": {
                          "type": "number"
                        },
                        "refreshExpiresIn": {
                          "type": "number"
                        },
                        "role": {
                          "type": "string"
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "mustChangePassword": {
                          "type": "boolean"
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "AuthController.login"
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "x-controller-name": "AuthController",
        "x-operation-name": "logout",
        "tags": [
          "AuthController"
        ],
        "responses": {
          "200": {
            "description": "Signed out"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false
        },
        "operationId": "AuthController.logout"
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "x-controller-name": "AuthController",
        "x-operation-name": "refresh",
        "tags": [
          "AuthController"
        ],
        "responses": {
          "200": {
            "description": "Tokens renewed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "refreshToken": {
                          "type": "string"
                        },
                        "expiresIn": {
                          "type": "number"
                        },
                        "refreshExpiresIn": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Refresh token invalid, expired, or replayed"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "AuthController.refresh"
      }
    },
    "/api/v1/auth/refresh-tokens/{tokenId}": {
      "delete": {
        "x-controller-name": "AuthRefreshTokenController",
        "x-operation-name": "revokeMine",
        "tags": [
          "AuthRefreshTokenController"
        ],
        "responses": {
          "200": {
            "description": "Session revoked"
          }
        },
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AuthRefreshTokenController.revokeMine"
      }
    },
    "/api/v1/auth/refresh-tokens": {
      "get": {
        "x-controller-name": "AuthRefreshTokenController",
        "x-operation-name": "listMine",
        "tags": [
          "AuthRefreshTokenController"
        ],
        "responses": {
          "200": {
            "description": "The caller's sessions"
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "AuthRefreshTokenController.listMine"
      },
      "delete": {
        "x-controller-name": "AuthRefreshTokenController",
        "x-operation-name": "revokeAllMine",
        "tags": [
          "AuthRefreshTokenController"
        ],
        "responses": {
          "200": {
            "description": "Sessions revoked"
          }
        },
        "parameters": [
          {
            "name": "exceptCurrent",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "operationId": "AuthRefreshTokenController.revokeAllMine"
      }
    },
    "/api/v1/auth/switch-role": {
      "post": {
        "x-controller-name": "AuthController",
        "x-operation-name": "switchRole",
        "tags": [
          "AuthController"
        ],
        "responses": {
          "200": {
            "description": "Role switched",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "refreshToken": {
                          "type": "string"
                        },
                        "expiresIn": {
                          "type": "number"
                        },
                        "refreshExpiresIn": {
                          "type": "number"
                        },
                        "role": {
                          "type": "string"
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "AuthController.switchRole"
      }
    },
    "/api/v1/billing-report/download/adherence": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadAdherenceReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Adherence Report XLSX file",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdherenceReportRequest"
              }
            }
          },
          "description": "Adherence report request with filters",
          "required": true
        },
        "operationId": "BillingReportController.downloadAdherenceReport"
      }
    },
    "/api/v1/billing-report/download/facility-adherence-trend": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadFacilityAdherenceTrendReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Facility Adherence Trend Report XLSX file",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FacilityAdherenceTrendRequest"
              }
            }
          },
          "description": "Facility adherence trend report request",
          "required": true
        },
        "operationId": "BillingReportController.downloadFacilityAdherenceTrendReport"
      }
    },
    "/api/v1/billing-report/download/facility-billing": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadFacilityBillingReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Facility Billing Report CSV file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FacilityBillingReportRequest"
              }
            }
          },
          "description": "Facility billing report request with filters",
          "required": true
        },
        "operationId": "BillingReportController.downloadFacilityBillingReport"
      }
    },
    "/api/v1/billing-report/download/raw": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadRawReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Raw Report CSV file",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RawReportRequest"
              }
            }
          },
          "description": "Raw report request with filters",
          "required": true
        },
        "operationId": "BillingReportController.downloadRawReport"
      }
    },
    "/api/v1/billing-report/download/trailing-adherence": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadTrailingAdherenceReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Trailing Adherence Report XLSX file",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrailingAdherenceRequest"
              }
            }
          },
          "description": "Trailing adherence report request with filters",
          "required": true
        },
        "operationId": "BillingReportController.downloadTrailingAdherenceReport"
      }
    },
    "/api/v1/billing-report/download/usage": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadUsageReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Usage Report XLSX file",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "operationId": "BillingReportController.downloadUsageReport"
      }
    },
    "/api/v1/billing-report/offboard/download": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadOffboardReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Offboard report CSV",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "operationId": "BillingReportController.downloadOffboardReport"
      }
    },
    "/api/v1/billing-report/offboard": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "getOffboardReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Offboard report fetched successfully"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "operationId": "BillingReportController.getOffboardReport"
      }
    },
    "/api/v1/billing-report/onboard/download": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "downloadOnboardReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Onboard report CSV",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "operationId": "BillingReportController.downloadOnboardReport"
      }
    },
    "/api/v1/billing-report/onboard": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "getOnboardReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Onboard report fetched successfully"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "operationId": "BillingReportController.getOnboardReport"
      }
    },
    "/api/v1/billing-report": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "getBillingReport",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Billing report with pagination - Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Billing report fetched successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BillingReportItem"
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number",
                              "example": 1
                            },
                            "pageSize": {
                              "type": "number",
                              "example": 10
                            },
                            "total": {
                              "type": "number",
                              "example": 150
                            },
                            "totalPages": {
                              "type": "number",
                              "example": 15
                            }
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "example": "2026-01-30T12:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - User does not have access to requested data"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingReportRequest"
              },
              "examples": {
                "basic": {
                  "summary": "Basic request",
                  "value": {
                    "month": "01",
                    "year": "2026",
                    "page": 1,
                    "limit": 10
                  }
                },
                "withFilters": {
                  "summary": "With filters",
                  "value": {
                    "month": "01",
                    "year": "2026",
                    "page": 1,
                    "limit": 10,
                    "companyIds": [
                      "company-id-1",
                      "company-id-2"
                    ],
                    "status": "billable",
                    "searchText": "John",
                    "sortBy": "name",
                    "sortOrder": "ASC"
                  }
                },
                "multipleCompanies": {
                  "summary": "Multiple companies (30+)",
                  "value": {
                    "month": "01",
                    "year": "2026",
                    "page": 1,
                    "limit": 20,
                    "companyIds": [
                      "company-1",
                      "company-2",
                      "company-3",
                      "...",
                      "company-30"
                    ],
                    "status": "active"
                  }
                }
              }
            }
          },
          "description": "Billing report request with filters and pagination",
          "required": true
        },
        "operationId": "BillingReportController.getBillingReport"
      }
    },
    "/api/v1/billing-report-summary": {
      "post": {
        "x-controller-name": "BillingReportController",
        "x-operation-name": "getBillingReportSummary",
        "tags": [
          "BillingReportController"
        ],
        "responses": {
          "200": {
            "description": "Billing report summary counts - Success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Billing summary fetched successfully"
                    },
                    "data": {
                      "$ref": "#/components/schemas/BillingReportSummaryResponse"
                    },
                    "timestamp": {
                      "type": "string",
                      "example": "2026-02-09T12:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid parameters"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - JWT token missing or invalid"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - User does not have access to requested data"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingReportSummaryRequest"
              },
              "examples": {
                "basic": {
                  "summary": "Basic request",
                  "value": {
                    "month": "01",
                    "year": "2026"
                  }
                },
                "withFilters": {
                  "summary": "With filters",
                  "value": {
                    "month": "01",
                    "year": "2026",
                    "companyIds": [
                      "company-id-1",
                      "company-id-2"
                    ],
                    "searchText": "John"
                  }
                },
                "multipleCompanies": {
                  "summary": "Multiple companies (30+)",
                  "value": {
                    "month": "01",
                    "year": "2026",
                    "companyIds": [
                      "company-1",
                      "company-2",
                      "company-3",
                      "...",
                      "company-30"
                    ]
                  }
                }
              }
            }
          },
          "description": "Billing report summary request with filters only (no pagination)",
          "required": true
        },
        "operationId": "BillingReportController.getBillingReportSummary"
      }
    },
    "/api/v1/ble-devices/me": {
      "get": {
        "x-controller-name": "BLEController",
        "x-operation-name": "getBleDataForCurrentUser",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.getBleDataForCurrentUser"
          }
        },
        "operationId": "BLEController.getBleDataForCurrentUser"
      }
    },
    "/api/v1/ble-devices/{deviceId}/ios-uuid": {
      "put": {
        "x-controller-name": "BLEController",
        "x-operation-name": "updateIosUuid",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.updateIosUuid"
          }
        },
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "iosUuid"
                ],
                "properties": {
                  "iosUuid": {
                    "type": "string",
                    "description": "iOS-specific UUID for this device"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "BLEController.updateIosUuid"
      }
    },
    "/api/v1/bulk-notifications/{id}/cancel": {
      "patch": {
        "x-controller-name": "BulkNotificationController",
        "x-operation-name": "cancel",
        "tags": [
          "BulkNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Bulk notification execution cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/BulkNotificationResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "BulkNotificationController.cancel"
      }
    },
    "/api/v1/bulk-notifications/{id}": {
      "get": {
        "x-controller-name": "BulkNotificationController",
        "x-operation-name": "getById",
        "tags": [
          "BulkNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Bulk notification execution detail with computed delivery summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/BulkNotificationResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "BulkNotificationController.getById"
      }
    },
    "/api/v1/bulk-notifications": {
      "get": {
        "x-controller-name": "BulkNotificationController",
        "x-operation-name": "list",
        "tags": [
          "BulkNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of bulk notification executions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BulkNotificationResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notificationRuleId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BulkNotificationController.list"
      }
    },
    "/api/v1/calls/initiate": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "initiateAiCall",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Initiate AI calling",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AiCallingInitiateResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiCallingInitiateRequest"
              }
            }
          }
        },
        "operationId": "UserController.initiateAiCall"
      }
    },
    "/api/v1/calls/{callId}/logs": {
      "get": {
        "x-controller-name": "RetellWebhookController",
        "x-operation-name": "getCallEventLogs",
        "tags": [
          "RetellWebhookController"
        ],
        "responses": {
          "200": {
            "description": "Call event logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RetellWebhookController.getCallEventLogs"
      }
    },
    "/api/v1/calls/{callId}": {
      "get": {
        "x-controller-name": "RetellWebhookController",
        "x-operation-name": "getCallDetail",
        "tags": [
          "RetellWebhookController"
        ],
        "responses": {
          "200": {
            "description": "Call detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RetellWebhookController.getCallDetail"
      }
    },
    "/api/v1/calls": {
      "get": {
        "x-controller-name": "RetellWebhookController",
        "x-operation-name": "getCallLogs",
        "tags": [
          "RetellWebhookController"
        ],
        "responses": {
          "200": {
            "description": "Paginated call logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "RetellWebhookController.getCallLogs"
      }
    },
    "/api/v1/chronic-conditions": {
      "get": {
        "x-controller-name": "ChronicConditionController",
        "x-operation-name": "findAll",
        "tags": [
          "ChronicConditionController"
        ],
        "responses": {
          "200": {
            "description": "List of active chronic conditions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChronicCondition"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "ChronicConditionController.findAll"
      }
    },
    "/api/v1/company-treatment-categories/{id}": {
      "patch": {
        "x-controller-name": "CompanyTreatmentCategoryController",
        "x-operation-name": "update",
        "tags": [
          "CompanyTreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "Company treatment category updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "description": {
                    "type": "string"
                  },
                  "maxSessionDurationInSeconds": {
                    "type": "number",
                    "minimum": 1
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "CompanyTreatmentCategoryController.update"
      },
      "delete": {
        "x-controller-name": "CompanyTreatmentCategoryController",
        "x-operation-name": "softDelete",
        "tags": [
          "CompanyTreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "Company treatment category soft-deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "CompanyTreatmentCategoryController.softDelete"
      }
    },
    "/api/v1/company-treatment-categories": {
      "post": {
        "x-controller-name": "CompanyTreatmentCategoryController",
        "x-operation-name": "create",
        "tags": [
          "CompanyTreatmentCategoryController"
        ],
        "responses": {
          "201": {
            "description": "Company treatment category created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "companyId",
                  "treatmentCategoryId",
                  "maxSessionDurationInSeconds"
                ],
                "properties": {
                  "companyId": {
                    "type": "string"
                  },
                  "treatmentCategoryId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "maxSessionDurationInSeconds": {
                    "type": "number",
                    "minimum": 1
                  }
                }
              }
            }
          }
        },
        "operationId": "CompanyTreatmentCategoryController.create"
      },
      "get": {
        "x-controller-name": "CompanyTreatmentCategoryController",
        "x-operation-name": "listByCompany",
        "tags": [
          "CompanyTreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "List company treatment categories enriched with category name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "CompanyTreatmentCategoryController.listByCompany"
      }
    },
    "/api/v1/cpt-recalculation-logs": {
      "get": {
        "x-controller-name": "CptCodeController",
        "x-operation-name": "getRecalculationLogs",
        "tags": [
          "CptCodeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Paginated recalculation logs retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Recalculation logs retrieved successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "userId": {
                                "type": "string"
                              },
                              "monthYear": {
                                "type": "string",
                                "example": "01-2026"
                              },
                              "oldCptCodes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "newCptCodes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "adherenceDays": {
                                "type": "number"
                              },
                              "careTimerMinutes": {
                                "type": "number"
                              },
                              "changed": {
                                "type": "boolean"
                              },
                              "isDryRun": {
                                "type": "boolean"
                              },
                              "executionId": {
                                "type": "string"
                              },
                              "executionNumber": {
                                "type": "number"
                              },
                              "migratedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "migratedBy": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "page": {
                          "type": "number",
                          "example": 1
                        },
                        "limit": {
                          "type": "number",
                          "example": 50
                        },
                        "total": {
                          "type": "number",
                          "example": 150
                        },
                        "totalPages": {
                          "type": "number",
                          "example": 3
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Only Admin can view logs"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "monthYear",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "CptCodeController.getRecalculationLogs"
      }
    },
    "/api/v1/cpt-recalculation-report": {
      "get": {
        "x-controller-name": "CptCodeController",
        "x-operation-name": "getRecalculationReport",
        "tags": [
          "CptCodeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Recalculation report retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Recalculation report retrieved successfully"
                    },
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "description": "Detailed execution report (when executionId provided)",
                          "properties": {
                            "executionId": {
                              "type": "string"
                            },
                            "monthYear": {
                              "type": "string",
                              "example": "01-2026"
                            },
                            "isDryRun": {
                              "type": "boolean"
                            },
                            "totalUsers": {
                              "type": "number"
                            },
                            "estimatedChanges": {
                              "type": "number"
                            },
                            "noChanges": {
                              "type": "number"
                            },
                            "codesAdded": {
                              "type": "object"
                            },
                            "codesRemoved": {
                              "type": "object"
                            },
                            "userChanges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "userId": {
                                    "type": "string"
                                  },
                                  "userName": {
                                    "type": "string"
                                  },
                                  "oldCodes": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "newCodes": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "changed": {
                                    "type": "boolean"
                                  },
                                  "adherenceDays": {
                                    "type": "number"
                                  },
                                  "careTimerMinutes": {
                                    "type": "number"
                                  }
                                }
                              }
                            },
                            "createdAt": {
                              "type": "string"
                            },
                            "executionNumber": {
                              "type": "number"
                            },
                            "executedBy": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "description": "Month executions summary (when monthYear provided)",
                          "properties": {
                            "monthYear": {
                              "type": "string",
                              "example": "01-2026"
                            },
                            "executions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "executionId": {
                                    "type": "string"
                                  },
                                  "executionNumber": {
                                    "type": "number"
                                  },
                                  "totalUsers": {
                                    "type": "number"
                                  },
                                  "usersUpdated": {
                                    "type": "number"
                                  },
                                  "executedAt": {
                                    "type": "string"
                                  },
                                  "executedBy": {
                                    "type": "string"
                                  },
                                  "isDryRun": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "totalExecutions": {
                              "type": "number"
                            }
                          }
                        }
                      ]
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Missing required query parameter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "message": {
                      "type": "string",
                      "example": "Either executionId or monthYear query parameter is required"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Only Admin can view reports"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Execution not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 404
                    },
                    "message": {
                      "type": "string",
                      "example": "No recalculation found for executionId: 123e4567-e89b-12d3-a456-426614174000"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "executionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "monthYear",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "CptCodeController.getRecalculationReport"
      }
    },
    "/api/v1/data-gap-alert/{alertId}/resolve": {
      "post": {
        "x-controller-name": "DataGapAlertController",
        "x-operation-name": "resolveAlert",
        "tags": [
          "DataGapAlertController"
        ],
        "responses": {
          "200": {
            "description": "Resolve a data gap alert and create a response record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/DataGapAlertResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Alert already resolved or invalid action"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Alert not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataGapAlertResolveRequest"
              }
            }
          },
          "description": "Data gap alert resolve request",
          "x-parameter-index": 1
        },
        "operationId": "DataGapAlertController.resolveAlert"
      }
    },
    "/api/v1/data-gap-alert/{alertId}/responses": {
      "get": {
        "x-controller-name": "DataGapAlertResponseController",
        "x-operation-name": "getResponsesByAlertId",
        "tags": [
          "DataGapAlertResponseController"
        ],
        "responses": {
          "200": {
            "description": "List of all responses for a specific data gap alert",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataGapAlertResponseResponse"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DataGapAlertResponseController.getResponsesByAlertId"
      }
    },
    "/api/v1/data-gap-alert": {
      "get": {
        "x-controller-name": "DataGapAlertController",
        "x-operation-name": "list",
        "tags": [
          "DataGapAlertController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of DataGapAlert records for specific user with optional date range filter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataGapAlertResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "resolved"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "DataGapAlertController.list"
      }
    },
    "/api/v1/device-settings/default": {
      "get": {
        "x-controller-name": "DeviceSettingController",
        "x-operation-name": "getDefault",
        "tags": [
          "DeviceSettingController"
        ],
        "responses": {
          "200": {
            "description": "Get default device setting JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "DeviceSettingController.getDefault"
      }
    },
    "/api/v1/device-settings/{userId}": {
      "patch": {
        "x-controller-name": "DeviceSettingController",
        "x-operation-name": "upsertDeviceSettings",
        "tags": [
          "DeviceSettingController"
        ],
        "responses": {
          "200": {
            "description": "Update or create device settings for a user (upsert)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "applyToBuddi",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSettingUpdate"
              }
            }
          },
          "x-parameter-index": 2
        },
        "operationId": "DeviceSettingController.upsertDeviceSettings"
      },
      "get": {
        "x-controller-name": "DeviceSettingController",
        "x-operation-name": "getConfigForUser",
        "tags": [
          "DeviceSettingController"
        ],
        "responses": {
          "200": {
            "description": "Get device setting cards and user DB value with device info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DeviceSettingController.getConfigForUser"
      }
    },
    "/api/v1/facility-integrations/check/{facilityId}": {
      "get": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "checkAccess",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Check whether a facility is allowed to publish vitals for a given provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "facilityId": {
                          "type": "string"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "allowed": {
                          "type": "boolean"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "FacilityIntegrationController.checkAccess"
      }
    },
    "/api/v1/facility-integrations/{id}/activate": {
      "patch": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "activate",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Mark a facility integration as active — SNS publishing resumes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FacilityIntegration"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FacilityIntegrationController.activate"
      }
    },
    "/api/v1/facility-integrations/{id}/deactivate": {
      "patch": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "deactivate",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Mark a facility integration as inactive — SNS publishing is skipped",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FacilityIntegration"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FacilityIntegrationController.deactivate"
      }
    },
    "/api/v1/facility-integrations/{id}/disable": {
      "patch": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "disable",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Disable a facility integration (soft toggle — record stays in DB)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FacilityIntegration"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FacilityIntegrationController.disable"
      }
    },
    "/api/v1/facility-integrations/{id}/enable": {
      "patch": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "enable",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Enable a facility integration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FacilityIntegration"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FacilityIntegrationController.enable"
      }
    },
    "/api/v1/facility-integrations/{id}": {
      "get": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "findById",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Get a single facility integration by id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FacilityIntegration"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FacilityIntegrationController.findById"
      },
      "delete": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "deleteById",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "Permanently delete a facility integration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "FacilityIntegrationController.deleteById"
      }
    },
    "/api/v1/facility-integrations": {
      "post": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "create",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "201": {
            "description": "Grant a facility access to publish vitals to a provider via SNS",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/FacilityIntegration"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FacilityIntegrationCreateRequest"
              }
            }
          }
        },
        "operationId": "FacilityIntegrationController.create"
      },
      "get": {
        "x-controller-name": "FacilityIntegrationController",
        "x-operation-name": "findAll",
        "tags": [
          "FacilityIntegrationController"
        ],
        "responses": {
          "200": {
            "description": "List all facility integrations — optionally filtered by ?provider=gabby&enabled=true",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FacilityIntegration"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "operationId": "FacilityIntegrationController.findAll"
      }
    },
    "/api/v1/fix-cpt-99453-assignment": {
      "post": {
        "x-controller-name": "CptCodeController",
        "x-operation-name": "fix99453Assignment",
        "tags": [
          "CptCodeController"
        ],
        "responses": {
          "200": {
            "description": "Success - CPT 99453 assignment fixed based on first BP readings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Dry run completed. 823 patients would be updated. View logs with executionId: abc-123"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        },
                        "executionId": {
                          "type": "string",
                          "example": "123e4567-e89b-12d3-a456-426614174000"
                        },
                        "isDryRun": {
                          "type": "boolean",
                          "example": true
                        },
                        "summary": {
                          "type": "object",
                          "properties": {
                            "totalPatients": {
                              "type": "number",
                              "example": 1247
                            },
                            "changed": {
                              "type": "number",
                              "example": 823
                            },
                            "noChanges": {
                              "type": "number",
                              "example": 312
                            },
                            "skippedNoBP": {
                              "type": "number",
                              "example": 112
                            }
                          }
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "message": {
                      "type": "string",
                      "example": "confirm parameter must be true to execute"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Only Admin can perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 403
                    },
                    "message": {
                      "type": "string",
                      "example": "Only Admin can perform this action"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "message": {
                      "type": "string",
                      "example": "Failed to fix 99453 assignment"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixCpt99453Request"
              }
            }
          }
        },
        "operationId": "CptCodeController.fix99453Assignment"
      }
    },
    "/api/v1/fix-cpt-99453-report": {
      "get": {
        "x-controller-name": "CptCodeController",
        "x-operation-name": "get99453FixReport",
        "tags": [
          "CptCodeController"
        ],
        "responses": {
          "200": {
            "description": "Success - CPT 99453 fix report retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "CPT 99453 fix report retrieved successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string"
                        },
                        "monthYear": {
                          "type": "string",
                          "example": "01-2026"
                        },
                        "isDryRun": {
                          "type": "boolean"
                        },
                        "totalPatients": {
                          "type": "number"
                        },
                        "changed": {
                          "type": "number"
                        },
                        "noChanges": {
                          "type": "number"
                        },
                        "skippedNoBP": {
                          "type": "number"
                        },
                        "patientChanges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "userId": {
                                "type": "string"
                              },
                              "userName": {
                                "type": "string"
                              },
                              "oldData": {
                                "type": "object"
                              },
                              "newData": {
                                "type": "object"
                              },
                              "note": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "executionNumber": {
                          "type": "number"
                        },
                        "executedBy": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Missing executionId parameter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "message": {
                      "type": "string",
                      "example": "executionId query parameter is required"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Only Admin can view reports"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Execution not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 404
                    },
                    "message": {
                      "type": "string",
                      "example": "No CPT 99453 fix found for executionId: 123e4567-e89b-12d3-a456-426614174000"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "executionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "CptCodeController.get99453FixReport"
      }
    },
    "/api/v1/frontend-access-logs": {
      "post": {
        "x-controller-name": "FrontendAccessLogController",
        "x-operation-name": "create",
        "tags": [
          "FrontendAccessLogController"
        ],
        "responses": {
          "201": {
            "description": "Frontend events logged successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FrontendAccessLogBatchRequest"
              }
            }
          }
        },
        "operationId": "FrontendAccessLogController.create"
      },
      "get": {
        "x-controller-name": "FrontendAccessLogController",
        "x-operation-name": "list",
        "tags": [
          "FrontendAccessLogController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of frontend access logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FrontendAccessLogResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "eventType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accessedBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ipAddress",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userAgent",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "FrontendAccessLogController.list"
      }
    },
    "/api/v1/health-data-errors/count": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "count",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Health data errors count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "number"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "HealthDataErrors.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<HealthDataErrors>"
                }
              }
            }
          }
        ],
        "operationId": "HealthDataErrorsController.count"
      }
    },
    "/api/v1/health-data-errors/device/{deviceId}": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "findByDeviceId",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of HealthDataErrors for specific device",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/HealthDataErrorsWithRelations"
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number"
                            },
                            "pageSize": {
                              "type": "number"
                            },
                            "totalItems": {
                              "type": "number"
                            },
                            "totalPages": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "HealthDataErrorsController.findByDeviceId"
      }
    },
    "/api/v1/health-data-errors/facility/{facilityId}": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "findByFacilityId",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of HealthDataErrors for specific facility",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/HealthDataErrorsWithRelations"
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number"
                            },
                            "pageSize": {
                              "type": "number"
                            },
                            "totalItems": {
                              "type": "number"
                            },
                            "totalPages": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "HealthDataErrorsController.findByFacilityId"
      }
    },
    "/api/v1/health-data-errors/report/count-by-error-type": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "getHealthDataErrorCountByErrorType",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Count of health data errors grouped by error type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "number"
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "facilityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vitalType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "errorType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "HealthDataErrorsController.getHealthDataErrorCountByErrorType"
      }
    },
    "/api/v1/health-data-errors/report/stats": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "getReportStats",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Stats for health data errors (distinct affected users) in a date range",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "affectedUserCount": {
                          "type": "number"
                        },
                        "prevAffectedUserCount": {
                          "type": "number"
                        },
                        "prevTotalCount": {
                          "type": "number"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prevFromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prevToDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "facilityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vitalType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "errorType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "HealthDataErrorsController.getReportStats"
      }
    },
    "/api/v1/health-data-errors/report": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "getHealthDataErrorReport",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Paginated all-records health data errors report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "userId": {
                                "type": "string"
                              },
                              "userName": {
                                "type": "string"
                              },
                              "facilityId": {
                                "type": "string"
                              },
                              "facilityName": {
                                "type": "string"
                              },
                              "errorDateTime": {
                                "type": "string"
                              },
                              "vitalData": {
                                "$ref": "#/components/schemas/HealthDataErrorVitalData"
                              },
                              "deviceId": {
                                "type": "string"
                              },
                              "vitalType": {
                                "type": "string"
                              },
                              "mode": {
                                "type": "string"
                              },
                              "errorCode": {
                                "type": "number"
                              },
                              "errorType": {
                                "type": "string"
                              },
                              "createdAt": {
                                "type": "string"
                              },
                              "updatedAt": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number"
                            },
                            "pageSize": {
                              "type": "number"
                            },
                            "totalItems": {
                              "type": "number"
                            },
                            "totalPages": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "facilityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vitalType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "errorType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "HealthDataErrorsController.getHealthDataErrorReport"
      }
    },
    "/api/v1/health-data-errors/user/{userId}": {
      "get": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "findByUserId",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of HealthDataErrors for specific user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/HealthDataErrorsWithRelations"
                          }
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number"
                            },
                            "pageSize": {
                              "type": "number"
                            },
                            "totalItems": {
                              "type": "number"
                            },
                            "totalPages": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "HealthDataErrorsController.findByUserId"
      }
    },
    "/api/v1/health-data-errors": {
      "post": {
        "x-controller-name": "HealthDataErrorsController",
        "x-operation-name": "create",
        "tags": [
          "HealthDataErrorsController"
        ],
        "responses": {
          "200": {
            "description": "Bulk import result for health data error records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "successCount": {
                          "type": "number"
                        },
                        "failedCount": {
                          "type": "number"
                        },
                        "duplicateCount": {
                          "type": "number"
                        },
                        "errorRecords": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/HealthDataErrors"
                          }
                        },
                        "failures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "number"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "facilityId",
                  "deviceId",
                  "userId",
                  "healthDataErrorRecords"
                ],
                "properties": {
                  "facilityId": {
                    "type": "string",
                    "description": "Facility identifier"
                  },
                  "deviceId": {
                    "type": "string",
                    "description": "Device MAC address or identifier"
                  },
                  "userId": {
                    "type": "string",
                    "description": "User identifier"
                  },
                  "healthDataErrorRecords": {
                    "type": "array",
                    "description": "Array of health data error records",
                    "items": {
                      "type": "object",
                      "required": [
                        "timeInMillis",
                        "vitalType",
                        "mode",
                        "errorCode",
                        "errorType"
                      ],
                      "properties": {
                        "timeInMillis": {
                          "type": "number",
                          "description": "Timestamp in milliseconds"
                        },
                        "vitalType": {
                          "type": "string",
                          "description": "Type of vital sign (e.g., BLOOD_PRESSURE, HEART_RATE)"
                        },
                        "mode": {
                          "type": "string",
                          "description": "Measurement mode (e.g., INDUCED, AUTOMATIC)"
                        },
                        "errorCode": {
                          "type": "number",
                          "description": "Numeric error code"
                        },
                        "errorType": {
                          "type": "string",
                          "description": "Error type description (e.g., NOT_DETECTED, LOW_BATTERY)"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "HealthDataErrorsController.create"
      }
    },
    "/api/v1/health-goal-progress/{goalId}": {
      "get": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "getProgress",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "200": {
            "description": "Progress entries for a goal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "HealthGoalController.getProgress"
      }
    },
    "/api/v1/health-goal-progress": {
      "post": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "addProgress",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "200": {
            "description": "Progress entry upserted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/HealthGoalProgress"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "goalId",
                  "userId",
                  "date",
                  "value",
                  "source"
                ],
                "properties": {
                  "goalId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string",
                    "description": "YYYY-MM-DD"
                  },
                  "value": {
                    "type": "number"
                  },
                  "valueNonFasting": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "manual"
                    ]
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "HealthGoalController.addProgress"
      }
    },
    "/api/v1/health-goals/summary/{userId}": {
      "get": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "getSummary",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "200": {
            "description": "Goals with current period progress summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "HealthGoalController.getSummary"
      }
    },
    "/api/v1/health-goals/user/{userId}": {
      "get": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "getByUserId",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "200": {
            "description": "List of active health goals for a user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/HealthGoal"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "HealthGoalController.getByUserId"
      }
    },
    "/api/v1/health-goals/{goalId}": {
      "patch": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "update",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "200": {
            "description": "Health goal updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/HealthGoal"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "goalType": {
                    "type": "string"
                  },
                  "trackingMethod": {
                    "type": "string"
                  },
                  "goalBehavior": {
                    "type": "string"
                  },
                  "habitType": {
                    "type": "string"
                  },
                  "goalPeriod": {
                    "type": "string"
                  },
                  "goalValue": {
                    "type": "number"
                  },
                  "goalValueSystolic": {
                    "type": "number"
                  },
                  "goalValueDiastolic": {
                    "type": "number"
                  },
                  "goalValueNonFasting": {
                    "type": "number"
                  },
                  "goalValueExerciseHR": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "startingValue": {
                    "type": "number"
                  },
                  "startingValueNonFasting": {
                    "type": "number"
                  },
                  "habitAction": {
                    "type": "string"
                  },
                  "targetDate": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "HealthGoalController.update"
      },
      "delete": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "remove",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "200": {
            "description": "Health goal deactivated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "HealthGoalController.remove"
      }
    },
    "/api/v1/health-goals": {
      "post": {
        "x-controller-name": "HealthGoalController",
        "x-operation-name": "create",
        "tags": [
          "HealthGoalController"
        ],
        "responses": {
          "201": {
            "description": "Health goal created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/HealthGoal"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "goalType",
                  "trackingMethod",
                  "goalBehavior",
                  "goalPeriod",
                  "goalValue",
                  "unit"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "goalType": {
                    "type": "string"
                  },
                  "trackingMethod": {
                    "type": "string"
                  },
                  "goalBehavior": {
                    "type": "string"
                  },
                  "habitType": {
                    "type": "string"
                  },
                  "goalPeriod": {
                    "type": "string"
                  },
                  "goalValue": {
                    "type": "number"
                  },
                  "goalValueSystolic": {
                    "type": "number"
                  },
                  "goalValueDiastolic": {
                    "type": "number"
                  },
                  "goalValueNonFasting": {
                    "type": "number"
                  },
                  "goalValueExerciseHR": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string"
                  },
                  "startingValue": {
                    "type": "number"
                  },
                  "startingValueNonFasting": {
                    "type": "number"
                  },
                  "habitAction": {
                    "type": "string"
                  },
                  "targetDate": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "HealthGoalController.create"
      }
    },
    "/api/v1/impersonation/end/{sessionId}": {
      "post": {
        "x-controller-name": "ImpersonationController",
        "x-operation-name": "endImpersonation",
        "tags": [
          "ImpersonationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "End an impersonation session"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ImpersonationController.endImpersonation"
      }
    },
    "/api/v1/impersonation/profile/{userId}": {
      "get": {
        "x-controller-name": "ImpersonationController",
        "x-operation-name": "getImpersonationProfile",
        "tags": [
          "ImpersonationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get impersonation profile for a target user"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ImpersonationController.getImpersonationProfile"
      }
    },
    "/api/v1/impersonation/start": {
      "post": {
        "x-controller-name": "ImpersonationController",
        "x-operation-name": "startImpersonation",
        "tags": [
          "ImpersonationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Start an impersonation session"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetUserId"
                ],
                "properties": {
                  "targetUserId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "ImpersonationController.startImpersonation"
      }
    },
    "/api/v1/impersonation/users": {
      "get": {
        "x-controller-name": "ImpersonationController",
        "x-operation-name": "listImpersonatableUsers",
        "tags": [
          "ImpersonationController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "List of doctors and nurses available for impersonation"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "facilityId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ImpersonationController.listImpersonatableUsers"
      }
    },
    "/api/v1/jobs/{executionId}": {
      "get": {
        "x-controller-name": "JobExecutionController",
        "x-operation-name": "getByExecutionId",
        "tags": [
          "JobExecutionController"
        ],
        "responses": {
          "200": {
            "description": "Success - Job execution retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string"
                        },
                        "jobType": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "triggerType": {
                          "type": "string"
                        },
                        "triggeredBy": {
                          "type": "string"
                        },
                        "instanceId": {
                          "type": "string"
                        },
                        "params": {
                          "type": "object"
                        },
                        "progress": {
                          "type": "object"
                        },
                        "result": {
                          "type": "object"
                        },
                        "errorMessages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "startedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "finishedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "durationMs": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Only Admin can view job executions"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - Unknown executionId"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "executionId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "JobExecutionController.getByExecutionId"
      }
    },
    "/api/v1/jobs": {
      "get": {
        "x-controller-name": "JobExecutionController",
        "x-operation-name": "list",
        "tags": [
          "JobExecutionController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Success - Paginated job executions retrieved"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid jobType or status"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Only Admin can view job executions"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "JobExecutionController.list"
      }
    },
    "/api/v1/medication-logs/user/{userId}": {
      "get": {
        "x-controller-name": "MedicationLogController",
        "x-operation-name": "findByUserId",
        "tags": [
          "MedicationLogController"
        ],
        "responses": {
          "200": {
            "description": "Paginated MedicationLog list for a user - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MedicationLog"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "MedicationLogController.findByUserId"
      }
    },
    "/api/v1/medication-logs/{id}": {
      "patch": {
        "x-controller-name": "MedicationLogController",
        "x-operation-name": "updateById",
        "tags": [
          "MedicationLogController"
        ],
        "responses": {
          "200": {
            "description": "MedicationLog updated - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MedicationLogPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "MedicationLogController.updateById"
      },
      "delete": {
        "x-controller-name": "MedicationLogController",
        "x-operation-name": "deleteById",
        "tags": [
          "MedicationLogController"
        ],
        "responses": {
          "200": {
            "description": "MedicationLog deleted - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MedicationLogController.deleteById"
      }
    },
    "/api/v1/medication-logs": {
      "post": {
        "x-controller-name": "MedicationLogController",
        "x-operation-name": "create",
        "tags": [
          "MedicationLogController"
        ],
        "responses": {
          "200": {
            "description": "MedicationLog created - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MedicationLog"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewMedicationLog"
              }
            }
          }
        },
        "operationId": "MedicationLogController.create"
      }
    },
    "/api/v1/medications/extract-from-prescription": {
      "post": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "extractFromPrescription",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "Extracted medication data from prescription image",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "operationId": "MedicationsController.extractFromPrescription"
      }
    },
    "/api/v1/motion-data/user/{userId}": {
      "get": {
        "x-controller-name": "MotionDataController",
        "x-operation-name": "getMotionList",
        "tags": [
          "MotionDataController"
        ],
        "responses": {
          "200": {
            "description": "Get motion data list with flexible filtering - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MotionDataListResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeWindow",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "MotionDataController.getMotionList"
      }
    },
    "/api/v1/motion-data/{id}": {
      "get": {
        "x-controller-name": "MotionDataController",
        "x-operation-name": "findById",
        "tags": [
          "MotionDataController"
        ],
        "responses": {
          "200": {
            "description": "Success - Motion data fetched successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Motion data fetched successfully"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MotionDataResponse"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Motion data with specified ID does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 404
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "example": "Motion data with ID 123 not found"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true,
                          "example": null
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MotionDataController.findById"
      }
    },
    "/api/v1/motion-data": {
      "post": {
        "x-controller-name": "MotionDataController",
        "x-operation-name": "upsertMotionData",
        "tags": [
          "MotionDataController"
        ],
        "responses": {
          "200": {
            "description": "Bulk upsert motion data - Standardized response format with success/failure counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MotionDataUpsertResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotionDataUpsertRequest"
              }
            }
          }
        },
        "operationId": "MotionDataController.upsertMotionData"
      }
    },
    "/api/v1/notes/export/pdf/user/{userId}": {
      "post": {
        "x-controller-name": "NotesController",
        "x-operation-name": "exportNotesPdf",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "201": {
            "description": "Generates a Notes PDF report for the given filters, saves a copy to the patient Documents tab, and returns the created document metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "patientDocument": {
                          "$ref": "#/components/schemas/PatientDocument"
                        },
                        "fileName": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "NotesController.exportNotesPdf"
      }
    },
    "/api/v1/notification-rules/{id}/activate": {
      "patch": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "activate",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "200": {
            "description": "Notification rule activated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/NotificationRuleResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotificationRuleController.activate"
      }
    },
    "/api/v1/notification-rules/{id}/deactivate": {
      "patch": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "deactivate",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "200": {
            "description": "Notification rule deactivated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/NotificationRuleResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotificationRuleController.deactivate"
      }
    },
    "/api/v1/notification-rules/{id}/trigger": {
      "post": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "trigger",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "200": {
            "description": "Notification rule triggered manually",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "triggered": {
                          "type": "boolean"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotificationRuleController.trigger"
      }
    },
    "/api/v1/notification-rules/{id}": {
      "patch": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "update",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "200": {
            "description": "Notification rule updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/NotificationRuleResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationRuleUpdateRequest"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "NotificationRuleController.update"
      },
      "get": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "getById",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "200": {
            "description": "Notification rule detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/NotificationRuleResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotificationRuleController.getById"
      }
    },
    "/api/v1/notification-rules": {
      "post": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "create",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "201": {
            "description": "Notification rule created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/NotificationRuleResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationRuleCreateRequest"
              }
            }
          }
        },
        "operationId": "NotificationRuleController.create"
      },
      "get": {
        "x-controller-name": "NotificationRuleController",
        "x-operation-name": "list",
        "tags": [
          "NotificationRuleController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of notification rules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NotificationRuleResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "isActive",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheduleType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "NotificationRuleController.list"
      }
    },
    "/api/v1/operational-dashboard/billing-types/{facilityId}": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalFacilityBillingTypes",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Distinct billing types"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getOperationalFacilityBillingTypes"
      }
    },
    "/api/v1/operational-dashboard/billing-types": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalBillingTypes",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Distinct billing types"
                }
              }
            }
          }
        },
        "operationId": "UserController.getOperationalBillingTypes"
      }
    },
    "/api/v1/operational-dashboard/device-connection": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalDeviceConnection",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Device connection status"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getOperationalDeviceConnection"
      }
    },
    "/api/v1/operational-dashboard/facilities/call-counts": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalFacilityCallCounts",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "AI call counts per facility, fetched independently of facility details"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityIds",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getOperationalFacilityCallCounts"
      }
    },
    "/api/v1/operational-dashboard/facilities/download": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "downloadFacilityOverviewReport",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Facility Overview Excel file",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activeStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.downloadFacilityOverviewReport"
      }
    },
    "/api/v1/operational-dashboard/facilities": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalFacilities",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Facility level overview with pagination"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activeStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getOperationalFacilities"
      }
    },
    "/api/v1/operational-dashboard/facility-patients/{facilityId}/download": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "downloadFacilityPatientsReport",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Facility Patient List Excel file",
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activeStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.downloadFacilityPatientsReport"
      }
    },
    "/api/v1/operational-dashboard/facility-patients/{facilityId}": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalFacilityPatients",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get patients for a specific facility"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activeStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getOperationalFacilityPatients"
      }
    },
    "/api/v1/operational-dashboard/facility-types": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalFacilityTypes",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Distinct facility types"
                }
              }
            }
          }
        },
        "operationId": "UserController.getOperationalFacilityTypes"
      }
    },
    "/api/v1/operational-dashboard/operational-notes/{entityType}/{entityId}": {
      "get": {
        "x-controller-name": "OperationalNoteController",
        "x-operation-name": "getOperationalNotes",
        "tags": [
          "OperationalNoteController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get operational notes for an entity"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "entityType",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "entityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "OperationalNoteController.getOperationalNotes"
      }
    },
    "/api/v1/operational-dashboard/operational-notes/{noteId}": {
      "patch": {
        "x-controller-name": "OperationalNoteController",
        "x-operation-name": "updateOperationalNote",
        "tags": [
          "OperationalNoteController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update an operational note"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "noteId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "OperationalNoteController.updateOperationalNote"
      },
      "delete": {
        "x-controller-name": "OperationalNoteController",
        "x-operation-name": "deleteOperationalNote",
        "tags": [
          "OperationalNoteController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Soft delete an operational note"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "noteId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OperationalNoteController.deleteOperationalNote"
      }
    },
    "/api/v1/operational-dashboard/operational-notes": {
      "post": {
        "x-controller-name": "OperationalNoteController",
        "x-operation-name": "createOperationalNote",
        "tags": [
          "OperationalNoteController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Create an operational note"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "OperationalNoteController.createOperationalNote"
      },
      "get": {
        "x-controller-name": "OperationalNoteController",
        "x-operation-name": "getAllOperationalNotes",
        "tags": [
          "OperationalNoteController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get all operational notes for a month/year"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "entityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authorName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "OperationalNoteController.getAllOperationalNotes"
      }
    },
    "/api/v1/operational-dashboard/states": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalStates",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Distinct facility states"
                }
              }
            }
          }
        },
        "operationId": "UserController.getOperationalStates"
      }
    },
    "/api/v1/operational-dashboard/top-metrics": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalTopMetrics",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Top metric cards"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getOperationalTopMetrics"
      }
    },
    "/api/v1/operational-dashboard/trends": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getOperationalTrends",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Monthly adherence trends (last 6 months)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getOperationalTrends"
      }
    },
    "/api/v1/operational-dashboard/{facilityId}/device-connection": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getFacilityDeviceConnection",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Device connection status for a specific facility"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingTypes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getFacilityDeviceConnection"
      }
    },
    "/api/v1/operational-dashboard/{facilityId}/top-metrics": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getFacilityTopMetrics",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Top metric cards for a specific facility"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingTypes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getFacilityTopMetrics"
      }
    },
    "/api/v1/operational-dashboard/{facilityId}/trends": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getFacilityTrends",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Monthly adherence trends (last 6 months) for a specific facility"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "billingTypes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "adherenceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getFacilityTrends"
      }
    },
    "/api/v1/patient-documents/{id}/preview": {
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "previewPatientDocument",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "Returns a short-lived presigned S3 URL for inline preview of a document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientDocumentController.previewPatientDocument"
      }
    },
    "/api/v1/patient-documents/{id}/stream": {
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "streamPatientDocument",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PatientDocumentController.streamPatientDocument"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientDocumentController.streamPatientDocument"
      }
    },
    "/api/v1/patient-notes/{id}/soft-delete": {
      "patch": {
        "x-controller-name": "PatientNoteController",
        "x-operation-name": "softDelete",
        "tags": [
          "PatientNoteController"
        ],
        "responses": {
          "200": {
            "description": "Soft-delete a patient note by setting deletedAt timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientNoteController.softDelete"
      }
    },
    "/api/v1/patient-notes/{id}": {
      "patch": {
        "x-controller-name": "PatientNoteController",
        "x-operation-name": "updateById",
        "tags": [
          "PatientNoteController"
        ],
        "responses": {
          "200": {
            "description": "Update a patient note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientNoteUpdateRequest"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientNoteController.updateById"
      },
      "get": {
        "x-controller-name": "PatientNoteController",
        "x-operation-name": "findById",
        "tags": [
          "PatientNoteController"
        ],
        "responses": {
          "200": {
            "description": "Get a patient note by ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PatientNote"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientNoteController.findById"
      }
    },
    "/api/v1/patient-notes": {
      "post": {
        "x-controller-name": "PatientNoteController",
        "x-operation-name": "create",
        "tags": [
          "PatientNoteController"
        ],
        "responses": {
          "201": {
            "description": "Create a new patient note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PatientNote"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientNoteCreateRequest"
              }
            }
          }
        },
        "operationId": "PatientNoteController.create"
      },
      "get": {
        "x-controller-name": "PatientNoteController",
        "x-operation-name": "find",
        "tags": [
          "PatientNoteController"
        ],
        "responses": {
          "200": {
            "description": "Get paginated patient notes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PatientNote"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PatientNoteController.find"
      }
    },
    "/api/v1/patient-vitals/user/{userId}/chatbot-context": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getChatbotContext",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Combined chatbot context: latest vitals, 30-day vitals history (up to 200/type), and recent alerts — optimised for speed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "latestVitals": {
                          "type": "object"
                        },
                        "vitalsHistory": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "alerts": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "facilityTimezone": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientVitalsController.getChatbotContext"
      }
    },
    "/api/v1/patient-vitals/user/{userId}/install-info": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getDeviceInstallInfo",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "First vital recordedAt (installation date) and facilityTimezone for a user/device combination",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recordedAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "facilityTimezone": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "deviceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PatientVitalsController.getDeviceInstallInfo"
      }
    },
    "/api/v1/patient-vitals/user/{userId}/personalized-baseline": {
      "get": {
        "x-controller-name": "PersonalizedBaselineController",
        "x-operation-name": "getPersonalizedBaseline",
        "tags": [
          "PersonalizedBaselineController"
        ],
        "responses": {
          "200": {
            "description": "Real-time, non-persisted rolling baseline (BP Systolic/Diastolic, Heart Rate, SpO2) averaged into four time-of-day buckets (morning/afternoon/evening/night) over the last 7/14/30/custom days.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "durationDays": {
                          "type": "number"
                        },
                        "fromDate": {
                          "type": "string"
                        },
                        "toDate": {
                          "type": "string"
                        },
                        "facilityTimezone": {
                          "type": "string"
                        },
                        "minCoveragePercent": {
                          "type": "number"
                        },
                        "globalMinCoveragePercent": {
                          "type": "number"
                        },
                        "vitals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vitalType": {
                                "type": "string"
                              },
                              "buckets": {
                                "type": "object",
                                "properties": {
                                  "morning": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "afternoon": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "evening": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "night": {
                                    "type": "number",
                                    "nullable": true
                                  }
                                }
                              },
                              "sufficiency": {
                                "type": "object",
                                "properties": {
                                  "morning": {
                                    "type": "boolean"
                                  },
                                  "afternoon": {
                                    "type": "boolean"
                                  },
                                  "evening": {
                                    "type": "boolean"
                                  },
                                  "night": {
                                    "type": "boolean"
                                  }
                                }
                              },
                              "sleepingAverage": {
                                "type": "number",
                                "nullable": true
                              },
                              "overallAverage": {
                                "type": "number",
                                "nullable": true
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "duration",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PersonalizedBaselineController.getPersonalizedBaseline"
      }
    },
    "/api/v1/patient-vitals/user/{userId}/vital-averages": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getVitalAverages",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Daily/weekly/monthly BP, Heart Rate, or SpO2 averages bucketed into four time-of-day windows (morning/afternoon/evening/night).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "vitalType": {
                          "type": "string"
                        },
                        "interval": {
                          "type": "string",
                          "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                          ]
                        },
                        "facilityTimezone": {
                          "type": "string"
                        },
                        "periods": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "periodStart": {
                                "type": "string"
                              },
                              "periodEnd": {
                                "type": "string"
                              },
                              "buckets": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "bucket": {
                                      "type": "string",
                                      "enum": [
                                        "morning",
                                        "afternoon",
                                        "evening",
                                        "night"
                                      ]
                                    },
                                    "readingCount": {
                                      "type": "number"
                                    },
                                    "avgSystolic": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "avgDiastolic": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "average": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "minimum": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "baselineDeltaBpm": {
                                      "type": "number",
                                      "nullable": true
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "vitalType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PatientVitalsController.getVitalAverages"
      }
    },
    "/api/v1/patients/{patientUserId}/attendants": {
      "post": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "assign",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "201": {
            "description": "Attendant assigned to patient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "patientUserId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttendantAssign"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "AttendantController.assign"
      },
      "get": {
        "x-controller-name": "AttendantController",
        "x-operation-name": "list",
        "tags": [
          "AttendantController"
        ],
        "responses": {
          "200": {
            "description": "List attendants assigned to a patient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "patientUserId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AttendantController.list"
      }
    },
    "/api/v1/prescription/parse": {
      "post": {
        "x-controller-name": "PrescriptionOcrController",
        "x-operation-name": "parsePrescription",
        "tags": [
          "PrescriptionOcrController"
        ],
        "responses": {
          "200": {
            "description": "Parse prescription OCR text into structured medication list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "scanId": {
                          "type": "string"
                        },
                        "medications": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "No medications found in the provided prescription text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ocrText"
                ],
                "properties": {
                  "ocrText": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "PrescriptionOcrController.parsePrescription"
      }
    },
    "/api/v1/prescription/user": {
      "get": {
        "x-controller-name": "PrescriptionOcrController",
        "x-operation-name": "getPrescriptionsByUser",
        "tags": [
          "PrescriptionOcrController"
        ],
        "responses": {
          "200": {
            "description": "Get paginated prescriptions for the logged-in user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "rawText": {
                            "type": "string"
                          },
                          "parsedMedications": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            }
                          },
                          "status": {
                            "type": "string"
                          },
                          "isActive": {
                            "type": "boolean"
                          },
                          "errorMessage": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "total": {
                      "type": "number"
                    },
                    "page": {
                      "type": "number"
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "totalPages": {
                      "type": "number"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PrescriptionOcrController.getPrescriptionsByUser"
      }
    },
    "/api/v1/privileges": {
      "get": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "getAllPrivileges",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Array of all available privileges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "example": "ACCESS_HOME"
                          },
                          "name": {
                            "type": "string",
                            "example": "Access Home"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "operationId": "RolePrivilegeController.getAllPrivileges"
      }
    },
    "/api/v1/push-notifications/actions": {
      "get": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "getAllActionList",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Paginated action list for all users - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PushNotificationActionListItem"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PushNotificationController.getAllActionList"
      }
    },
    "/api/v1/push-notifications/delivery-status/{deliveryStatusId}": {
      "patch": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "updateDeliveryStatus",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Delivery status updated successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UpdateDeliveryStatusResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data or missing required fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "deliveredToDeviceAt is required when status is delivered"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Delivery status not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 404
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "example": "Delivery status not found"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "deliveryStatusId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeliveryStatusRequest"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PushNotificationController.updateDeliveryStatus"
      }
    },
    "/api/v1/push-notifications/messages": {
      "get": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "getAllMessageList",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Paginated message list for all users - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PushNotificationMessageListItem"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bulkNotificationId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PushNotificationController.getAllMessageList"
      }
    },
    "/api/v1/push-notifications/users/{userId}/actions": {
      "get": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "getActionList",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Paginated action list - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PushNotificationActionListItem"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PushNotificationController.getActionList"
      }
    },
    "/api/v1/push-notifications/users/{userId}/messages": {
      "get": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "getMessageList",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Paginated message list - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PushNotificationMessageListItem"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PushNotificationController.getMessageList"
      }
    },
    "/api/v1/push-notifications/{notificationId}/status-timeline": {
      "get": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "getStatusTimeline",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "200": {
            "description": "Push notification status timeline - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PushNotificationTimelineResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Push notification not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 404
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "NOT_FOUND"
                        },
                        "message": {
                          "type": "string",
                          "example": "Push notification not found"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "notificationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PushNotificationController.getStatusTimeline"
      }
    },
    "/api/v1/push-notifications": {
      "post": {
        "x-controller-name": "PushNotificationController",
        "x-operation-name": "create",
        "tags": [
          "PushNotificationController"
        ],
        "responses": {
          "201": {
            "description": "Push notification created successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PushNotificationCreateResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushNotificationCreateRequest"
              }
            }
          }
        },
        "operationId": "PushNotificationController.create"
      }
    },
    "/api/v1/recalculate-cpt-codes": {
      "post": {
        "x-controller-name": "CptCodeController",
        "x-operation-name": "recalculateCptCodes",
        "tags": [
          "CptCodeController"
        ],
        "responses": {
          "200": {
            "description": "Success - CPT codes recalculated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Dry run completed. Use GET /api/v1/cpt-recalculation-report?executionId=... to view detailed results"
                    },
                    "data": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "success": {
                              "type": "boolean"
                            },
                            "executionId": {
                              "type": "string",
                              "example": "123e4567-e89b-12d3-a456-426614174000"
                            },
                            "isDryRun": {
                              "type": "boolean",
                              "example": true
                            },
                            "summary": {
                              "type": "object",
                              "properties": {
                                "monthYear": {
                                  "type": "string",
                                  "example": "01-2026"
                                },
                                "totalUsers": {
                                  "type": "number",
                                  "example": 150
                                },
                                "estimatedChanges": {
                                  "type": "number",
                                  "example": 45
                                },
                                "noChanges": {
                                  "type": "number",
                                  "example": 105
                                },
                                "codesAdded": {
                                  "type": "object"
                                },
                                "codesRemoved": {
                                  "type": "object"
                                }
                              }
                            },
                            "message": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "properties": {
                            "success": {
                              "type": "boolean"
                            },
                            "executionId": {
                              "type": "string"
                            },
                            "isDryRun": {
                              "type": "boolean",
                              "example": false
                            },
                            "data": {
                              "type": "object",
                              "properties": {
                                "monthYear": {
                                  "type": "string"
                                },
                                "executionNumber": {
                                  "type": "number"
                                },
                                "totalUsers": {
                                  "type": "number"
                                },
                                "usersUpdated": {
                                  "type": "number"
                                },
                                "usersSkipped": {
                                  "type": "number"
                                },
                                "codesAdded": {
                                  "type": "object"
                                },
                                "codesRemoved": {
                                  "type": "object"
                                },
                                "recalculatedAt": {
                                  "type": "string"
                                },
                                "executedBy": {
                                  "type": "string"
                                }
                              }
                            },
                            "message": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid month-year format: \"13-2026\". Expected MM-YYYY (e.g., \"01-2026\")"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Only Admin can perform this action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 403
                    },
                    "message": {
                      "type": "string",
                      "example": "Only Admin can perform this action"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "message": {
                      "type": "string",
                      "example": "Failed to recalculate CPT codes"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecalculateCptCodesRequest"
              }
            }
          }
        },
        "operationId": "CptCodeController.recalculateCptCodes"
      }
    },
    "/api/v1/replacebledevice": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "replaceBleUserDeviceId",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Success - Device ID replaced successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "deviceId": {
                          "type": "string"
                        },
                        "previousDeviceId": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "deviceAddress",
                  "deviceId",
                  "userId"
                ],
                "properties": {
                  "deviceAddress": {
                    "type": "string",
                    "description": "The new device address (MAC address) to replace deviceId"
                  },
                  "deviceId": {
                    "type": "string",
                    "description": "The current deviceId to find the BLEUser record"
                  },
                  "userId": {
                    "type": "string",
                    "description": "The userId associated with the device"
                  }
                }
              }
            }
          }
        },
        "operationId": "BLEController.replaceBleUserDeviceId"
      }
    },
    "/api/v1/role-privileges/defaults/{roleName}": {
      "get": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "getDefaultPrivileges",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Default privileges for a specific role",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "roleName": {
                          "type": "string"
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "count": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Invalid role name"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roleName",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RolePrivilegeController.getDefaultPrivileges"
      }
    },
    "/api/v1/role-privileges/reset-to-default": {
      "post": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "resetToDefault",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Role privileges reset to defaults",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "roleName": {
                          "type": "string",
                          "example": "nurse"
                        },
                        "privilegeCount": {
                          "type": "number",
                          "example": 9
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid role name or no default privileges defined",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "roleName"
                ],
                "properties": {
                  "roleName": {
                    "type": "string",
                    "example": "nurse",
                    "description": "The role to reset to default privileges"
                  }
                }
              }
            }
          }
        },
        "operationId": "RolePrivilegeController.resetToDefault"
      }
    },
    "/api/v1/role-privileges/role/{roleName}": {
      "get": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "findByRole",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Privileges for a specific role",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "roleName": {
                          "type": "string"
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "count": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roleName",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RolePrivilegeController.findByRole"
      }
    },
    "/api/v1/role-privileges/{id}": {
      "get": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "findById",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - RolePrivilege instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/RolePrivilegeWithRelations"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - RolePrivilege not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RolePrivilegeController.findById"
      },
      "delete": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "deleteById",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - RolePrivilege deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found - RolePrivilege not found"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RolePrivilegeController.deleteById"
      }
    },
    "/api/v1/role-privileges": {
      "post": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "create",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - RolePrivilege created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/RolePrivilege"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict - Role privilege mapping already exists",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 409
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "CONFLICT"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewRolePrivilege"
              }
            }
          }
        },
        "operationId": "RolePrivilegeController.create"
      },
      "get": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "find",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Array of RolePrivilege instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RolePrivilegeWithRelations"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "operationId": "RolePrivilegeController.find"
      }
    },
    "/api/v1/roles": {
      "get": {
        "x-controller-name": "RolePrivilegeController",
        "x-operation-name": "getAllRoles",
        "tags": [
          "RolePrivilegeController"
        ],
        "responses": {
          "200": {
            "description": "Success - Array of all available roles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "admin"
                          },
                          "displayName": {
                            "type": "string",
                            "example": "Admin"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error"
                }
              }
            }
          }
        },
        "operationId": "RolePrivilegeController.getAllRoles"
      }
    },
    "/api/v1/settings/hierarchy/company/{companyId}": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getAllHierarchyBasedSettingsForCompany",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get All Hierarchy-Based Settings for Company",
        "description": "Retrieve all hierarchy levels (default, global, company) for all setting keys from company perspective. Excludes userValue and facilityValue.",
        "responses": {
          "200": {
            "description": "List of settings hierarchies with effective values from company perspective - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsHierarchyListResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Company not found"
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SettingsController.getAllHierarchyBasedSettingsForCompany"
      }
    },
    "/api/v1/settings/hierarchy/facility/{facilityId}": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getAllHierarchyBasedSettingsForFacility",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get All Hierarchy-Based Settings for Facility",
        "description": "Retrieve all hierarchy levels (default, global, company, facility) for all setting keys from facility perspective. Excludes userValue.",
        "responses": {
          "200": {
            "description": "List of settings hierarchies with effective values from facility perspective - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsHierarchyListResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Facility not found"
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SettingsController.getAllHierarchyBasedSettingsForFacility"
      }
    },
    "/api/v1/settings/hierarchy/global": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getAllHierarchyBasedSettingsForGlobal",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get All Hierarchy-Based Settings for Global",
        "description": "Retrieve all hierarchy levels (default, global) for all setting keys from global perspective. Excludes userValue, facilityValue, and companyValue.",
        "responses": {
          "200": {
            "description": "List of settings hierarchies with effective values from global perspective - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsHierarchyListResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "SettingsController.getAllHierarchyBasedSettingsForGlobal"
      }
    },
    "/api/v1/settings/hierarchy/user/{userId}/key/{key}": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getHierarchyBasedSettingsForUser",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get Hierarchy-Based Settings for User by Key",
        "description": "Retrieve all hierarchy levels (default, global, company, facility, user) for a specific setting key and user along with the effective value and scope",
        "responses": {
          "200": {
            "description": "Settings hierarchy with effective value for user - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsHierarchyResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "key",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SettingsController.getHierarchyBasedSettingsForUser"
      }
    },
    "/api/v1/settings/hierarchy/user/{userId}": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getAllHierarchyBasedSettingsForUser",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get All Hierarchy-Based Settings for User",
        "description": "Retrieve all hierarchy levels (default, global, company, facility, user) for all setting keys from user perspective along with the effective values and scopes",
        "responses": {
          "200": {
            "description": "List of settings hierarchies with effective values from user perspective - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsHierarchyListResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SettingsController.getAllHierarchyBasedSettingsForUser"
      }
    },
    "/api/v1/settings/metadata": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getMetadata",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get Settings Metadata",
        "description": "Get metadata for all settings including field types, edit permissions, and validation rules",
        "responses": {
          "200": {
            "description": "Settings metadata retrieved successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "displayName": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "defaultValue": {
                            "type": "string"
                          },
                          "fieldType": {
                            "type": "string",
                            "enum": [
                              "text",
                              "int",
                              "boolean",
                              "float",
                              "dropdown"
                            ]
                          },
                          "editableFor": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "user",
                                "facility",
                                "company",
                                "global"
                              ]
                            }
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "validation": {
                            "type": "object",
                            "properties": {
                              "min": {
                                "type": "number"
                              },
                              "max": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "SettingsController.getMetadata"
      }
    },
    "/api/v1/settings/upsert": {
      "put": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "upsert",
        "tags": [
          "SettingsController"
        ],
        "summary": "Upsert Setting by Scope",
        "description": "Create a new setting or update existing one based on scopeType, scopeId, and key. If a setting with the same scope and key exists, it will be updated; otherwise, a new one will be created.",
        "responses": {
          "200": {
            "description": "Setting created or updated successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsDetailsResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - validation failed"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsUpsertRequest"
              }
            }
          },
          "description": "Settings Upsert Request"
        },
        "operationId": "SettingsController.upsert"
      }
    },
    "/api/v1/settings/{id}": {
      "patch": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "updateById",
        "tags": [
          "SettingsController"
        ],
        "summary": "Update Setting by ID",
        "description": "Update a setting's value by its ID and return the updated setting",
        "responses": {
          "200": {
            "description": "Setting updated successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsDetailsResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Setting not found"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsUpdateRequestPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "SettingsController.updateById"
      },
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "findById",
        "tags": [
          "SettingsController"
        ],
        "summary": "Get Setting by ID",
        "description": "Retrieve a single setting by its ID",
        "responses": {
          "200": {
            "description": "Setting fetched successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsDetailsResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Setting not found"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SettingsController.findById"
      }
    },
    "/api/v1/settings": {
      "post": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "create",
        "tags": [
          "SettingsController"
        ],
        "summary": "Create Setting",
        "description": "Create a new setting and return the created setting",
        "responses": {
          "200": {
            "description": "Setting created successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SettingsDetailsResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - validation failed"
          },
          "422": {
            "description": "Unprocessable Entity - duplicate setting"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SettingsCreateRequest"
              }
            }
          },
          "description": "Settings Create Request"
        },
        "operationId": "SettingsController.create"
      },
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "list",
        "tags": [
          "SettingsController"
        ],
        "summary": "Settings List",
        "description": "Retrieve a list of all settings with optional filters",
        "responses": {
          "200": {
            "description": "Settings list - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SettingsDetailsResponseWithRelations"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "scopeType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scopeId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SettingsController.list"
      }
    },
    "/api/v1/sleep-data/count": {
      "get": {
        "x-controller-name": "SleepDataController",
        "x-operation-name": "count",
        "tags": [
          "SleepDataController"
        ],
        "responses": {
          "200": {
            "description": "SleepData model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "SleepData.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<SleepData>"
                }
              }
            }
          }
        ],
        "operationId": "SleepDataController.count"
      }
    },
    "/api/v1/sleep-data/user/{userId}/overnight-insights": {
      "get": {
        "x-controller-name": "SleepDataController",
        "x-operation-name": "getOvernightInsights",
        "tags": [
          "SleepDataController"
        ],
        "responses": {
          "200": {
            "description": "Overnight BP + sleep stage insights for charting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SleepDataController.getOvernightInsights"
      }
    },
    "/api/v1/sleep-data/user/{userId}": {
      "get": {
        "x-controller-name": "SleepDataController",
        "x-operation-name": "findByUserId",
        "tags": [
          "SleepDataController"
        ],
        "responses": {
          "200": {
            "description": "Array of SleepRecords for specific user with facility timezone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "sleepRecords": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SleepDataWithRelations"
                          }
                        },
                        "facilityTimezone": {
                          "type": "string"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filterType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeWindow",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "SleepDataController.findByUserId"
      }
    },
    "/api/v1/sleep-data": {
      "post": {
        "x-controller-name": "SleepDataController",
        "x-operation-name": "create",
        "tags": [
          "SleepDataController"
        ],
        "responses": {
          "200": {
            "description": "Bulk import result for sleep data sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "successCount": {
                          "type": "number"
                        },
                        "failedCount": {
                          "type": "number"
                        },
                        "duplicateCount": {
                          "type": "number"
                        },
                        "sleepRecords": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SleepData"
                          }
                        },
                        "failures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "number"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "deviceId",
                  "userId",
                  "facilityId",
                  "sleepRecords"
                ],
                "properties": {
                  "deviceId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "facilityId": {
                    "type": "string"
                  },
                  "sleepRecords": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "sleepType",
                        "durationMinutes",
                        "sleepStartTime",
                        "sleepEndTime"
                      ],
                      "properties": {
                        "sleepType": {
                          "type": "string"
                        },
                        "durationMinutes": {
                          "type": "number"
                        },
                        "sleepStartTime": {
                          "type": "string"
                        },
                        "sleepEndTime": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "SleepDataController.create"
      }
    },
    "/api/v1/staff/{id}/roles": {
      "get": {
        "x-controller-name": "StaffController",
        "x-operation-name": "getStaffRoles",
        "tags": [
          "StaffController"
        ],
        "responses": {
          "200": {
            "description": "Staff account with all its role documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/StaffDetailResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "StaffController.getStaffRoles"
      }
    },
    "/api/v1/staff/{accountId}": {
      "patch": {
        "x-controller-name": "StaffController",
        "x-operation-name": "updateStaff",
        "tags": [
          "StaffController"
        ],
        "responses": {
          "200": {
            "description": "Updated staff account with roles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/StaffDetailResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffUpdateRequestPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "StaffController.updateStaff"
      }
    },
    "/api/v1/staff": {
      "post": {
        "x-controller-name": "StaffController",
        "x-operation-name": "createStaff",
        "tags": [
          "StaffController"
        ],
        "responses": {
          "201": {
            "description": "Staff account created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/StaffCreateResult"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffCreateRequest"
              }
            }
          }
        },
        "operationId": "StaffController.createStaff"
      }
    },
    "/api/v1/tasks/all": {
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getAllTasks",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get all tasks with optional filters, pagination, and sorting"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignedToUserId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignedByUserId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortDir",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TaskController.getAllTasks"
      }
    },
    "/api/v1/tasks/assignable-users": {
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getAssignableUsers",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get assignable users for a task entity"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "entityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TaskController.getAssignableUsers"
      }
    },
    "/api/v1/tasks/filter-users": {
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getTaskFilterUsers",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Distinct assigned-to and assigned-by users for filter dropdowns"
                }
              }
            }
          }
        },
        "operationId": "TaskController.getTaskFilterUsers"
      }
    },
    "/api/v1/tasks/my-tasks": {
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getMyTasks",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get tasks assigned to the logged-in user"
                }
              }
            }
          }
        },
        "operationId": "TaskController.getMyTasks"
      }
    },
    "/api/v1/tasks/{taskId}/comments/{commentId}": {
      "delete": {
        "x-controller-name": "TaskController",
        "x-operation-name": "deleteTaskComment",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Delete a task comment"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "commentId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TaskController.deleteTaskComment"
      }
    },
    "/api/v1/tasks/{taskId}/comments": {
      "post": {
        "x-controller-name": "TaskController",
        "x-operation-name": "createTaskComment",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Add a comment to a task"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TaskController.createTaskComment"
      },
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getTaskComments",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get comments for a task"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TaskController.getTaskComments"
      }
    },
    "/api/v1/tasks/{taskId}/status-history": {
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getTaskStatusHistory",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get status change history for a task"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TaskController.getTaskStatusHistory"
      }
    },
    "/api/v1/tasks/{taskId}": {
      "patch": {
        "x-controller-name": "TaskController",
        "x-operation-name": "updateTask",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update a task"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TaskController.updateTask"
      },
      "delete": {
        "x-controller-name": "TaskController",
        "x-operation-name": "deleteTask",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Soft delete a task"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TaskController.deleteTask"
      }
    },
    "/api/v1/tasks": {
      "post": {
        "x-controller-name": "TaskController",
        "x-operation-name": "createTask",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Create a task"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "operationId": "TaskController.createTask"
      },
      "get": {
        "x-controller-name": "TaskController",
        "x-operation-name": "getTasks",
        "tags": [
          "TaskController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get tasks for an entity"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "entityType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TaskController.getTasks"
      }
    },
    "/api/v1/treatment-categories/{id}": {
      "put": {
        "x-controller-name": "TreatmentCategoryController",
        "x-operation-name": "replaceById",
        "tags": [
          "TreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentCategory PUT success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentCategory"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TreatmentCategory"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TreatmentCategoryController.replaceById"
      },
      "patch": {
        "x-controller-name": "TreatmentCategoryController",
        "x-operation-name": "updateById",
        "tags": [
          "TreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentCategory PATCH success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TreatmentCategoryPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TreatmentCategoryController.updateById"
      },
      "get": {
        "x-controller-name": "TreatmentCategoryController",
        "x-operation-name": "findById",
        "tags": [
          "TreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentCategory model instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentCategoryWithRelations"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreatmentCategory.Filter"
                }
              }
            }
          }
        ],
        "operationId": "TreatmentCategoryController.findById"
      },
      "delete": {
        "x-controller-name": "TreatmentCategoryController",
        "x-operation-name": "deleteById",
        "tags": [
          "TreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentCategory DELETE success (soft delete)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TreatmentCategoryController.deleteById"
      }
    },
    "/api/v1/treatment-categories": {
      "post": {
        "x-controller-name": "TreatmentCategoryController",
        "x-operation-name": "create",
        "tags": [
          "TreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentCategory model instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentCategory"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewTreatmentCategory"
              }
            }
          }
        },
        "operationId": "TreatmentCategoryController.create"
      },
      "get": {
        "x-controller-name": "TreatmentCategoryController",
        "x-operation-name": "find",
        "tags": [
          "TreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "Array of TreatmentCategory model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TreatmentCategoryWithRelations"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreatmentCategory.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "TreatmentCategoryController.find"
      }
    },
    "/api/v1/treatment-sessions/count": {
      "get": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "count",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentSession model count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/loopback.Count"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "TreatmentSession.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<TreatmentSession>"
                }
              }
            }
          }
        ],
        "operationId": "TreatmentSessionController.count"
      }
    },
    "/api/v1/treatment-sessions/running": {
      "get": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "findRunningSessions",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "Array of running TreatmentSession instances for the given user (or logged-in user if userId not provided)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TreatmentSession"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TreatmentSessionController.findRunningSessions"
      }
    },
    "/api/v1/treatment-sessions/{id}/restore": {
      "patch": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "restoreSessionById",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "Restores a soft-deleted treatment session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentSessionWithRelations"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TreatmentSessionController.restoreSessionById"
      }
    },
    "/api/v1/treatment-sessions/{id}": {
      "put": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "replaceById",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentSession PUT success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentSession"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TreatmentSession"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TreatmentSessionController.replaceById"
      },
      "patch": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "updateById",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentSession PATCH success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session": {
                    "$ref": "#/components/schemas/TreatmentSessionPartial"
                  },
                  "careSession": {
                    "$ref": "#/components/schemas/CareSessionPartial"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TreatmentSessionController.updateById"
      },
      "get": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "findById",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentSession model instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentSessionWithRelations"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreatmentSession.Filter"
                }
              }
            }
          }
        ],
        "operationId": "TreatmentSessionController.findById"
      },
      "delete": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "deleteById",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentSession DELETE success (soft delete)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TreatmentSessionController.deleteById"
      }
    },
    "/api/v1/treatment-sessions": {
      "post": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "create",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "TreatmentSession model instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TreatmentSession"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session": {
                    "$ref": "#/components/schemas/NewTreatmentSession"
                  },
                  "careSession": {
                    "$ref": "#/components/schemas/NewCareSession"
                  }
                },
                "required": [
                  "session",
                  "careSession"
                ]
              }
            }
          }
        },
        "operationId": "TreatmentSessionController.create"
      },
      "get": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "find",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "Array of TreatmentSession model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TreatmentSessionWithRelations"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TreatmentSession.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "TreatmentSessionController.find"
      }
    },
    "/api/v1/user/{userId}/treatment-sessions": {
      "get": {
        "x-controller-name": "TreatmentSessionController",
        "x-operation-name": "findByUserId",
        "tags": [
          "TreatmentSessionController"
        ],
        "responses": {
          "200": {
            "description": "Array of TreatmentSession belonging to a specific userId",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TreatmentSession"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TreatmentSessionController.findByUserId"
      }
    },
    "/api/v1/user-chronic-conditions/{userId}": {
      "get": {
        "x-controller-name": "UserChronicConditionController",
        "x-operation-name": "getByUserId",
        "tags": [
          "UserChronicConditionController"
        ],
        "responses": {
          "200": {
            "description": "Get user chronic conditions by user ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserChronicCondition"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserChronicConditionController.getByUserId"
      }
    },
    "/api/v1/user-chronic-conditions": {
      "post": {
        "x-controller-name": "UserChronicConditionController",
        "x-operation-name": "createOrUpdate",
        "tags": [
          "UserChronicConditionController"
        ],
        "responses": {
          "200": {
            "description": "User chronic conditions updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserChronicCondition"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "User chronic conditions created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserChronicCondition"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "conditionIds"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "conditionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "otherCondition": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserChronicConditionController.createOrUpdate"
      }
    },
    "/api/v1/user-devices/switch": {
      "post": {
        "x-controller-name": "UserDeviceController",
        "x-operation-name": "switchDevice",
        "tags": [
          "UserDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Device switch success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserDevice"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "checkConflict",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "oldDeviceId",
                  "installDate"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "oldDeviceId": {
                    "type": "string"
                  },
                  "newDeviceId": {
                    "type": "string"
                  },
                  "deInstallDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "installDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "watchReturnDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "offboardingDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "installedById": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserDeviceController.switchDevice"
      }
    },
    "/api/v1/user-devices/user/{userId}/history": {
      "get": {
        "x-controller-name": "UserDeviceController",
        "x-operation-name": "getDeviceHistory",
        "tags": [
          "UserDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Full device switch history for a user (active and inactive)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserDevice"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserDeviceController.getDeviceHistory"
      }
    },
    "/api/v1/user-devices/user/{userId}": {
      "get": {
        "x-controller-name": "UserDeviceController",
        "x-operation-name": "findByUserId",
        "tags": [
          "UserDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Array of UserDevice model instances for a specific user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UserDevice"
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserDeviceController.findByUserId"
      }
    },
    "/api/v1/user-devices/{id}/reason": {
      "patch": {
        "x-controller-name": "UserDeviceController",
        "x-operation-name": "updateReason",
        "tags": [
          "UserDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Update reason for a device history record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "UserDeviceController.updateReason"
      }
    },
    "/api/v1/user-devices": {
      "post": {
        "x-controller-name": "UserDeviceController",
        "x-operation-name": "create",
        "tags": [
          "UserDeviceController"
        ],
        "responses": {
          "200": {
            "description": "UserDevice model instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserDevice"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "checkConflict",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUserDevice"
              }
            }
          }
        },
        "operationId": "UserDeviceController.create"
      }
    },
    "/api/v1/user-firebase-tokens": {
      "post": {
        "x-controller-name": "UserFirebaseTokenController",
        "x-operation-name": "upsertFirebaseToken",
        "tags": [
          "UserFirebaseTokenController"
        ],
        "responses": {
          "200": {
            "description": "Success - Firebase token upserted successfully. Returns array of tokens if all succeeded, or bulk operation summary if there were failures.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string",
                      "example": "Firebase token upserted successfully for 2 user(s)"
                    },
                    "data": {
                      "oneOf": [
                        {
                          "type": "array",
                          "items": {},
                          "description": "Array of UserFirebaseTokenResponse when all operations succeeded",
                          "example": [
                            {
                              "id": "token-id-1",
                              "userId": "user-id-1",
                              "firebaseToken": "fcm-token-123",
                              "deviceId": "device-123",
                              "deviceName": "iPhone 14",
                              "deviceType": "ios",
                              "isActive": true
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "description": "Bulk operation summary when some operations failed",
                          "properties": {
                            "successCount": {
                              "type": "number",
                              "example": 2,
                              "description": "Number of successful operations"
                            },
                            "failedCount": {
                              "type": "number",
                              "example": 1,
                              "description": "Number of failed operations"
                            },
                            "totalCount": {
                              "type": "number",
                              "example": 3,
                              "description": "Total number of operations attempted"
                            },
                            "failures": {
                              "type": "array",
                              "description": "Details of failed operations",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "userId": {
                                    "type": "string",
                                    "example": "user-id-3"
                                  },
                                  "reason": {
                                    "type": "string",
                                    "example": "User not found"
                                  }
                                }
                              }
                            },
                            "successfulTokens": {
                              "type": "array",
                              "description": "Array of successfully created/updated tokens",
                              "items": {}
                            }
                          }
                        }
                      ]
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2026-01-12T10:30:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - Invalid or missing authentication token"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "INTERNAL_ERROR"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserFirebaseTokenRequest"
              }
            }
          }
        },
        "operationId": "UserFirebaseTokenController.upsertFirebaseToken"
      }
    },
    "/api/v1/user-treatment-categories/{userId}": {
      "get": {
        "x-controller-name": "UserTreatmentCategoryController",
        "x-operation-name": "getByUserId",
        "tags": [
          "UserTreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "Get user treatment categories by user ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserTreatmentCategory"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserTreatmentCategoryController.getByUserId"
      }
    },
    "/api/v1/user-treatment-categories": {
      "post": {
        "x-controller-name": "UserTreatmentCategoryController",
        "x-operation-name": "createOrUpdate",
        "tags": [
          "UserTreatmentCategoryController"
        ],
        "responses": {
          "200": {
            "description": "Create or update user treatment categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserTreatmentCategory"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "categoryIds"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "categoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "UserTreatmentCategoryController.createOrUpdate"
      }
    },
    "/api/v1/users/accessibleUsersForFilter": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "accessibleUsersForFilter",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of users accessible to the current user for filter purposes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccessibleUserForFilterResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.accessibleUsersForFilter"
      }
    },
    "/api/v1/users/export-companies": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "exportCompanies",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Paginated companies list for export - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "legalName": {
                            "type": "string"
                          },
                          "dbaName": {
                            "type": "string"
                          },
                          "monitoringService": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "phone": {
                            "type": "string"
                          },
                          "contactNumber": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 401
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "UNAUTHORIZED"
                        },
                        "message": {
                          "type": "string",
                          "example": "Unauthorized"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "INTERNAL_ERROR"
                        },
                        "message": {
                          "type": "string",
                          "example": "Failed to export companies data"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.exportCompanies"
      }
    },
    "/api/v1/users/export-doctors": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "exportDoctors",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Doctors export data - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "doctorName": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "customTitle": {
                            "type": "string"
                          },
                          "facilityName": {
                            "type": "string"
                          },
                          "companyName": {
                            "type": "string"
                          },
                          "monitoringService": {
                            "type": "string"
                          },
                          "facilityPhone": {
                            "type": "string"
                          },
                          "facilityEmail": {
                            "type": "string"
                          },
                          "devicePassCode": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 401
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "UNAUTHORIZED"
                        },
                        "message": {
                          "type": "string",
                          "example": "Unauthorized"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "INTERNAL_ERROR"
                        },
                        "message": {
                          "type": "string",
                          "example": "Failed to export doctors data"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.exportDoctors"
      }
    },
    "/api/v1/users/export-facilities": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "exportFacilities",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Facilities export data - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "facilityName": {
                            "type": "string"
                          },
                          "companyName": {
                            "type": "string"
                          },
                          "monitoringService": {
                            "type": "string"
                          },
                          "facilityPhone": {
                            "type": "string"
                          },
                          "facilityEmail": {
                            "type": "string"
                          },
                          "devicePassCode": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 401
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "UNAUTHORIZED"
                        },
                        "message": {
                          "type": "string",
                          "example": "Unauthorized"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "INTERNAL_ERROR"
                        },
                        "message": {
                          "type": "string",
                          "example": "Failed to export facilities data"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.exportFacilities"
      }
    },
    "/api/v1/users/search-patients-in-home": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "globalPatientSearch",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Search for patients across all accessible companies - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "firstName": {
                            "type": "string"
                          },
                          "lastName": {
                            "type": "string"
                          },
                          "gender": {
                            "type": "string"
                          },
                          "dob": {
                            "type": "string"
                          },
                          "companyId": {
                            "type": "string"
                          },
                          "companyName": {
                            "type": "string"
                          },
                          "facilityId": {
                            "type": "string"
                          },
                          "facilityName": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 400
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "BAD_REQUEST"
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request data"
                        },
                        "details": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 401
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "UNAUTHORIZED"
                        },
                        "message": {
                          "type": "string",
                          "example": "Unauthorized"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "INTERNAL_SERVER_ERROR"
                        },
                        "message": {
                          "type": "string",
                          "example": "An unexpected error occurred"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "UserController.globalPatientSearch"
      }
    },
    "/api/v1/users/setup-password": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "setupPassword",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Password setup successful - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired token"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "password",
                  "confirmPassword"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "confirmPassword": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.setupPassword"
      }
    },
    "/api/v1/users/upsert-by-third-party-id": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "upsertByThirdPartyId",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User created or updated — looked up by thirdPartyUserId",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "action": {
                          "type": "string",
                          "enum": [
                            "created",
                            "updated"
                          ]
                        },
                        "userId": {
                          "type": "string"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUserRequestPartial"
              }
            }
          },
          "description": "Standard Users fields — thirdPartyUserId is required as the lookup key. Caller owns field mapping."
        },
        "operationId": "UserController.upsertByThirdPartyId"
      }
    },
    "/api/v1/users/{userId}/delete": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "softDeleteUser",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User soft-deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.softDeleteUser"
      }
    },
    "/api/v1/users/{userId}/refresh-tokens/{tokenId}": {
      "delete": {
        "x-controller-name": "AuthRefreshTokenController",
        "x-operation-name": "revokeForUser",
        "tags": [
          "AuthRefreshTokenController"
        ],
        "responses": {
          "200": {
            "description": "Session revoked"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tokenId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AuthRefreshTokenController.revokeForUser"
      }
    },
    "/api/v1/users/{userId}/refresh-tokens": {
      "get": {
        "x-controller-name": "AuthRefreshTokenController",
        "x-operation-name": "listForUser",
        "tags": [
          "AuthRefreshTokenController"
        ],
        "responses": {
          "200": {
            "description": "Sessions for the named user"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "AuthRefreshTokenController.listForUser"
      },
      "delete": {
        "x-controller-name": "AuthRefreshTokenController",
        "x-operation-name": "revokeAllForUser",
        "tags": [
          "AuthRefreshTokenController"
        ],
        "responses": {
          "200": {
            "description": "All sessions revoked"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "AuthRefreshTokenController.revokeAllForUser"
      }
    },
    "/api/v1/users/{userId}/send-invite": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "sendInviteEmail",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Invite email sent successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "inviteEmailSentAt": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - user already set password or invite already sent"
          },
          "404": {
            "description": "User not found"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.sendInviteEmail"
      }
    },
    "/api/v1/users/{userId}/user-firebase-tokens": {
      "get": {
        "x-controller-name": "UserFirebaseTokenController",
        "x-operation-name": "getActiveTokensByUserId",
        "tags": [
          "UserFirebaseTokenController"
        ],
        "responses": {
          "200": {
            "description": "Success - Active tokens fetched successfully - Standardized response format",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {}
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - Invalid or missing authentication token"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 500
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "INTERNAL_ERROR"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserFirebaseTokenController.getActiveTokensByUserId"
      }
    },
    "/api/v1/vital-data-gap": {
      "get": {
        "x-controller-name": "VitalDataGapController",
        "x-operation-name": "list",
        "tags": [
          "VitalDataGapController"
        ],
        "responses": {
          "200": {
            "description": "Paginated list of VitalDataGap records for specific user with optional date range filter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VitalDataGapResponse"
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "pageSize": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number"
                        },
                        "totalPages": {
                          "type": "number"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "VitalDataGapController.list"
      }
    },
    "/api/v1/vitals-cache/rebuild": {
      "post": {
        "x-controller-name": "VitalsCacheController",
        "x-operation-name": "rebuild",
        "tags": [
          "VitalsCacheController"
        ],
        "responses": {
          "202": {
            "description": "Accepted - Rebuild started, poll /api/v1/jobs/{executionId} for progress",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 202
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string"
                        },
                        "scope": {
                          "type": "object"
                        }
                      }
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Bad Request - Conflicting scope, or too many userIds"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Only Admin can perform this action"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Conflict - A rebuild is already running"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RebuildVitalsCacheRequest"
              }
            }
          },
          "required": false
        },
        "operationId": "VitalsCacheController.rebuild"
      }
    },
    "/api/v1/webhooks/retell": {
      "post": {
        "x-controller-name": "RetellWebhookController",
        "x-operation-name": "handleRetellWebhook",
        "tags": [
          "RetellWebhookController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Webhook received"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "type": "string"
                  },
                  "call": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "operationId": "RetellWebhookController.handleRetellWebhook"
      }
    },
    "/bleData/{facilityId}": {
      "get": {
        "x-controller-name": "BLEController",
        "x-operation-name": "getBleDataByFacilityId",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.getBleDataByFacilityId"
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "BLEController.getBleDataByFacilityId"
      }
    },
    "/bleUserById/{userId}": {
      "get": {
        "x-controller-name": "BLEController",
        "x-operation-name": "getBleDevicesByUserId",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.getBleDevicesByUserId"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "BLEController.getBleDevicesByUserId"
      }
    },
    "/care-sessions/count": {
      "get": {
        "x-controller-name": "CareSessionController",
        "x-operation-name": "count",
        "tags": [
          "CareSessionController"
        ],
        "responses": {
          "200": {
            "description": "CareSession model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "CareSession.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<CareSession>"
                }
              }
            }
          }
        ],
        "operationId": "CareSessionController.count"
      }
    },
    "/care-sessions/user/{userId}": {
      "get": {
        "x-controller-name": "CareSessionController",
        "x-operation-name": "findByUserId",
        "tags": [
          "CareSessionController"
        ],
        "responses": {
          "200": {
            "description": "Array of CareSession for a specific userId",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CareSessionWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "CareSessionController.findByUserId"
      }
    },
    "/care-sessions/{id}": {
      "get": {
        "x-controller-name": "CareSessionController",
        "x-operation-name": "findById",
        "tags": [
          "CareSessionController"
        ],
        "responses": {
          "200": {
            "description": "CareSession model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CareSessionWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "CareSessionController.findById"
      },
      "delete": {
        "x-controller-name": "CareSessionController",
        "x-operation-name": "deleteById",
        "tags": [
          "CareSessionController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "CareSession DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "CareSessionController.deleteById"
      }
    },
    "/care-sessions": {
      "post": {
        "x-controller-name": "CareSessionController",
        "x-operation-name": "create",
        "tags": [
          "CareSessionController"
        ],
        "responses": {
          "200": {
            "description": "CareSession model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CareSession"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCareSession"
              }
            }
          }
        },
        "operationId": "CareSessionController.create"
      },
      "get": {
        "x-controller-name": "CareSessionController",
        "x-operation-name": "find",
        "tags": [
          "CareSessionController"
        ],
        "responses": {
          "200": {
            "description": "Array of CareSession model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CareSessionWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CareSession.Filter"
                }
              }
            }
          }
        ],
        "operationId": "CareSessionController.find"
      }
    },
    "/care-timer/user/{userId}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getTimerData",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PatientVitalsController.getTimerData"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "monthYear",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "PatientVitalsController.getTimerData"
      }
    },
    "/company/{companyId}/users": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getUsersByCompany",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "List of users for a specific company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "UserController.getUsersByCompany"
      }
    },
    "/concurrent/requests": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "sendConcurrentRequests",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.sendConcurrentRequests"
          }
        },
        "operationId": "BLEController.sendConcurrentRequests"
      }
    },
    "/facilities/{companyId}/users": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getFacilityByCompany",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "List of facilities for a specific company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getFacilityByCompany"
      }
    },
    "/facility/{facilityId}/dashboard-stats": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getDashboardStats",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Return value of UserController.getDashboardStats"
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getDashboardStats"
      }
    },
    "/facility/{facilityId}": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getFacilityById",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Facility details by facilityId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "facilityId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getFacilityById"
      }
    },
    "/franchise/{franchiseId}/dashboard-summary": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getDashboardSummary",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Aggregated dashboard summary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "franchiseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getDashboardSummary"
      }
    },
    "/franchise/{franchiseId}/users": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getUsersByFranchise",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "List of users for a specific franchise",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "franchiseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getUsersByFranchise"
      }
    },
    "/franchise/{franchiseId}": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getFranchiseById",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Franchise details by franchiseId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "franchiseId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getFranchiseById"
      }
    },
    "/internal/v1/licenses/activate": {
      "post": {
        "x-controller-name": "SdkActivationController",
        "x-operation-name": "activate",
        "tags": [
          "SdkActivationController"
        ],
        "responses": {
          "200": {
            "description": "Success - Activation created or returned unchanged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SdkActivateResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - Invalid/revoked/expired license or revoked device"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Application not authorized on this license"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Conflict - Device limit reached for this license"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkActivateRequest"
              }
            }
          }
        },
        "operationId": "SdkActivationController.activate"
      }
    },
    "/internal/v1/licenses/buddy-devices/register": {
      "post": {
        "x-controller-name": "SdkBuddyDeviceController",
        "x-operation-name": "register",
        "tags": [
          "SdkBuddyDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Success - Buddy device registered (or existing active registration refreshed)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SdkBuddyDeviceRegisterResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Unauthorized - Invalid or inactive license"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - This watch has been revoked on this license"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkBuddyDeviceRegisterRequest"
              }
            }
          }
        },
        "operationId": "SdkBuddyDeviceController.register"
      }
    },
    "/internal/v1/licenses/buddy-devices/verify": {
      "post": {
        "x-controller-name": "SdkBuddyDeviceController",
        "x-operation-name": "verify",
        "tags": [
          "SdkBuddyDeviceController"
        ],
        "responses": {
          "200": {
            "description": "Success - Watch is on the allowlist and active",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "statusCode": {
                      "type": "number",
                      "example": 200
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SdkBuddyDeviceVerifyResponse"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden - Watch not found on the allowlist, or revoked"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkBuddyDeviceVerifyRequest"
              }
            }
          }
        },
        "operationId": "SdkBuddyDeviceController.verify"
      }
    },
    "/medications/count": {
      "get": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "count",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "Medications model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Medications.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Medications>"
                }
              }
            }
          }
        ],
        "operationId": "MedicationsController.count"
      }
    },
    "/medications/user/{userId}": {
      "get": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "findByUserId",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "Array of Medications model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MedicationsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "MedicationsController.findByUserId"
      }
    },
    "/medications/{id}/withfile": {
      "get": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "getMedicationFile",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get file from S3"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MedicationsController.getMedicationFile"
      }
    },
    "/medications/{id}": {
      "put": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "replaceById",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Medications PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Medications"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "MedicationsController.replaceById"
      },
      "patch": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "updateById",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Medications PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MedicationsPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "MedicationsController.updateById"
      },
      "get": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "findById",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "Medications model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MedicationsWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Medications.Filter"
                }
              }
            }
          }
        ],
        "operationId": "MedicationsController.findById"
      },
      "delete": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "deleteById",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Medications soft-delete success (sets deletedAt timestamp)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "MedicationsController.deleteById"
      }
    },
    "/medications": {
      "post": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "create",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "Medications model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Medications"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewMedications"
              }
            }
          }
        },
        "operationId": "MedicationsController.create"
      },
      "get": {
        "x-controller-name": "MedicationsController",
        "x-operation-name": "find",
        "tags": [
          "MedicationsController"
        ],
        "responses": {
          "200": {
            "description": "Array of Medications model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MedicationsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Medications.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "MedicationsController.find"
      }
    },
    "/migrate/caretimers": {
      "patch": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "migrateOldCareTimers",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PatientVitalsController.migrateOldCareTimers"
          }
        },
        "operationId": "PatientVitalsController.migrateOldCareTimers"
      }
    },
    "/notes/alert/{alertId}": {
      "get": {
        "x-controller-name": "NotesController",
        "x-operation-name": "findByAlertId",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Array of Notes belonging to a specific alertId",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Notes"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotesController.findByAlertId"
      }
    },
    "/notes/count/{alertId}": {
      "get": {
        "x-controller-name": "NotesController",
        "x-operation-name": "countUserAlerts",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Return value of NotesController.countUserAlerts"
          }
        },
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotesController.countUserAlerts"
      }
    },
    "/notes/count": {
      "get": {
        "x-controller-name": "NotesController",
        "x-operation-name": "count",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Notes model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Notes.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Notes>"
                }
              }
            }
          }
        ],
        "operationId": "NotesController.count"
      }
    },
    "/notes/{id}/restore": {
      "patch": {
        "x-controller-name": "NotesController",
        "x-operation-name": "restoreNoteById",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Restores a soft-deleted note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/NotesWithRelations"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotesController.restoreNoteById"
      }
    },
    "/notes/{id}": {
      "put": {
        "x-controller-name": "NotesController",
        "x-operation-name": "replaceById",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "204": {
            "description": "Notes PUT success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Notes"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "NotesController.replaceById"
      },
      "patch": {
        "x-controller-name": "NotesController",
        "x-operation-name": "updateById",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "204": {
            "description": "Notes PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "$ref": "#/components/schemas/NotesPartial"
                  },
                  "careSession": {
                    "$ref": "#/components/schemas/CareSessionPartial"
                  }
                }
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "NotesController.updateById"
      },
      "get": {
        "x-controller-name": "NotesController",
        "x-operation-name": "findById",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Notes model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotesWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notes.Filter"
                }
              }
            }
          }
        ],
        "operationId": "NotesController.findById"
      },
      "delete": {
        "x-controller-name": "NotesController",
        "x-operation-name": "deleteById",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "204": {
            "description": "Notes DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "NotesController.deleteById"
      }
    },
    "/notes/{userId}": {
      "get": {
        "x-controller-name": "NotesController",
        "x-operation-name": "findByUserId",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Array of Notes belonging to a specific userId",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Notes"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "NotesController.findByUserId"
      }
    },
    "/notes": {
      "post": {
        "x-controller-name": "NotesController",
        "x-operation-name": "create",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Notes model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notes"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "$ref": "#/components/schemas/NewNotes"
                  },
                  "session": {
                    "$ref": "#/components/schemas/NewCareSession"
                  }
                },
                "required": [
                  "note",
                  "session"
                ]
              }
            }
          }
        },
        "operationId": "NotesController.create"
      },
      "patch": {
        "x-controller-name": "NotesController",
        "x-operation-name": "updateAll",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Notes PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Notes.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Notes>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotesPartial"
              }
            }
          }
        },
        "operationId": "NotesController.updateAll"
      },
      "get": {
        "x-controller-name": "NotesController",
        "x-operation-name": "find",
        "tags": [
          "NotesController"
        ],
        "responses": {
          "200": {
            "description": "Array of Notes model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NotesWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notes.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "NotesController.find"
      }
    },
    "/patient-documents/count": {
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "count",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "PatientDocument model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PatientDocument.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<PatientDocument>"
                }
              }
            }
          }
        ],
        "operationId": "PatientDocumentController.count"
      }
    },
    "/patient-documents/upload": {
      "post": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "uploadPatientDocument",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "Upload patient document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "patientDocument": {
                      "$ref": "#/components/schemas/PatientDocument"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "fileName": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "documentType": {
                    "type": "string",
                    "enum": [
                      "Consent",
                      "Fact Sheet",
                      "Diagnostics",
                      "Insurance"
                    ]
                  }
                }
              }
            }
          },
          "description": "Upload Patient Document",
          "required": true
        },
        "operationId": "PatientDocumentController.uploadPatientDocument"
      }
    },
    "/patient-documents/{id}/download": {
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "downloadPatientDocument",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "Returns a presigned S3 URL for downloading a document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientDocumentController.downloadPatientDocument"
      }
    },
    "/patient-documents/{id}": {
      "put": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "replaceById",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientDocument PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientDocument"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientDocumentController.replaceById"
      },
      "patch": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "updateById",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientDocument PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientDocumentPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientDocumentController.updateById"
      },
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "findById",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "PatientDocument model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientDocumentWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientDocument.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientDocumentController.findById"
      },
      "delete": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "deleteById",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientDocument DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientDocumentController.deleteById"
      }
    },
    "/patient-documents/{userId}": {
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "findByUserId",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientDocument model instances for a user, with facilityTimezone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientDocument"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientDocumentController.findByUserId"
      }
    },
    "/patient-documents": {
      "post": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "create",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "PatientDocument model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientDocument"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPatientDocument"
              }
            }
          }
        },
        "operationId": "PatientDocumentController.create"
      },
      "patch": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "updateAll",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "PatientDocument PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PatientDocument.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<PatientDocument>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientDocumentPartial"
              }
            }
          }
        },
        "operationId": "PatientDocumentController.updateAll"
      },
      "get": {
        "x-controller-name": "PatientDocumentController",
        "x-operation-name": "find",
        "tags": [
          "PatientDocumentController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientDocument model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientDocumentWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientDocument.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "PatientDocumentController.find"
      }
    },
    "/patient-profiles/count": {
      "get": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "count",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "200": {
            "description": "PatientProfiles model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PatientProfiles.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<PatientProfiles>"
                }
              }
            }
          }
        ],
        "operationId": "PatientProfilesController.count"
      }
    },
    "/patient-profiles/{id}": {
      "put": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "replaceById",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientProfiles PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientProfiles"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientProfilesController.replaceById"
      },
      "patch": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "updateById",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientProfiles PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientProfilesPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientProfilesController.updateById"
      },
      "get": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "findById",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "200": {
            "description": "PatientProfiles model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientProfilesWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientProfiles.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientProfilesController.findById"
      },
      "delete": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "deleteById",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientProfiles DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientProfilesController.deleteById"
      }
    },
    "/patient-profiles": {
      "post": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "create",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "200": {
            "description": "PatientProfiles model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientProfiles"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPatientProfiles"
              }
            }
          }
        },
        "operationId": "PatientProfilesController.create"
      },
      "get": {
        "x-controller-name": "PatientProfilesController",
        "x-operation-name": "find",
        "tags": [
          "PatientProfilesController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientProfiles model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientProfilesWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientProfiles.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "PatientProfilesController.find"
      }
    },
    "/patient-vitals/count": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "count",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "PatientVitals model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PatientVitals.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<PatientVitals>"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.count"
      }
    },
    "/patient-vitals/filter/user/{userId}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "findByUserIdWithFilter",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals with facilityTimezone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "facilityTimezone": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filterType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vitalTypes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeWindow",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.findByUserIdWithFilter"
      }
    },
    "/patient-vitals/group/filter/user/{userId}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "findByUserIdWithGroupFilter",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals with facilityTimezone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "facilityTimezone": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filterType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vitalTypes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "readingSources",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeWindow",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeObsolete",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeHistorical",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.findByUserIdWithGroupFilter"
      }
    },
    "/patient-vitals/import": {
      "post": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "importPatientVitals",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Bulk import vitals from uploaded JSON file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "successCount": {
                      "type": "number"
                    },
                    "failedCount": {
                      "type": "number"
                    },
                    "failures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "number"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Request body for multipart/form-data based file upload",
          "required": true
        },
        "operationId": "PatientVitalsController.importPatientVitals"
      }
    },
    "/patient-vitals/importCsv": {
      "post": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "importCsv",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Bulk Import of Patient Vitals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vitals": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "vitalType": {
                          "type": "string"
                        },
                        "vitalValue": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "recordedAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "vitalType",
                        "vitalValue",
                        "unit",
                        "recordedAt"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "PatientVitalsController.importCsv"
      }
    },
    "/patient-vitals/report/pdf/user/{userId}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "downloadVitalsReportPdf",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Download vitals report as PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "vitalTypes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "windowStartMinutes",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "windowEndMinutes",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "PatientVitalsController.downloadVitalsReportPdf"
      }
    },
    "/patient-vitals/report/user/{userId}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getVitalsReport",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Vitals report for the last 30 days. Optional windowStartMinutes/windowEndMinutes (0-1439) to set preferred reading window (defaults 5:00 PM - 7:30 PM)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "windowStartMinutes",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "windowEndMinutes",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "operationId": "PatientVitalsController.getVitalsReport"
      }
    },
    "/patient-vitals/user/{userId}/latest/{vitalType}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "findLatestByUserIdAndType",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Latest PatientVital by user and vitalType with facilityTimezone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitalsWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "vitalType",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientVitalsController.findLatestByUserIdAndType"
      }
    },
    "/patient-vitals/user/{userId}/latest": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getLatestVitalsShaped",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PatientVitalsController.getLatestVitalsShaped"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientVitalsController.getLatestVitalsShaped"
      }
    },
    "/patient-vitals/user/{userId}/type/{vitalType}/last": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getLastSubmittedVitalsByUserIdAndVitalTypes",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientVitalsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "vitalType",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.getLastSubmittedVitalsByUserIdAndVitalTypes"
      }
    },
    "/patient-vitals/user/{userId}/type/{vitalType}/last4": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "getLast4SubmittedVitalsByUserIdAndVitalTypes",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientVitalsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "vitalType",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.getLast4SubmittedVitalsByUserIdAndVitalTypes"
      }
    },
    "/patient-vitals/user/{userId}/type/{vitalType}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "findByUserIdAndVitalType",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientVitalsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "vitalType",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.findByUserIdAndVitalType"
      }
    },
    "/patient-vitals/user/{userId}": {
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "findByUserId",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals with facilityTimezone. NOTE on includeHistorical: unlike /patient-vitals/group/filter/user/{userId} (which excludes historical vitals by default), this endpoint is shared by several callers that never pass the param — so omitting it returns ALL vitals unfiltered. Pass includeHistorical=false explicitly to exclude historical readings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "facilityTimezone": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filterType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timezone",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeHistorical",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.findByUserId"
      }
    },
    "/patient-vitals/{id}": {
      "put": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "replaceById",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientVitals PUT success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientVitals"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientVitalsController.replaceById"
      },
      "patch": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "updateById",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientVitals PATCH success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientVitalsPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "PatientVitalsController.updateById"
      },
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "findById",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "PatientVitals model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitalsWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.findById"
      },
      "delete": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "deleteById",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "description": "PatientVitals DELETE success"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "PatientVitalsController.deleteById"
      }
    },
    "/patient-vitals": {
      "post": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "create",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "PatientVitals model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPatientVitals"
              }
            }
          }
        },
        "operationId": "PatientVitalsController.create"
      },
      "patch": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "updateAll",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "PatientVitals PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "PatientVitals.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<PatientVitals>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientVitalsPartial"
              }
            }
          }
        },
        "operationId": "PatientVitalsController.updateAll"
      },
      "get": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "find",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Array of PatientVitals model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PatientVitalsWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientVitals.Filter"
                }
              }
            }
          }
        ],
        "operationId": "PatientVitalsController.find"
      }
    },
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": [
          "PingController"
        ],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping"
      }
    },
    "/sessions/{token}/deactivate": {
      "patch": {
        "x-controller-name": "DeprecatedController",
        "x-operation-name": "deactivateSessionByToken",
        "tags": [
          "DeprecatedController"
        ],
        "responses": {
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "statusCode": {
                          "type": "number"
                        },
                        "name": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "DeprecatedController.deactivateSessionByToken"
      }
    },
    "/sessions": {
      "post": {
        "x-controller-name": "DeprecatedController",
        "x-operation-name": "createSession",
        "tags": [
          "DeprecatedController"
        ],
        "responses": {
          "200": {
            "description": "Sessions model instance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "token": {
                      "type": "string"
                    },
                    "firebaseToken": {
                      "type": "string"
                    },
                    "active": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "required": false
        },
        "operationId": "DeprecatedController.createSession"
      }
    },
    "/settings/baseline-vitals": {
      "get": {
        "x-controller-name": "SettingsController",
        "x-operation-name": "getstandardBaselineVitals",
        "tags": [
          "SettingsController"
        ],
        "responses": {
          "200": {
            "description": "Default Vitals JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "operationId": "SettingsController.getstandardBaselineVitals"
      }
    },
    "/signup": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "signUp",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "422": {
            "description": "Invalid referral code",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUser"
              }
            }
          }
        },
        "operationId": "UserController.signUp"
      }
    },
    "/sleep-data": {
      "get": {
        "x-controller-name": "SleepDataController",
        "x-operation-name": "find",
        "tags": [
          "SleepDataController"
        ],
        "responses": {
          "200": {
            "description": "Array of SleepData model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SleepDataWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SleepData.Filter"
                }
              }
            }
          }
        ],
        "operationId": "SleepDataController.find"
      }
    },
    "/upload-profile-pic": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "uploadFile",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Upload file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "x-parser": "stream",
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          },
          "description": "Upload File",
          "required": true
        },
        "operationId": "UserController.uploadFile"
      }
    },
    "/user/caretimers": {
      "post": {
        "x-controller-name": "PatientVitalsController",
        "x-operation-name": "createOrUpdateCareTimer",
        "tags": [
          "PatientVitalsController"
        ],
        "responses": {
          "200": {
            "description": "Return value of PatientVitalsController.createOrUpdateCareTimer"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId",
                  "duration",
                  "date"
                ],
                "properties": {
                  "userId": {
                    "type": "string"
                  },
                  "duration": {
                    "type": "number"
                  },
                  "date": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "PatientVitalsController.createOrUpdateCareTimer"
      }
    },
    "/user/{userId}": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "updateUserById",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "checkConflict",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsersPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "UserController.updateUserById"
      }
    },
    "/users/addUser": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "addUser",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "checkConflict",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUser"
              }
            }
          }
        },
        "operationId": "UserController.addUser"
      }
    },
    "/users/age": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "age",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Return current user age",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "UserController.age"
      }
    },
    "/users/changePassword": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "changePassword",
        "tags": [
          "UserController"
        ],
        "responses": {
          "204": {
            "description": "Password changed successfully"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentPassword": {
                    "type": "string"
                  },
                  "newPassword": {
                    "type": "string"
                  }
                },
                "required": [
                  "currentPassword",
                  "newPassword"
                ]
              }
            }
          }
        },
        "operationId": "UserController.changePassword"
      }
    },
    "/users/check-phone/{phone}": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "checkUserByPhone",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Return value of UserController.checkUserByPhone"
          }
        },
        "parameters": [
          {
            "name": "phone",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.checkUserByPhone"
      }
    },
    "/users/delete": {
      "delete": {
        "x-controller-name": "UserController",
        "x-operation-name": "deleteUser",
        "tags": [
          "UserController"
        ],
        "responses": {
          "204": {
            "description": "User Deleted Successfully"
          }
        },
        "operationId": "UserController.deleteUser"
      }
    },
    "/users/details": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "details",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Return current user details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "UserController.details"
      }
    },
    "/users/doctorLogin": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "doctorLogin",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          },
          "description": "The input of login function",
          "required": true
        },
        "operationId": "UserController.doctorLogin"
      }
    },
    "/users/facilities": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getScopedFacilities",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Get facilities (and staff) scoped to the caller's tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.getScopedFacilities"
      }
    },
    "/users/facilityLogin": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "facilityLogin",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Web login — token plus derived roles and privileges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "mustChangePassword": {
                          "type": "boolean"
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          },
          "description": "Web login credentials (email or phone plus password)",
          "required": true
        },
        "operationId": "UserController.facilityLogin"
      }
    },
    "/users/firstTimePasswordChange": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "firstTimePasswordChange",
        "tags": [
          "UserController"
        ],
        "responses": {
          "204": {
            "description": "First-time password changed successfully"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentPassword": {
                    "type": "string"
                  },
                  "newPassword": {
                    "type": "string"
                  }
                },
                "required": [
                  "currentPassword",
                  "newPassword"
                ]
              }
            }
          }
        },
        "operationId": "UserController.firstTimePasswordChange"
      }
    },
    "/users/franchiseLogin": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "franchiseLogin",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          },
          "description": "The input of login function (phone or email)",
          "required": true
        },
        "operationId": "UserController.franchiseLogin"
      }
    },
    "/users/high-risk-levels": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getHighRiskLevels",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Get all possible HighRiskLevel enum values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.getHighRiskLevels"
      }
    },
    "/users/login": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "login",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "phone": {
                    "type": "string",
                    "minLength": 1
                  },
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          },
          "description": "The input of login function (phone or email)",
          "required": true
        },
        "operationId": "UserController.login"
      }
    },
    "/users/setNewPasswordByPhone": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "setNewPasswordByPhone",
        "tags": [
          "UserController"
        ],
        "responses": {
          "204": {
            "description": "Password changed successfully"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string"
                  },
                  "phoneNumber": {
                    "type": "string"
                  },
                  "newPassword": {
                    "type": "string"
                  }
                },
                "required": [
                  "role",
                  "phoneNumber",
                  "newPassword"
                ]
              }
            }
          }
        },
        "operationId": "UserController.setNewPasswordByPhone"
      }
    },
    "/users/switchRole": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "switchRole",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Switch to another role the account already holds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "statusCode": {
                      "type": "number"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "roles": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "privileges": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            }
          },
          "description": "Target role to switch into",
          "required": true
        },
        "operationId": "UserController.switchRole"
      }
    },
    "/users/updateDetails": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "updateDetails",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User Details Updated"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsersPartial"
              }
            }
          }
        },
        "operationId": "UserController.updateDetails"
      }
    },
    "/users/updateDeviceToken": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "updateDeviceToken",
        "tags": [
          "UserController"
        ],
        "deprecated": true,
        "responses": {
          "200": {
            "description": "Device Token Updated - DEPRECATED: Use POST /api/user-firebase-token instead",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "deviceToken"
                ],
                "properties": {
                  "deviceToken": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.updateDeviceToken"
      }
    },
    "/users/updateWebBrowserToken": {
      "patch": {
        "x-controller-name": "UserController",
        "x-operation-name": "updateWebBrowserToken",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Device Token Updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "webBrowserToken"
                ],
                "properties": {
                  "webBrowserToken": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.updateWebBrowserToken"
      }
    },
    "/users/with-roles": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getWithRoles",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Get all users with role facility or doctor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.getWithRoles"
      }
    },
    "/users/{userId}/details": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getUserDetails",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Return value of UserController.getUserDetails"
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getUserDetails"
      }
    },
    "/users/{id}/profile-picture": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "getProfilePictureUrl",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Get profile picture URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "UserController.getProfilePictureUrl"
      }
    },
    "/vitals/delete-duplicates": {
      "post": {
        "x-controller-name": "BLEController",
        "x-operation-name": "deleteDuplicates",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.deleteDuplicates"
          }
        },
        "operationId": "BLEController.deleteDuplicates"
      }
    },
    "/vitals/duplicates": {
      "get": {
        "x-controller-name": "BLEController",
        "x-operation-name": "findDuplicates",
        "tags": [
          "BLEController"
        ],
        "responses": {
          "200": {
            "description": "Return value of BLEController.findDuplicates"
          }
        },
        "operationId": "BLEController.findDuplicates"
      }
    },
    "/whoAmI": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "whoAmI",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Return current user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "operationId": "UserController.whoAmI"
      }
    }
  },
  "servers": [
    {
      "url": "https://backend.dev.vitalfriend.com"
    }
  ],
  "components": {
    "schemas": {
      "ParsePrescriptionRequest": {
        "title": "ParsePrescriptionRequest",
        "type": "object",
        "properties": {
          "ocrText": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          }
        },
        "required": [
          "ocrText"
        ],
        "additionalProperties": false
      },
      "RebuildVitalsCacheRequest": {
        "title": "RebuildVitalsCacheRequest",
        "type": "object",
        "properties": {
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "pruneOrphans": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "VitalDataGapResponse": {
        "title": "VitalDataGapResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "vitalType": {
            "type": "string"
          },
          "gapDurationInSeconds": {
            "type": "number"
          },
          "gapDurationInSecondsAtFirstDetection": {
            "type": "number"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "userId",
          "vitalType",
          "gapDurationInSeconds",
          "gapDurationInSecondsAtFirstDetection",
          "date",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "User": {
        "title": "User",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "verificationToken": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": true
      },
      "BaselineVital": {
        "title": "BaselineVital",
        "type": "object",
        "properties": {
          "vitalType": {
            "type": "string"
          },
          "low": {},
          "slightlyLow": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "normal": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "elevated": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "high": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "highRisk": {
            "type": "number"
          }
        },
        "additionalProperties": false
      },
      "Facility": {
        "title": "Facility",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "UsersPartial": {
        "title": "UsersPartial",
        "type": "object",
        "description": "(tsType: Partial<Users>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "customTitle": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code in uppercase (e.g. \"US\", \"GB\"). Stored uppercase regardless of client input."
          },
          "dialCode": {
            "type": "string",
            "description": "Dial code digits without leading + (e.g. \"1\" for US/CA, \"44\" for GB)."
          },
          "dob": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "statusReason": {
            "type": "string"
          },
          "statusReasonDetails": {
            "type": "string"
          },
          "statusDate": {
            "type": "string"
          },
          "notDeployedReason": {
            "type": "string"
          },
          "deviceSetupStatus": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "installationStatus": {
            "type": "string"
          },
          "documentationStatus": {
            "type": "string"
          },
          "documentationNotes": {
            "type": "string"
          },
          "buddyInstallHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "facilityStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "patientStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "referredBy": {
            "type": "string"
          },
          "refferedBy": {
            "type": "string"
          },
          "referralLocation": {
            "type": "string"
          },
          "referralSource": {
            "type": "string"
          },
          "ipadTabletSerialNumber": {
            "type": "string"
          },
          "contactAvailableFrom": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "contactAvailableTo": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "dateOfDeath": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "bloodGroup": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "emergencyName1": {
            "type": "string"
          },
          "emergencyName2": {
            "type": "string"
          },
          "emergencyContact1": {
            "type": "string"
          },
          "emergencyContact2": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "heightUnits": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "weightUnits": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "family": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "type": "string"
          },
          "deviceToken": {
            "type": "string"
          },
          "webBrowserToken": {
            "type": "string"
          },
          "tokenVersion": {
            "type": "number"
          },
          "tokensRevokedAt": {
            "type": "number"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedBy": {
            "type": "string"
          },
          "mustChangePassword": {
            "type": "boolean"
          },
          "inviteEmailSent": {
            "type": "boolean"
          },
          "inviteEmailSentAt": {
            "type": "string",
            "format": "date-time"
          },
          "hasSetPassword": {
            "type": "boolean"
          },
          "passwordSetAt": {
            "type": "string",
            "format": "date-time"
          },
          "inviteToken": {
            "type": "string"
          },
          "inviteTokenExpiry": {
            "type": "string",
            "format": "date-time"
          },
          "urlTimestamp": {
            "type": "number"
          },
          "referralCode": {
            "type": "string"
          },
          "franchiseId": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "locationTime": {
            "type": "string",
            "format": "date-time"
          },
          "sexualOrientation": {
            "type": "string"
          },
          "race": {
            "type": "string"
          },
          "ethnicity": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "mrnId": {
            "type": "string"
          },
          "thirdPartyUserId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "linkedAccountId": {
            "type": "string"
          },
          "thirdPartyFacilityName": {
            "type": "string"
          },
          "thirdPartyFacilityId": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "room": {
            "type": "string"
          },
          "roomNo": {
            "type": "string"
          },
          "dxCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "facilityName": {
            "type": "string"
          },
          "allergies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "medication": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityContactName": {
            "type": "string"
          },
          "facilityContactRole": {
            "type": "string"
          },
          "facilityPhone": {
            "type": "string"
          },
          "facilityEmail": {
            "type": "string"
          },
          "facilityType": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "providerName": {
            "type": "string"
          },
          "providerSpecialty": {
            "type": "string"
          },
          "provideEmail": {
            "type": "string"
          },
          "providerPhone": {
            "type": "string"
          },
          "familyContactName1": {
            "type": "string"
          },
          "familyRelationShip1": {
            "type": "string"
          },
          "familyphone1": {
            "type": "string"
          },
          "familyEmail1": {
            "type": "string"
          },
          "familyContactName2": {
            "type": "string"
          },
          "familyRelationShip2": {
            "type": "string"
          },
          "familyphone2": {
            "type": "string"
          },
          "familyEmail2": {
            "type": "string"
          },
          "insuranceProvider": {
            "type": "string"
          },
          "insuranceProviderName": {
            "type": "string"
          },
          "insuranceProviderId": {
            "type": "string"
          },
          "insuranceProviderAddress": {
            "type": "string"
          },
          "primaryPhyName": {
            "type": "string"
          },
          "primaryPhySpecialty": {
            "type": "string"
          },
          "primaryPhyPhone": {
            "type": "string"
          },
          "primaryPhyEmail": {
            "type": "string"
          },
          "primaryInsuranceName": {
            "type": "string"
          },
          "primaryInsuranceID": {
            "type": "string"
          },
          "primaryInsurancePhone": {
            "type": "string"
          },
          "primaryInsuranceEmail": {
            "type": "string"
          },
          "secondaryInsuranceName": {
            "type": "string"
          },
          "secondaryInsuranceID": {
            "type": "string"
          },
          "secondaryInsurancePhone": {
            "type": "string"
          },
          "secondaryInsuranceEmail": {
            "type": "string"
          },
          "emergencyContactName": {
            "type": "string"
          },
          "emergencyRelationship": {
            "type": "string"
          },
          "emergencyPhone": {
            "type": "string"
          },
          "emergencyEmail": {
            "type": "string"
          },
          "facilityTimeZone": {
            "type": "string"
          },
          "adherence": {
            "type": "object"
          },
          "hrAdherence": {
            "type": "object"
          },
          "hrConsecutiveCount": {
            "type": "number"
          },
          "cptCodes": {
            "type": "object"
          },
          "billed": {
            "type": "object"
          },
          "baselineVitals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaselineVital"
            }
          },
          "facilitiesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          },
          "highRisk": {
            "type": "string",
            "enum": [
              "normal",
              "high"
            ],
            "default": "normal"
          },
          "alertSettings": {
            "type": "object"
          },
          "devicePassCode": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "companyStatus": {
            "type": "string"
          },
          "facilityStatus": {
            "type": "string"
          },
          "parentCompanyId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedAccess": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stateJuristiction": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "facilityCategory": {
            "type": "string"
          },
          "billing_and_status": {
            "type": "object"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<Users>"
      },
      "NewUser": {
        "title": "NewUser",
        "type": "object",
        "description": "(tsType: NewUserRequest, schemaOptions: { title: 'NewUser', partial: false })",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "customTitle": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code in uppercase (e.g. \"US\", \"GB\"). Stored uppercase regardless of client input."
          },
          "dialCode": {
            "type": "string",
            "description": "Dial code digits without leading + (e.g. \"1\" for US/CA, \"44\" for GB)."
          },
          "dob": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "statusReason": {
            "type": "string"
          },
          "statusReasonDetails": {
            "type": "string"
          },
          "statusDate": {
            "type": "string"
          },
          "notDeployedReason": {
            "type": "string"
          },
          "deviceSetupStatus": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "installationStatus": {
            "type": "string"
          },
          "documentationStatus": {
            "type": "string"
          },
          "documentationNotes": {
            "type": "string"
          },
          "buddyInstallHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "facilityStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "patientStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "referredBy": {
            "type": "string"
          },
          "refferedBy": {
            "type": "string"
          },
          "referralLocation": {
            "type": "string"
          },
          "referralSource": {
            "type": "string"
          },
          "ipadTabletSerialNumber": {
            "type": "string"
          },
          "contactAvailableFrom": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "contactAvailableTo": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "dateOfDeath": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "bloodGroup": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "emergencyName1": {
            "type": "string"
          },
          "emergencyName2": {
            "type": "string"
          },
          "emergencyContact1": {
            "type": "string"
          },
          "emergencyContact2": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "heightUnits": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "weightUnits": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "family": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "type": "string"
          },
          "deviceToken": {
            "type": "string"
          },
          "webBrowserToken": {
            "type": "string"
          },
          "tokenVersion": {
            "type": "number"
          },
          "tokensRevokedAt": {
            "type": "number"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedBy": {
            "type": "string"
          },
          "mustChangePassword": {
            "type": "boolean"
          },
          "inviteEmailSent": {
            "type": "boolean"
          },
          "inviteEmailSentAt": {
            "type": "string",
            "format": "date-time"
          },
          "hasSetPassword": {
            "type": "boolean"
          },
          "passwordSetAt": {
            "type": "string",
            "format": "date-time"
          },
          "inviteToken": {
            "type": "string"
          },
          "inviteTokenExpiry": {
            "type": "string",
            "format": "date-time"
          },
          "urlTimestamp": {
            "type": "number"
          },
          "referralCode": {
            "type": "string"
          },
          "franchiseId": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "locationTime": {
            "type": "string",
            "format": "date-time"
          },
          "sexualOrientation": {
            "type": "string"
          },
          "race": {
            "type": "string"
          },
          "ethnicity": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "mrnId": {
            "type": "string"
          },
          "thirdPartyUserId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "linkedAccountId": {
            "type": "string"
          },
          "thirdPartyFacilityName": {
            "type": "string"
          },
          "thirdPartyFacilityId": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "room": {
            "type": "string"
          },
          "roomNo": {
            "type": "string"
          },
          "dxCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "facilityName": {
            "type": "string"
          },
          "allergies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "medication": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityContactName": {
            "type": "string"
          },
          "facilityContactRole": {
            "type": "string"
          },
          "facilityPhone": {
            "type": "string"
          },
          "facilityEmail": {
            "type": "string"
          },
          "facilityType": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "providerName": {
            "type": "string"
          },
          "providerSpecialty": {
            "type": "string"
          },
          "provideEmail": {
            "type": "string"
          },
          "providerPhone": {
            "type": "string"
          },
          "familyContactName1": {
            "type": "string"
          },
          "familyRelationShip1": {
            "type": "string"
          },
          "familyphone1": {
            "type": "string"
          },
          "familyEmail1": {
            "type": "string"
          },
          "familyContactName2": {
            "type": "string"
          },
          "familyRelationShip2": {
            "type": "string"
          },
          "familyphone2": {
            "type": "string"
          },
          "familyEmail2": {
            "type": "string"
          },
          "insuranceProvider": {
            "type": "string"
          },
          "insuranceProviderName": {
            "type": "string"
          },
          "insuranceProviderId": {
            "type": "string"
          },
          "insuranceProviderAddress": {
            "type": "string"
          },
          "primaryPhyName": {
            "type": "string"
          },
          "primaryPhySpecialty": {
            "type": "string"
          },
          "primaryPhyPhone": {
            "type": "string"
          },
          "primaryPhyEmail": {
            "type": "string"
          },
          "primaryInsuranceName": {
            "type": "string"
          },
          "primaryInsuranceID": {
            "type": "string"
          },
          "primaryInsurancePhone": {
            "type": "string"
          },
          "primaryInsuranceEmail": {
            "type": "string"
          },
          "secondaryInsuranceName": {
            "type": "string"
          },
          "secondaryInsuranceID": {
            "type": "string"
          },
          "secondaryInsurancePhone": {
            "type": "string"
          },
          "secondaryInsuranceEmail": {
            "type": "string"
          },
          "emergencyContactName": {
            "type": "string"
          },
          "emergencyRelationship": {
            "type": "string"
          },
          "emergencyPhone": {
            "type": "string"
          },
          "emergencyEmail": {
            "type": "string"
          },
          "facilityTimeZone": {
            "type": "string"
          },
          "adherence": {
            "type": "object"
          },
          "hrAdherence": {
            "type": "object"
          },
          "hrConsecutiveCount": {
            "type": "number"
          },
          "cptCodes": {
            "type": "object"
          },
          "billed": {
            "type": "object"
          },
          "baselineVitals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaselineVital"
            }
          },
          "facilitiesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          },
          "highRisk": {
            "type": "string",
            "enum": [
              "normal",
              "high"
            ],
            "default": "normal"
          },
          "alertSettings": {
            "type": "object"
          },
          "devicePassCode": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "companyStatus": {
            "type": "string"
          },
          "facilityStatus": {
            "type": "string"
          },
          "parentCompanyId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedAccess": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stateJuristiction": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "facilityCategory": {
            "type": "string"
          },
          "billing_and_status": {
            "type": "object"
          },
          "linkToExistingAccountId": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password",
          "phone"
        ],
        "additionalProperties": true,
        "x-typescript-type": "NewUserRequest"
      },
      "NewUserRequest": {
        "title": "NewUserRequest",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "customTitle": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code in uppercase (e.g. \"US\", \"GB\"). Stored uppercase regardless of client input."
          },
          "dialCode": {
            "type": "string",
            "description": "Dial code digits without leading + (e.g. \"1\" for US/CA, \"44\" for GB)."
          },
          "dob": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "statusReason": {
            "type": "string"
          },
          "statusReasonDetails": {
            "type": "string"
          },
          "statusDate": {
            "type": "string"
          },
          "notDeployedReason": {
            "type": "string"
          },
          "deviceSetupStatus": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "installationStatus": {
            "type": "string"
          },
          "documentationStatus": {
            "type": "string"
          },
          "documentationNotes": {
            "type": "string"
          },
          "buddyInstallHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "facilityStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "patientStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "referredBy": {
            "type": "string"
          },
          "refferedBy": {
            "type": "string"
          },
          "referralLocation": {
            "type": "string"
          },
          "referralSource": {
            "type": "string"
          },
          "ipadTabletSerialNumber": {
            "type": "string"
          },
          "contactAvailableFrom": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "contactAvailableTo": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "dateOfDeath": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "bloodGroup": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "emergencyName1": {
            "type": "string"
          },
          "emergencyName2": {
            "type": "string"
          },
          "emergencyContact1": {
            "type": "string"
          },
          "emergencyContact2": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "heightUnits": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "weightUnits": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "family": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "type": "string"
          },
          "deviceToken": {
            "type": "string"
          },
          "webBrowserToken": {
            "type": "string"
          },
          "tokenVersion": {
            "type": "number"
          },
          "tokensRevokedAt": {
            "type": "number"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedBy": {
            "type": "string"
          },
          "mustChangePassword": {
            "type": "boolean"
          },
          "inviteEmailSent": {
            "type": "boolean"
          },
          "inviteEmailSentAt": {
            "type": "string",
            "format": "date-time"
          },
          "hasSetPassword": {
            "type": "boolean"
          },
          "passwordSetAt": {
            "type": "string",
            "format": "date-time"
          },
          "inviteToken": {
            "type": "string"
          },
          "inviteTokenExpiry": {
            "type": "string",
            "format": "date-time"
          },
          "urlTimestamp": {
            "type": "number"
          },
          "referralCode": {
            "type": "string"
          },
          "franchiseId": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "locationTime": {
            "type": "string",
            "format": "date-time"
          },
          "sexualOrientation": {
            "type": "string"
          },
          "race": {
            "type": "string"
          },
          "ethnicity": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "mrnId": {
            "type": "string"
          },
          "thirdPartyUserId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "linkedAccountId": {
            "type": "string"
          },
          "thirdPartyFacilityName": {
            "type": "string"
          },
          "thirdPartyFacilityId": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "room": {
            "type": "string"
          },
          "roomNo": {
            "type": "string"
          },
          "dxCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "facilityName": {
            "type": "string"
          },
          "allergies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "medication": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityContactName": {
            "type": "string"
          },
          "facilityContactRole": {
            "type": "string"
          },
          "facilityPhone": {
            "type": "string"
          },
          "facilityEmail": {
            "type": "string"
          },
          "facilityType": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "providerName": {
            "type": "string"
          },
          "providerSpecialty": {
            "type": "string"
          },
          "provideEmail": {
            "type": "string"
          },
          "providerPhone": {
            "type": "string"
          },
          "familyContactName1": {
            "type": "string"
          },
          "familyRelationShip1": {
            "type": "string"
          },
          "familyphone1": {
            "type": "string"
          },
          "familyEmail1": {
            "type": "string"
          },
          "familyContactName2": {
            "type": "string"
          },
          "familyRelationShip2": {
            "type": "string"
          },
          "familyphone2": {
            "type": "string"
          },
          "familyEmail2": {
            "type": "string"
          },
          "insuranceProvider": {
            "type": "string"
          },
          "insuranceProviderName": {
            "type": "string"
          },
          "insuranceProviderId": {
            "type": "string"
          },
          "insuranceProviderAddress": {
            "type": "string"
          },
          "primaryPhyName": {
            "type": "string"
          },
          "primaryPhySpecialty": {
            "type": "string"
          },
          "primaryPhyPhone": {
            "type": "string"
          },
          "primaryPhyEmail": {
            "type": "string"
          },
          "primaryInsuranceName": {
            "type": "string"
          },
          "primaryInsuranceID": {
            "type": "string"
          },
          "primaryInsurancePhone": {
            "type": "string"
          },
          "primaryInsuranceEmail": {
            "type": "string"
          },
          "secondaryInsuranceName": {
            "type": "string"
          },
          "secondaryInsuranceID": {
            "type": "string"
          },
          "secondaryInsurancePhone": {
            "type": "string"
          },
          "secondaryInsuranceEmail": {
            "type": "string"
          },
          "emergencyContactName": {
            "type": "string"
          },
          "emergencyRelationship": {
            "type": "string"
          },
          "emergencyPhone": {
            "type": "string"
          },
          "emergencyEmail": {
            "type": "string"
          },
          "facilityTimeZone": {
            "type": "string"
          },
          "adherence": {
            "type": "object"
          },
          "hrAdherence": {
            "type": "object"
          },
          "hrConsecutiveCount": {
            "type": "number"
          },
          "cptCodes": {
            "type": "object"
          },
          "billed": {
            "type": "object"
          },
          "baselineVitals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaselineVital"
            }
          },
          "facilitiesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          },
          "highRisk": {
            "type": "string",
            "enum": [
              "normal",
              "high"
            ],
            "default": "normal"
          },
          "alertSettings": {
            "type": "object"
          },
          "devicePassCode": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "companyStatus": {
            "type": "string"
          },
          "facilityStatus": {
            "type": "string"
          },
          "parentCompanyId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedAccess": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stateJuristiction": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "facilityCategory": {
            "type": "string"
          },
          "billing_and_status": {
            "type": "object"
          },
          "linkToExistingAccountId": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password",
          "phone"
        ],
        "additionalProperties": true
      },
      "AiCallingInitiateResponse": {
        "title": "AiCallingInitiateResponse",
        "type": "object",
        "properties": {
          "callId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "AiCallingInitiateRequest": {
        "title": "AiCallingInitiateRequest",
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "call_reason": {
            "type": "string",
            "enum": [
              "adherence_check",
              "device_connectivity"
            ]
          },
          "phone_number": {
            "type": "string"
          },
          "phone_number_dial_code": {
            "type": "string"
          },
          "facility_name": {
            "type": "string"
          },
          "facility_type": {
            "type": "string"
          },
          "facility_email": {
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "call_reason",
          "phone_number"
        ],
        "additionalProperties": false
      },
      "AccessibleUserForFilterResponse": {
        "title": "AccessibleUserForFilterResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "NewUserRequestPartial": {
        "title": "NewUserRequestPartial",
        "type": "object",
        "description": "(tsType: Partial<NewUserRequest>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "customTitle": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code in uppercase (e.g. \"US\", \"GB\"). Stored uppercase regardless of client input."
          },
          "dialCode": {
            "type": "string",
            "description": "Dial code digits without leading + (e.g. \"1\" for US/CA, \"44\" for GB)."
          },
          "dob": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "statusReason": {
            "type": "string"
          },
          "statusReasonDetails": {
            "type": "string"
          },
          "statusDate": {
            "type": "string"
          },
          "notDeployedReason": {
            "type": "string"
          },
          "deviceSetupStatus": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "installationStatus": {
            "type": "string"
          },
          "documentationStatus": {
            "type": "string"
          },
          "documentationNotes": {
            "type": "string"
          },
          "buddyInstallHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "facilityStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "patientStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "referredBy": {
            "type": "string"
          },
          "refferedBy": {
            "type": "string"
          },
          "referralLocation": {
            "type": "string"
          },
          "referralSource": {
            "type": "string"
          },
          "ipadTabletSerialNumber": {
            "type": "string"
          },
          "contactAvailableFrom": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "contactAvailableTo": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "dateOfDeath": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "bloodGroup": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "emergencyName1": {
            "type": "string"
          },
          "emergencyName2": {
            "type": "string"
          },
          "emergencyContact1": {
            "type": "string"
          },
          "emergencyContact2": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "heightUnits": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "weightUnits": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "family": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "type": "string"
          },
          "deviceToken": {
            "type": "string"
          },
          "webBrowserToken": {
            "type": "string"
          },
          "tokenVersion": {
            "type": "number"
          },
          "tokensRevokedAt": {
            "type": "number"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedBy": {
            "type": "string"
          },
          "mustChangePassword": {
            "type": "boolean"
          },
          "inviteEmailSent": {
            "type": "boolean"
          },
          "inviteEmailSentAt": {
            "type": "string",
            "format": "date-time"
          },
          "hasSetPassword": {
            "type": "boolean"
          },
          "passwordSetAt": {
            "type": "string",
            "format": "date-time"
          },
          "inviteToken": {
            "type": "string"
          },
          "inviteTokenExpiry": {
            "type": "string",
            "format": "date-time"
          },
          "urlTimestamp": {
            "type": "number"
          },
          "referralCode": {
            "type": "string"
          },
          "franchiseId": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "locationTime": {
            "type": "string",
            "format": "date-time"
          },
          "sexualOrientation": {
            "type": "string"
          },
          "race": {
            "type": "string"
          },
          "ethnicity": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "mrnId": {
            "type": "string"
          },
          "thirdPartyUserId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "linkedAccountId": {
            "type": "string"
          },
          "thirdPartyFacilityName": {
            "type": "string"
          },
          "thirdPartyFacilityId": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "room": {
            "type": "string"
          },
          "roomNo": {
            "type": "string"
          },
          "dxCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "facilityName": {
            "type": "string"
          },
          "allergies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "medication": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityContactName": {
            "type": "string"
          },
          "facilityContactRole": {
            "type": "string"
          },
          "facilityPhone": {
            "type": "string"
          },
          "facilityEmail": {
            "type": "string"
          },
          "facilityType": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "providerName": {
            "type": "string"
          },
          "providerSpecialty": {
            "type": "string"
          },
          "provideEmail": {
            "type": "string"
          },
          "providerPhone": {
            "type": "string"
          },
          "familyContactName1": {
            "type": "string"
          },
          "familyRelationShip1": {
            "type": "string"
          },
          "familyphone1": {
            "type": "string"
          },
          "familyEmail1": {
            "type": "string"
          },
          "familyContactName2": {
            "type": "string"
          },
          "familyRelationShip2": {
            "type": "string"
          },
          "familyphone2": {
            "type": "string"
          },
          "familyEmail2": {
            "type": "string"
          },
          "insuranceProvider": {
            "type": "string"
          },
          "insuranceProviderName": {
            "type": "string"
          },
          "insuranceProviderId": {
            "type": "string"
          },
          "insuranceProviderAddress": {
            "type": "string"
          },
          "primaryPhyName": {
            "type": "string"
          },
          "primaryPhySpecialty": {
            "type": "string"
          },
          "primaryPhyPhone": {
            "type": "string"
          },
          "primaryPhyEmail": {
            "type": "string"
          },
          "primaryInsuranceName": {
            "type": "string"
          },
          "primaryInsuranceID": {
            "type": "string"
          },
          "primaryInsurancePhone": {
            "type": "string"
          },
          "primaryInsuranceEmail": {
            "type": "string"
          },
          "secondaryInsuranceName": {
            "type": "string"
          },
          "secondaryInsuranceID": {
            "type": "string"
          },
          "secondaryInsurancePhone": {
            "type": "string"
          },
          "secondaryInsuranceEmail": {
            "type": "string"
          },
          "emergencyContactName": {
            "type": "string"
          },
          "emergencyRelationship": {
            "type": "string"
          },
          "emergencyPhone": {
            "type": "string"
          },
          "emergencyEmail": {
            "type": "string"
          },
          "facilityTimeZone": {
            "type": "string"
          },
          "adherence": {
            "type": "object"
          },
          "hrAdherence": {
            "type": "object"
          },
          "hrConsecutiveCount": {
            "type": "number"
          },
          "cptCodes": {
            "type": "object"
          },
          "billed": {
            "type": "object"
          },
          "baselineVitals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaselineVital"
            }
          },
          "facilitiesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          },
          "highRisk": {
            "type": "string",
            "enum": [
              "normal",
              "high"
            ],
            "default": "normal"
          },
          "alertSettings": {
            "type": "object"
          },
          "devicePassCode": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "companyStatus": {
            "type": "string"
          },
          "facilityStatus": {
            "type": "string"
          },
          "parentCompanyId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedAccess": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stateJuristiction": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "facilityCategory": {
            "type": "string"
          },
          "billing_and_status": {
            "type": "object"
          },
          "linkToExistingAccountId": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<NewUserRequest>"
      },
      "UserTreatmentCategory": {
        "title": "UserTreatmentCategory",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "categoryIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "categoryIds",
          "categories"
        ],
        "additionalProperties": false
      },
      "UserFirebaseTokenRequest": {
        "title": "UserFirebaseTokenRequest",
        "type": "object",
        "properties": {
          "userIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "firebaseToken": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceName": {
            "type": "string"
          },
          "deviceType": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "web"
            ]
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "userIds",
          "firebaseToken",
          "deviceId"
        ],
        "additionalProperties": false
      },
      "UserDevice": {
        "title": "UserDevice",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "installDate": {
            "type": "string",
            "format": "date-time"
          },
          "deInstallDate": {
            "type": "string",
            "format": "date-time"
          },
          "watchReturnDate": {
            "type": "string",
            "format": "date-time"
          },
          "offboardingDate": {
            "type": "string",
            "format": "date-time"
          },
          "installedById": {
            "type": "string"
          },
          "firmwareVersion": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "firstVitalDate": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "deviceId"
        ],
        "additionalProperties": true
      },
      "NewUserDevice": {
        "title": "NewUserDevice",
        "type": "object",
        "description": "(tsType: Omit<UserDevice, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt'>, schemaOptions: { title: 'NewUserDevice', exclude: [ 'id', 'createdAt', 'updatedAt', 'deletedAt' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "installDate": {
            "type": "string",
            "format": "date-time"
          },
          "deInstallDate": {
            "type": "string",
            "format": "date-time"
          },
          "watchReturnDate": {
            "type": "string",
            "format": "date-time"
          },
          "offboardingDate": {
            "type": "string",
            "format": "date-time"
          },
          "installedById": {
            "type": "string"
          },
          "firmwareVersion": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "firstVitalDate": {
            "type": "string",
            "format": "date-time"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "deviceId"
        ],
        "additionalProperties": true,
        "x-typescript-type": "Omit<UserDevice, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt'>"
      },
      "UserChronicCondition": {
        "title": "UserChronicCondition",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "conditionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "otherCondition": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "conditionIds",
          "conditions"
        ],
        "additionalProperties": true
      },
      "TreatmentSession": {
        "title": "TreatmentSession",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "hasVitalAtStart": {
            "type": "boolean"
          },
          "hasVitalAtEnd": {
            "type": "boolean"
          },
          "isSessionEnd": {
            "type": "boolean"
          },
          "isEndedBySystem": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "number"
          },
          "careSessionId": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "systemNote": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "NewTreatmentSession": {
        "title": "NewTreatmentSession",
        "type": "object",
        "description": "(tsType: Omit<TreatmentSession, 'id' | 'careSessionId'>, schemaOptions: { title: 'NewTreatmentSession', exclude: [ 'id', 'careSessionId' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "hasVitalAtStart": {
            "type": "boolean"
          },
          "hasVitalAtEnd": {
            "type": "boolean"
          },
          "isSessionEnd": {
            "type": "boolean"
          },
          "isEndedBySystem": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "number"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "systemNote": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<TreatmentSession, 'id' | 'careSessionId'>"
      },
      "NewCareSession": {
        "title": "NewCareSession",
        "type": "object",
        "description": "(tsType: Omit<CareSession, 'id'>, schemaOptions: { title: 'NewCareSession', exclude: [ 'id' ] })",
        "properties": {
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "date",
          "time",
          "duration"
        ],
        "additionalProperties": true,
        "x-typescript-type": "Omit<CareSession, 'id'>"
      },
      "TreatmentCategoryWithRelations": {
        "title": "TreatmentCategoryWithRelations",
        "type": "object",
        "description": "(tsType: TreatmentCategoryWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "maxSessionDurationInSeconds": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "treatmentSessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TreatmentSessionWithRelations"
            }
          }
        },
        "required": [
          "name",
          "maxSessionDurationInSeconds"
        ],
        "additionalProperties": true,
        "x-typescript-type": "TreatmentCategoryWithRelations"
      },
      "CareSessionWithRelations": {
        "title": "CareSessionWithRelations",
        "type": "object",
        "description": "(tsType: CareSessionWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "date",
          "time",
          "duration"
        ],
        "additionalProperties": true,
        "x-typescript-type": "CareSessionWithRelations"
      },
      "TreatmentSessionWithRelations": {
        "title": "TreatmentSessionWithRelations",
        "type": "object",
        "description": "(tsType: TreatmentSessionWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "hasVitalAtStart": {
            "type": "boolean"
          },
          "hasVitalAtEnd": {
            "type": "boolean"
          },
          "isSessionEnd": {
            "type": "boolean"
          },
          "isEndedBySystem": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "number"
          },
          "careSessionId": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "systemNote": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "category": {
            "$ref": "#/components/schemas/TreatmentCategoryWithRelations"
          },
          "foreignKey": {},
          "careSession": {
            "$ref": "#/components/schemas/CareSessionWithRelations"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "TreatmentSessionWithRelations"
      },
      "TreatmentSessionPartial": {
        "title": "TreatmentSessionPartial",
        "type": "object",
        "description": "(tsType: Partial<TreatmentSession>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "hasVitalAtStart": {
            "type": "boolean"
          },
          "hasVitalAtEnd": {
            "type": "boolean"
          },
          "isSessionEnd": {
            "type": "boolean"
          },
          "isEndedBySystem": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "type": "number"
          },
          "careSessionId": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "systemNote": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<TreatmentSession>"
      },
      "CareSessionPartial": {
        "title": "CareSessionPartial",
        "type": "object",
        "description": "(tsType: Partial<CareSession>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<CareSession>"
      },
      "TreatmentCategory": {
        "title": "TreatmentCategory",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "maxSessionDurationInSeconds": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name",
          "maxSessionDurationInSeconds"
        ],
        "additionalProperties": true
      },
      "NewTreatmentCategory": {
        "title": "NewTreatmentCategory",
        "type": "object",
        "description": "(tsType: Omit<TreatmentCategory, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt'>, schemaOptions: { title: 'NewTreatmentCategory', exclude: [ 'id', 'createdAt', 'updatedAt', 'deletedAt' ] })",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "maxSessionDurationInSeconds": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "maxSessionDurationInSeconds"
        ],
        "additionalProperties": true,
        "x-typescript-type": "Omit<TreatmentCategory, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt'>"
      },
      "TreatmentCategoryPartial": {
        "title": "TreatmentCategoryPartial",
        "type": "object",
        "description": "(tsType: Partial<TreatmentCategory>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "maxSessionDurationInSeconds": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<TreatmentCategory>"
      },
      "StaffAccount": {
        "title": "StaffAccount",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "dialCode": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "address": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "StaffRoleProfile": {
        "title": "StaffRoleProfile",
        "type": "object",
        "properties": {
          "roleDocId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "customTitle": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "assignedAccess": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "roleDocId",
          "role",
          "active"
        ],
        "additionalProperties": false
      },
      "StaffDetailResponse": {
        "title": "StaffDetailResponse",
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/StaffAccount"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StaffRoleProfile"
            }
          }
        },
        "required": [
          "roles"
        ],
        "additionalProperties": false
      },
      "StaffCreateResult": {
        "title": "StaffCreateResult",
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "roleDocIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "accountId",
          "roleDocIds"
        ],
        "additionalProperties": false
      },
      "StaffCreateRequest": {
        "title": "StaffCreateRequest",
        "type": "object",
        "properties": {
          "contact": {
            "type": "object"
          },
          "password": {
            "type": "string",
            "description": "Password must be 8-128 characters and contain: 1 uppercase, 1 lowercase, 1 number, and 1 special character",
            "minLength": 8,
            "maxLength": 128,
            "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-=\\[\\]{}|;:,.<>?]).{8,128}$",
            "errorMessage": "Password must be 8-128 characters and contain: 1 uppercase, 1 lowercase, 1 number, and 1 special character"
          },
          "linkToExistingAccountId": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "contact",
          "roles"
        ],
        "additionalProperties": false
      },
      "StaffUpdateRequestPartial": {
        "title": "StaffUpdateRequestPartial",
        "type": "object",
        "description": "(tsType: Partial<StaffUpdateRequest>, schemaOptions: { partial: true })",
        "properties": {
          "contact": {
            "type": "object"
          },
          "roles": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<StaffUpdateRequest>"
      },
      "StaffUpdateRequest": {
        "title": "StaffUpdateRequest",
        "type": "object",
        "properties": {
          "contact": {
            "type": "object"
          },
          "roles": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "SleepData": {
        "title": "SleepData",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "sleepType": {
            "type": "string"
          },
          "durationMinutes": {
            "type": "number"
          },
          "sleepStartTime": {
            "type": "string",
            "format": "date-time"
          },
          "sleepEndTime": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "facilityId",
          "deviceId",
          "sleepType",
          "durationMinutes",
          "sleepStartTime",
          "sleepEndTime"
        ],
        "additionalProperties": true
      },
      "UsersWithRelations": {
        "title": "UsersWithRelations",
        "type": "object",
        "description": "(tsType: UsersWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "suffix": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "customTitle": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code in uppercase (e.g. \"US\", \"GB\"). Stored uppercase regardless of client input."
          },
          "dialCode": {
            "type": "string",
            "description": "Dial code digits without leading + (e.g. \"1\" for US/CA, \"44\" for GB)."
          },
          "dob": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "statusReason": {
            "type": "string"
          },
          "statusReasonDetails": {
            "type": "string"
          },
          "statusDate": {
            "type": "string"
          },
          "notDeployedReason": {
            "type": "string"
          },
          "deviceSetupStatus": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "installationStatus": {
            "type": "string"
          },
          "documentationStatus": {
            "type": "string"
          },
          "documentationNotes": {
            "type": "string"
          },
          "buddyInstallHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "facilityStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "patientStatusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "referredBy": {
            "type": "string"
          },
          "refferedBy": {
            "type": "string"
          },
          "referralLocation": {
            "type": "string"
          },
          "referralSource": {
            "type": "string"
          },
          "ipadTabletSerialNumber": {
            "type": "string"
          },
          "contactAvailableFrom": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "contactAvailableTo": {
            "type": "string",
            "pattern": "^(([01]\\d|2[0-3]):[0-5]\\d|)$"
          },
          "dateOfDeath": {
            "type": "string",
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "bloodGroup": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "emergencyName1": {
            "type": "string"
          },
          "emergencyName2": {
            "type": "string"
          },
          "emergencyContact1": {
            "type": "string"
          },
          "emergencyContact2": {
            "type": "string"
          },
          "height": {
            "type": "string"
          },
          "heightUnits": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "weight": {
            "type": "string"
          },
          "weightUnits": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "family": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "type": "string"
          },
          "deviceToken": {
            "type": "string"
          },
          "webBrowserToken": {
            "type": "string"
          },
          "tokenVersion": {
            "type": "number"
          },
          "tokensRevokedAt": {
            "type": "number"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedBy": {
            "type": "string"
          },
          "mustChangePassword": {
            "type": "boolean"
          },
          "inviteEmailSent": {
            "type": "boolean"
          },
          "inviteEmailSentAt": {
            "type": "string",
            "format": "date-time"
          },
          "hasSetPassword": {
            "type": "boolean"
          },
          "passwordSetAt": {
            "type": "string",
            "format": "date-time"
          },
          "inviteToken": {
            "type": "string"
          },
          "inviteTokenExpiry": {
            "type": "string",
            "format": "date-time"
          },
          "urlTimestamp": {
            "type": "number"
          },
          "referralCode": {
            "type": "string"
          },
          "franchiseId": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "locationTime": {
            "type": "string",
            "format": "date-time"
          },
          "sexualOrientation": {
            "type": "string"
          },
          "race": {
            "type": "string"
          },
          "ethnicity": {
            "type": "string"
          },
          "ssn": {
            "type": "string"
          },
          "mrnId": {
            "type": "string"
          },
          "thirdPartyUserId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "linkedAccountId": {
            "type": "string"
          },
          "thirdPartyFacilityName": {
            "type": "string"
          },
          "thirdPartyFacilityId": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "room": {
            "type": "string"
          },
          "roomNo": {
            "type": "string"
          },
          "dxCode": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "zipcode": {
            "type": "string"
          },
          "facilityName": {
            "type": "string"
          },
          "allergies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "medication": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facilityContactName": {
            "type": "string"
          },
          "facilityContactRole": {
            "type": "string"
          },
          "facilityPhone": {
            "type": "string"
          },
          "facilityEmail": {
            "type": "string"
          },
          "facilityType": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "providerName": {
            "type": "string"
          },
          "providerSpecialty": {
            "type": "string"
          },
          "provideEmail": {
            "type": "string"
          },
          "providerPhone": {
            "type": "string"
          },
          "familyContactName1": {
            "type": "string"
          },
          "familyRelationShip1": {
            "type": "string"
          },
          "familyphone1": {
            "type": "string"
          },
          "familyEmail1": {
            "type": "string"
          },
          "familyContactName2": {
            "type": "string"
          },
          "familyRelationShip2": {
            "type": "string"
          },
          "familyphone2": {
            "type": "string"
          },
          "familyEmail2": {
            "type": "string"
          },
          "insuranceProvider": {
            "type": "string"
          },
          "insuranceProviderName": {
            "type": "string"
          },
          "insuranceProviderId": {
            "type": "string"
          },
          "insuranceProviderAddress": {
            "type": "string"
          },
          "primaryPhyName": {
            "type": "string"
          },
          "primaryPhySpecialty": {
            "type": "string"
          },
          "primaryPhyPhone": {
            "type": "string"
          },
          "primaryPhyEmail": {
            "type": "string"
          },
          "primaryInsuranceName": {
            "type": "string"
          },
          "primaryInsuranceID": {
            "type": "string"
          },
          "primaryInsurancePhone": {
            "type": "string"
          },
          "primaryInsuranceEmail": {
            "type": "string"
          },
          "secondaryInsuranceName": {
            "type": "string"
          },
          "secondaryInsuranceID": {
            "type": "string"
          },
          "secondaryInsurancePhone": {
            "type": "string"
          },
          "secondaryInsuranceEmail": {
            "type": "string"
          },
          "emergencyContactName": {
            "type": "string"
          },
          "emergencyRelationship": {
            "type": "string"
          },
          "emergencyPhone": {
            "type": "string"
          },
          "emergencyEmail": {
            "type": "string"
          },
          "facilityTimeZone": {
            "type": "string"
          },
          "adherence": {
            "type": "object"
          },
          "hrAdherence": {
            "type": "object"
          },
          "hrConsecutiveCount": {
            "type": "number"
          },
          "cptCodes": {
            "type": "object"
          },
          "billed": {
            "type": "object"
          },
          "baselineVitals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BaselineVital"
            }
          },
          "facilitiesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          },
          "highRisk": {
            "type": "string",
            "enum": [
              "normal",
              "high"
            ],
            "default": "normal"
          },
          "alertSettings": {
            "type": "object"
          },
          "devicePassCode": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "companyStatus": {
            "type": "string"
          },
          "facilityStatus": {
            "type": "string"
          },
          "parentCompanyId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignedAccess": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stateJuristiction": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "subType": {
            "type": "string"
          },
          "facilityCategory": {
            "type": "string"
          },
          "billing_and_status": {
            "type": "object"
          }
        },
        "required": [
          "email",
          "password",
          "phone"
        ],
        "additionalProperties": true,
        "x-typescript-type": "UsersWithRelations"
      },
      "SleepDataWithRelations": {
        "title": "SleepDataWithRelations",
        "type": "object",
        "description": "(tsType: SleepDataWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "sleepType": {
            "type": "string"
          },
          "durationMinutes": {
            "type": "number"
          },
          "sleepStartTime": {
            "type": "string",
            "format": "date-time"
          },
          "sleepEndTime": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/UsersWithRelations"
          },
          "foreignKey": {}
        },
        "required": [
          "facilityId",
          "deviceId",
          "sleepType",
          "durationMinutes",
          "sleepStartTime",
          "sleepEndTime"
        ],
        "additionalProperties": true,
        "x-typescript-type": "SleepDataWithRelations"
      },
      "SettingsDetailsResponse": {
        "title": "SettingsDetailsResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "scopeType": {
            "type": "string"
          },
          "scopeId": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SettingsCreateRequest": {
        "title": "SettingsCreateRequest",
        "type": "object",
        "properties": {
          "scopeType": {
            "type": "string",
            "enum": [
              "global",
              "company",
              "facility",
              "user"
            ]
          },
          "scopeId": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "enum": [
              "vital_data_gap_bp_in_minutes",
              "vital_data_gap_heart_rate_in_minutes",
              "alert_creation_time_window_minutes",
              "treatment_tracker_enabled",
              "invitation_email_template",
              "caregiver_access_granted_email_template",
              "min_battery_percentage_for_buddi_update",
              "notes_only_editable_by_author",
              "operational_notes_only_editable_by_author",
              "auto_new_data_alert_previous_days",
              "auto_new_data_alert_max_days",
              "smart_bp_absence_threshold_minutes",
              "smart_bp_hr_freshness_minutes",
              "smart_bp_failure_retry_interval_minutes",
              "smart_bp_retry_cooldown_minutes",
              "personalized_baseline_min_coverage_percentage"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "scopeType",
          "key",
          "value"
        ],
        "additionalProperties": false
      },
      "SettingsDetailsResponseWithRelations": {
        "title": "SettingsDetailsResponseWithRelations",
        "type": "object",
        "description": "(tsType: SettingsDetailsResponseWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "scopeType": {
            "type": "string"
          },
          "scopeId": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "SettingsDetailsResponseWithRelations"
      },
      "SettingsUpdateRequestPartial": {
        "title": "SettingsUpdateRequestPartial",
        "type": "object",
        "description": "(tsType: Partial<SettingsUpdateRequest>, schemaOptions: { partial: true })",
        "properties": {
          "value": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<SettingsUpdateRequest>"
      },
      "SettingsUpdateRequest": {
        "title": "SettingsUpdateRequest",
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SettingsUpsertRequest": {
        "title": "SettingsUpsertRequest",
        "type": "object",
        "properties": {
          "scopeType": {
            "type": "string",
            "enum": [
              "global",
              "company",
              "facility",
              "user"
            ]
          },
          "scopeId": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "enum": [
              "vital_data_gap_bp_in_minutes",
              "vital_data_gap_heart_rate_in_minutes",
              "alert_creation_time_window_minutes",
              "treatment_tracker_enabled",
              "invitation_email_template",
              "caregiver_access_granted_email_template",
              "min_battery_percentage_for_buddi_update",
              "notes_only_editable_by_author",
              "operational_notes_only_editable_by_author",
              "auto_new_data_alert_previous_days",
              "auto_new_data_alert_max_days",
              "smart_bp_absence_threshold_minutes",
              "smart_bp_hr_freshness_minutes",
              "smart_bp_failure_retry_interval_minutes",
              "smart_bp_retry_cooldown_minutes",
              "personalized_baseline_min_coverage_percentage"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "scopeType",
          "key",
          "value"
        ],
        "additionalProperties": false
      },
      "SettingsHierarchyResponse": {
        "title": "SettingsHierarchyResponse",
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "defaultValue": {
            "type": "string"
          },
          "globalValue": {
            "type": "string"
          },
          "companyValue": {
            "type": "string"
          },
          "facilityValue": {
            "type": "string"
          },
          "userValue": {
            "type": "string"
          },
          "effectiveValue": {
            "type": "string"
          },
          "effectiveScopeType": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SettingsHierarchyListResponse": {
        "title": "SettingsHierarchyListResponse",
        "type": "object",
        "properties": {
          "settings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SettingsHierarchyResponse"
            }
          }
        },
        "required": [
          "settings"
        ],
        "additionalProperties": false
      },
      "SdkBuddyDeviceVerifyResponse": {
        "title": "SdkBuddyDeviceVerifyResponse",
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "bleMacAddress": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SdkBuddyDeviceVerifyRequest": {
        "title": "SdkBuddyDeviceVerifyRequest",
        "type": "object",
        "properties": {
          "licenseId": {
            "type": "string"
          },
          "bleMacAddress": {
            "type": "string"
          }
        },
        "required": [
          "licenseId",
          "bleMacAddress"
        ],
        "additionalProperties": false
      },
      "SdkBuddyDeviceRegisterResponse": {
        "title": "SdkBuddyDeviceRegisterResponse",
        "type": "object",
        "properties": {
          "bleMacAddress": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "registeredAt": {
            "type": "string",
            "format": "date-time"
          },
          "patientId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SdkBuddyDeviceRegisterRequest": {
        "title": "SdkBuddyDeviceRegisterRequest",
        "type": "object",
        "properties": {
          "licenseId": {
            "type": "string"
          },
          "bleMacAddress": {
            "type": "string"
          },
          "deviceLabel": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "sdkActivationId": {
            "type": "string"
          }
        },
        "required": [
          "licenseId",
          "bleMacAddress"
        ],
        "additionalProperties": false
      },
      "SdkBuddyDevice": {
        "title": "SdkBuddyDevice",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "licenseId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "bleMacAddress": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "deviceLabel": {
            "type": "string"
          },
          "lastPairedActivationId": {
            "type": "string"
          },
          "lastVitalSentAt": {
            "type": "string",
            "format": "date-time"
          },
          "vitalsSentCount": {
            "type": "number"
          },
          "registeredAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "licenseId",
          "companyId",
          "bleMacAddress",
          "status",
          "vitalsSentCount",
          "registeredAt"
        ],
        "additionalProperties": false
      },
      "LicenseFeature": {
        "title": "LicenseFeature",
        "type": "object",
        "properties": {
          "feature": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "feature",
          "description"
        ],
        "additionalProperties": false
      },
      "SdkActivateResponse": {
        "title": "SdkActivateResponse",
        "type": "object",
        "properties": {
          "sdkActivationId": {
            "type": "string"
          },
          "licenseId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "deviceType": {
            "type": "string"
          },
          "licenseExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SdkActivateRequest": {
        "title": "SdkActivateRequest",
        "type": "object",
        "properties": {
          "licenseKey": {
            "type": "string"
          },
          "deviceType": {
            "type": "string",
            "enum": [
              "android",
              "ios"
            ]
          },
          "appName": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceLabel": {
            "type": "string"
          },
          "packageName": {
            "type": "string"
          }
        },
        "required": [
          "licenseKey",
          "deviceType",
          "appName",
          "deviceId"
        ],
        "additionalProperties": false
      },
      "SdkActivation": {
        "title": "SdkActivation",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sdkActivationId": {
            "type": "string"
          },
          "licenseId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceType": {
            "type": "string",
            "enum": [
              "android",
              "ios"
            ]
          },
          "appName": {
            "type": "string"
          },
          "packageName": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "deviceLabel": {
            "type": "string"
          },
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked"
            ]
          },
          "revocationWebhookStatus": {
            "type": "string",
            "enum": [
              "n/a",
              "delivered",
              "failed"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "sdkActivationId",
          "licenseId",
          "companyId",
          "deviceType",
          "appName",
          "deviceId",
          "enabledFeatures",
          "status",
          "revocationWebhookStatus",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "RolePrivilege": {
        "title": "RolePrivilege",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "roleName": {
            "type": "string",
            "enum": [
              "admin",
              "doctor",
              "facility",
              "nurse",
              "company",
              "patient",
              "ops_admin",
              "attendant"
            ],
            "description": "Role name - must be one of the defined roles"
          },
          "privilegeCode": {
            "type": "string",
            "enum": [
              "ACCESS_HOME",
              "ACCESS_FACILITY_DASHBOARD",
              "ACCESS_ADMIN_DASHBOARD",
              "ACCESS_MANAGE_COMPANIES",
              "ACCESS_MANAGE_STAFF",
              "VIEW_PATIENTS",
              "CREATE_NOTE",
              "EDIT_NOTE",
              "DELETE_NOTE",
              "OVERRIDE_NOTE_EDIT_DELETE",
              "RECORD_VITALS",
              "START_CARE_TIMER",
              "VIEW_NOTES",
              "VIEW_TREATMENT_SESSIONS",
              "ACCESS_TREATMENT_CATEGORIES",
              "VIEW_TREATMENT_CATEGORIES",
              "CREATE_TREATMENT_CATEGORY",
              "EDIT_TREATMENT_CATEGORY",
              "DELETE_TREATMENT_CATEGORY",
              "VIEW_FACILITY_REPORTS",
              "VIEW_ADMIN_REPORTS",
              "ACCESS_OPERATIONAL_DASHBOARD",
              "VIEW_ERROR_REPORT",
              "VIEW_USERS",
              "CREATE_USER",
              "EDIT_USER",
              "MIGRATE_USER",
              "DELETE_USER",
              "MANAGE_FRIENDS_AND_FAMILY",
              "VIEW_FACILITIES",
              "CREATE_FACILITY",
              "EDIT_FACILITY",
              "MIGRATE_FACILITY",
              "ACCESS_SETTINGS",
              "ACCESS_MANAGE_ALERTS",
              "VIEW_ALERTS",
              "ACKNOWLEDGE_ALERTS",
              "VIEW_DATA_GAP",
              "VIEW_RECENT_ACTIVITY",
              "MANAGE_ROLES",
              "ACCESS_NOTIFICATION_HUB",
              "CREATE_TASK",
              "EDIT_TASK",
              "DELETE_TASK",
              "VIEW_TASKS",
              "IMPERSONATE_USER",
              "ACCESS_AUDIT_ACCESS_HUB",
              "VIEW_AI_CALLING",
              "CREATE_AI_CALLING",
              "VIEW_HEALTH_GOALS",
              "CREATE_HEALTH_GOAL",
              "EDIT_HEALTH_GOAL",
              "DELETE_HEALTH_GOAL",
              "VIEW_FACILITY_INTEGRATIONS",
              "MANAGE_FACILITY_INTEGRATIONS",
              "VIEW_SPLIT_SCREEN",
              "MANAGE_LICENSES",
              "ACCESS_DOCUMENT_INTAKE",
              "VIEW_USER_REFRESH_TOKENS",
              "REVOKE_USER_REFRESH_TOKENS"
            ],
            "description": "Privilege code - must be one of the defined privilege keys"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "roleName",
          "privilegeCode",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "NewRolePrivilege": {
        "title": "NewRolePrivilege",
        "type": "object",
        "description": "(tsType: Omit<RolePrivilege, 'id' | 'createdAt'>, schemaOptions: { title: 'NewRolePrivilege', exclude: [ 'id', 'createdAt' ] })",
        "properties": {
          "roleName": {
            "type": "string",
            "enum": [
              "admin",
              "doctor",
              "facility",
              "nurse",
              "company",
              "patient",
              "ops_admin",
              "attendant"
            ],
            "description": "Role name - must be one of the defined roles"
          },
          "privilegeCode": {
            "type": "string",
            "enum": [
              "ACCESS_HOME",
              "ACCESS_FACILITY_DASHBOARD",
              "ACCESS_ADMIN_DASHBOARD",
              "ACCESS_MANAGE_COMPANIES",
              "ACCESS_MANAGE_STAFF",
              "VIEW_PATIENTS",
              "CREATE_NOTE",
              "EDIT_NOTE",
              "DELETE_NOTE",
              "OVERRIDE_NOTE_EDIT_DELETE",
              "RECORD_VITALS",
              "START_CARE_TIMER",
              "VIEW_NOTES",
              "VIEW_TREATMENT_SESSIONS",
              "ACCESS_TREATMENT_CATEGORIES",
              "VIEW_TREATMENT_CATEGORIES",
              "CREATE_TREATMENT_CATEGORY",
              "EDIT_TREATMENT_CATEGORY",
              "DELETE_TREATMENT_CATEGORY",
              "VIEW_FACILITY_REPORTS",
              "VIEW_ADMIN_REPORTS",
              "ACCESS_OPERATIONAL_DASHBOARD",
              "VIEW_ERROR_REPORT",
              "VIEW_USERS",
              "CREATE_USER",
              "EDIT_USER",
              "MIGRATE_USER",
              "DELETE_USER",
              "MANAGE_FRIENDS_AND_FAMILY",
              "VIEW_FACILITIES",
              "CREATE_FACILITY",
              "EDIT_FACILITY",
              "MIGRATE_FACILITY",
              "ACCESS_SETTINGS",
              "ACCESS_MANAGE_ALERTS",
              "VIEW_ALERTS",
              "ACKNOWLEDGE_ALERTS",
              "VIEW_DATA_GAP",
              "VIEW_RECENT_ACTIVITY",
              "MANAGE_ROLES",
              "ACCESS_NOTIFICATION_HUB",
              "CREATE_TASK",
              "EDIT_TASK",
              "DELETE_TASK",
              "VIEW_TASKS",
              "IMPERSONATE_USER",
              "ACCESS_AUDIT_ACCESS_HUB",
              "VIEW_AI_CALLING",
              "CREATE_AI_CALLING",
              "VIEW_HEALTH_GOALS",
              "CREATE_HEALTH_GOAL",
              "EDIT_HEALTH_GOAL",
              "DELETE_HEALTH_GOAL",
              "VIEW_FACILITY_INTEGRATIONS",
              "MANAGE_FACILITY_INTEGRATIONS",
              "VIEW_SPLIT_SCREEN",
              "MANAGE_LICENSES",
              "ACCESS_DOCUMENT_INTAKE",
              "VIEW_USER_REFRESH_TOKENS",
              "REVOKE_USER_REFRESH_TOKENS"
            ],
            "description": "Privilege code - must be one of the defined privilege keys"
          }
        },
        "required": [
          "roleName",
          "privilegeCode"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<RolePrivilege, 'id' | 'createdAt'>"
      },
      "RolePrivilegeWithRelations": {
        "title": "RolePrivilegeWithRelations",
        "type": "object",
        "description": "(tsType: RolePrivilegeWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "roleName": {
            "type": "string",
            "enum": [
              "admin",
              "doctor",
              "facility",
              "nurse",
              "company",
              "patient",
              "ops_admin",
              "attendant"
            ],
            "description": "Role name - must be one of the defined roles"
          },
          "privilegeCode": {
            "type": "string",
            "enum": [
              "ACCESS_HOME",
              "ACCESS_FACILITY_DASHBOARD",
              "ACCESS_ADMIN_DASHBOARD",
              "ACCESS_MANAGE_COMPANIES",
              "ACCESS_MANAGE_STAFF",
              "VIEW_PATIENTS",
              "CREATE_NOTE",
              "EDIT_NOTE",
              "DELETE_NOTE",
              "OVERRIDE_NOTE_EDIT_DELETE",
              "RECORD_VITALS",
              "START_CARE_TIMER",
              "VIEW_NOTES",
              "VIEW_TREATMENT_SESSIONS",
              "ACCESS_TREATMENT_CATEGORIES",
              "VIEW_TREATMENT_CATEGORIES",
              "CREATE_TREATMENT_CATEGORY",
              "EDIT_TREATMENT_CATEGORY",
              "DELETE_TREATMENT_CATEGORY",
              "VIEW_FACILITY_REPORTS",
              "VIEW_ADMIN_REPORTS",
              "ACCESS_OPERATIONAL_DASHBOARD",
              "VIEW_ERROR_REPORT",
              "VIEW_USERS",
              "CREATE_USER",
              "EDIT_USER",
              "MIGRATE_USER",
              "DELETE_USER",
              "MANAGE_FRIENDS_AND_FAMILY",
              "VIEW_FACILITIES",
              "CREATE_FACILITY",
              "EDIT_FACILITY",
              "MIGRATE_FACILITY",
              "ACCESS_SETTINGS",
              "ACCESS_MANAGE_ALERTS",
              "VIEW_ALERTS",
              "ACKNOWLEDGE_ALERTS",
              "VIEW_DATA_GAP",
              "VIEW_RECENT_ACTIVITY",
              "MANAGE_ROLES",
              "ACCESS_NOTIFICATION_HUB",
              "CREATE_TASK",
              "EDIT_TASK",
              "DELETE_TASK",
              "VIEW_TASKS",
              "IMPERSONATE_USER",
              "ACCESS_AUDIT_ACCESS_HUB",
              "VIEW_AI_CALLING",
              "CREATE_AI_CALLING",
              "VIEW_HEALTH_GOALS",
              "CREATE_HEALTH_GOAL",
              "EDIT_HEALTH_GOAL",
              "DELETE_HEALTH_GOAL",
              "VIEW_FACILITY_INTEGRATIONS",
              "MANAGE_FACILITY_INTEGRATIONS",
              "VIEW_SPLIT_SCREEN",
              "MANAGE_LICENSES",
              "ACCESS_DOCUMENT_INTAKE",
              "VIEW_USER_REFRESH_TOKENS",
              "REVOKE_USER_REFRESH_TOKENS"
            ],
            "description": "Privilege code - must be one of the defined privilege keys"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "roleName",
          "privilegeCode",
          "createdAt"
        ],
        "additionalProperties": false,
        "x-typescript-type": "RolePrivilegeWithRelations"
      },
      "PushNotificationCreateResponse": {
        "title": "PushNotificationCreateResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "notificationType": {
            "type": "string"
          },
          "actionName": {
            "type": "string"
          },
          "actionPayload": {
            "type": "object"
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string"
          },
          "bellType": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "notificationType"
        ],
        "additionalProperties": false
      },
      "PushNotificationCreateRequest": {
        "title": "PushNotificationCreateRequest",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "notificationType": {
            "type": "string",
            "enum": [
              "message",
              "ble_command",
              "sync"
            ]
          },
          "notificationFor": {
            "type": "string",
            "enum": [
              "vital_link",
              "buddi",
              "vital_insight"
            ]
          },
          "actionName": {
            "type": "string",
            "enum": [
              "send_message",
              "collect_bp",
              "collect_heart_rate",
              "collect_sleep_data",
              "sync_all_history",
              "sync_history_days",
              "sync_today",
              "sync_device_settings",
              "device_switched"
            ]
          },
          "actionPayload": {
            "type": "object"
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string",
            "enum": [
              "ringtone1",
              "ringtone2",
              "ringtone3"
            ]
          },
          "bellType": {
            "type": "string",
            "enum": [
              "ring",
              "vibrate",
              "ring_and_vibrate"
            ]
          },
          "notificationTitle": {
            "type": "string"
          },
          "actionUrl": {
            "type": "string"
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "manual_action",
              "notification_rule",
              "medication_reminder",
              "smart_bp"
            ]
          },
          "sourceId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "notificationType"
        ],
        "additionalProperties": false
      },
      "PushNotificationMessageListItem": {
        "title": "PushNotificationMessageListItem",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "notificationType": {
            "type": "string"
          },
          "notificationTitle": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string"
          },
          "bellType": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "totalDevice": {
            "type": "number"
          },
          "sentCount": {
            "type": "number"
          },
          "deviceDelivered": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "failureReason": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "userId",
          "notificationType",
          "priority",
          "status",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "PushNotificationActionListItem": {
        "title": "PushNotificationActionListItem",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "notificationType": {
            "type": "string"
          },
          "actionName": {
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "actionPayload": {
            "type": "object"
          },
          "priority": {
            "type": "string"
          },
          "totalDevice": {
            "type": "number"
          },
          "sentCount": {
            "type": "number"
          },
          "deviceDelivered": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "failureReason": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "userId",
          "notificationType",
          "priority",
          "status",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "PushNotificationTimelineResponse": {
        "title": "PushNotificationTimelineResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalDevice": {
            "type": "number"
          },
          "sentCount": {
            "type": "number"
          },
          "deviceDelivered": {
            "type": "number"
          },
          "failureReason": {
            "type": "string"
          },
          "devices": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "id",
          "status"
        ],
        "additionalProperties": false
      },
      "UpdateDeliveryStatusResponse": {
        "title": "UpdateDeliveryStatusResponse",
        "type": "object",
        "properties": {
          "deliveryStatusId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "deliveryStatusId",
          "status"
        ],
        "additionalProperties": false
      },
      "UpdateDeliveryStatusRequest": {
        "title": "UpdateDeliveryStatusRequest",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "delivered",
              "read",
              "replied",
              "failed"
            ]
          },
          "deliveredToDeviceAt": {
            "type": "string",
            "format": "date-time"
          },
          "replySentAt": {
            "type": "string",
            "format": "date-time"
          },
          "failureReason": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "PatientVitals": {
        "title": "PatientVitals",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "vitalType": {
            "type": "string"
          },
          "vitalValue": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "vitalStatus": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "induced",
              "triggered",
              "automatic",
              "manual"
            ]
          },
          "recordedAt": {
            "type": "string"
          },
          "recordedAtWithoutSeconds": {
            "type": "string"
          },
          "pulseTimestamp": {
            "type": "string"
          },
          "bpTimestamp": {
            "type": "string"
          },
          "sPo2Timestamp": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isHistoricalData": {
            "type": "boolean"
          },
          "dataAgeInSecondsDuringCreation": {
            "type": "number"
          }
        },
        "additionalProperties": true
      },
      "NewPatientVitals": {
        "title": "NewPatientVitals",
        "type": "object",
        "description": "(tsType: Omit<PatientVitals, 'id'>, schemaOptions: { title: 'NewPatientVitals', exclude: [ 'id' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "vitalType": {
            "type": "string"
          },
          "vitalValue": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "vitalStatus": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "induced",
              "triggered",
              "automatic",
              "manual"
            ]
          },
          "recordedAt": {
            "type": "string"
          },
          "recordedAtWithoutSeconds": {
            "type": "string"
          },
          "pulseTimestamp": {
            "type": "string"
          },
          "bpTimestamp": {
            "type": "string"
          },
          "sPo2Timestamp": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isHistoricalData": {
            "type": "boolean"
          },
          "dataAgeInSecondsDuringCreation": {
            "type": "number"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Omit<PatientVitals, 'id'>"
      },
      "PatientVitalsPartial": {
        "title": "PatientVitalsPartial",
        "type": "object",
        "description": "(tsType: Partial<PatientVitals>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "vitalType": {
            "type": "string"
          },
          "vitalValue": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "vitalStatus": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "induced",
              "triggered",
              "automatic",
              "manual"
            ]
          },
          "recordedAt": {
            "type": "string"
          },
          "recordedAtWithoutSeconds": {
            "type": "string"
          },
          "pulseTimestamp": {
            "type": "string"
          },
          "bpTimestamp": {
            "type": "string"
          },
          "sPo2Timestamp": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isHistoricalData": {
            "type": "boolean"
          },
          "dataAgeInSecondsDuringCreation": {
            "type": "number"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<PatientVitals>"
      },
      "PatientVitalsWithRelations": {
        "title": "PatientVitalsWithRelations",
        "type": "object",
        "description": "(tsType: PatientVitalsWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "vitalType": {
            "type": "string"
          },
          "vitalValue": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "vitalStatus": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "induced",
              "triggered",
              "automatic",
              "manual"
            ]
          },
          "recordedAt": {
            "type": "string"
          },
          "recordedAtWithoutSeconds": {
            "type": "string"
          },
          "pulseTimestamp": {
            "type": "string"
          },
          "bpTimestamp": {
            "type": "string"
          },
          "sPo2Timestamp": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isHistoricalData": {
            "type": "boolean"
          },
          "dataAgeInSecondsDuringCreation": {
            "type": "number"
          },
          "user": {
            "$ref": "#/components/schemas/UsersWithRelations"
          },
          "foreignKey": {}
        },
        "additionalProperties": true,
        "x-typescript-type": "PatientVitalsWithRelations"
      },
      "PatientProfiles": {
        "title": "PatientProfiles",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "profileImgUrl": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "birthDate": {
            "type": "string"
          },
          "address": {
            "type": "string"
          }
        },
        "required": [
          "userId"
        ],
        "additionalProperties": true
      },
      "NewPatientProfiles": {
        "title": "NewPatientProfiles",
        "type": "object",
        "description": "(tsType: Omit<PatientProfiles, 'id'>, schemaOptions: { title: 'NewPatientProfiles', exclude: [ 'id' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "profileImgUrl": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "birthDate": {
            "type": "string"
          },
          "address": {
            "type": "string"
          }
        },
        "required": [
          "userId"
        ],
        "additionalProperties": true,
        "x-typescript-type": "Omit<PatientProfiles, 'id'>"
      },
      "PatientProfilesWithRelations": {
        "title": "PatientProfilesWithRelations",
        "type": "object",
        "description": "(tsType: PatientProfilesWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "profileImgUrl": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "birthDate": {
            "type": "string"
          },
          "address": {
            "type": "string"
          }
        },
        "required": [
          "userId"
        ],
        "additionalProperties": true,
        "x-typescript-type": "PatientProfilesWithRelations"
      },
      "PatientProfilesPartial": {
        "title": "PatientProfilesPartial",
        "type": "object",
        "description": "(tsType: Partial<PatientProfiles>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "profileImgUrl": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "birthDate": {
            "type": "string"
          },
          "address": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<PatientProfiles>"
      },
      "PatientNote": {
        "title": "PatientNote",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "noteDate": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "title",
          "content"
        ],
        "additionalProperties": false
      },
      "PatientNoteCreateRequest": {
        "title": "PatientNoteCreateRequest",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "The user ID this note belongs to"
          },
          "userName": {
            "type": "string",
            "description": "Display name of the user"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Title of the note"
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "description": "Content/body of the note"
          },
          "type": {
            "type": "string",
            "description": "Type of note (e.g. \"patient\")"
          },
          "noteDate": {
            "type": "string",
            "description": "The date/time of the incident (ISO 8601). Defaults to createdAt if not provided."
          }
        },
        "required": [
          "userId",
          "title",
          "content"
        ],
        "additionalProperties": false
      },
      "PatientNoteUpdateRequest": {
        "title": "PatientNoteUpdateRequest",
        "type": "object",
        "properties": {
          "userName": {
            "type": "string",
            "description": "Display name of the user"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Title of the note"
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "description": "Content/body of the note"
          },
          "type": {
            "type": "string",
            "description": "Type of note (e.g. \"patient\")"
          },
          "noteDate": {
            "type": "string",
            "description": "The date/time of the incident (ISO 8601). Defaults to createdAt if not provided."
          }
        },
        "additionalProperties": false
      },
      "PatientDocument": {
        "title": "PatientDocument",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "NewPatientDocument": {
        "title": "NewPatientDocument",
        "type": "object",
        "description": "(tsType: Omit<PatientDocument, 'id'>, schemaOptions: { title: 'NewPatientDocument', exclude: [ 'id' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<PatientDocument, 'id'>"
      },
      "PatientDocumentWithRelations": {
        "title": "PatientDocumentWithRelations",
        "type": "object",
        "description": "(tsType: PatientDocumentWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "PatientDocumentWithRelations"
      },
      "PatientDocumentPartial": {
        "title": "PatientDocumentPartial",
        "type": "object",
        "description": "(tsType: Partial<PatientDocument>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<PatientDocument>"
      },
      "NotificationRuleResponse": {
        "title": "NotificationRuleResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scheduleType": {
            "type": "string",
            "enum": [
              "immediate",
              "one_time",
              "recurring"
            ]
          },
          "notificationTitle": {
            "type": "string"
          },
          "actionUrl": {
            "type": "string"
          },
          "targetScope": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "adherenceCriteria": {
            "type": "object"
          },
          "connectivityCriteria": {
            "type": "object"
          },
          "batteryFilter": {
            "type": "object"
          },
          "bindingFilter": {
            "type": "object"
          },
          "stepGoalFilter": {
            "type": "object"
          },
          "bpVsBaselineVitalFilter": {
            "type": "object"
          },
          "sleepQualityFilter": {
            "type": "object"
          },
          "bpFilter": {
            "type": "object"
          },
          "heartRateVsBaselineFilter": {
            "type": "object"
          },
          "heartRateFilter": {
            "type": "object"
          },
          "spo2VsBaselineFilter": {
            "type": "object"
          },
          "spo2Filter": {
            "type": "object"
          },
          "pulseFilter": {
            "type": "object"
          },
          "birthdayFilter": {
            "type": "object"
          },
          "notificationFor": {
            "type": "string",
            "enum": [
              "vital_link",
              "buddi",
              "vital_insight"
            ]
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string",
            "enum": [
              "ringtone1",
              "ringtone2",
              "ringtone3"
            ]
          },
          "bellType": {
            "type": "string",
            "enum": [
              "ring",
              "vibrate",
              "ring_and_vibrate"
            ]
          },
          "scheduledAt": {
            "type": "string",
            "format": "date-time"
          },
          "cronExpression": {
            "type": "string"
          },
          "resolvedTimezones": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "isActive": {
            "type": "boolean"
          },
          "lastExecutedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "NotificationRuleCreateRequest": {
        "title": "NotificationRuleCreateRequest",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scheduleType": {
            "type": "string",
            "enum": [
              "immediate",
              "one_time",
              "recurring"
            ]
          },
          "notificationTitle": {
            "type": "string"
          },
          "actionUrl": {
            "type": "string"
          },
          "targetScope": {
            "type": "array",
            "items": {
              "type": "object",
              "items": {
                "type": "object",
                "required": [
                  "companyId",
                  "facilities"
                ],
                "properties": {
                  "companyId": {
                    "type": "string"
                  },
                  "facilities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "facilityId"
                      ],
                      "properties": {
                        "facilityId": {
                          "type": "string"
                        },
                        "patientIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "adherenceCriteria": {
            "type": "object",
            "required": [
              "operator",
              "value"
            ],
            "properties": {
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte"
                ]
              },
              "value": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "connectivityCriteria": {
            "type": "object",
            "required": [
              "disconnectedForSeconds"
            ],
            "properties": {
              "disconnectedForSeconds": {
                "type": "number",
                "minimum": 1
              }
            }
          },
          "batteryFilter": {
            "type": "object",
            "required": [
              "operator",
              "value"
            ],
            "properties": {
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte"
                ]
              },
              "value": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            }
          },
          "bindingFilter": {
            "type": "object",
            "required": [
              "bound"
            ],
            "properties": {
              "bound": {
                "type": "boolean"
              }
            }
          },
          "stepGoalFilter": {
            "type": "object",
            "required": [
              "lookbackDays",
              "goalMet"
            ],
            "properties": {
              "lookbackDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "goalMet": {
                "type": "boolean"
              }
            }
          },
          "sleepQualityFilter": {
            "type": "object",
            "required": [
              "recentDays",
              "previousDays"
            ],
            "properties": {
              "recentDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "previousDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              }
            }
          },
          "bpVsBaselineVitalFilter": {
            "type": "object",
            "required": [
              "days",
              "inRange"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "inRange": {
                "type": "boolean"
              }
            }
          },
          "bpFilter": {
            "type": "object",
            "required": [
              "days"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "systolicCondition": {
                "type": "object",
                "required": [
                  "operator"
                ],
                "properties": {
                  "operator": {
                    "type": "string",
                    "enum": [
                      "lt",
                      "lte",
                      "gt",
                      "gte",
                      "range"
                    ]
                  },
                  "value": {
                    "type": "number"
                  },
                  "minValue": {
                    "type": "number"
                  },
                  "maxValue": {
                    "type": "number"
                  }
                }
              },
              "diastolicCondition": {
                "type": "object",
                "required": [
                  "operator"
                ],
                "properties": {
                  "operator": {
                    "type": "string",
                    "enum": [
                      "lt",
                      "lte",
                      "gt",
                      "gte",
                      "range"
                    ]
                  },
                  "value": {
                    "type": "number"
                  },
                  "minValue": {
                    "type": "number"
                  },
                  "maxValue": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "heartRateVsBaselineFilter": {
            "type": "object",
            "required": [
              "days",
              "inRange"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "inRange": {
                "type": "boolean"
              }
            }
          },
          "heartRateFilter": {
            "type": "object",
            "required": [
              "days",
              "operator"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte",
                  "range"
                ]
              },
              "value": {
                "type": "number"
              },
              "minValue": {
                "type": "number"
              },
              "maxValue": {
                "type": "number"
              }
            }
          },
          "spo2VsBaselineFilter": {
            "type": "object",
            "required": [
              "days",
              "inRange"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "inRange": {
                "type": "boolean"
              }
            }
          },
          "spo2Filter": {
            "type": "object",
            "required": [
              "days",
              "operator"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte",
                  "range"
                ]
              },
              "value": {
                "type": "number"
              },
              "minValue": {
                "type": "number"
              },
              "maxValue": {
                "type": "number"
              }
            }
          },
          "pulseFilter": {
            "type": "object",
            "required": [
              "days",
              "operator"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte",
                  "range"
                ]
              },
              "value": {
                "type": "number"
              },
              "minValue": {
                "type": "number"
              },
              "maxValue": {
                "type": "number"
              }
            }
          },
          "birthdayFilter": {
            "type": "object",
            "required": [
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "offsetDays": {
                "type": "integer",
                "minimum": -365,
                "maximum": 365
              }
            }
          },
          "notificationFor": {
            "type": "string",
            "enum": [
              "vital_link",
              "buddi",
              "vital_insight"
            ]
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string",
            "enum": [
              "ringtone1",
              "ringtone2",
              "ringtone3"
            ]
          },
          "bellType": {
            "type": "string",
            "enum": [
              "ring",
              "vibrate",
              "ring_and_vibrate"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "scheduledAt": {
            "type": "string"
          },
          "cronExpression": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "scheduleType",
          "notificationFor",
          "content"
        ],
        "additionalProperties": false
      },
      "NotificationRuleUpdateRequest": {
        "title": "NotificationRuleUpdateRequest",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scheduleType": {
            "type": "string",
            "enum": [
              "immediate",
              "one_time",
              "recurring"
            ]
          },
          "notificationTitle": {
            "type": "string"
          },
          "actionUrl": {
            "type": "string"
          },
          "targetScope": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "adherenceCriteria": {
            "type": "object",
            "nullable": true,
            "required": [
              "operator",
              "value"
            ],
            "properties": {
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte"
                ]
              },
              "value": {
                "type": "number",
                "minimum": 0
              }
            }
          },
          "connectivityCriteria": {
            "type": "object",
            "nullable": true,
            "required": [
              "disconnectedForSeconds"
            ],
            "properties": {
              "disconnectedForSeconds": {
                "type": "number",
                "minimum": 1
              }
            }
          },
          "batteryFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "operator",
              "value"
            ],
            "properties": {
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte"
                ]
              },
              "value": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            }
          },
          "bindingFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "bound"
            ],
            "properties": {
              "bound": {
                "type": "boolean"
              }
            }
          },
          "stepGoalFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "lookbackDays",
              "goalMet"
            ],
            "properties": {
              "lookbackDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "goalMet": {
                "type": "boolean"
              }
            }
          },
          "sleepQualityFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "recentDays",
              "previousDays"
            ],
            "properties": {
              "recentDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "previousDays": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              }
            }
          },
          "bpVsBaselineVitalFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days",
              "inRange"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "inRange": {
                "type": "boolean"
              }
            }
          },
          "bpFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "systolicCondition": {
                "type": "object",
                "required": [
                  "operator"
                ],
                "properties": {
                  "operator": {
                    "type": "string",
                    "enum": [
                      "lt",
                      "lte",
                      "gt",
                      "gte",
                      "range"
                    ]
                  },
                  "value": {
                    "type": "number"
                  },
                  "minValue": {
                    "type": "number"
                  },
                  "maxValue": {
                    "type": "number"
                  }
                }
              },
              "diastolicCondition": {
                "type": "object",
                "required": [
                  "operator"
                ],
                "properties": {
                  "operator": {
                    "type": "string",
                    "enum": [
                      "lt",
                      "lte",
                      "gt",
                      "gte",
                      "range"
                    ]
                  },
                  "value": {
                    "type": "number"
                  },
                  "minValue": {
                    "type": "number"
                  },
                  "maxValue": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "heartRateVsBaselineFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days",
              "inRange"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "inRange": {
                "type": "boolean"
              }
            }
          },
          "heartRateFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days",
              "operator"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte",
                  "range"
                ]
              },
              "value": {
                "type": "number"
              },
              "minValue": {
                "type": "number"
              },
              "maxValue": {
                "type": "number"
              }
            }
          },
          "spo2VsBaselineFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days",
              "inRange"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "inRange": {
                "type": "boolean"
              }
            }
          },
          "spo2Filter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days",
              "operator"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte",
                  "range"
                ]
              },
              "value": {
                "type": "number"
              },
              "minValue": {
                "type": "number"
              },
              "maxValue": {
                "type": "number"
              }
            }
          },
          "pulseFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "days",
              "operator"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "operator": {
                "type": "string",
                "enum": [
                  "lt",
                  "lte",
                  "gt",
                  "gte",
                  "range"
                ]
              },
              "value": {
                "type": "number"
              },
              "minValue": {
                "type": "number"
              },
              "maxValue": {
                "type": "number"
              }
            }
          },
          "birthdayFilter": {
            "type": "object",
            "nullable": true,
            "required": [
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "offsetDays": {
                "type": "integer",
                "minimum": -365,
                "maximum": 365
              }
            }
          },
          "notificationFor": {
            "type": "string",
            "enum": [
              "vital_link",
              "buddi",
              "vital_insight"
            ]
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string",
            "enum": [
              "ringtone1",
              "ringtone2",
              "ringtone3"
            ]
          },
          "bellType": {
            "type": "string",
            "enum": [
              "ring",
              "vibrate",
              "ring_and_vibrate"
            ]
          },
          "isActive": {
            "type": "boolean"
          },
          "scheduledAt": {
            "type": "string"
          },
          "cronExpression": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Notes": {
        "title": "Notes",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "alertId": {
            "type": "string"
          },
          "TypeId": {
            "type": "string"
          },
          "alertStatus": {
            "type": "string"
          },
          "careSessionId": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "NewNotes": {
        "title": "NewNotes",
        "type": "object",
        "description": "(tsType: Omit<Notes, 'id' | 'careSessionId'>, schemaOptions: { title: 'NewNotes', exclude: [ 'id', 'careSessionId' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "alertId": {
            "type": "string"
          },
          "TypeId": {
            "type": "string"
          },
          "alertStatus": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Notes, 'id' | 'careSessionId'>"
      },
      "NotesWithRelations": {
        "title": "NotesWithRelations",
        "type": "object",
        "description": "(tsType: NotesWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "alertId": {
            "type": "string"
          },
          "TypeId": {
            "type": "string"
          },
          "alertStatus": {
            "type": "string"
          },
          "careSessionId": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "careSession": {
            "$ref": "#/components/schemas/CareSessionWithRelations"
          },
          "foreignKey": {}
        },
        "additionalProperties": false,
        "x-typescript-type": "NotesWithRelations"
      },
      "NotesPartial": {
        "title": "NotesPartial",
        "type": "object",
        "description": "(tsType: Partial<Notes>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "alertId": {
            "type": "string"
          },
          "TypeId": {
            "type": "string"
          },
          "alertStatus": {
            "type": "string"
          },
          "careSessionId": {
            "type": "string"
          },
          "careSessionRecordType": {
            "type": "string",
            "enum": [
              "notDefined",
              "auto",
              "manual"
            ],
            "default": "notDefined"
          },
          "selectedDateTime": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<Notes>"
      },
      "MotionDataUpsertResponse": {
        "title": "MotionDataUpsertResponse",
        "type": "object",
        "properties": {
          "successCount": {
            "type": "number"
          },
          "failedCount": {
            "type": "number"
          },
          "totalCount": {
            "type": "number"
          },
          "failures": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "successCount",
          "failedCount",
          "totalCount",
          "failures"
        ],
        "additionalProperties": false
      },
      "MotionDataEntry": {
        "title": "MotionDataEntry",
        "type": "object",
        "properties": {
          "hourTimestamp": {
            "type": "string",
            "description": "Hour timestamp in ISO format (e.g., 2025-11-04T14:00:00.000Z) with minutes and seconds set to 0",
            "format": "date-time",
            "pattern": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:00:00\\.000Z$"
          },
          "stepCount": {
            "type": "number"
          },
          "caloriesBurned": {
            "type": "number"
          },
          "distanceInMeter": {
            "type": "number"
          }
        },
        "required": [
          "hourTimestamp"
        ],
        "additionalProperties": false
      },
      "MotionDataUpsertRequest": {
        "title": "MotionDataUpsertRequest",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "motionDataEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotionDataEntry"
            }
          }
        },
        "required": [
          "userId",
          "deviceId",
          "facilityId",
          "motionDataEntries"
        ],
        "additionalProperties": false
      },
      "MotionDataResponse": {
        "title": "MotionDataResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "hourTimestamp": {
            "type": "string",
            "format": "date-time"
          },
          "stepCount": {
            "type": "number"
          },
          "caloriesBurned": {
            "type": "number"
          },
          "distanceInMeter": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "userId",
          "deviceId",
          "facilityId",
          "hourTimestamp"
        ],
        "additionalProperties": false
      },
      "MotionDataListResponse": {
        "title": "MotionDataListResponse",
        "type": "object",
        "properties": {
          "motionDataList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotionDataResponse"
            }
          },
          "facilityTimeZone": {
            "type": "string"
          }
        },
        "required": [
          "motionDataList"
        ],
        "additionalProperties": false
      },
      "Medications": {
        "title": "Medications",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosageForm": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "doseQuantity": {
            "type": "number"
          },
          "dosageAmount": {
            "type": "number"
          },
          "strength": {
            "type": "number"
          },
          "strengthUnit": {
            "type": "string"
          },
          "intervalValue": {
            "type": "number"
          },
          "intakeReminders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "specialInstructions": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "refillDueDate": {
            "type": "string",
            "format": "date-time"
          },
          "fileUrl": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "medicineName": {
            "type": "string"
          },
          "medicineTypeId": {
            "type": "string"
          },
          "medicineMongoId": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "dosageMorning": {
            "type": "string"
          },
          "dosageNoon": {
            "type": "string"
          },
          "dosageNight": {
            "type": "string"
          },
          "strictFrequency": {
            "type": "string"
          },
          "tillDate": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true
      },
      "NewMedications": {
        "title": "NewMedications",
        "type": "object",
        "description": "(tsType: Omit<Medications, 'id'>, schemaOptions: { title: 'NewMedications', exclude: [ 'id' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosageForm": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "doseQuantity": {
            "type": "number"
          },
          "dosageAmount": {
            "type": "number"
          },
          "strength": {
            "type": "number"
          },
          "strengthUnit": {
            "type": "string"
          },
          "intervalValue": {
            "type": "number"
          },
          "intakeReminders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "specialInstructions": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "refillDueDate": {
            "type": "string",
            "format": "date-time"
          },
          "fileUrl": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "medicineName": {
            "type": "string"
          },
          "medicineTypeId": {
            "type": "string"
          },
          "medicineMongoId": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "dosageMorning": {
            "type": "string"
          },
          "dosageNoon": {
            "type": "string"
          },
          "dosageNight": {
            "type": "string"
          },
          "strictFrequency": {
            "type": "string"
          },
          "tillDate": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Omit<Medications, 'id'>"
      },
      "MedicationsWithRelations": {
        "title": "MedicationsWithRelations",
        "type": "object",
        "description": "(tsType: MedicationsWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosageForm": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "doseQuantity": {
            "type": "number"
          },
          "dosageAmount": {
            "type": "number"
          },
          "strength": {
            "type": "number"
          },
          "strengthUnit": {
            "type": "string"
          },
          "intervalValue": {
            "type": "number"
          },
          "intakeReminders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "specialInstructions": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "refillDueDate": {
            "type": "string",
            "format": "date-time"
          },
          "fileUrl": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "medicineName": {
            "type": "string"
          },
          "medicineTypeId": {
            "type": "string"
          },
          "medicineMongoId": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "dosageMorning": {
            "type": "string"
          },
          "dosageNoon": {
            "type": "string"
          },
          "dosageNight": {
            "type": "string"
          },
          "strictFrequency": {
            "type": "string"
          },
          "tillDate": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/UsersWithRelations"
          },
          "foreignKey": {}
        },
        "additionalProperties": true,
        "x-typescript-type": "MedicationsWithRelations"
      },
      "MedicationsPartial": {
        "title": "MedicationsPartial",
        "type": "object",
        "description": "(tsType: Partial<Medications>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosageForm": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "doseQuantity": {
            "type": "number"
          },
          "dosageAmount": {
            "type": "number"
          },
          "strength": {
            "type": "number"
          },
          "strengthUnit": {
            "type": "string"
          },
          "intervalValue": {
            "type": "number"
          },
          "intakeReminders": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "specialInstructions": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "refillDueDate": {
            "type": "string",
            "format": "date-time"
          },
          "fileUrl": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "medicineName": {
            "type": "string"
          },
          "medicineTypeId": {
            "type": "string"
          },
          "medicineMongoId": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "dosageMorning": {
            "type": "string"
          },
          "dosageNoon": {
            "type": "string"
          },
          "dosageNight": {
            "type": "string"
          },
          "strictFrequency": {
            "type": "string"
          },
          "tillDate": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<Medications>"
      },
      "MedicationLog": {
        "title": "MedicationLog",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "medicationId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "loggedTime": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "loggedBy": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "medicationName",
          "loggedTime",
          "status",
          "loggedBy"
        ],
        "additionalProperties": true
      },
      "NewMedicationLog": {
        "title": "NewMedicationLog",
        "type": "object",
        "description": "(tsType: Omit<MedicationLog, 'id'>, schemaOptions: { title: 'NewMedicationLog', exclude: [ 'id' ] })",
        "properties": {
          "userId": {
            "type": "string"
          },
          "medicationId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "loggedTime": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "loggedBy": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "medicationName",
          "loggedTime",
          "status",
          "loggedBy"
        ],
        "additionalProperties": true,
        "x-typescript-type": "Omit<MedicationLog, 'id'>"
      },
      "MedicationLogPartial": {
        "title": "MedicationLogPartial",
        "type": "object",
        "description": "(tsType: Partial<MedicationLog>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "medicationId": {
            "type": "string"
          },
          "medicationName": {
            "type": "string"
          },
          "dosage": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "loggedTime": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "loggedBy": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<MedicationLog>"
      },
      "AllowedDeviceType": {
        "title": "AllowedDeviceType",
        "type": "object",
        "properties": {
          "deviceType": {
            "type": "string",
            "enum": [
              "android",
              "ios"
            ]
          },
          "appName": {
            "type": "string"
          }
        },
        "required": [
          "deviceType",
          "appName"
        ],
        "additionalProperties": false
      },
      "LicenseCreateResponse": {
        "title": "LicenseCreateResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "licenseId": {
            "type": "string"
          },
          "licenseKeyPrefix": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "allowedDeviceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedDeviceType"
            }
          },
          "maxDeviceCount": {
            "type": "number"
          },
          "sdkActivationId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedReason": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          },
          "licenseKey": {
            "type": "string"
          }
        },
        "required": [
          "licenseKey"
        ],
        "additionalProperties": false
      },
      "LicenseCreateRequest": {
        "title": "LicenseCreateRequest",
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "allowedDeviceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedDeviceType"
            }
          },
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "maxDeviceCount": {
            "type": "number"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "companyId",
          "allowedDeviceTypes",
          "enabledFeatures",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "LicenseResponse": {
        "title": "LicenseResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "licenseId": {
            "type": "string"
          },
          "licenseKeyPrefix": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "allowedDeviceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedDeviceType"
            }
          },
          "maxDeviceCount": {
            "type": "number"
          },
          "sdkActivationId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          },
          "revokedReason": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "LicenseUpdateRequestPartial": {
        "title": "LicenseUpdateRequestPartial",
        "type": "object",
        "description": "(tsType: Partial<LicenseUpdateRequest>, schemaOptions: { partial: true })",
        "properties": {
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "allowedDeviceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedDeviceType"
            }
          },
          "maxDeviceCount": {
            "type": "number"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<LicenseUpdateRequest>"
      },
      "LicenseUpdateRequest": {
        "title": "LicenseUpdateRequest",
        "type": "object",
        "properties": {
          "enabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenseFeature"
            }
          },
          "allowedDeviceTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllowedDeviceType"
            }
          },
          "maxDeviceCount": {
            "type": "number"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "LicenseRevokeRequest": {
        "title": "LicenseRevokeRequest",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "HealthGoal": {
        "title": "HealthGoal",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "goalType": {
            "type": "string",
            "enum": [
              "hydrate",
              "increase_activity",
              "reduce_weight",
              "reduce_stress",
              "increase_sleep",
              "reduce_blood_sugar",
              "decrease_smoking",
              "manage_bp",
              "manage_heart_rate",
              "manage_caffeine_intake"
            ]
          },
          "trackingMethod": {
            "type": "string",
            "enum": [
              "auto_tracked",
              "manual_number",
              "done_once_a_day",
              "timed_activity",
              "add_count"
            ]
          },
          "goalBehavior": {
            "type": "string",
            "enum": [
              "set_target",
              "set_limit"
            ]
          },
          "habitType": {
            "type": "string",
            "enum": [
              "build",
              "quit",
              "increase",
              "decrease",
              "maintain",
              "meditation",
              "breathing_exercise",
              "meditation_breathing_exercise"
            ]
          },
          "goalPeriod": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ]
          },
          "goalValue": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "goalValueSystolic": {
            "type": "number"
          },
          "goalValueDiastolic": {
            "type": "number"
          },
          "goalValueNonFasting": {
            "type": "number"
          },
          "startingValueNonFasting": {
            "type": "number"
          },
          "goalValueExerciseHR": {
            "type": "number"
          },
          "startingValue": {
            "type": "number"
          },
          "habitAction": {
            "type": "string"
          },
          "targetDate": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "goalType",
          "trackingMethod",
          "goalBehavior",
          "goalPeriod",
          "goalValue",
          "unit"
        ],
        "additionalProperties": true
      },
      "HealthGoalProgress": {
        "title": "HealthGoalProgress",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "goalId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "description": "Date in YYYY-MM-DD format"
          },
          "value": {
            "type": "number"
          },
          "valueNonFasting": {
            "type": "number"
          },
          "source": {
            "type": "string",
            "enum": [
              "auto",
              "manual"
            ]
          },
          "notes": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "goalId",
          "userId",
          "date",
          "value",
          "source"
        ],
        "additionalProperties": true
      },
      "HealthDataErrorVitalData": {
        "title": "HealthDataErrorVitalData",
        "type": "object",
        "properties": {
          "recordedAt": {
            "type": "string"
          },
          "skewMinutes": {
            "type": "number"
          },
          "vitalValue": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "vitalStatus": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "recordedAt",
          "skewMinutes"
        ],
        "additionalProperties": false
      },
      "HealthDataErrors": {
        "title": "HealthDataErrors",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "timeInMillis": {
            "type": "number"
          },
          "vitalType": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "errorCode": {
            "type": "number"
          },
          "errorType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "vitalData": {
            "$ref": "#/components/schemas/HealthDataErrorVitalData"
          }
        },
        "required": [
          "facilityId",
          "deviceId",
          "userId",
          "timeInMillis",
          "vitalType",
          "mode",
          "errorCode",
          "errorType"
        ],
        "additionalProperties": true
      },
      "HealthDataErrorsWithRelations": {
        "title": "HealthDataErrorsWithRelations",
        "type": "object",
        "description": "(tsType: HealthDataErrorsWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "timeInMillis": {
            "type": "number"
          },
          "vitalType": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "errorCode": {
            "type": "number"
          },
          "errorType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "vitalData": {
            "$ref": "#/components/schemas/HealthDataErrorVitalData"
          }
        },
        "required": [
          "facilityId",
          "deviceId",
          "userId",
          "timeInMillis",
          "vitalType",
          "mode",
          "errorCode",
          "errorType"
        ],
        "additionalProperties": true,
        "x-typescript-type": "HealthDataErrorsWithRelations"
      },
      "FrontendAccessLogEventRequest": {
        "title": "FrontendAccessLogEventRequest",
        "type": "object",
        "properties": {
          "eventType": {
            "type": "string",
            "enum": [
              "session_start",
              "login",
              "route_change",
              "click",
              "api_call",
              "error"
            ]
          },
          "eventAt": {
            "type": "string",
            "format": "date-time"
          },
          "accessedBy": {
            "type": "string"
          },
          "impersonatedById": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "pageTitle": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          },
          "extras": {
            "type": "object"
          }
        },
        "required": [
          "eventType",
          "eventAt",
          "sessionId",
          "url",
          "route"
        ],
        "additionalProperties": false
      },
      "FrontendAccessLogBatchRequest": {
        "title": "FrontendAccessLogBatchRequest",
        "type": "object",
        "description": "(tsType: FrontendAccessLogBatchRequest, schemaOptions: { title: 'FrontendAccessLogBatchRequest' })",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrontendAccessLogEventRequest"
            }
          }
        },
        "required": [
          "events"
        ],
        "additionalProperties": false,
        "x-typescript-type": "FrontendAccessLogBatchRequest"
      },
      "FrontendAccessLogResponse": {
        "title": "FrontendAccessLogResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "eventAt": {
            "type": "string",
            "format": "date-time"
          },
          "accessedById": {
            "type": "string"
          },
          "accessedByName": {
            "type": "string"
          },
          "accessedByRole": {
            "type": "string"
          },
          "impersonatedById": {
            "type": "string"
          },
          "impersonatedByName": {
            "type": "string"
          },
          "impersonatedByRole": {
            "type": "string"
          },
          "facilityTimezone": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "pageTitle": {
            "type": "string"
          },
          "ipAddress": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          },
          "extras": {
            "type": "object"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "FacilityIntegration": {
        "title": "FacilityIntegration",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "facilityId": {
            "type": "string",
            "description": "VitalBackend facility user _id (role = facility)"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gabby"
            ],
            "description": "Third-party provider identifier"
          },
          "facilityName": {
            "type": "string",
            "description": "Facility name used as SNS MessageAttribute — consuming microservices filter on this value"
          },
          "enabled": {
            "type": "boolean",
            "description": "Soft toggle — disable without deleting the record"
          },
          "active": {
            "type": "boolean",
            "description": "Admin-controlled active flag — SNS publishing is skipped when false"
          },
          "queueUrl": {
            "type": "string"
          },
          "queueArn": {
            "type": "string"
          },
          "subscriptionArn": {
            "type": "string"
          },
          "createdBy": {
            "type": "string",
            "description": "VitalBackend user _id of the admin who created this integration"
          },
          "updatedBy": {
            "type": "string",
            "description": "VitalBackend user _id of the admin who last modified this integration"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "facilityId",
          "provider",
          "facilityName"
        ],
        "additionalProperties": true
      },
      "FacilityIntegrationCreateRequest": {
        "title": "FacilityIntegrationCreateRequest",
        "type": "object",
        "properties": {
          "facilityId": {
            "type": "string",
            "description": "VitalBackend facility user _id (role = facility)"
          },
          "provider": {
            "type": "string",
            "description": "Third-party provider (e.g. \"gabby\")",
            "enum": [
              "gabby"
            ]
          },
          "facilityName": {
            "type": "string",
            "description": "Facility name — used as SNS MessageAttribute so consuming microservices can filter by facility"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the integration is active immediately"
          }
        },
        "required": [
          "facilityId",
          "provider",
          "facilityName"
        ],
        "additionalProperties": false
      },
      "DeviceSettingUpdate": {
        "title": "DeviceSettingUpdate",
        "type": "object",
        "description": "(tsType: Omit<DeviceSetting, 'id' | 'userId' | 'createdAt' | 'updatedAt'>, schemaOptions: { title: 'DeviceSettingUpdate', exclude: [ 'id', 'userId', 'createdAt', 'updatedAt' ] })",
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "buddyUserName": {
            "type": "string"
          },
          "automaticHeartRate": {
            "type": "object"
          },
          "automaticOxygenSaturation": {
            "type": "object"
          },
          "bloodPressure": {
            "type": "object"
          },
          "waterReminder": {
            "type": "object"
          },
          "sleepPeriod": {
            "type": "object"
          },
          "sedentaryReminder": {
            "type": "object"
          },
          "raiseHand": {
            "type": "object"
          },
          "stepGoal": {
            "type": "object"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Omit<DeviceSetting, 'id' | 'userId' | 'createdAt' | 'updatedAt'>"
      },
      "DeviceInfo": {
        "title": "DeviceInfo",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "versionNumber": {
            "type": "string"
          },
          "iosUuid": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "bleAddress": {
            "type": "string"
          },
          "deviceFirmwareVersion": {
            "type": "string"
          },
          "deviceStatus": {
            "type": "boolean"
          },
          "batteryPercentage": {
            "type": "number"
          },
          "previousBatteryPercentage": {
            "type": "number"
          },
          "previousBatteryRecordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "batteryReadingBuffer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "bindingStatus": {
            "type": "boolean"
          },
          "signalStrength": {
            "type": "number"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "deviceId",
          "deviceStatus",
          "batteryPercentage",
          "bindingStatus",
          "signalStrength",
          "recordedAt",
          "createdAt"
        ],
        "additionalProperties": true
      },
      "DeviceInfoRequest": {
        "title": "DeviceInfoRequest",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "facilityId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "versionNumber": {
            "type": "string"
          },
          "iosUuid": {
            "type": "string"
          },
          "bleAddress": {
            "type": "string"
          },
          "deviceFirmwareVersion": {
            "type": "string"
          },
          "deviceStatus": {
            "type": "boolean"
          },
          "batteryPercentage": {
            "type": "number"
          },
          "bindingStatus": {
            "type": "boolean"
          },
          "signalStrength": {
            "type": "number"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "deviceId",
          "deviceStatus",
          "batteryPercentage",
          "bindingStatus",
          "signalStrength",
          "recordedAt"
        ],
        "additionalProperties": false
      },
      "DataGapAlertResponse": {
        "title": "DataGapAlertResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "dataGapId": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "userId",
          "type",
          "category",
          "value",
          "description",
          "status",
          "date"
        ],
        "additionalProperties": false
      },
      "DataGapAlertResolveRequest": {
        "title": "DataGapAlertResolveRequest",
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "description": "Optional note about the resolution"
          }
        },
        "additionalProperties": false
      },
      "DataGapAlertResponseResponse": {
        "title": "DataGapAlertResponseResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "alertId": {
            "type": "string"
          },
          "dataGapId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "respondedBy": {
            "type": "string"
          },
          "respondedByUserName": {
            "type": "string"
          },
          "respondedByRole": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "respondedAt": {
            "type": "string",
            "format": "date-time"
          },
          "responseDelaySeconds": {
            "type": "number"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "alertId",
          "dataGapId",
          "userId",
          "respondedBy",
          "respondedByRole",
          "action",
          "respondedAt",
          "responseDelaySeconds"
        ],
        "additionalProperties": false
      },
      "RecalculateCptCodesRequest": {
        "title": "RecalculateCptCodesRequest",
        "type": "object",
        "properties": {
          "monthYear": {
            "type": "string",
            "description": "Target month in MM-YYYY format (e.g., \"01-2026\"). Defaults to current month if not provided."
          },
          "confirm": {
            "type": "boolean",
            "description": "Must be true to execute recalculation (safety check)"
          },
          "dryRun": {
            "type": "boolean",
            "description": "If true, performs simulation without saving to database"
          }
        },
        "required": [
          "confirm"
        ],
        "additionalProperties": false
      },
      "FixCpt99453Request": {
        "title": "FixCpt99453Request",
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean",
            "description": "Run in dry-run mode (no actual changes)"
          },
          "confirm": {
            "type": "boolean",
            "description": "Must be true to confirm execution"
          }
        },
        "required": [
          "confirm"
        ],
        "additionalProperties": false
      },
      "CompanyCreateRequest": {
        "title": "CompanyCreateRequest",
        "type": "object",
        "properties": {
          "legalName": {
            "type": "string",
            "maxLength": 100,
            "errorMessage": "Legal name must not exceed 100 characters"
          },
          "dbaName": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "taxIdEin": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "pending"
            ]
          },
          "region": {
            "type": "string",
            "enum": [
              "EST",
              "CST",
              "MST",
              "PST"
            ]
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "phoneDialCode": {
            "type": "string"
          },
          "phoneCountryCode": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "password": {
            "type": "string",
            "description": "Password must be 8-128 characters and contain: 1 uppercase, 1 lowercase, 1 number, and 1 special character",
            "minLength": 8,
            "maxLength": 128,
            "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-=\\[\\]{}|;:,.<>?]).{8,128}$",
            "errorMessage": "Password must be 8-128 characters and contain: 1 uppercase, 1 lowercase, 1 number, and 1 special character"
          },
          "linkToExistingAccountId": {
            "type": "string"
          }
        },
        "required": [
          "legalName",
          "status",
          "email",
          "password"
        ],
        "additionalProperties": false
      },
      "CompanyUpdateRequestPartial": {
        "title": "CompanyUpdateRequestPartial",
        "type": "object",
        "description": "(tsType: Partial<CompanyUpdateRequest>, schemaOptions: { partial: true })",
        "properties": {
          "legalName": {
            "type": "string",
            "maxLength": 100,
            "errorMessage": "Legal name must not exceed 100 characters"
          },
          "dbaName": {
            "type": "string"
          },
          "monitoringService": {
            "type": "string"
          },
          "billingService": {
            "type": "string"
          },
          "taxIdEin": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "pending"
            ]
          },
          "region": {
            "type": "string",
            "enum": [
              "EST",
              "CST",
              "MST",
              "PST"
            ]
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "phoneDialCode": {
            "type": "string"
          },
          "phoneCountryCode": {
            "type": "string"
          },
          "contactNumber": {
            "type": "string"
          },
          "contactNumberDialCode": {
            "type": "string"
          },
          "contactNumberCountryCode": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "additionalContacts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "reactivationSelection": {
            "type": "object"
          },
          "forceEndSessions": {
            "type": "boolean"
          },
          "inactiveOnly": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<CompanyUpdateRequest>"
      },
      "ChronicCondition": {
        "title": "ChronicCondition",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "isOther": {
            "type": "boolean"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": true
      },
      "CareSession": {
        "title": "CareSession",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "duration": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "userId",
          "date",
          "time",
          "duration"
        ],
        "additionalProperties": true
      },
      "BulkNotificationResponse": {
        "title": "BulkNotificationResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "notificationRuleId": {
            "type": "string"
          },
          "notificationRuleName": {
            "type": "string"
          },
          "totalRecipients": {
            "type": "number"
          },
          "triggerType": {
            "type": "string",
            "enum": [
              "scheduled",
              "manual"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "targetUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "executionStartedAt": {
            "type": "string",
            "format": "date-time"
          },
          "executionCompletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "targetScope": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "adherenceCriteria": {
            "type": "object"
          },
          "connectivityCriteria": {
            "type": "object"
          },
          "batteryFilter": {
            "type": "object"
          },
          "bindingFilter": {
            "type": "object"
          },
          "notificationFor": {
            "type": "string",
            "enum": [
              "vital_link",
              "buddi",
              "vital_insight"
            ]
          },
          "notificationTitle": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "ringtone": {
            "type": "string",
            "enum": [
              "ringtone1",
              "ringtone2",
              "ringtone3"
            ]
          },
          "bellType": {
            "type": "string",
            "enum": [
              "ring",
              "vibrate",
              "ring_and_vibrate"
            ]
          },
          "actionUrl": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          },
          "deliverySummary": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "BillingReportItem": {
        "title": "BillingReportItem",
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User unique identifier"
          },
          "name": {
            "type": "string",
            "description": "User full name"
          },
          "dob": {
            "type": "string",
            "description": "Date of birth (ISO format)"
          },
          "facilityId": {
            "type": "string",
            "description": "Facility ID"
          },
          "facilityName": {
            "type": "string",
            "description": "Facility name"
          },
          "companyId": {
            "type": "string",
            "description": "Company ID"
          },
          "companyName": {
            "type": "string",
            "description": "Company name"
          },
          "createdAt": {
            "type": "string",
            "description": "Account creation date (ISO format)"
          },
          "cptCodes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "CPT codes for the selected month"
            }
          },
          "adherence": {
            "type": "string",
            "description": "Adherence for the selected month (e.g., \"15/31\")"
          },
          "billed": {
            "type": "boolean",
            "description": "Billing status for the selected month"
          },
          "status": {
            "type": "string",
            "description": "User status"
          },
          "careTimerDuration": {
            "type": "number",
            "description": "Care timer duration in seconds for the selected month"
          },
          "careTimerMinutes": {
            "type": "number",
            "description": "Care timer duration in minutes for the selected month"
          },
          "careTimerWarning": {
            "type": "boolean",
            "description": "Whether care timer is below 40 minutes threshold"
          },
          "stateJurisdiction": {
            "type": "string",
            "description": "State jurisdiction"
          },
          "facilityPhone": {
            "type": "string",
            "description": "Facility phone number"
          },
          "type": {
            "type": "string",
            "description": "Facility type"
          },
          "lastAdherenceDate": {
            "type": "string",
            "description": "Last adherence date (ISO format)"
          },
          "timeElapsed": {
            "type": "string",
            "description": "Time elapsed since last adherence"
          },
          "billing_and_status": {
            "type": "object",
            "description": "Billing and installation status information"
          },
          "installDate": {
            "type": "string",
            "description": "Device install date from billing_and_status"
          },
          "isBillable": {
            "type": "boolean",
            "description": "Whether user has billable CPT codes (see BILLABLE_CPT_CODES enum)"
          }
        },
        "required": [
          "userId"
        ],
        "additionalProperties": false
      },
      "BillingReportRequest": {
        "title": "BillingReportRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format (e.g., \"01\", \"02\")",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format (e.g., \"2026\")",
            "pattern": "^[0-9]{4}$"
          },
          "page": {
            "type": "number",
            "description": "Page number (1-indexed)",
            "minimum": 1
          },
          "limit": {
            "type": "number",
            "description": "Number of items per page",
            "minimum": 1,
            "maximum": 100
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by specific company IDs (can handle 30+ companies)"
            }
          },
          "status": {
            "type": "string",
            "description": "Filter status: \"all\" (default), \"hasAdherence\", \"billable\", \"active\", \"pending_inactive\", \"inactive\"",
            "enum": [
              "all",
              "hasAdherence",
              "billable",
              "active",
              "pending_inactive",
              "inactive"
            ]
          },
          "searchText": {
            "type": "string",
            "description": "Search by user name"
          },
          "sortBy": {
            "type": "string",
            "description": "Sort field (name, createdAt, adherence, careTimer)"
          },
          "sortOrder": {
            "type": "string",
            "description": "Sort order (ASC or DESC)",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values (e.g., [\"RPM\", \"Inactive\"])"
            }
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "BillingReportSummaryResponse": {
        "title": "BillingReportSummaryResponse",
        "type": "object",
        "properties": {
          "totalUsers": {
            "type": "number",
            "description": "Total number of patients matching filters (all status)"
          },
          "usersWithAdherence": {
            "type": "number",
            "description": "Number of patients with adherence data (not \"0/0\")"
          },
          "billableUsers": {
            "type": "number",
            "description": "Number of patients with billable CPT codes (see BILLABLE_CPT_CODES enum)"
          },
          "activeUsers": {
            "type": "number",
            "description": "Number of patients with active status"
          }
        },
        "required": [
          "totalUsers",
          "usersWithAdherence",
          "billableUsers",
          "activeUsers"
        ],
        "additionalProperties": false
      },
      "BillingReportSummaryRequest": {
        "title": "BillingReportSummaryRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format (e.g., \"01\", \"02\")",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format (e.g., \"2026\")",
            "pattern": "^[0-9]{4}$"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by specific company IDs (can handle 30+ companies)"
            }
          },
          "searchText": {
            "type": "string",
            "description": "Search by user name"
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values (e.g., [\"RPM\", \"Inactive\"])"
            }
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "AdherenceReportRequest": {
        "title": "AdherenceReportRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format",
            "pattern": "^[0-9]{4}$"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of company IDs to filter results"
            }
          },
          "status": {
            "type": "string",
            "description": "Status filter",
            "enum": [
              "all",
              "hasAdherence",
              "billable",
              "active",
              "pending_inactive"
            ],
            "default": "all"
          },
          "searchText": {
            "type": "string",
            "description": "Search text to filter by user name"
          },
          "selectedUserIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of specific user IDs to include (overrides other filters)"
            }
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values (e.g., [\"RPM\", \"Inactive\"])"
            }
          },
          "startDate": {
            "type": "string",
            "description": "Custom range start date (yyyy-MM-dd)",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
          },
          "endDate": {
            "type": "string",
            "description": "Custom range end date (yyyy-MM-dd)",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "RawReportRequest": {
        "title": "RawReportRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format",
            "pattern": "^[0-9]{4}$"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of company IDs to filter results"
            }
          },
          "status": {
            "type": "string",
            "description": "Status filter",
            "enum": [
              "all",
              "hasAdherence",
              "billable",
              "active",
              "pending_inactive"
            ],
            "default": "all"
          },
          "searchText": {
            "type": "string",
            "description": "Search text to filter by user name"
          },
          "selectedUserIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of specific user IDs to include (overrides other filters)"
            }
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values (e.g., [\"RPM\", \"Inactive\"])"
            }
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "FacilityBillingReportRequest": {
        "title": "FacilityBillingReportRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format",
            "pattern": "^[0-9]{4}$"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of company IDs to filter results"
            }
          },
          "searchText": {
            "type": "string",
            "description": "Search text to filter by user name"
          },
          "status": {
            "type": "string",
            "description": "Filter status: \"all\" (default), \"hasAdherence\", \"billable\", \"active\", \"pending_inactive\", \"inactive\"",
            "enum": [
              "all",
              "hasAdherence",
              "billable",
              "active",
              "pending_inactive",
              "inactive"
            ]
          },
          "generatedByUserName": {
            "type": "string",
            "description": "Name of user generating the report (for metadata header)"
          },
          "selectedUserIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of specific user IDs to include (overrides other filters)"
            }
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values (e.g., [\"RPM\", \"Inactive\"])"
            }
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "FacilityAdherenceTrendRequest": {
        "title": "FacilityAdherenceTrendRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format",
            "pattern": "^[0-9]{4}$"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of company IDs to filter results"
            }
          },
          "facilityCategories": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of facility categories to filter (e.g., [\"Facility\", \"Independent\"])"
            }
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values"
            }
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "TrailingAdherenceRequest": {
        "title": "TrailingAdherenceRequest",
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "Month in MM format",
            "pattern": "^(0[1-9]|1[0-2])$"
          },
          "year": {
            "type": "string",
            "description": "Year in YYYY format",
            "pattern": "^[0-9]{4}$"
          },
          "adherenceType": {
            "type": "string",
            "description": "Adherence type",
            "enum": [
              "bp",
              "hr"
            ],
            "default": "bp"
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of company IDs to filter results"
            }
          },
          "status": {
            "type": "string",
            "description": "Status filter",
            "enum": [
              "all",
              "hasAdherence",
              "billable",
              "active",
              "pending_inactive"
            ],
            "default": "all"
          },
          "searchText": {
            "type": "string",
            "description": "Search text to filter by user name"
          },
          "selectedUserIds": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Array of specific user IDs to include (overrides other filters)"
            }
          },
          "billingStatuses": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Filter by billing status values (e.g., [\"RPM\", \"Inactive\"])"
            }
          }
        },
        "required": [
          "month",
          "year"
        ],
        "additionalProperties": false
      },
      "NewAttendantDetails": {
        "title": "NewAttendantDetails",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "dialCode": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "AttendantAssign": {
        "title": "AttendantAssign",
        "type": "object",
        "description": "(tsType: AttendantAssignRequest, schemaOptions: { title: 'AttendantAssign' })",
        "properties": {
          "attendantUserId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "newAttendant": {
            "$ref": "#/components/schemas/NewAttendantDetails"
          },
          "allowedPrivileges": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relationship": {
            "type": "string"
          },
          "notificationTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sendInvite": {
            "type": "boolean"
          }
        },
        "required": [
          "allowedPrivileges"
        ],
        "additionalProperties": false,
        "x-typescript-type": "AttendantAssignRequest"
      },
      "AttendantAssignRequest": {
        "title": "AttendantAssignRequest",
        "type": "object",
        "properties": {
          "attendantUserId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "newAttendant": {
            "$ref": "#/components/schemas/NewAttendantDetails"
          },
          "allowedPrivileges": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relationship": {
            "type": "string"
          },
          "notificationTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sendInvite": {
            "type": "boolean"
          }
        },
        "required": [
          "allowedPrivileges"
        ],
        "additionalProperties": false
      },
      "Alerts": {
        "title": "Alerts",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "vitalStatus": {
            "type": "string"
          },
          "vitalId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusBeforeObsolete": {
            "type": "string"
          },
          "userPhone": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "escalationLevel": {
            "type": "string"
          },
          "escalationCount": {
            "type": "number"
          },
          "lastEscalationTime": {
            "type": "string",
            "format": "date-time"
          },
          "parentAlertId": {
            "type": "string"
          },
          "isEscalating": {
            "type": "boolean"
          },
          "vitalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resolvedBy": {
            "type": "string"
          },
          "resolvedDate": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "NewAlerts": {
        "title": "NewAlerts",
        "type": "object",
        "description": "(tsType: Omit<Alerts, 'id'>, schemaOptions: { title: 'NewAlerts', exclude: [ 'id' ] })",
        "properties": {
          "type": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "vitalStatus": {
            "type": "string"
          },
          "vitalId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusBeforeObsolete": {
            "type": "string"
          },
          "userPhone": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "escalationLevel": {
            "type": "string"
          },
          "escalationCount": {
            "type": "number"
          },
          "lastEscalationTime": {
            "type": "string",
            "format": "date-time"
          },
          "parentAlertId": {
            "type": "string"
          },
          "isEscalating": {
            "type": "boolean"
          },
          "vitalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resolvedBy": {
            "type": "string"
          },
          "resolvedDate": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Omit<Alerts, 'id'>"
      },
      "AlertsWithRelations": {
        "title": "AlertsWithRelations",
        "type": "object",
        "description": "(tsType: AlertsWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "vitalStatus": {
            "type": "string"
          },
          "vitalId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusBeforeObsolete": {
            "type": "string"
          },
          "userPhone": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "escalationLevel": {
            "type": "string"
          },
          "escalationCount": {
            "type": "number"
          },
          "lastEscalationTime": {
            "type": "string",
            "format": "date-time"
          },
          "parentAlertId": {
            "type": "string"
          },
          "isEscalating": {
            "type": "boolean"
          },
          "vitalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resolvedBy": {
            "type": "string"
          },
          "resolvedDate": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "AlertsWithRelations"
      },
      "AlertsPartial": {
        "title": "AlertsPartial",
        "type": "object",
        "description": "(tsType: Partial<Alerts>, schemaOptions: { partial: true })",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "vitalStatus": {
            "type": "string"
          },
          "vitalId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "statusBeforeObsolete": {
            "type": "string"
          },
          "userPhone": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userMessage": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "escalationLevel": {
            "type": "string"
          },
          "escalationCount": {
            "type": "number"
          },
          "lastEscalationTime": {
            "type": "string",
            "format": "date-time"
          },
          "parentAlertId": {
            "type": "string"
          },
          "isEscalating": {
            "type": "boolean"
          },
          "vitalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "resolvedBy": {
            "type": "string"
          },
          "resolvedDate": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "Partial<Alerts>"
      },
      "AiEvaluationRun": {
        "title": "AiEvaluationRun",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          },
          "totalCases": {
            "type": "number"
          },
          "passedCases": {
            "type": "number"
          },
          "failedCases": {
            "type": "number"
          },
          "passRate": {
            "type": "number"
          },
          "averageLatencyMs": {
            "type": "number"
          },
          "averageGroundingScore": {
            "type": "number"
          },
          "status": {
            "type": "string"
          },
          "triggerType": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "totalCases",
          "passedCases",
          "failedCases",
          "passRate",
          "averageLatencyMs",
          "averageGroundingScore",
          "status",
          "triggerType"
        ],
        "additionalProperties": false
      },
      "AiEvaluationResult": {
        "title": "AiEvaluationResult",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "testCaseId": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "presetKey": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "latencyMs": {
            "type": "number"
          },
          "success": {
            "type": "boolean"
          },
          "actualPresetKey": {
            "type": "string"
          },
          "actualConfidence": {
            "type": "string"
          },
          "actualCompleteness": {
            "type": "number"
          },
          "actualResponse": {
            "type": "object"
          },
          "groundingScore": {
            "type": "number"
          },
          "assertions": {
            "type": "object"
          },
          "error": {
            "type": "string"
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "runId",
          "testCaseId",
          "question",
          "patientId",
          "latencyMs",
          "success",
          "assertions"
        ],
        "additionalProperties": false
      },
      "AiClinicalTestCase": {
        "title": "AiClinicalTestCase",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "presetKey": {
            "type": "string"
          },
          "previousActionKey": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "mockTelemetry": {
            "type": "object"
          },
          "expected": {
            "type": "object"
          },
          "isActive": {
            "type": "boolean"
          },
          "category": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "question",
          "patientId",
          "expected"
        ],
        "additionalProperties": false
      },
      "NewTestCase": {
        "title": "NewTestCase",
        "type": "object",
        "description": "(tsType: Omit<AiClinicalTestCase, 'id' | 'createdAt' | 'updatedAt'>, schemaOptions: { title: 'NewTestCase', exclude: [ 'id', 'createdAt', 'updatedAt' ] })",
        "properties": {
          "question": {
            "type": "string"
          },
          "presetKey": {
            "type": "string"
          },
          "previousActionKey": {
            "type": "string"
          },
          "patientId": {
            "type": "string"
          },
          "mockTelemetry": {
            "type": "object"
          },
          "expected": {
            "type": "object"
          },
          "isActive": {
            "type": "boolean"
          },
          "category": {
            "type": "string"
          }
        },
        "required": [
          "question",
          "patientId",
          "expected"
        ],
        "additionalProperties": false,
        "x-typescript-type": "Omit<AiClinicalTestCase, 'id' | 'createdAt' | 'updatedAt'>"
      },
      "AccessLogResponse": {
        "title": "AccessLogResponse",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "apiEndPointName": {
            "type": "string"
          },
          "apiEndPointMethod": {
            "type": "string"
          },
          "ipAddress": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          },
          "accessedById": {
            "type": "string"
          },
          "accessedByName": {
            "type": "string"
          },
          "accessedByRole": {
            "type": "string"
          },
          "impersonatedById": {
            "type": "string"
          },
          "impersonatedByName": {
            "type": "string"
          },
          "impersonatedByRole": {
            "type": "string"
          },
          "queryParams": {
            "type": "object"
          },
          "pathParams": {
            "type": "object"
          },
          "body": {
            "type": "object"
          },
          "deviceInfo": {
            "type": "object"
          },
          "durationMs": {
            "type": "number"
          },
          "accessedAt": {
            "type": "string",
            "format": "date-time"
          },
          "facilityTimezone": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "loopback.Count": {
        "type": "object",
        "title": "loopback.Count",
        "x-typescript-type": "@loopback/repository#Count",
        "properties": {
          "count": {
            "type": "number"
          }
        }
      },
      "Alerts.Filter": {
        "type": "object",
        "title": "Alerts.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "category": {
                    "type": "boolean"
                  },
                  "value": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "date": {
                    "type": "boolean"
                  },
                  "vitalStatus": {
                    "type": "boolean"
                  },
                  "vitalId": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "statusBeforeObsolete": {
                    "type": "boolean"
                  },
                  "userPhone": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "userMessage": {
                    "type": "boolean"
                  },
                  "isRead": {
                    "type": "boolean"
                  },
                  "escalationLevel": {
                    "type": "boolean"
                  },
                  "escalationCount": {
                    "type": "boolean"
                  },
                  "lastEscalationTime": {
                    "type": "boolean"
                  },
                  "parentAlertId": {
                    "type": "boolean"
                  },
                  "isEscalating": {
                    "type": "boolean"
                  },
                  "vitalIds": {
                    "type": "boolean"
                  },
                  "resolvedBy": {
                    "type": "boolean"
                  },
                  "resolvedDate": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "type",
                    "category",
                    "value",
                    "description",
                    "date",
                    "vitalStatus",
                    "vitalId",
                    "status",
                    "statusBeforeObsolete",
                    "userPhone",
                    "userId",
                    "userMessage",
                    "isRead",
                    "escalationLevel",
                    "escalationCount",
                    "lastEscalationTime",
                    "parentAlertId",
                    "isEscalating",
                    "vitalIds",
                    "resolvedBy",
                    "resolvedDate",
                    "source",
                    "updatedAt"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Alerts.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Alerts>"
      },
      "Alerts.Filter1": {
        "type": "object",
        "title": "Alerts.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Alerts.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "category": {
                    "type": "boolean"
                  },
                  "value": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "date": {
                    "type": "boolean"
                  },
                  "vitalStatus": {
                    "type": "boolean"
                  },
                  "vitalId": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "statusBeforeObsolete": {
                    "type": "boolean"
                  },
                  "userPhone": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "userMessage": {
                    "type": "boolean"
                  },
                  "isRead": {
                    "type": "boolean"
                  },
                  "escalationLevel": {
                    "type": "boolean"
                  },
                  "escalationCount": {
                    "type": "boolean"
                  },
                  "lastEscalationTime": {
                    "type": "boolean"
                  },
                  "parentAlertId": {
                    "type": "boolean"
                  },
                  "isEscalating": {
                    "type": "boolean"
                  },
                  "vitalIds": {
                    "type": "boolean"
                  },
                  "resolvedBy": {
                    "type": "boolean"
                  },
                  "resolvedDate": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "type",
                    "category",
                    "value",
                    "description",
                    "date",
                    "vitalStatus",
                    "vitalId",
                    "status",
                    "statusBeforeObsolete",
                    "userPhone",
                    "userId",
                    "userMessage",
                    "isRead",
                    "escalationLevel",
                    "escalationCount",
                    "lastEscalationTime",
                    "parentAlertId",
                    "isEscalating",
                    "vitalIds",
                    "resolvedBy",
                    "resolvedDate",
                    "source",
                    "updatedAt"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Alerts.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Alerts>"
      },
      "TreatmentCategory.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "TreatmentCategory.ScopeFilter"
      },
      "TreatmentCategory.IncludeFilter.Items": {
        "title": "TreatmentCategory.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "treatmentSessions"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/TreatmentCategory.ScopeFilter"
          }
        }
      },
      "TreatmentCategory.Filter": {
        "type": "object",
        "title": "TreatmentCategory.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "maxSessionDurationInSeconds": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "TreatmentCategory.Fields"
          },
          "include": {
            "title": "TreatmentCategory.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TreatmentCategory.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<TreatmentCategory>"
      },
      "TreatmentCategory.Filter1": {
        "type": "object",
        "title": "TreatmentCategory.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "TreatmentCategory.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  },
                  "maxSessionDurationInSeconds": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "TreatmentCategory.Fields"
          },
          "include": {
            "title": "TreatmentCategory.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TreatmentCategory.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<TreatmentCategory>"
      },
      "TreatmentSession.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "TreatmentSession.ScopeFilter"
      },
      "TreatmentSession.IncludeFilter.Items": {
        "title": "TreatmentSession.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "category",
              "careSession"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/TreatmentSession.ScopeFilter"
          }
        }
      },
      "TreatmentSession.Filter": {
        "type": "object",
        "title": "TreatmentSession.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "userName": {
                    "type": "boolean"
                  },
                  "categoryId": {
                    "type": "boolean"
                  },
                  "hasVitalAtStart": {
                    "type": "boolean"
                  },
                  "hasVitalAtEnd": {
                    "type": "boolean"
                  },
                  "isSessionEnd": {
                    "type": "boolean"
                  },
                  "isEndedBySystem": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "content": {
                    "type": "boolean"
                  },
                  "startTime": {
                    "type": "boolean"
                  },
                  "endTime": {
                    "type": "boolean"
                  },
                  "duration": {
                    "type": "boolean"
                  },
                  "careSessionId": {
                    "type": "boolean"
                  },
                  "careSessionRecordType": {
                    "type": "boolean"
                  },
                  "selectedDateTime": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "systemNote": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "userId",
                    "userName",
                    "categoryId",
                    "hasVitalAtStart",
                    "hasVitalAtEnd",
                    "isSessionEnd",
                    "isEndedBySystem",
                    "title",
                    "content",
                    "startTime",
                    "endTime",
                    "duration",
                    "careSessionId",
                    "careSessionRecordType",
                    "selectedDateTime",
                    "createdAt",
                    "updatedAt",
                    "systemNote",
                    "deletedAt"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "TreatmentSession.Fields"
          },
          "include": {
            "title": "TreatmentSession.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TreatmentSession.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<TreatmentSession>"
      },
      "TreatmentSession.Filter1": {
        "type": "object",
        "title": "TreatmentSession.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "TreatmentSession.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "userName": {
                    "type": "boolean"
                  },
                  "categoryId": {
                    "type": "boolean"
                  },
                  "hasVitalAtStart": {
                    "type": "boolean"
                  },
                  "hasVitalAtEnd": {
                    "type": "boolean"
                  },
                  "isSessionEnd": {
                    "type": "boolean"
                  },
                  "isEndedBySystem": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "content": {
                    "type": "boolean"
                  },
                  "startTime": {
                    "type": "boolean"
                  },
                  "endTime": {
                    "type": "boolean"
                  },
                  "duration": {
                    "type": "boolean"
                  },
                  "careSessionId": {
                    "type": "boolean"
                  },
                  "careSessionRecordType": {
                    "type": "boolean"
                  },
                  "selectedDateTime": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "systemNote": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "userId",
                    "userName",
                    "categoryId",
                    "hasVitalAtStart",
                    "hasVitalAtEnd",
                    "isSessionEnd",
                    "isEndedBySystem",
                    "title",
                    "content",
                    "startTime",
                    "endTime",
                    "duration",
                    "careSessionId",
                    "careSessionRecordType",
                    "selectedDateTime",
                    "createdAt",
                    "updatedAt",
                    "systemNote",
                    "deletedAt"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "TreatmentSession.Fields"
          },
          "include": {
            "title": "TreatmentSession.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TreatmentSession.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<TreatmentSession>"
      },
      "CareSession.Filter": {
        "type": "object",
        "title": "CareSession.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "CareSession.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "createdBy": {
                    "type": "boolean"
                  },
                  "updatedBy": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "date": {
                    "type": "boolean"
                  },
                  "time": {
                    "type": "boolean"
                  },
                  "duration": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "CareSession.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<CareSession>"
      },
      "Medications.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "Medications.ScopeFilter"
      },
      "Medications.IncludeFilter.Items": {
        "title": "Medications.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "user"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/Medications.ScopeFilter"
          }
        }
      },
      "Medications.Filter": {
        "type": "object",
        "title": "Medications.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "medicationName": {
                    "type": "boolean"
                  },
                  "dosageForm": {
                    "type": "boolean"
                  },
                  "route": {
                    "type": "boolean"
                  },
                  "doseQuantity": {
                    "type": "boolean"
                  },
                  "dosageAmount": {
                    "type": "boolean"
                  },
                  "strength": {
                    "type": "boolean"
                  },
                  "strengthUnit": {
                    "type": "boolean"
                  },
                  "intervalValue": {
                    "type": "boolean"
                  },
                  "intakeReminders": {
                    "type": "boolean"
                  },
                  "startDate": {
                    "type": "boolean"
                  },
                  "endDate": {
                    "type": "boolean"
                  },
                  "specialInstructions": {
                    "type": "boolean"
                  },
                  "purpose": {
                    "type": "boolean"
                  },
                  "frequency": {
                    "type": "boolean"
                  },
                  "refillDueDate": {
                    "type": "boolean"
                  },
                  "fileUrl": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "boolean"
                  },
                  "medicineName": {
                    "type": "boolean"
                  },
                  "medicineTypeId": {
                    "type": "boolean"
                  },
                  "medicineMongoId": {
                    "type": "boolean"
                  },
                  "dosage": {
                    "type": "boolean"
                  },
                  "amount": {
                    "type": "boolean"
                  },
                  "dosageMorning": {
                    "type": "boolean"
                  },
                  "dosageNoon": {
                    "type": "boolean"
                  },
                  "dosageNight": {
                    "type": "boolean"
                  },
                  "strictFrequency": {
                    "type": "boolean"
                  },
                  "tillDate": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Medications.Fields"
          },
          "include": {
            "title": "Medications.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Medications.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Medications>"
      },
      "Medications.Filter1": {
        "type": "object",
        "title": "Medications.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Medications.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "medicationName": {
                    "type": "boolean"
                  },
                  "dosageForm": {
                    "type": "boolean"
                  },
                  "route": {
                    "type": "boolean"
                  },
                  "doseQuantity": {
                    "type": "boolean"
                  },
                  "dosageAmount": {
                    "type": "boolean"
                  },
                  "strength": {
                    "type": "boolean"
                  },
                  "strengthUnit": {
                    "type": "boolean"
                  },
                  "intervalValue": {
                    "type": "boolean"
                  },
                  "intakeReminders": {
                    "type": "boolean"
                  },
                  "startDate": {
                    "type": "boolean"
                  },
                  "endDate": {
                    "type": "boolean"
                  },
                  "specialInstructions": {
                    "type": "boolean"
                  },
                  "purpose": {
                    "type": "boolean"
                  },
                  "frequency": {
                    "type": "boolean"
                  },
                  "refillDueDate": {
                    "type": "boolean"
                  },
                  "fileUrl": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "boolean"
                  },
                  "medicineName": {
                    "type": "boolean"
                  },
                  "medicineTypeId": {
                    "type": "boolean"
                  },
                  "medicineMongoId": {
                    "type": "boolean"
                  },
                  "dosage": {
                    "type": "boolean"
                  },
                  "amount": {
                    "type": "boolean"
                  },
                  "dosageMorning": {
                    "type": "boolean"
                  },
                  "dosageNoon": {
                    "type": "boolean"
                  },
                  "dosageNight": {
                    "type": "boolean"
                  },
                  "strictFrequency": {
                    "type": "boolean"
                  },
                  "tillDate": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Medications.Fields"
          },
          "include": {
            "title": "Medications.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Medications.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Medications>"
      },
      "Notes.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "Notes.ScopeFilter"
      },
      "Notes.IncludeFilter.Items": {
        "title": "Notes.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "careSession"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/Notes.ScopeFilter"
          }
        }
      },
      "Notes.Filter": {
        "type": "object",
        "title": "Notes.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "userName": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "content": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "alertId": {
                    "type": "boolean"
                  },
                  "TypeId": {
                    "type": "boolean"
                  },
                  "alertStatus": {
                    "type": "boolean"
                  },
                  "careSessionId": {
                    "type": "boolean"
                  },
                  "careSessionRecordType": {
                    "type": "boolean"
                  },
                  "selectedDateTime": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  },
                  "createdBy": {
                    "type": "boolean"
                  },
                  "updatedBy": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "userId",
                    "userName",
                    "title",
                    "content",
                    "createdAt",
                    "status",
                    "type",
                    "updatedAt",
                    "alertId",
                    "TypeId",
                    "alertStatus",
                    "careSessionId",
                    "careSessionRecordType",
                    "selectedDateTime",
                    "deletedAt",
                    "createdBy",
                    "updatedBy"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Notes.Fields"
          },
          "include": {
            "title": "Notes.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Notes.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Notes>"
      },
      "Notes.Filter1": {
        "type": "object",
        "title": "Notes.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "Notes.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "userName": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "content": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "alertId": {
                    "type": "boolean"
                  },
                  "TypeId": {
                    "type": "boolean"
                  },
                  "alertStatus": {
                    "type": "boolean"
                  },
                  "careSessionId": {
                    "type": "boolean"
                  },
                  "careSessionRecordType": {
                    "type": "boolean"
                  },
                  "selectedDateTime": {
                    "type": "boolean"
                  },
                  "deletedAt": {
                    "type": "boolean"
                  },
                  "createdBy": {
                    "type": "boolean"
                  },
                  "updatedBy": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "userId",
                    "userName",
                    "title",
                    "content",
                    "createdAt",
                    "status",
                    "type",
                    "updatedAt",
                    "alertId",
                    "TypeId",
                    "alertStatus",
                    "careSessionId",
                    "careSessionRecordType",
                    "selectedDateTime",
                    "deletedAt",
                    "createdBy",
                    "updatedBy"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "Notes.Fields"
          },
          "include": {
            "title": "Notes.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Notes.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Notes>"
      },
      "PatientDocument.Filter": {
        "type": "object",
        "title": "PatientDocument.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "url": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "boolean"
                  },
                  "documentType": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "userId",
                    "title",
                    "url",
                    "fileName",
                    "type",
                    "notes",
                    "documentType",
                    "createdAt",
                    "updatedAt"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "PatientDocument.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<PatientDocument>"
      },
      "PatientDocument.Filter1": {
        "type": "object",
        "title": "PatientDocument.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "PatientDocument.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "title": {
                    "type": "boolean"
                  },
                  "url": {
                    "type": "boolean"
                  },
                  "fileName": {
                    "type": "boolean"
                  },
                  "type": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "boolean"
                  },
                  "documentType": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "userId",
                    "title",
                    "url",
                    "fileName",
                    "type",
                    "notes",
                    "documentType",
                    "createdAt",
                    "updatedAt"
                  ],
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "PatientDocument.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<PatientDocument>"
      },
      "PatientProfiles.Filter": {
        "type": "object",
        "title": "PatientProfiles.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "profileImgUrl": {
                    "type": "boolean"
                  },
                  "firstName": {
                    "type": "boolean"
                  },
                  "lastName": {
                    "type": "boolean"
                  },
                  "gender": {
                    "type": "boolean"
                  },
                  "birthDate": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "PatientProfiles.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<PatientProfiles>"
      },
      "PatientProfiles.Filter1": {
        "type": "object",
        "title": "PatientProfiles.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "PatientProfiles.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "profileImgUrl": {
                    "type": "boolean"
                  },
                  "firstName": {
                    "type": "boolean"
                  },
                  "lastName": {
                    "type": "boolean"
                  },
                  "gender": {
                    "type": "boolean"
                  },
                  "birthDate": {
                    "type": "boolean"
                  },
                  "address": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "PatientProfiles.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<PatientProfiles>"
      },
      "PatientVitals.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "PatientVitals.ScopeFilter"
      },
      "PatientVitals.IncludeFilter.Items": {
        "title": "PatientVitals.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "user"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/PatientVitals.ScopeFilter"
          }
        }
      },
      "PatientVitals.Filter": {
        "type": "object",
        "title": "PatientVitals.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "PatientVitals.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "vitalType": {
                    "type": "boolean"
                  },
                  "vitalValue": {
                    "type": "boolean"
                  },
                  "unit": {
                    "type": "boolean"
                  },
                  "vitalStatus": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "boolean"
                  },
                  "recordedAt": {
                    "type": "boolean"
                  },
                  "recordedAtWithoutSeconds": {
                    "type": "boolean"
                  },
                  "pulseTimestamp": {
                    "type": "boolean"
                  },
                  "bpTimestamp": {
                    "type": "boolean"
                  },
                  "sPo2Timestamp": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "isHistoricalData": {
                    "type": "boolean"
                  },
                  "dataAgeInSecondsDuringCreation": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "PatientVitals.Fields"
          },
          "include": {
            "title": "PatientVitals.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PatientVitals.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<PatientVitals>"
      },
      "PatientVitals.Filter1": {
        "type": "object",
        "title": "PatientVitals.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "vitalType": {
                    "type": "boolean"
                  },
                  "vitalValue": {
                    "type": "boolean"
                  },
                  "unit": {
                    "type": "boolean"
                  },
                  "vitalStatus": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "boolean"
                  },
                  "recordedAt": {
                    "type": "boolean"
                  },
                  "recordedAtWithoutSeconds": {
                    "type": "boolean"
                  },
                  "pulseTimestamp": {
                    "type": "boolean"
                  },
                  "bpTimestamp": {
                    "type": "boolean"
                  },
                  "sPo2Timestamp": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  },
                  "isHistoricalData": {
                    "type": "boolean"
                  },
                  "dataAgeInSecondsDuringCreation": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "PatientVitals.Fields"
          },
          "include": {
            "title": "PatientVitals.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PatientVitals.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<PatientVitals>"
      },
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "greeting": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "properties": {
              "Content-Type": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      },
      "SleepData.ScopeFilter": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              }
            ]
          },
          "include": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": false,
        "title": "SleepData.ScopeFilter"
      },
      "SleepData.IncludeFilter.Items": {
        "title": "SleepData.IncludeFilter.Items",
        "type": "object",
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "user"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/SleepData.ScopeFilter"
          }
        }
      },
      "SleepData.Filter": {
        "type": "object",
        "title": "SleepData.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "where": {
            "title": "SleepData.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "boolean"
                  },
                  "userId": {
                    "type": "boolean"
                  },
                  "facilityId": {
                    "type": "boolean"
                  },
                  "deviceId": {
                    "type": "boolean"
                  },
                  "sleepType": {
                    "type": "boolean"
                  },
                  "durationMinutes": {
                    "type": "boolean"
                  },
                  "sleepStartTime": {
                    "type": "boolean"
                  },
                  "sleepEndTime": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "boolean"
                  },
                  "updatedAt": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "id"
                },
                "uniqueItems": true
              }
            ],
            "title": "SleepData.Fields"
          },
          "include": {
            "title": "SleepData.IncludeFilter",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SleepData.IncludeFilter.Items"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<SleepData>"
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "jwt": []
    }
  ]
}