Git Product home page Git Product logo

libreview_to_applehealth_converter's Introduction

LibreView_to_AppleHealth_converter

Converts a CSV export of blood sugar levels from LibreView into a format that can be imported into the Apple Health app with Health CSV Importer.

Recommended general settings / assumptions

  1. In the LibreView account settings preferences set the following:
    • Blood Glucose Units to mmol/L
      • You could use mg/dL for import and export, by setting the relevant header name to Blood Glucose (mg/dL) in the conversion script
    • Date Format to Day-Month-Year
    • Time Format to 24-hour
    • Language for UI to English (this affects the decimal point of the exported CSV)
  2. The CSV file is expected to have been exported today (thus have today's date within its name, in DD-MM-YYYY format).

Specifics when running on iOS

  1. INPUT_DIR: The CSV to convert is expected to be in the iCloud drive, within the Pythonista 3 folder.
  2. You need to set LIBRE_VIEW_USER to your LibreView name within the conversion script. It's usually of the form FirstnameLastname.
    • Or make sure your LibreView name expands to mobile (by setting First Name to mob and Last Name to ile for example).
  3. OUTPUT_DIR: This will also be the Pythonista 3 folder within your iCloud drive by default (it'd be a bit of a PITA to use local folders).

Specifics when running on macOS

  1. INPUT_DIR: The CSV to convert is expected to in the Downloads folder in your home directory.
  2. OUTPUT_DIR: This will be the Pythonista 3 folder within your iCloud drive by default. Set to something else if you like.

Then export, convert and import your data

  1. Export your blood sugar levels from LibreView, by clicking Export Patient's Glucose Data in the bottom right of your measurements, to the INPUT_DIR as per above.
  2. Run the conversion script convert_LV_export.py on a device of your choice.
    • You could use Pythonista 3 to run the conversion script on your iPhone.
    • To run it on a Mac, cd to the script's directory and run it with ./convert_LV_export
      • You may need to install python3, for example with Homebrew.
  3. Use Health CSV Importer on your iPhone to import the converted CSV (named YYYY-MM-DD_blood_glucose.csv in the OUTPUT_DIR of your choice) into the Apple Health app.

Limitations

  • The conversion script does not remember the last exported data point, and will always convert the full set.
    • The importer will remind you to delete previously imported data before importing a new full set, as you'd get duplicate data in Apple Health otherwise.

libreview_to_applehealth_converter's People

Contributors

shrugalic avatar

Stargazers

 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

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.