Roadmap to an open source artificial pancreas & diabetes monitoring with Flask

#WeAreNotWaiting

$whoami

Diana Rodríguez 

Google Developer Expert

Auth0 Ambassador

Microsoft MVP 

🐍 Developer Advocate @ Vonage

GDG Durham Organiser @ gdgdurham

🦊  https://gdgdurham.org

🐦  @cotufa82 | https://superdi.dev

 

 

 

@cotufa82

DIABETES

@cotufa82

WHY ALL THIS FUSS?

RUNNING AN AUTOMATED PROCESS MANUALLY WITH THESE GUIDELINES

@cotufa82

HOW? MORE CONTEXT PLEASE....?

@cotufa82

@cotufa82

USING TECH FOR GOOD CAUSES

@cotufa82

1. Monitoring

@cotufa82

  • Web-based CGM (Continuous Glucose Monitor)
  • Glucose data in real time! - Values are predicted 30 minutes ahead using an autoregressive second order model.
  • Server reads a mongoDB containing data from your sensor
  • Alarms are generated for high and low values
  • FOSS!!

CONTEXT

2. Automating

@cotufa82

OpenAPS

(Open Artificial Pancreas System)

The Open Source Artificial Pancreas System (OpenAPS) is a safe but powerful, advanced but easily understandable, Artificial Pancreas System (APS) designed to automatically adjust an insulin pump’s insulin delivery to keep blood glucose (BG) in a safe range at all times. It does this by communicating with an insulin pump to obtain details of all recent insulin dosing (basal and boluses), by communicating with a Continuous Glucose Monitor (CGM) to obtain current and recent BG estimates, and by issuing commands to the insulin pump to adjust insulin dosing as needed

@cotufa82

"As of July 13, 2020, there are more than (n=1)*1,957+ individuals around the world with various types of DIY closed loop implementations (that we know of). This number continues to grow, as does the number of options for various types of DIY closed loops!"


OpenAPS


My (your)
Contribution

FLASK IN ACTION

+

THE PROBLEM

👂🏼

😴

🚫

🧐

HOW?

3.9 mmol/L
or
 70 mg/dl

🚨⬇️🚨

10 mmol/L
 or
 180 mg/dl

🚨⬆️🚨

📲

THE SOLUTION

    <head>
    <link rel="stylesheet" href=
      "{{ url_for('static', filename='css/materialize.min.css') }}">
    {% block head %}{% endblock %}
    </head>
   

layout.html

{% extends "layout.html" %}
  {% block head %}
  <script src="https://apis.google.com/js/platform.js" async defer></script>
  <meta name="google-signin-client_id" content="{{ client_id }}">
  {% endblock %}
  

login.html

@app.route('/login',methods=["POST"])
def login():

app.py

#TECH4GOOD CHALLENGE

@cotufa82

$resources

  • Sarah Withee @geekygirlsarah
  • Scott Hanselman @shanselman
  • https://nightscout.info
  • https://openaps.org

https://superdi.dev

MUCHAS GRACIAS!!

@cotufa82

https://superdi.dev

https://slides.com/superdiana/diabetox

Road to an open source artificial pancreas

By Super Diana

Road to an open source artificial pancreas

  • 1,325