Documentation Index
Fetch the complete documentation index at: https://mintlify.com/amankiit/OmniEHR/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All admin endpoints require a valid JWT token in the Authorization header:List Users
Authorization
Required Role:admin
Response
Array of user objects
User’s unique identifier (MongoDB ObjectId)
User’s email address (lowercase)
User’s full name
User’s organization name
User role:
admin, practitioner, or auditorWhether the user account is active
ISO 8601 timestamp of last login
ISO 8601 timestamp of account creation
ISO 8601 timestamp of last update
Total number of users
Example Response
Create User
Authorization
Required Role:admin
Request Body
User’s email address. Must be a valid email format and will be converted to lowercase. Must be unique.
User’s full name. Must be 2-120 characters.
User’s organization name. Maximum 120 characters. Defaults to empty string.
User’s password. Must meet complexity requirements:
- Minimum 12 characters, maximum 128 characters
- At least one uppercase letter (A-Z)
- At least one lowercase letter (a-z)
- At least one digit (0-9)
- At least one special character
User’s role in the system. Must be one of:
admin, practitioner, auditor. Defaults to practitioner.Response
The created user object
User’s unique identifier
User’s email address
User’s full name
User’s organization name
User’s assigned role
Account active status (always true for new users)
ISO 8601 timestamp of account creation
ISO 8601 timestamp of last update
Example Response
Error Responses
409 Conflict
Email address is already in use
400 Bad Request
Validation error for invalid input
List Practitioners
Authorization
Required Role:admin or practitioner
When accessed by a practitioner, only returns their own information. When accessed by an admin, returns all active practitioners.
Response
Array of practitioner user objects (same structure as user objects), sorted alphabetically by full name
Total number of practitioners returned
Example Response (Admin)
Get Audit Logs
Authorization
Required Role:admin or auditor
Query Parameters
Page number for pagination. Must be >= 1.
Number of records per page. Must be between 1 and 100.
Filter by outcome:
success or failureFilter by FHIR resource type (e.g.,
Patient, Observation, Appointment)Filter by actor’s email address (case-insensitive)
Response
Current page number
Number of records per page
Total number of records matching the filter
Array of audit log entries
Unique identifier for the audit log entry
User ID of the actor who performed the action
Email address of the actor
Role of the actor:
admin, practitioner, or auditorDescription of the action performed (e.g., “create”, “read”, “update”, “delete”)
FHIR resource type affected (e.g., “Patient”, “Observation”)
ID of the affected resource
HTTP method used (GET, POST, PUT, DELETE)
API endpoint path accessed
HTTP status code of the response
Result of the action:
success or failureIP address of the client
User agent string of the client
ISO 8601 timestamp when the log was created
ISO 8601 timestamp of last update
Example Response
Example Filtered Request
User Roles
Role Descriptions
admin
Administrator - Full system access including user provisioning, all FHIR resources, and audit logs
practitioner
Healthcare Practitioner - Can manage patient records, clinical resources (Observations, Conditions, Medications, Encounters, Appointments, Tasks), and view their own practitioner profile
auditor
Auditor - Read-only access to audit logs for compliance and security monitoring. Cannot modify any resources.
Role Permission Matrix
| Endpoint | Admin | Practitioner | Auditor |
|---|---|---|---|
| GET /admin/users | ✓ | ✗ | ✗ |
| POST /admin/users | ✓ | ✗ | ✗ |
| GET /admin/practitioners | ✓ | ✓ (self only) | ✗ |
| GET /admin/audit-logs | ✓ | ✗ | ✓ |
| All FHIR endpoints | ✓ | ✓ | ✗ |