Giter VIP home page Giter VIP logo

freestyle-libre-parser-viewer's Introduction

Abbot FreeStyle Libre flash glucose meter Parser/Viewer

Objective

Create a library to read and manage TSV files created by the FreeStyle libre app to better understand and visualize the report data

How to install

npm install

How to use the Viewer (user)

Mount a local web-server (for example using node's http-server) and browse to the index.html (for example http://127.0.0.1:8080/index.html) to open the main view that lets you import a tsv file generated from the Abbott FreeStyle Libre app (or use the test.tsv example file) and visualize the data in the HighChart chart.

How to use the FreeStyleLibreLib (developer)

var reader = new FileReader();
reader.readAsText(file);
reader.onload = function() {
    var report = FreeStyleLibreLib.parseReport(reader.result);
}

TSV File Format (Tab separated values, like a CSV but with tabs)

This is the format of the exported file generated by the Abbot FreeStyle Libre app when running the File->Export Data menu option with the meter connected.

  • Line 1:
    • Patient name
      • this non-standard tsv line, break standard parsers
      • (Is this line optional?)
  • Line 2:
    • Headers
      • ID
      • Time (Is YYYY/MM/DD HH:mm the only possible date format?)
      • Record Type
        • 0: Historic Glucose
        • 1: Scan Glucose
        • 2: ?
        • 3: ?
        • 4: Insulin (Need to read if Rapid-Acting Insulin (units) or Long-Acting Insulin (units) has data to know witch is witch, probably appies to the "non numeric" ones too, but is not tested)
        • 5: Food
        • 6: Date change (Not implemented)
        • Is there anything beyond type 6?
      • Historic Glucose (mmol/L)
        • Does the column name change if the meter units are not mmol/L?
      • Scan Glucose (mmol/L)
        • Does the column name change if the meter units are not mmol/L?
      • Non-numeric Rapid-Acting Insulin
      • Rapid-Acting Insulin (units)
      • Non-numeric Food
      • Carbohydrates (grams)
      • Non-numeric Long-Acting Insulin
      • Long-Acting Insulin (units)
      • Notes
      • Strip Glucose (mmol/L)
        • Does the column name change if the meter units are not mmol/L?
      • Ketone (mmol/L)
        • Does the column name change if the meter units are not mmol/L?
      • Meal Insulin (units)
      • Correction Insulin (units)
        • It seems that this is not used for insulin units
      • User Change Insulin (units)
        • It seems that this is not used for insulin units
      • Previous Time
        • For Record type 6
      • Updated Time
        • For Record type 6
      • Are these all the possible columns?
      • Can the columns have another name if the meter or app is set up in other language?
  • Lines > 2
    • Data

How it looks

Alt text

freestyle-libre-parser-viewer's People

Contributors

nahog avatar stuzog 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freestyle-libre-parser-viewer's Issues

Getting the tsv

Hey! Nice project you have here. I was wondering how you get the tsv data off of the libre for use with this?

Errors when parsing TSV file

Hi, thanks a lot for this project, it is really useful.
I was getting some errors when importing my TSV file, and after debugging and making some changes in the file structure, I realized that it fails in the following cases:

  • If the TSV file is generated from an FSL that is configured in a language other than English
  • If the TSV file does not have any food records
  • If the TSV file does not have any insulin records
  • If the TSV file contains the national identification number (in my case is a DNI number from Argentina, I have no idea if this is standardized across all countries). This data is in the second line, before the header and after the patient name

Note: I use the FSL only for glucose measurement but I don't usually use it to record any other data.

Fragment from my TSV file:

Carlos Bertinci
# 12345678
ID	Hora	Tipo de registro	Histórico de glucosa (mg/dL)	Escaneo de glucosa (mg/dL)	Insulina de acción rápida sin valor numérico	Insulina de acción rápida (unidades)	Alimentos sin valor numérico	Carbohidratos (gramos)	Insulina de acción prolongada sin valor numérico	Insulina de acción prolongada (unidades)	Notas	Glucosa de tira (mg/dL)	Cetonas (mmol/L)	No corresponde	No corresponde	No corresponde	Hora anterior	Hora actualizada
16140	2018/06/19 03:16	0	154															
16145	2018/06/19 03:33	0	151															
16146	2018/06/19 03:48	0	155															
16147	2018/06/19 04:03	0	182															
16148	2018/06/19 04:18	0	196															
16149	2018/06/19 04:33	0	187															
16150	2018/06/19 04:48	0	169															
16151	2018/06/19 05:03	0	162															
16152	2018/06/19 05:18	0	159		

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.