Skip to main content

Get info for Session

GET /api/v1/session/{sessionId}

Description

This endpoint provedes some metadata for the session

Request Parameters (path)

NameDescriptionRequiredTypeDefault Value
sessionIdThe identifier of the sessionYesuuid

Response

HTTP Status Codes

CodeDescription
200Success, returns a SessionInfo
401Unauthorized, missing X-Red-Robin-API-Key header
403Forbidden, invalid X-Red-Robin-API-Key header
404Not found, invalid configuration

SessionInfo

NameDescriptionTypeExample
descriptionOfMatterA description of the matterstring?I have a headache
patientAgeThe age of the patientdouble?42
patientSexThe biological sex of the patientSex | nullFemale
sessionCompletedTimestampThe timestamp when the session was completedDateTime?2023-10-01T12:30:00Z
sessionCreatedTimestampThe timestamp when the session was createdDateTime?2023-10-01T12:00:00Z
urgencyAn enum describing the urgency of the sessionUrgency6
userStartedTimestampThe timestamp when the user started the sessionDateTime?2023-10-01T12:05:00Z
userWasPatientTrue if the user was the patientboolean?false
issueTypeThe type of the sessionIssueTypeRegular

Enums

Urgency

String valueDescription
No urgency setNo urgency set
Level10 minutes (patient will receive a red flag)
Level210 minutes (patient will receive a red flag)
Level31 hour (patient will receive a red flag)
Level44 hours (patient will receive a warning flag)
Level51 day
Level61 week
Level71 month
Level8Self-care

Sex

It's important to remember that this is the biological sex of the patient, to ask the correct questions.

String valueDescription
Male
Female
OtherThe 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 valueDescription
NoneNo type set yet
RegularRegular session where meddical questions has been asked
PrescriptionPrescription wanted
CertificateSick certificate wanted
AdminAdministrative help wanted

Example Usage

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"
}