Samuel Edusa MD
Contributing to the Pancreas Digital Open Source Insulin Bolus Calculator
Samuel Edusa | Sept 17, 2022
During this year's Cognizant Softvision Programmers' Week conference, I listened to a very inspiring presentation from an Argentine software engineer about a project he had started to assist in calculating the dosage of insulin for his son, who had recently been diagnosed with Type 1 Diabetes mellitus (T1DM).
About the Pancreas Digital
Pancreas Digital is a non-profit organization based in Buenos Aires, Argentina, that focuses on diabetes technology, manages an open-source insulin bolus calculator, and plans online workshops hosted on YouTube.
About the Open Source Insulin Bolus Calculator
The Pancreas Digital Insulin Bolus Calculator uses a standard formula that matches the meal insulin to the patient's carbohydrate intake (carbohydrate counting). A deployed version (online version) of this calculator can be found here.
My first contribution
My first contribution was to implement Internationalization (i18n) in the project (i.e. adding support for local languages and cultural settings) in order to allow for more broader personal use. You can check out my pull request (PR) here.
Tasks completed
- Added i18n which is supported out-of-the-box by Next.js.
- Added support for the english language
en-US
. - Translated the Disclaimer text (which runs when the app is first run).FNext
- Translated the labels & input fields on the calculator page.
Spanish version of the Pancreas Digital Insulin Bolus Calculator
Translated version of the Pancreas Digital Insulin Bolus Calculator
- Changes made to
next.config.js
file to enable the out-of-the-boxi18n
support in Next.js
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants'); module.exports = (phase) => { return { env: { siteUrl: phase === PHASE_DEVELOPMENT_SERVER ? 'http://localhost:3000' : 'https://pancreas.digital', siteTitle: 'Pancreas Digital - Calculadora de bolos', siteDescription: 'Calculadora de bolos de insulina para el control de la diabetes.', siteLogo: 'Vertical.jpg', siteName: 'Pancreas Digital', twitterCard: 'summary_large_image', twitterImageAlt: 'Pancreas Digital Logo', twitterSite: '@fedemotta_', }, reactStrictMode: true, i18n: { locales: ['es-AR', 'en-US'], localeDetection: true, defaultLocale: 'es-AR', }, }; };
- All the other code changes can be found in the Pull Request (PR) Feature/6 Implement i18n in the insulin bolus calculator #7.
Future contributions
- Improving input field validations.
- Investigating further the effect of dietary fat and protein on the rise in basal glucose levels, as well as the possibility of enhancing the algorithm for insulin bolus calculation to include all three variables (carbohydrate, fat and protein).
- Translating the application into other languages, e.g. French, German, Ukrainian, Swahili, etc.
- Nightscout integration. Nightscout is an open-source cloud application used by people with diabetes and parents of kids with diabetes to visualize, store and share the data from their Continuous Glucose Monitoring (CGM) sensors in real-time.
References
- Schmidt, S., & Nørgaard, K. (2014). Bolus Calculators. Journal of Diabetes Science and Technology, 8(5), 1035–1041. (View paper)
- Pesl, P., Herrero, P., Reddy, et al. (2016). An Advanced Bolus Calculator for Type 1 Diabetes: System Architecture and Usability Results. IEEE Journal of Biomedical and Health Informatics, 20(1), 11–17. (View paper)