Base URL: https://zeus.intelms.com:8447
Timeout: 30 seconds
Content-Type: application/json
Endpoint: POST /api/v1/sessions
Headers:
Content-Type: application/json
Request Body:
{
"username": "string",
"password": "string"
}Success Response (200 OK):
{
"auth_token": "string",
"user": {
"name": "string",
"description": "string",
"roles": ["array"]
}
}Mobile Implementation:
- Store token as:
"Bearer " + response.auth_token - Storage key:
"TOKEN"in AsyncStorage - Token expires: 24 hours
Error Responses:
401 Unauthorized- Invalid credentials500 Internal Server Error- Server error
All report endpoints require authentication.
Authentication Header:
Authorization: Bearer {auth_token}
Endpoint: GET /api/v1/reports
Headers:
Authorization: Bearer {auth_token}
Content-Type: application/json
Query Parameters: None (returns all accessible reports)
Success Response (200 OK):
{
"reports": [
{
"id": "integer",
"collection": "datetime (ISO 8601)",
"received": "datetime (ISO 8601)",
"subject": "string",
"doctor": "string",
"specimen": "string",
"folder": "string",
"report_status": "string",
"department": "string",
"text_only": "boolean",
"report_tests": "array (if text_only=false)",
"result_date": "datetime (if text_only=false)",
"summary": "string (if text_only=true)",
"body_text": "string",
"patient": {
"id": "integer",
"first_name": "string",
"last_name": "string",
"date_of_birth": "date (YYYY-MM-DD)",
"sex": "string",
"medical_record_number": "string"
},
"studies": "array",
"meta": {
"next_report_id": "integer",
"prev_report_id": "integer",
"report_total": "integer",
"report_index": "integer"
}
}
],
"current_page": "integer",
"next_page": "integer",
"prev_page": "integer",
"total_pages": "integer",
"total_count": "integer"
}Mobile Transformation:
- Calculate
agefrompatient.date_of_birth - Create
full_name:first_name + " " + last_name - Create
header_title:"{full_name} | {age} | {sex} | {DOB}" - Group reports by
receiveddate - Format dates as
DD/MM/YYYY
Error Responses:
401 Unauthorized- Invalid/expired token403 Forbidden- Access denied500 Internal Server Error- Server error
Endpoint: GET /api/v1/reports?read=false
Headers:
Authorization: Bearer {auth_token}
Content-Type: application/json
Query Parameters:
read=false- Filter for unread reports only
Success Response: Same structure as "Get All Reports"
Filtering Logic:
- Returns reports where
status = 0(Not Read) - Only reports addressed to authenticated user
- Excludes superseded reports
Endpoint: GET /api/v1/reports?marked=true
Headers:
Authorization: Bearer {auth_token}
Content-Type: application/json
Query Parameters:
marked=true- Filter for marked reports only
Success Response: Same structure as "Get All Reports"
Filtering Logic:
- Returns reports marked by user
- User-specific marking state
Endpoint: GET /api/v1/reports?dnr_only=true
Headers:
Authorization: Bearer {auth_token}
Content-Type: application/json
Query Parameters:
dnr_only=true- Filter for Do Not Report (DNR) only
Success Response: Same structure as "Get All Reports"
Filtering Logic:
- Returns DNR flagged reports
- Critical/flagged results
Endpoint: GET /api/v1/reports/{id}?patient_id={patient_id}
Headers:
Authorization: Bearer {auth_token}
Content-Type: application/json
URL Parameters:
id- Report ID (integer)
Query Parameters:
patient_id- Patient ID (integer, required)
Success Response (200 OK):
{
"id": "integer",
"collection": "datetime (ISO 8601)",
"received": "datetime (ISO 8601)",
"subject": "string",
"doctor": "string",
"specimen": "string",
"folder": "string",
"report_status": "string",
"department": "string",
"text_only": "boolean",
"report_tests": "array",
"result_date": "datetime",
"summary": "string",
"body_text": "string",
"patient": {
"id": "integer",
"first_name": "string",
"last_name": "string",
"date_of_birth": "date",
"sex": "string",
"medical_record_number": "string"
},
"studies": "array",
"drug_order": "object",
"referral": "object",
"consultation": "object",
"meta": {
"next_report_id": "integer",
"prev_report_id": "integer",
"report_total": "integer",
"report_index": "integer"
}
}Side Effect:
- Viewing report marks it as read (updates status)
Error Responses:
401 Unauthorized- Invalid/expired token403 Forbidden- No access to this report404 Not Found- Report doesn't exist500 Internal Server Error- Server error
Endpoint: GET /api/v1/reports
Headers:
Authorization: Bearer {auth_token}
Content-Type: application/json
Query Parameters (all optional):
first_name- Patient first name (string)last_name- Patient last name (string)date- Date filter (date)status- "Not Read" or "Read" (string)text_only- Filter text reports only (boolean)page- Page number for pagination (integer)
Success Response: Same structure as "Get All Reports"
Network Errors:
- Message:
"No Internet Connection Found!" - Occurs when no network connectivity
Timeout Errors:
- Message:
"Internet connection is poor" - Occurs after 30 seconds
Session Expired:
- Message:
"Session expired. Please login again" - Occurs when token is invalid/expired
- Action: Redirect to login screen
| Field | Type | Description |
|---|---|---|
id |
integer | Unique report identifier |
collection |
datetime | Sample collection date/time |
received |
datetime | Report received date/time |
subject |
string | Report subject/title |
doctor |
string | Ordering physician |
specimen |
string | Specimen type |
folder |
string | Report category/folder |
report_status |
string | Status (Final, Preliminary, etc.) |
department |
string | Department (Microbiology, Histology, etc.) |
text_only |
boolean | true = text report, false = lab results |
report_tests |
array | Lab test results (when text_only=false) |
result_date |
datetime | Result date (when text_only=false) |
summary |
string | Report summary (when text_only=true) |
body_text |
string | Full report body |
patient |
object | Patient demographics |
studies |
array | Radiology images (if applicable) |
meta |
object | Navigation metadata |
| Field | Type | Description |
|---|---|---|
id |
integer | Patient identifier |
first_name |
string | Patient first name |
last_name |
string | Patient last name |
date_of_birth |
date | DOB (YYYY-MM-DD) |
sex |
string | Patient sex |
medical_record_number |
string | MRN |
| Field | Type | Description |
|---|---|---|
current_page |
integer | Current page number |
next_page |
integer | Next page number (null if last) |
prev_page |
integer | Previous page number (null if first) |
total_pages |
integer | Total number of pages |
total_count |
integer | Total number of reports |
-
Token Management:
- Store token with "Bearer " prefix
- Include in Authorization header for all authenticated requests
- Clear token and redirect to login on 401 errors
-
Data Transformation:
- Calculate patient age from
date_of_birth - Create
full_namefromfirst_name+last_name - Format
header_titlewith patient details - Group reports by
receiveddate - Format dates as DD/MM/YYYY for display
- Calculate patient age from
-
Report Grouping:
- Group by
receiveddate - Sort by newest first
- Format group headers with date
- Group by
-
Error Handling:
- Network errors: Show offline message
- Timeout: Show poor connection message
- 401: Clear session and return to login
- Other errors: Show generic error message
-
Access Control:
- Ward users: See reports for their ward + direct assignments
- Hospital users: See reports for entire organization
- All users: Superseded reports excluded by default
-
Status Updates:
- Viewing report (GET /api/v1/reports/:id) marks as read
- Status changes reflect immediately in subsequent requests
-
Date Filtering:
- Default: 7 days before last admission
- Doctors: 1 year from inbox
- Uses
collection_date,report_date, orcreated_at
-
Pagination:
- Default page size configured server-side
- Use
pageparameter for navigation - Total count provided for UI