Get info for Session
GET /api/v1/session/{sessionId}
Description
This endpoint provedes some metadata for the session
Request Parameters (path)
| Name | Description | Required | Type | Default Value |
|---|---|---|---|---|
sessionId | The identifier of the session | Yes | uuid |
Response
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success, returns a SessionInfo |
| 401 | Unauthorized, missing X-Red-Robin-API-Key header |
| 403 | Forbidden, invalid X-Red-Robin-API-Key header |
| 404 | Not found, invalid configuration |
SessionInfo
| Name | Description | Type | Example |
|---|---|---|---|
descriptionOfMatter | A description of the matter | string? | I have a headache |
patientAge | The age of the patient | double? | 42 |
patientSex | The biological sex of the patient | Sex | null | Female |
sessionCompletedTimestamp | The timestamp when the session was completed | DateTime? | 2023-10-01T12:30:00Z |
sessionCreatedTimestamp | The timestamp when the session was created | DateTime? | 2023-10-01T12:00:00Z |
urgency | An enum describing the urgency of the session | Urgency | 6 |
userStartedTimestamp | The timestamp when the user started the session | DateTime? | 2023-10-01T12:05:00Z |
userWasPatient | True if the user was the patient | boolean? | false |
issueType | The type of the session | IssueType | Regular |
Enums
Urgency
| String value | Description |
|---|---|
No urgency set | No urgency set |
Level1 | 0 minutes (patient will receive a red flag) |
Level2 | 10 minutes (patient will receive a red flag) |
Level3 | 1 hour (patient will receive a red flag) |
Level4 | 4 hours (patient will receive a warning flag) |
Level5 | 1 day |
Level6 | 1 week |
Level7 | 1 month |
Level8 | Self-care |
Sex
It's important to remember that this is the biological sex of the patient, to ask the correct questions.
| String value | Description |
|---|---|
Male | |
Female | |
Other | The Triage UI will show information to the user why we ask for the biological sex, but the user can still proceed with this option |
IssueType
| String value | Description |
|---|---|
| None | No type set yet |
| Regular | Regular session where meddical questions has been asked |
| Prescription | Prescription wanted |
| Certificate | Sick certificate wanted |
| Admin | Administrative help wanted |
Example Usage
- Javascript
GET /api/v1/session/{sessionId}
const headers = new Headers();
headers.append('X-Red-Robin-API-Key', 'API_KEY');
headers.append('Content-Type', 'application/json');
const requestOptions = {
method: 'GET',
headers: headers,
};
fetch('https://se.visibatriage.com/api/v1/session/{sessionId}', requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
Example Success Response
{
"urgency": 6,
"patientAge": 42,
"patientSex": "Female",
"userWasPatient": false,
"descriptionOfMatter": "I have a headache",
"sessionCreatedTimestamp": "2023-10-01T12:00:00Z",
"userStartedTimestamp": "2023-10-01T12:05:00Z",
"sessionCompletedTimestamp": "2023-10-01T12:30:00Z"
}