Skip to content

Pain Meds Buddy is an iOS application written in SwiftUI with CoreData. The app allows users to keep track of the medication they have taken and provide reminders when doses have elapsed.

Notifications You must be signed in to change notification settings

JulesMoorhouse/Pain-Meds-Buddy-Public

Repository files navigation

Pain Meds Buddy

Platform iOS Version Swift Version SwiftUI Version Xcode Version GitHub License Build Status

Introduction

Pain Meds Buddy has been designed to help people in pain manage their medication. It allows the user to add their medication and track their doses. The app is focused on making it easy to manage pain around the person not a schedule.

The app is written with SwiftUI and uses Core Data / Combine.

Prerequisites

  • To automate test coverage across multiple devices and produce framed screenshots Fastlane integration has been added, please see these Setup Instructions

Approach

The project uses an MVVM architecture approach. However, ViewModels have only been employed where Core Data fetch requests and more complex code has cluttered the SwiftUI Views. Unit Tests cover most of the code where it is difficult to visual test functionality, please see coverage here. There is also some UI Testing which covers the main functionality of the app e.g. adding / editing. The project also has good accessibility coverage.

Design / Screenshots

Home

Code

HomeView.swift / HomeViewModel.swift

Usage

The main screen in the app has been designed to summarise medication and current doses. Here the user can quickly take the next medication and see which medication is running out.

When designing the app it was important to consider the key functions a user would need and how these could be performed quickly.

The progress circles show how long is left until the the user can take their next dose or whether medication has recently become available to take.

Medications

Code

MedsView.swift / MedsViewModel.swift

Usage

Here in the medications screen the user can see all the drugs they have setup.

They can also see an icon for which will make it easier to identify the medication at a glance.

A simple sort feature has been provided to make it easier to find medications if the list grows over time.

Add Medications

Code

MedAddView.swift

Usage

The add medication screen allows the user to setup details about their medication, the dose and how long the medication should last.

A gap time can also be used to space out medication taken through-out the day so coverage of the medication can stretched across the day within the maximum dose range for the day.

The user can also pick from a range of medical related icons and colours.

In Progress / History

Code

DosesView.swift / DosesViewModel.swift

Usage

The In Progress / History screens are very similar and either show available or taken medication.

The list of doses is grouped by day.

Add Dose Screen

Code

DoseAddView.swift

Usage

The add dose screen is quite powerful, it uses the medications the user has setup and makes it easy and quick to add a new dose / take medication.

App Store

You can also download the latest version of the app from the app store.


You can also use this QR code to download the app from the app store.

Contributing

Contributions for bug fixing or improvements are welcomed. Feel free to submit a pull request. Please ensure that all current unit tests and UI tests pass before submitting. Also if you find this code useful, feel free to buy a copy of my app, see the app store button above.

License

Usage is provided under the MIT License. See LICENSE for the full details.

Acknowledgements

I'd like to thank Paul Hudson from Hacking with Swift for his 100 days courses.

Contact

You may Contact me with any questions or concerns.

About

Pain Meds Buddy is an iOS application written in SwiftUI with CoreData. The app allows users to keep track of the medication they have taken and provide reminders when doses have elapsed.

Topics

Resources

Stars

Watchers

Forks

Languages