bcgov / myhealthBC-iOS

4 stars 1 forks source link

My Health BC

Health Gateway

Download on the App Store

Health Gateway provides secure and convenient access to your B.C. health records all in one place. Keep track of what's important to you and your health.

Table of Contents

Getting Started

graph LR
A((Clone project)) --> B((Open Terminal))
B --> C((Navigate project directory))
C --> D{execute Pod instsall}
D --> E((open BCVaccineCard.xcworkspace))

Libraries

Deployment

Targets

Switch between different environments by selecting the appropriate target:

Automated

Github Actions have been setup for this project for handling the archive and upload of builds:

Manual

You can upload builds manually through Xcode, after obtaining the certificates from an admin of Government of British Columbia Apple account. The certificates included in the repository are encrypted for use by the automated pipeline.

Architecture

This application uses UIKit as its UI framework, and Core Data with encryption as its storage option.

The diagram below shows the high level architecture:

graph LR
A[View Controller]
C(View Model)
D(Storage Service)
E(Core Data)
G(Record Services)
F(Health Gateway API)
A --> C
C --> A
C --> D
D --> C
D --> E
E --> D
C --> G
G ---> C
G --> F
F --> G
G ---> D

Each health record type has its it own record service that handles the network calls, and storage of data through the Storage Service Storage Service handles reads and writes from the core data database.

Migrations

The data for this application is completely wiped and re-fetched with each synchronization and the app is not required to hold onto data that hasn't been uploaded to the back end. Because of this, the database doesn't require manual migrations.

If there is a change in the Database structure, update the app version. If the app was updated, or if there was any error with accessing the database, MigrationService will delete the sqlite file and generate a new one on application launch.

Resources

Health Gateway API

The documentation for the backend api is available through Swagger. There are services for various sets of APIs:

Contributors

Connor Ogilvie | Amir Shayegh |