Eka Medical Records Core
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 yourPackage.swift
file:
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 theRecordsRepo
class, which provides the following model: