Diabetes Glucose, eAG, HbA1c Calculator

Just gauging interest.

Glucose to Estimated Average Glucose to HbA1c and All Cause HbA1c Mortality Hazard Ratio Calculator. iPhone App.

image

Around 15% of my practice population are diabetic.
Quite a few aren’t great with getting their HbA1c or blood sugar diaries done.

Sometimes the last HbA1c will be a year old, and I have to rely on a single finger prick BSL to give me the vaguest idea of whether things are better, worse or the same.

It’s obvious that there are huge caveats to converting a single or sparse number of blood glucose readings to an HbA1c, but sometimes it’s all we have. And about 1:100 requests, I get a blood sugar diary, or someone brings their machine in, and I like to try to get an idea of where their HbA1c might be.

I also find it useful to remind me what glucose readings correspond to a given HbA1c.

You can enter a list of glucose readings (the average disregards the temporal spacing of readings) or an HbA1c and get the corresponding conversions. I’ve also noticed that there are a few Americans about who still use units like ounces per bushel, so it will convert between mg/dL and mmol/mol. Also, for the old duffers, there’s old timey HbA1c in % to HbA1c mmol/mol.

Cheers.

I can see how it could be useful for @general-practitioners and maybe for @endocrine-physicians and @endocrine-interest. Anaesthetists can refuse to anaesthetise without the HbA1c (love the power) so not a big prob for us.

Technical advice:

Do it as a progressive webapp, not an iOS/Android app. Way more flexible, and can be one-click linked to from desktops as well as doing the funky API thing.

Please do this as an API first. We have to move forward the state of the art in medical tech by providing web services that wrap clinico-technological problems like this in a simple API.

I’m doing similar work with the RCPCH in the UK on growth charts via API and trying to spread the word on this approach.

Once you have an API, then client apps can be many and varied and they will all output the exact same answer.

Very happy to help and advise with building the API, and wrapping the API in the API management layer.

Ok. Let me know what the hooks are for integrating.

I’m guessing if web app based, then Java, PHP, Python?

Been a little while since I used PHP, never used Java, Python is pretty similar in syntax to Swift, so that would be my favoured option.

Only other things I know off the bat are C and a dimmish memory of Objective-C.

Send me a personal message with your email address and we can discuss.

I did start on a growth chart app, the main requirement for input as far as I can see is the patient’s DOB and the current date, with automatically derived age in days, so GPs don’t have the additional step of having to calculate age via calendars.

I have run some polynomial regressions on WHO growth chart data, and I’m pretty sure I can get an R^2 of 1 with polynomial splines of about 8th order.

I’m pretty happy with the mathematical side of doing these calculators, I find it relatively straightforward, the hardest bit is validating user input to cover nonsense inputs.

It’s early days for the growth chart API, we are in pre-alpha really at the moment. We open sourced the work over the last weekend.

Growth charts are simple mathematically. Where it gets gnarly are the edge cases: gestational age correction, determining what ‘term’ is and what value should be returned for babies who are term, and (in the UK) managing the transition between the WHO and UK90 data tables. (You wouldn’t need that last bit in NZ)

We have aimed this work at a UK use-case, so the API returns WHO/UK90 data. We could change this and make a new endpoint which returns plain WHO data for international use, but we’d need funding for this to flow from either the API revenue, or a commission.

@Mattbrook, have you looked into providing point-of-care HbA1c testing in your practice? Having the ability to do a simple fingerstick and get laboratory accurate HbA1c results in a few minutes might be something to consider. At least you will then be able to discuss the current HbA1c results with your patient at the time of the consultation. This streamlined consultation process is super convenient for patients and has been linked to improvements in patient satisfaction and motivation to self-manage their condition. Happy to discuss further. Regards, Susan Martland

Very good plan. Thankyou.

Good thoughts, thanks.