CSV Export
The CSV Export API allows you to access specific types of data for business intelligence purposes.
The Export API allows you to programmatically queue an export job. By requesting a CSV export you receive a download uri in the response body where eventually the file will be available for download. All CSV report types supported in the Web Application are supported as Export API jobs.
Exports are generated asynchronously. There is no guarantee that on receiving the response the export file is immediately ready for download. Depending on size of the export the generation process can take from a couple of seconds to a couple of minutes.
Request
Endpoint
POST /v1/csvexport/{reportType}
Path Parameters
Name | Type | Description |
---|---|---|
reportType required | enum | Resource type to export. Available values: patients , measurements ,alerts , hcps , patientsMutations , starRatings |
Query Parameters
Name | Type | Description |
---|---|---|
startDate required or forbidden | string | Minimum creation date of resources to include in the export. Date string in format of YYYY-MM-DD e.g. 2024-01-14 .required for reportType of measurements and alerts forbidden for reportType of patients ,hcps ,patientsMutations and starRatings |
endDate required or forbidden | string | Maximum creation date of resources to include in the export. Date string in format of YYYY-MM-DD e.g. 2024-01-14 .required for reportType of measurements and alerts forbidden for reportType of patients ,hcps ,patientsMutations and starRatings |
sendEmail optional | string | Also send an email to the user with the export download link. Available values: true or false |
Response
HTTP status code
202
Body
{
"meta": {
"message": "Export request queued",
"uri": "..." // download uri of export resource
}
}
Example
POST /v1/csvexport/measurements?startDate=2024-01-01&endDate=2024-01-07 HTTP/1.1
Authorization: Bearer <api-key>
Host: api.luscii.com
Content-Type: application/json
Content-Length: 0
HTTP/1.1 202 Accepted
Date: Wed, 14 Feb 2024 11:03:24 GMT
Content-Type: application/json
{"meta":{"message":"Export request queued", "uri": "..."}}
Structure of the export
The downloaded csv file will have the following structure depending on the type of export which was requested.
patients
- Patient_UUID
- First_Name
- Middle_Name
- Last_Name
- Sex
- Patient_Number
- BSN
- Phone
- Date_Of_Birth
- Status
- Group_Name
- Program_Name
- Created_Date
- Activated_Date
- Stopped_Date
- Stopped_Reason
- Grey_Alerts
- Orange_Alerts
- Red_Alerts
- Measurements_Alerts
- Combination_Alerts
- Remark_Alerts
- Overdues_Alerts
- Average_Alerts
- Total_Alerts
measurements
- Patient_UUID
- First_Name
- Middle_Name
- Last_Name
- Patient_Number
- Group
- Program
- Measurement_Date
- Measurement_Name
- Measurement_Value
- Alert_Flag
- Alert_Type
- Alert_Created_Date
- Alert_Processed_Type
- Alert_Processed_Action
- Alert_Processed_At
- Alert_Processed_By_UUID
alerts
- Patient_UUID
- Group
- Program
- Alert_Flag
- Alert_Type
- Measurement_Name
- Alert_Created_Date
- Alert_Processed_Type
- Alert_Processed_Action
- Alert_Processed_At
- Alert_Processed_By_UUID
hcps
- UUID
- First_Name
- Middle_Name
- Last_Name
- User_Name
- Language
- Role
- Status
- Last_Login_At
- Last_Logout_At
- Groups (comma separated list)
- Processed_Alerts (the amount of alerts the HCP has processed)
patientsMutations
- Patient_UUID
- First_Name
- Middle_Name
- Last_Name
- Patient_Number
- Type (Group or Program)
- Mutation_Date
starRatings
- Group
- Date
- Patient_UUID
- Score
- Remarks
Updated 12 months ago