{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Units","llmstxt":{"hide":true}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"units","__idx":0},"children":["Units"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Platform does not mutate data. Rather, data is read from diabetes devices and stored in near original form while still translating into the standardized Tidepool data model."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An exception is made, however, for blood glucose data. Tidepool has chosen to store blood glucose data in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mmol/L"]}," units only. Tidepool chose mmol/L because it is the standard for international research and because, as a floating point number, it can be converted accurately to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mg/dL"]},", which is typically an integer."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Event types that include a blood glucose value or blood glucose-related value (such as an insulin sensitivity factor) must also have a units field specified – either mg/dL or mmol/L. When that field is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mg/dL"]},", upon its ingestion through Platform, the value is converted to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mmol/L"]},", the units field updated accordingly and the event is stored."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The algorithm followed for conversion of blood glucose/related values from mg/dL to mmol/L is:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If units field is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mg/dL"]}," divide the value by 18.01559 (the molar mass of glucose is 180.1559)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Store the resulting floating point precision value without rounding or truncation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The value has now been converted into ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["mmol/L"]}]}]}]},"headings":[{"value":"Units","id":"units","depth":1}],"frontmatter":{"seo":{"title":"Units"}},"lastModified":"2023-02-09T20:41:39.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/device-data/units","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}