Git Product home page Git Product logo

diaguard's Introduction

Diaguard

version ci

Diaguard is an Android app for people with diabetes mellitus.

It replaces the handwritten diary and helps the user to quickly and easily record, evaluate and export his blood sugar and other important data as PDF or CSV. Thanks to the clearly arranged interface, the user always has an overview of his diabetes. The app also provides information on several thousand foods including carbohydrates and other nutrients.

  • Quickly and easily track your blood glucose, insulin, carbohydrates, HbA1c, activity, weight, pulse, blood pressure and oxygen saturation
  • Customizable units
  • Visualize your blood glucose level in a graph
  • Detailed logs of your data
  • Settings for basal rate, correction factor and meal-bolus-factor
  • Food database with thousands of entries
  • PDF and CSV export
  • Backup
  • Reminder
  • Estimated HbA1c
  • Statistics
  • Dark Mode
  • Localized in English, German, French, Spanish and Italian

Distribution

Get it on Google PlayGet it on F-Droid

About

History

Development of Diaguard started in October 2013. It was as one of several small projects of one developer who was trying to gain traction on the Android platform. This project soon evolved into a vision named Diaguard which saw its initial release in July 2014. Since then it has received many updates, much appreciated feedback from its users and a little bit of marketing with the help of direct contact and mouth to mouth propaganda. But at the end of the day every line of code has been provided by one sole developer in his spare-time. This should change in April 2020 when the decision was made to go open source.

Goals

Diaguard should help diabetics with monitoring their diabetes. It should be able to replace the handwritten diary completely and to supplement tasks like basal rate tests or carb counting. It should help diabetologists with monitoring their patients regularly and when preparing a health insurance application.

Diaguard's users should always be and feel in full control. All user-generated data must stay on the same device until the user explicitely decides to transfer something to another device, e.g. during an export or backup. Nothing is shared with remote services and network is only used to read data from a food database.
User data must not be lost. Therefor database migrations enable user data to be carried from version 1.0 to any existing and upcoming release.

Diaguard should be accessible to most people. Therefor its design is heavily influenced by the Material Design Guidelines and tested with accessibility tools like TalkBack and Accessibility Scanner.

Diaguard should only be used under the supervision of a diabetologist.
Diaguard should not be used by minors without the supervision of a parent or legal guardian.
Diaguard is not a medical app and serves no therapeutical purpose.

Business model

There is none.

Diaguard exists for three reasons: for learning, for fun and for saying thank you. This app kickstarted the career of a professional software developer by leading through the whole software lifecycle: creating a concept, building software from scratch, publishing it to the masses and maintaining a legacy project with additions sprinkled here and there. Additionally it was and is pure fun to enhance this app and to see feedback from a helpful and thankful community. Last but not least Diaguard is a way of giving something back.

For these reasons, Diaguard has been, is and will always be free of cost.

If you want to buy me a beer or support me in general, please use the donate button and be aware of my thanks.

Development

Languages

English is used as general language for naming things. Everything except the localization should be written in English.

Java is used as programming language. Currently there are no plans to migrate to Kotlin to prevent a multi-language project. A possible approach could be splitting up the monolith into multiple modules which unleashes the potential to switch language while staying consistent within a module.

SQLite is used as query language for the database. Object-relational mapping takes then place via ORMLite.

XML is used as markup language for user interfaces. These views are then bound to Java via View Binding.

Localization

Localization takes place locally and affects following components:

Currently the localization process requires certain programming skills. This should and could be improved by using an external service in order to support localizations by non-developers.

Architecture

There are two architectural design patterns that are being used for Diaguard: Model-View-Controller and Domain-driven design.

Model-View-Controller (MVC) was a widely spread design pattern in the early days of Android development until Google presented its Architecture Components in 2017 and Model-View-ViewModel (MVVM) took over. A gradual transition to MVVM is planned due to its advantages over MVC, e.g. regarding encapsulation and testability.

Domain-driven design improves the structure by grouping files in features. Every feature describes one aspect of the project and should be self-contained to improve focus during development. The only exception to this rule is the shared package which contains everything that is used in multiple features (e.g. database- or networking logic).

Testing

Testing takes place via JUnit and Espresso. Tests are few in number and far from perfect, since most of Diaguard has been developed in the early of days of one developer. However the decision to go open source came with a code of conduct, and instrumentation testing major features was the first step in a right direction. The goal now is to unit- and instrumentation test every new and edited feature in order to increase the quality with every commit.

Third-party licenses

This software uses following technologies with great appreciation:

These dependencies are bundled with Diaguard but under the terms of their respective license.

Legal

The manufacturer of this software assumes no responsibility for the topicality, correctness, completeness or quality of the information provided. Liability claims against the manufacturer, which relate to material or immaterial nature, caused by the use or non-use of the software are excluded.

Redistribution

Additionally to the permissions, conditions and limitations of the GPLv3, the permission for redistribution must be manually requested in advance. This ensures that neither the original software or any fork will be affected negatively by terms and conditions like the Google Play Developer Distribution Agreement. If you plan to redistribute this software, please contact the maintainer at [email protected].

License

Copyright (C) 2013-2024 Philipp Fahlteich

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

diaguard's People

Contributors

faltenreich avatar nuraiman avatar tarres avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

diaguard's Issues

Add option to favourite food database entries and/or to sort by frequency of usage

In addition to #18 I would like to be able to favourite food database entries and/or have them sorted by usage.
The information about how many times a certain entry has been used is already present.

Since there are a lot of duplicates coming from the different sources, which sometimes also have different or plainly wrong values, I'd like to be able to favourite the entries I deem correct.

Backup misses food on second try

When importing a backup containing custom food, the custom is missing when deleted manually and then re-imported again.

Steps to reproduce:

  • Fresh install
  • Add new food named "Test" with 20.0 carboyhdrates
  • Export backup
  • Reset app
  • Import backup
  • "Test" can be found
  • Delete "Test"
  • Import backup again
  • "Test" is missing

strange CSV export or how to import in into KNIME or LibreOffice

Hi,
thank for the nice tool. I wanted to to an analysis of my date in an external tool like KNIME and used the CSV export tool. But the format of the exported data is strange for me and I do not know how to import it into KNIME properly.

What I get is:

"11.11.2022 11:11";
"bloodsugar";"110"
"insulin";"28";;
"meal";"6"
"11.11.2022 12:12";
"bloodsugar";"110"
"insulin";"9";;
"meal";"3"

So the first column is data or "bloodsugar", "insulin" and so on. Can you give me some tips how to import it without some programming.

It would help me if all the data for on date/time would be in one line. Even better would each "category" like "boodsugar" would have it own column like:

"Date","bloodsugar", "meal", "insulin-bolus", "insulin-correction", "insulin-basal"
"11.11.2022 11:11";"110","6","28",,
"11.11.2022 12:12";"110","3","9",,

Allow units such as servings for food

It seems that a food's carbohydrates can on only be specified in units of 100g. In the US, at least, both commercial and home-cooked recipes usually specify carbohydrates per serving rather than per weight. While I could convert these foods over to 100g units, in many cases the actual weight of the food is unknown. I often don't travel with a scale to weigh my foods. A good compromise would be to allow us to just specify a per serving carbohydrate

Enhance food database search function

Currently the search function in the food database only searches for the (exact) titel. If I want to search for a brand, it has to be included in the titel to be found. I can also not do a fuzzy search, since it tries to match the precise string.

Example:
I want to find "Milchreis" from "Müller", so I search for "Müller Milchreis" ("Milchreis Müller" does not work).
I get a few results, which have that exact string in the title.
If I only search for "Milchreis" I get dozens of results, some from Müller (more than with the query above), some from other brands.

Feature: Diary table: distinguish basal and bolus

In diary view at the table below it would be helpful to split insuline into basal and bolus in separate rows (as they might act differently fast and long)

E.g. some slow basal insuline acting 12 hours is not what you want to see mixed with a fast bolus insuline acting 2 hours.

CSV export is missing tags

Even though the corresponding checkmark has been checked and tags are being exported to PDF, they are missing in the CSV export.

Feature: multi device / sync / online

have a possibility to access the user data from multiple devices (without need to always do manual backups).

If there would be a sync functionality, any storage could be used to achive this.

Button to jump to last entry of certain type

Currently, when I want to look at my last meal or insulin intake, I have to manually scroll and find the last entry myself.
Since there is room under the date on the lefthand side of the screen, I think adding buttons to jump to the last entry of blood sugar, meals, insulin, etc. would greatly enhance the handling of the protocol screen.

Insulin calculator

The app has all the data it needs to calculate the insulin needed for a given meal.
Currently I use Tasker to extract all values from the settings and UI to calculate my insulin.

A native calculator would greatly increase the usability and reduce errors.

Highlight manually added/edited food database entries

Currently I can not distinguish between entries from an online database (which might be wrong/not suiting my needs) and my own additions.
Since I do not want to add an indicator to the title myself (because I consider it a dirty workaround), I'd like to have something like a star or a plus sign behind the title or a bold font.

I think it would make adding food entries easier to manage.

Confirm button disapears in long meal lists

Diaguard 3.11.
Android 13 auf Galaxy A71

Der Bestätigungs Knopf rutscht bei längeren Mahlzeit Listen tief unter den Bildschirmrand und ist nicht mehr erreichbar.

Die Eingabe kann nicht bestätigt werden und wird nicht übernommen.

Mehr als zwei Einträge pro Mahlzeit sind nicht mehr möglich!

Custom categories

Currently Diaguard supports a fixed set of categories that are relevant for most therapies. Since therapies and people differ, it could be very helpful to support categories by allowing the user to add, edit or delete them on their own.

This issue includes a database migration from the current scheme of fixed categories to a more flexible scheme which supports dynamic categories. Futhermore this issue could be seen as a profi-feature and should therefore not distract from the previous handling of categories and measurements.

Make "activity" less ambiguous

I'd like to add "activity" like I can add food: As their own entries.
Currently I can only add "15 minutes of activity".

I'd like to be able to add "50 push-ups", "20 sit-ups", "30 minutes of chopping wood", etc.

Food database entries from external sources use "kJ" as "kcal"

I noticed that pre-filled entries from outside sources have wrong kJ/kcal values. When compared to the entry on openfoodfacts, it is clear that the app reads the kJ value as kcal, which is then converted back to a very high kJ value.

Example in the app:
"Apfel birnen saft naturtrüb direktsaft 100%" lists 736,4 kJ (176 kcal)

Entry on openfoodfacts lists 176 kj (42 kcal)
https://de.openfoodfacts.org/produkt/4388860589672/apfel-birnen-saft-naturtr%C3%BCb-direktsaft-100-rewe

Make dots in blood sugar curve optional

I own and use a CGM system and thus sometimes add a lot of entries in a short time span. This has the effect that I can no longer acurately see the curve because the dots overlap and hide the actual line.
Making the dots hideable would fix this issue.

Miscalculated sum of BE

There seems to be a calculation issue when adding 100g of "Joghurt, Vanille" and 200g of "Vollmilch, UHT", instead of adding up to 2BE they add up to 1.1

Export only "sober" bloodsugar levels (Nüchternzucker)

When exporting and printing my entries for my doctor, I only need the entries right before a meal intake. All other entries are just for me to be able to have a daily curve, but are uninteresting for others.
Is there a way to make the export customizable in such a way that only certain bloodsugar values are exported?

Add data field to record Ketones

Hello!
Thank you for the fantastic app, it has allowed me to drop support for my own one-man diabetes app (the only user was me).

I have a request that you add Ketones as an optional data point that you can log.

In the UK I measure them in mmol/L.

0.0 is ideal,
0.0 - 0.3 is ok
0.4 - 1.0 is bad
1.0 - 1.5 is worse, and
1.5+ probably requires urgent medical treatment.

Apologies if you already knew that; diabetes management varies around the world.

Ketone measurements are considered a core part of my management routine (if your sugars are high, or you are ill).

Improve data handling

It could be better explained how Diaguard handles its data, e.g. regarding the backup. When importing data, users could be asked whether they want to add this new to the existing data or to replace it all. When exporting data, date ranges could be defined. Additionally an in-app option for resetting all user data would be helpful for people who are not too familiar with the Android settings.

Undoing a delete of food entries in the log adds empty entry

Steps to reproduce:

  1. Add an entry with X grams of a food item, e.g. 200g of grapes
  2. Open the log and swipe the entry to the right
  3. When prompted, tap on "undo"

It will create the same entry as before, only stating that it has 0 BE. Closing and re-opening the app/log then shows an empty entry.

Allow precise bolus-factors

I'd like to be able to change my bolus factors in 0.25 steps. 2.75 gets rounded up to 2.8 though.
Allowing one more decimal place would not hurt the usability.

Recurring reminders

Currently the reminder serves as a short-term helper e.g. for checking the blood sugar shortly after a hypoglycemia. There is no option for a recurring reminder that repeats on a daily or weekly basis. This could be useful e.g. for checking the blood sugar after waking up or before bed.

Add Temperature Tracking

Request: Additional category for tracking temperature. Am currently using the 'notes' for this purpose.

Feature: second "blood sugar" value

Be able to enter a value for e.g. flash glukose.
Either as a new type or a second input for blood sugar.
this second value might not be needed for statistics, but for better understand a certain data point.

The other way round it would even be more realistic for CGM users:

  • first value flash glukose
  • second value (only in some cases checked): blood sugar

Add more limits for fine granular extrema

Currently there are only two limits: hypo- and hyperglycemia. It could be helpful to add more distinct limits in order to differentiate between light and severe hypo-/hyperglycemia.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.