Medical records
Eka Medical Records Core
A Swift package for integrating with Eka’s medical records system.
Table of Contents
Installation
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the Swift compiler.
Add EkaMedicalRecordsCore as a dependency in your Package.swift
file:
Add EkaMedicalRecordsCore
in the target:
Initialization
Initialize the SDK with the required tokens from Auth SDK:
Required Parameters
-
Auth Token: Eka’s authentication token that you can get from Eka’s Auth SDK APIs.
-
Refresh Token: Eka’s refresh token that you can get from Eka’s Auth SDK APIs.
-
OwnerID: Owner ID is the OID for the person for whom you want the records for.
-
FilterID (optional): FilterID is the OID of the person for whom you want to filter the records for.
Note: You need to set all these properties from wherever you want to open the records screen. FilterID field is optional and will be used only when you need to filter records attached to an ownerID.
Database Models
Record Model
RecordMeta Model
SmartReport Model
Relationships:
- Record Model has a one-to-many relationship with RecordMeta
- Record Model has a one-to-one relationship with SmartReport
CRUD Operations
For all communications with the record database, we use the RecordsRepo
class, which provides the following model:
Create
Adding a Single Record
Function:
Usage:
Read
Fetching Records from Database
Fetching Records from Server
Getting File Details
Update
Updating a Record
Function:
Usage:
Delete
Deleting a Record
API Response Models
Document Fetch Response
File Model
Masked File Model
Smart Report Info Model
Verified Model
Coordinate Model
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For any questions or support, please open an issue in the GitHub repository or contact the Eka Care team.