Medical records
Eka Health Records Android SDK Documentation
Table of Contents
- API Reference
- Introduction
- Prerequisites
- Installation
- SDK Initialization
- Data Models
- Core Functionality
- Advanced Features
- Troubleshooting
API Reference
For complete API reference, please refer to the source code documentation in the GitHub repository: https://github.com/eka-care/eka-health-records-android
Introduction
The Eka Health Records Android SDK provides comprehensive functionality for managing medical document records in Android applications. This SDK allows integration with the Eka Care platform for storing, retrieving, and managing health documents.
Prerequisites
Before using the Eka Health Records SDK, ensure your development environment meets the following requirements:
- Android Studio Arctic Fox (2020.3.1) or newer
- Minimum SDK version: 21 (Android 5.0 Lollipop)
- Kotlin version: 1.5.0 or newer
- JDK 8 or newer
- Authentication with Eka platform (tokens required for initialization)
Installation
Add the repository to your project-level build.gradle
or settings.gradle
file:
Include the dependency in your app-level build.gradle.kts
file:
Replace 1.2.5
with the latest version as needed.
SDK Initialization
Initialize the SDK by creating an implementation of the IOkHttpSetup
interface to provide authentication tokens:
Data Models
VaultEntity
The primary entity for document storage in the Room database. VaultEntity
represents medical document records.
RecordModel
A data transfer object representing document records, used for API communication.
Document Types
Constants used to specify document categories:
Type ID | Description |
---|---|
1 | Lab Report |
2 | Prescription |
3 | Discharge Summary |
4 | Vaccine Certificate |
5 | Insurance |
6 | Invoice |
7 | Scan |
8 | Other |
-1 | All types (default) |
AvailableDocTypes
A data class representing available document types for filtering:
DocumentSortEnum
Enum used for specifying document sort criteria:
Core Functionality
Data Synchronization
Initialize background synchronization for patient documents:
Document Retrieval
Retrieve documents with optional filtering and sorting:
Get a single document by ID:
Get available document types:
Document Management
Store documents:
Delete a document:
Edit document metadata:
Document Viewing
Open a document viewer:
File Handling
Download document files:
Download thumbnail images:
Check if a document exists:
Advanced Features
Cleanup
When the SDK is no longer needed or when a user logs out:
Troubleshooting
Common Issues
-
Authentication Failures
- Ensure your
IOkHttpSetup
implementation provides valid tokens - Verify the host URL is correctly specified
- Ensure your
-
Documents Not Syncing
- Check network connectivity
- Verify the patient UUID is correct
- Ensure background workers are not restricted by battery optimization
-
File Download Issues
- Check storage permissions
- Verify the device has sufficient storage space