---
updatedAt: 2026-06-22T13:11:51.000Z
agentTools:
  projectIndex: https://integrations.luscii.com/llms.txt
---

# Generate JSON export

Generate a paginated json export to be received via response body.

The Export API allows you to directly access data from your organization.

> 🚧 NOTE: The Export API is not intended or designed for the use in a clinical setting where the data is used to provide care to patients.
>
> Data can be used for business intelligence purposes, for example to analyse the use and effectiveness of Luscii in your organization.

Accessible by `HC_ADMIN` and `HC_SUPPORTER`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Public API reference",
    "description": "Full list of available endpoints.",
    "version": "1.0"
  },
  "paths": {
    "/v1/export/{reportType}": {
      "get": {
        "tags": [
          "Exports"
        ],
        "summary": "Generate JSON export",
        "description": "Generate a paginated json export to be received via response body.",
        "operationId": "7d3b5ae658e28b9d2af61e25a9e2087f",
        "parameters": [
          {
            "name": "reportType",
            "in": "path",
            "description": "Report type.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "patients",
                "hcps",
                "patientsMutations",
                "measurements",
                "measurementsWithQuestionnaires",
                "measurementsForQuestionnaires",
                "alerts",
                "starRatings",
                "plannedActions",
                "patientsWorkflowHistory",
                "patientsProgramsHistory",
                "patientsSettingsHistory",
                "usersStatusChangeReasons",
                "patientsMoments"
              ]
            },
            "example": "alerts"
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "First day of the selected data. Must be given if the reportType is 'alerts', 'measurements', 'plannedActions', 'patientsWorkflowHistory', 'patientsProgramsHistory', 'patientsSettingsHistory' or 'usersStatusChangeReasons'. Optional if reportType is 'measurementsWithQuestionnaires' or 'measurementsForQuestionnaires'. Forbidden for other values of reportType.",
            "schema": {
              "$ref": "#/components/schemas/dateSchema"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Last day of the selected data. Must be given if the reportType is 'alerts', 'measurements', 'plannedActions', 'patientsWorkflowHistory', 'patientsProgramsHistory', 'patientsSettingsHistory' or 'usersStatusChangeReasons'. Optional if reportType is 'measurementsWithQuestionnaires' or 'measurementsForQuestionnaires'. Forbidden for other values of reportType.",
            "schema": {
              "$ref": "#/components/schemas/dateSchema"
            }
          },
          {
            "$ref": "#/components/parameters/PaginationCursor"
          },
          {
            "$ref": "#/components/parameters/PaginationPageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Success response if everything works",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "meta",
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "description": "Paginated export data.",
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PatientsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/HcpsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PatientsMutationsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MeasurementsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/MeasurementsForQuestionnairesReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AlertsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/StarRatingsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PlannedActionsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PatientsWorkflowHistoryReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PatientsProgramsHistoryReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PatientsSettingsHistoryReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UsersStatusChangeReasonsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PatientsMomentsReportResponse"
                          },
                          "minItems": 1
                        },
                        {
                          "type": "array",
                          "items": {}
                        }
                      ]
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PaginationData"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "PatientsReportResponse": {
                    "summary": "\"patients\" report type",
                    "value": {
                      "data": [
                        {
                          "Patient_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "First_Name": "John",
                          "Middle_Name": "Doe",
                          "Last_Name": "Smith",
                          "Sex": "male",
                          "Patient_Number": "123456789",
                          "BSN": "123456789",
                          "Email": "j.d.smith@example.com",
                          "Phone": "0612345678",
                          "Date_Of_Birth": "2023-05-23",
                          "Status": "active",
                          "Group_Name": "Test Group",
                          "Program_Name": "Test Program",
                          "Protocol": "Test Protocol",
                          "Created_Date": "2023-05-23 10:20:30",
                          "Activated_Date": "2023-05-23 10:20:30",
                          "Stopped_Date": "2023-05-23 10:20:30",
                          "Stopped_Reason": "Test Reason",
                          "Grey_Alerts": "1",
                          "Orange_Alerts": "1",
                          "Red_Alerts": "1",
                          "Measurements_Alerts": "1",
                          "Combination_Alerts": "1",
                          "Remark_Alerts": "1",
                          "Overdues_Alerts": "1",
                          "Average_Alerts": "1",
                          "Total_Alerts": 1
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "HcpsReportResponse": {
                    "summary": "\"hcps\" report type",
                    "value": {
                      "data": [
                        {
                          "UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "First_Name": "John",
                          "Middle_Name": "Doe",
                          "Last_Name": "Smith",
                          "Email": "j.d.smith@example.com",
                          "User_Name": "j.d.smith@example.com",
                          "Language": "nl",
                          "Role": "hcp_primary",
                          "Status": "active",
                          "Last_Login_At": "2025-05-23 10:20:30",
                          "Last_Logout_At": "2025-05-23 10:20:30",
                          "Groups": "Test Group",
                          "Processed_alerts": 0
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "PatientsMutationsReportResponse": {
                    "summary": "\"patientsMutations\" report type",
                    "value": {
                      "data": [
                        {
                          "Patient_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "First_Name": "John",
                          "Middle_Name": "Doe",
                          "Last_Name": "Smith",
                          "Patient_Number": "123456789",
                          "Type": "program",
                          "Name": "Test Program",
                          "Mutation_Date": "2023-05-23 10:20:30"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "MeasurementsReportResponse": {
                    "summary": "\"measurements\" report type",
                    "value": {
                      "data": [
                        {
                          "Patient_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "First_Name": "John",
                          "Middle_Name": "Doe",
                          "Last_Name": "Smith",
                          "Patient_Number": "123456789",
                          "Group": "Test Group",
                          "Program": "Test Program",
                          "Protocol": "Test Protocol",
                          "Measurement_Date": "2023-05-23 10:20:30",
                          "Measurement_Name": "Test Measurement",
                          "Measurement_Value": "",
                          "Alert_Flag": "red",
                          "Alert_Type": "Measurement",
                          "Alert_Created_Date": "2023-05-23 10:20:30",
                          "Alert_Processed_Type": "contact_via_message",
                          "Alert_Processed_At": "2023-05-23 10:20:30",
                          "Alert_Processed_By_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "MeasurementsForQuestionnairesReportResponse": {
                    "summary": "\"measurementsForQuestionnaires\" report type",
                    "value": {
                      "data": [
                        {
                          "patientId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "plannedActionId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "groupId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "organizationId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "instrumentId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "instrumentVersion": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "createdByUserId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "measurementDate": "2023-05-23T10:20:30+02:00",
                          "details": "[{\"item_id\":\"7659dfb3-c089-4d12-95b7-46ff8ce1e7dd\",\"item_version\":\"7659dfb3-c089-4d12-95b7-46ff8ce1e7dd\",\"value\":\"151\",\"response_ids\":[\"7659dfb3-c089-4d12-95b7-46ff8ce1e7dd\"],\"file_name\":null}]"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "AlertsReportResponse": {
                    "summary": "\"alerts\" report type",
                    "value": {
                      "data": [
                        {
                          "Patient_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "Group": "Test Group",
                          "Program": "Test Program",
                          "Protocol": "Test Protocol",
                          "Alert_Flag": "red",
                          "Alert_Type": "Measurement",
                          "Measurement_Name": "Test Measurement",
                          "Alert_Created_Date": "2023-05-23 10:20:30",
                          "Alert_Processed_Type": "contact_via_message",
                          "Alert_Processed_Action": "contacted",
                          "Alert_Processed_At": "2023-05-23 10:20:30",
                          "Alert_Processed_By_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "Alert_Processed_By_Role": "hcp_primary",
                          "Alert_Processed_By_Additional_Info": "Test Additional Info",
                          "Id": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "StarRatingsReportResponse": {
                    "summary": "\"starRatings\" report type",
                    "value": {
                      "data": [
                        {
                          "Group": "Test Group",
                          "Date": "2023-05-23 10:20:30",
                          "Patient_UUID": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "Score": "5",
                          "Remarks": "Test Remarks"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "PlannedActionsReportResponse": {
                    "summary": "\"plannedActions\" report type",
                    "value": {
                      "data": [
                        {
                          "id": "9890ed24-405d-4688-abcd-b7f829d75939",
                          "programActionId": "5ad2dcf7-6a3f-43bf-a940-ff706f546f6e",
                          "patientId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "plannedVia": "rec",
                          "selfPlanned": 1,
                          "notBefore": "2023-05-23T10:20:30+01:00",
                          "expiresAt": "2023-05-23T10:20:30+01:00",
                          "validPeriodTimezone": "Europe/Amsterdam",
                          "completedAt": "2023-05-23T10:20:30+01:00",
                          "completedAtTimezone": "Europe/Amsterdam",
                          "createdAt": "2023-05-23T10:20:30+01:00"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "PatientsWorkflowHistoryReportResponse": {
                    "summary": "\"patientsWorkflowHistory\" report type",
                    "value": {
                      "data": [
                        {
                          "patientId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "workflowId": "5ad2dcf7-6a3f-43bf-a940-ff706f546f6e",
                          "triggerDay": "2023-05-23",
                          "triggerCount": 1,
                          "createdAt": "2023-05-23T10:20:30+01:00"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "PatientsProgramsHistoryReportResponse": {
                    "summary": "\"patientsProgramsHistory\" report type",
                    "value": {
                      "data": [
                        {
                          "patientId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "programId": "5ad2dcf7-6a3f-43bf-a940-ff706f546f6e",
                          "createdBy": "9890ed24-405d-4688-abcd-b7f829d75939",
                          "createdAt": "2023-05-23T10:20:30+01:00"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "PatientsSettingsHistoryReportResponse": {
                    "summary": "\"patientsSettingsHistory\" report type",
                    "value": {
                      "data": [
                        {
                          "patientId": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "key": "timezone",
                          "value": "Europe/Amsterdam",
                          "createdBy": "9890ed24-405d-4688-abcd-b7f829d75939",
                          "createdAt": "2023-05-23T10:20:30+01:00"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "UsersStatusChangeReasonsReportResponse": {
                    "summary": "\"usersStatusChangeReasons\" report type",
                    "value": {
                      "data": [
                        {
                          "userId": "9890ed24-405d-4688-abcd-b7f829d75939",
                          "fromStatus": "created",
                          "toStatus": "active",
                          "reason": "User is now verified.",
                          "createdBy": "7659dfb3-c089-4d12-95b7-46ff8ce1e7dd",
                          "createdAt": "2023-05-23T10:20:30+01:00",
                          "processedAt": "2023-05-23T10:20:30+01:00"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  },
                  "PatientsMomentsReportResponse": {
                    "summary": "\"patientsMoments\" report type",
                    "value": {
                      "data": [
                        {
                          "patientId": "1c1c0358-60cf-40de-9e7e-e738c0e0ca0c",
                          "momentId": "5ad2dcf7-6a3f-43bf-a940-ff706f546f6e",
                          "date": "2023-05-23",
                          "createdAt": "2023-05-23T10:20:30+01:00"
                        }
                      ],
                      "meta": {
                        "perPage": 50,
                        "nextCursor": "eyJBjorNWefD...",
                        "nextPageUrl": "https://next.page/?cursor=eyJBjorNWefD...",
                        "prevCursor": "eyJBmOMwE...",
                        "prevPageUrl": "https://next.page/?cursor=eyJBmOMwE..."
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PatientsReportResponse": {
        "description": "Fields of patients response.",
        "properties": {
          "Patient_UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "First_Name": {
            "description": "The first name of the patient.",
            "type": "string",
            "example": "John"
          },
          "Middle_Name": {
            "description": "The middle name of the patient.",
            "type": [
              "string",
              "null"
            ],
            "example": "Doe"
          },
          "Last_Name": {
            "description": "The last name of the patient.",
            "type": "string",
            "example": "Smith"
          },
          "Sex": {
            "description": "The sex of the patient.",
            "type": "string",
            "example": "female"
          },
          "Patient_Number": {
            "description": "The patient number.",
            "type": [
              "string",
              "null"
            ],
            "example": "123456789"
          },
          "BSN": {
            "description": "The BSN of the patient.",
            "type": [
              "string",
              "null"
            ],
            "example": "265969451"
          },
          "Email": {
            "description": "The email of the patient.",
            "type": "string",
            "format": "email",
            "example": "j.d.smith@example.com"
          },
          "Phone": {
            "description": "The phone number of the patient.",
            "type": [
              "string",
              "null"
            ],
            "example": "0612345678"
          },
          "Date_Of_Birth": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date of birth of the patient."
          },
          "Status": {
            "description": "The status of the patient.",
            "type": "string",
            "example": "active"
          },
          "Group_Name": {
            "description": "The name of the group.",
            "type": "string",
            "example": "Test group"
          },
          "Program_Name": {
            "description": "The name of the program.",
            "type": "string",
            "example": "Test program"
          },
          "Protocol": {
            "description": "The name of the protocol.",
            "type": "string",
            "example": "Test protocol"
          },
          "Created_Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the patient was created."
          },
          "Activated_Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the patient was activated."
          },
          "Stopped_Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the patient was stopped."
          },
          "Stopped_Reason": {
            "description": "The reason for stopping the patient.",
            "type": [
              "string",
              "null"
            ],
            "example": "Finished program"
          },
          "Grey_Alerts": {
            "description": "The number of grey alerts.",
            "type": "string",
            "example": "0"
          },
          "Orange_Alerts": {
            "description": "The number of orange alerts.",
            "type": "string",
            "example": "0"
          },
          "Red_Alerts": {
            "description": "The number of red alerts.",
            "type": "string",
            "example": "0"
          },
          "Measurements_Alerts": {
            "description": "The number of measurement alerts.",
            "type": "string",
            "example": "0"
          },
          "Combination_Alerts": {
            "description": "The number of combination alerts.",
            "type": "string",
            "example": "0"
          },
          "Remark_Alerts": {
            "description": "The number of remark alerts.",
            "type": "string",
            "example": "0"
          },
          "Overdues_Alerts": {
            "description": "The number of overdue alerts.",
            "type": "string",
            "example": "0"
          },
          "Average_Alerts": {
            "description": "The number of average alerts.",
            "type": "string",
            "example": "0"
          },
          "Total_Alerts": {
            "description": "The total number of alerts.",
            "type": "integer",
            "example": 0
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "HcpsReportResponse": {
        "description": "Fields of user response.",
        "properties": {
          "UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the user."
          },
          "First_Name": {
            "description": "The first name of the user.",
            "type": "string",
            "example": "John"
          },
          "Middle_Name": {
            "description": "The middle name of the user.",
            "type": [
              "string",
              "null"
            ],
            "example": "Doe"
          },
          "Last_Name": {
            "description": "The last name of the user.",
            "type": "string",
            "example": "Smith"
          },
          "Email": {
            "description": "The email of the user.",
            "type": "string",
            "format": "email",
            "example": "j.d.smith@example.com"
          },
          "User_Name": {
            "description": "The username of the user.",
            "type": "string",
            "example": "j.d.smith@example.com"
          },
          "Language": {
            "description": "The language of the user.",
            "type": "string",
            "example": "nl"
          },
          "Role": {
            "description": "The role of the user.",
            "type": "string",
            "example": "hc_primary"
          },
          "Status": {
            "description": "The status of the user.",
            "type": "string",
            "example": "active"
          },
          "Last_Login_At": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the user last logged in."
          },
          "Last_Logout_At": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the user last logged out."
          },
          "Groups": {
            "description": "The groups the user belongs to.",
            "type": "string",
            "example": "Test group"
          },
          "Processed_Alerts": {
            "description": "The number of processed alerts.",
            "type": "integer",
            "example": 0
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PatientsMutationsReportResponse": {
        "description": "Fields of patientsMutations report type.",
        "properties": {
          "Patient_UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "First_Name": {
            "description": "The first name of the patient.",
            "type": "string",
            "example": "John"
          },
          "Middle_Name": {
            "description": "The middle name of the patient.",
            "type": [
              "string",
              "null"
            ],
            "example": "Doe"
          },
          "Last_Name": {
            "description": "The last name of the patient.",
            "type": "string",
            "example": "Smith"
          },
          "Patient_Number": {
            "description": "The patient number.",
            "type": [
              "string",
              "null"
            ],
            "example": "123456789"
          },
          "Type": {
            "description": "The type of mutation.",
            "type": "string",
            "example": "program"
          },
          "Name": {
            "description": "The name of the program or group associated with the mutation.",
            "type": "string",
            "example": "test group"
          },
          "Mutation_Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time of the mutation."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "MeasurementsReportResponse": {
        "description": "Fields of patient measurement response.",
        "properties": {
          "Patient_UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "First_Name": {
            "description": "The first name of the patient.",
            "type": "string",
            "example": "John"
          },
          "Middle_Name": {
            "description": "The middle name of the patient.",
            "type": [
              "string",
              "null"
            ],
            "example": "Doe"
          },
          "Last_Name": {
            "description": "The last name of the patient.",
            "type": "string",
            "example": "Smith"
          },
          "Patient_Number": {
            "description": "The patient number.",
            "type": [
              "string",
              "null"
            ],
            "example": "123456789"
          },
          "Group": {
            "description": "The group the patient belongs to.",
            "type": "string",
            "example": "Test group"
          },
          "Program": {
            "description": "The program the patient is enrolled in.",
            "type": [
              "string",
              "null"
            ],
            "example": "Test program"
          },
          "Protocol": {
            "description": "The protocol the patient is following.",
            "type": "string",
            "example": "Test protocol"
          },
          "Measurement_Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time of the measurement."
          },
          "Measurement_Name": {
            "description": "The name of the measurement.",
            "type": "string",
            "example": "Weight"
          },
          "Measurement_Value": {
            "description": "The value of the measurement.",
            "type": "string",
            "example": "70"
          },
          "Alert_Flag": {
            "description": "The flag indicating an alert.",
            "type": [
              "string",
              "null"
            ],
            "example": "red"
          },
          "Alert_Type": {
            "description": "The type of alert.",
            "type": [
              "string",
              "null"
            ],
            "example": "Measurement"
          },
          "Alert_Created_Date": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/dateTimeSchema",
                "description": "The date and time when the alert was created."
              },
              {
                "type": "null"
              }
            ],
            "description": "The date and time when the alert was created."
          },
          "Alert_Processed_Type": {
            "description": "The type of alert processing.",
            "type": [
              "string",
              "null"
            ],
            "example": "alerts_dashboard"
          },
          "Alert_Processed_Action": {
            "description": "The action taken for alert processing.",
            "type": [
              "string",
              "null"
            ],
            "example": "contact_via_message"
          },
          "Alert_Processed_At": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/dateTimeSchema",
                "description": "The date and time when the alert was processed."
              },
              {
                "type": "null"
              }
            ],
            "description": "The date and time when the alert was processed."
          },
          "Alert_Processed_By_UUID": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/uuidSchema",
                "description": "The unique identifier of the user who processed the alert."
              },
              {
                "type": "null"
              }
            ],
            "description": "The unique identifier of the user who processed the alert."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "AlertsReportResponse": {
        "description": "Fields of patient alert response.",
        "properties": {
          "Patient_UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "Group": {
            "description": "The group the patient belongs to.",
            "type": "string",
            "example": "Test group"
          },
          "Program": {
            "description": "The program the patient is enrolled in.",
            "type": "string",
            "example": "Test program"
          },
          "Protocol": {
            "description": "The protocol the patient is following.",
            "type": "string",
            "example": "Test protocol"
          },
          "Alert_Flag": {
            "description": "The flag indicating an alert.",
            "type": "string",
            "example": "red"
          },
          "Alert_Type": {
            "description": "The type of alert.",
            "type": "string",
            "example": "Measurement"
          },
          "Measurement_Name": {
            "description": "The name of the measurement.",
            "type": "string",
            "example": "Weight"
          },
          "Alert_Created_Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the alert was created."
          },
          "Alert_Processed_Type": {
            "description": "The type of alert processing.",
            "type": [
              "string",
              "null"
            ],
            "example": "alerts_dashboard"
          },
          "Alert_Processed_Action": {
            "description": "The action taken for alert processing.",
            "type": [
              "string",
              "null"
            ],
            "example": "contact_via_message"
          },
          "Alert_Processed_At": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the alert was processed."
          },
          "Alert_Processed_By_UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the user who processed the alert."
          },
          "Alert_Processed_By_Role": {
            "description": "The role of the user who processed the alert.",
            "type": [
              "string",
              "null"
            ],
            "example": "hcp_primary"
          },
          "Alert_Processed_Additional_Info": {
            "description": "Additional information about the alert processing.",
            "type": [
              "string",
              "null"
            ],
            "example": "Note on alert processing"
          },
          "Id": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the alert."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "StarRatingsReportResponse": {
        "description": "Fields of patient score response.",
        "properties": {
          "Group": {
            "description": "The group the patient belongs to.",
            "type": "string",
            "example": "Test group"
          },
          "Date": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time of the score."
          },
          "Patient_UUID": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "Score": {
            "description": "The score of the patient.",
            "type": "string",
            "example": "4"
          },
          "Remarks": {
            "description": "Additional remarks.",
            "type": [
              "string",
              "null"
            ],
            "example": "Good job!"
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PlannedActionsReportResponse": {
        "description": "Fields of plannedActions report type.",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the planned action."
          },
          "programActionId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the program action."
          },
          "patientId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "plannedVia": {
            "description": "The method of planning the action. Whether rec for frequency-based recalculation routine or wfa for workflow actions.",
            "type": "string",
            "example": "rec",
            "enum": [
              "rec",
              "wfa"
            ]
          },
          "selfPlanned": {
            "description": "Whether the action was planned by the patient themselves.",
            "type": "integer",
            "example": 1
          },
          "notBefore": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time after which the action can only be completed."
          },
          "expiresAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time after which the action can no longer be completed."
          },
          "validPeriodTimezone": {
            "description": "The timezone of the notBefore and expiresAt fields as a region string.",
            "type": "string",
            "example": "Europe/Amsterdam"
          },
          "completedAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the action was completed."
          },
          "completedAtTimezone": {
            "description": "The timezone of the completedAt field as a region string.",
            "type": "string",
            "example": "Europe/Amsterdam"
          },
          "createdAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the action was created."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PatientsWorkflowHistoryReportResponse": {
        "description": "Fields of patientsWorkflowHistory report type.",
        "properties": {
          "patientId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "workflowId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the workflow."
          },
          "triggerDay": {
            "$ref": "#/components/schemas/dateSchema",
            "description": "The date when the workflow was triggered."
          },
          "triggerCount": {
            "description": "The number of times the workflow was triggered.",
            "type": "integer",
            "example": 1
          },
          "createdAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the workflow was created."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PatientsProgramsHistoryReportResponse": {
        "description": "Fields of patientsProgramsHistory report type.",
        "properties": {
          "patientId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "programId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the program."
          },
          "createdBy": {
            "description": "The unique identifier of the user who assigned the patient to the program, or null when the assignment was performed by an automated process.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/uuidSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the patient was assigned to the program."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PatientsSettingsHistoryReportResponse": {
        "description": "Fields of patientsSettingsHistory report type.",
        "properties": {
          "patientId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "key": {
            "description": "The name of the setting.",
            "type": "string",
            "example": "timezone"
          },
          "value": {
            "description": "The value of the setting.",
            "type": "string",
            "example": "Europe/Amsterdam"
          },
          "createdBy": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the user who changed the setting."
          },
          "createdAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the setting was created."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "UsersStatusChangeReasonsReportResponse": {
        "description": "Fields of usersStatusChangeReasons report type.",
        "properties": {
          "userId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the user."
          },
          "fromStatus": {
            "description": "The status the user was in before the change.",
            "type": "string",
            "example": "created"
          },
          "toStatus": {
            "description": "The status the user was in after the change.",
            "type": "string",
            "example": "active"
          },
          "reason": {
            "description": "The reason for the status change.",
            "type": "string",
            "example": "User now verified."
          },
          "createdBy": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the user who changed the status."
          },
          "createdAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the status change was created."
          },
          "processedAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the status change was processed."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PatientsMomentsReportResponse": {
        "description": "Fields of patientsMoments report type.",
        "properties": {
          "patientId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "momentId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the program moment."
          },
          "date": {
            "$ref": "#/components/schemas/dateSchema",
            "description": "The date the moment happened."
          },
          "createdAt": {
            "$ref": "#/components/schemas/isoDateTimeSchema",
            "description": "The date and time when the patient moment was created."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "MeasurementsForQuestionnairesReportResponse": {
        "description": "Fields of patient measurements for questionnaires response.",
        "properties": {
          "patientId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the patient."
          },
          "plannedActionId": {
            "description": "The unique identifier of the planned action the measurement belongs to.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/uuidSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "groupId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the group the patient belongs to."
          },
          "instrumentId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the instrument the measurement belongs to."
          },
          "instrumentVersion": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The version of the instrument the measurement belongs to."
          },
          "details": {
            "description": "A JSON string containing the details of the measurement.",
            "type": "string",
            "example": "[{\"item_id\":\"7659dfb3-c089-4d12-95b7-46ff8ce1e7dd\",\"item_version\":\"7659dfb3-c089-4d12-95b7-46ff8ce1e7dd\",\"value\":\"151\",\"response_ids\":[\"7659dfb3-c089-4d12-95b7-46ff8ce1e7dd\"],\"file_name\":null}]"
          },
          "measurementDate": {
            "$ref": "#/components/schemas/dateTimeSchema",
            "description": "The date and time when the measurement was created."
          },
          "createdByUserId": {
            "$ref": "#/components/schemas/uuidSchema",
            "description": "The unique identifier of the user who created the measurement."
          }
        },
        "type": "object",
        "additionalProperties": false
      },
      "PaginationData": {
        "properties": {
          "perPage": {
            "description": "Number of results per page",
            "type": "integer",
            "default": 50
          },
          "nextCursor": {
            "description": "Pagination cursor to be used to fetch next results",
            "type": [
              "string",
              "null"
            ],
            "example": "eyJBbGVyd..."
          },
          "nextPageUrl": {
            "description": "Url to be used to fetch next results",
            "type": [
              "string",
              "null"
            ],
            "example": "https://next.page/?cursor=eyJBbGVyd..."
          },
          "prevCursor": {
            "description": "Pagination cursor to be used to fetch previous results",
            "type": [
              "string",
              "null"
            ],
            "example": "eyJBbGVyd..."
          },
          "prevPageUrl": {
            "description": "Url to be used to fetch previous results",
            "type": [
              "string",
              "null"
            ],
            "example": "https://next.page/?cursor=eyJBbGVyd..."
          }
        },
        "type": "object"
      },
      "uuidSchema": {
        "type": "string",
        "format": "uuid",
        "example": "9890ed24-405d-4688-abcd-b7f829d75939"
      },
      "dateSchema": {
        "type": "string",
        "format": "date",
        "example": "2023-05-23"
      },
      "dateTimeSchema": {
        "description": "Date and time schema in Y-m-d H:i:s format",
        "type": "string",
        "format": "date-time",
        "example": "2024-09-17 15:45:00"
      },
      "isoDateTimeSchema": {
        "description": "Date-time formatted to ISO8601. See https://www.rfc-editor.org/rfc/rfc3339#section-5.6",
        "type": "string",
        "format": "date-time",
        "example": "2024-09-17T15:45:00+02:00"
      }
    },
    "responses": {
      "Unprocessable": {
        "description": "Unprocessable entity, i.e. Validation error",
        "x-statusCode": "422"
      },
      "ServiceUnavailable": {
        "description": "Service unavailable, e.g. when the functionality is disabled",
        "x-statusCode": "503"
      }
    },
    "parameters": {
      "PaginationCursor": {
        "name": "cursor",
        "in": "query",
        "description": "Cursor to paginate the results",
        "schema": {
          "type": "string"
        }
      },
      "PaginationPageSize": {
        "name": "perPage",
        "in": "query",
        "description": "Number of items per page",
        "schema": {
          "type": "integer",
          "default": 50,
          "maximum": 200,
          "minimum": 1
        }
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "description": "Bearer token. Just enter the token itself without 'Bearer' keyword",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Exports",
      "description": "Exports related endpoints",
      "externalDocs": {
        "description": "Exports Api guide",
        "url": "https://integrations.luscii.com/docs/export-api"
      }
    }
  ],
  "externalDocs": {
    "description": "General Public API Documentation",
    "url": "https://integrations.luscii.com/docs/public-api"
  },
  "servers": [
    {
      "url": "https://vitalsapi.luscii.com/"
    }
  ],
  "x-readme": {}
}
```