Uploading Data (Re-visited)

6 posts, 4 contributors

Search the DAFNE Online Forums

 
gab DAFNE Graduate
Hertfordshire DAFNE Centre
2 posts

Hi there

I am relatively new to this site, and was checking the forums to see what others are doing.
I wanted to see if it was possible to upload data direct to the site, instead of typing it all in manually.I have read the older posts made by NiVZ concerning uploads, but this was using OneTouch meters, and trying to read the meter contents directly from this site.

I have an Abbot Freestyle InsulinX meter, which allows connection via USB. It contains in-built self installing software which allows you to change the meter settings and create reports.It also allows direct export from the meter, where it produces a text file with all readings, carbs, QA and BI doses, including corrective doses and manual corrections (Tab delimited). The contents of the file are far more complex than necessary for upload, but could easily be trimmed, modified and presented as an uploadable text file.

I have already developed software with Visual Basic 6 (Windows platforms only. 95/98/2000/Vista/7, Not tested on Windows Eight [using figure eight posts a smiley: 8]) to filter this file, and store only the required values in an Access database (DAO 3.6, compatible with Office 2000 onwards). The meter file always has the full set of values from the first use onwards, so when later files are produced, the software ignores values already stored and updates only the new data. Internally the meter works with the US units so has to be converted to read mmol as used in the UK. The comments you can store on the meter are only a list of pre-defined comments, so fairly limited. By storing all the values in a database, this can then be edited to add more meaningful comments if required.

I developed the software to allow me to print a sheet of values in the same format as used in the DAFNE course for presenting to my GP or at post-DAFNE re-unions. At the moment it prints using VB's inbuilt Printer object, but I intended to automate Excel from within the software to produce a fully formatted worksheet at some point. I then started to use this site, and realised there was no need, as I could store everything here and print directly!

The InsulinX meter is an excellent piece of kit, allowing you to use all the information, targets, ratios and calculations used by DAFNE.Once set up, it calculates dose based on the carbs you are about to consume, your ratio for that time of day, and any corrections needed for BG out of range at that time. Background Insulin can be input manually at the time of injection. By using this meter all the information used on this site is stored at the time of use, and it is easy to go on without recording this information externally, either in a log book, or here. I tend to log on here every few days and manually go through the meter to enter all the data.

If it were possible to upload directly, this would be great.

In the meantime I will experiment with using the Windows SetCursorPos and GetCursorPos api's and VB's SendKeys function to see if I can fill in the "Add multiple entries" grid programmatically.

Anybody familiar with VB6 I will happily send you the source code produced so far

marke Site Administrator
South East Kent PCT
662 posts

Hi,
There IS a way of interfacing to the site directly to upload your data, I won't bore everyone with techno-babble so if you email us using the 'contact DAFNE Online' at the bottom of every page we can help. I one day hope to write a programme that allows lots of different meters to be interfaced to the site to upload data. It the moment I am bogged down in updating the Oz handbook and have not had chance to progress this at all. In the meantime I am more than happy to try to provide you with assistance to interface what you have written to the site.

Simon Site Administrator
Sheffield Teaching Hospitals
559 posts

Mark, are you talking about the REST services? That's one way to do it - we could also look at the possibility of users uploading a CSV file as described by gab above.

marke Site Administrator
South East Kent PCT
662 posts

I said I was not going to bore people with techo-bablle Laughing Yes I am referring to REST. I think csv would be too complicated to implement on the server side in terms of validation. Its possible but I would be concerned about the damage that could be done with a csv file.....

gab DAFNE Graduate
Hertfordshire DAFNE Centre
2 posts

I will compose an email shortly with all the details as suggested.
I am researching the use of REST with VB at the moment, so there should not be any problems with that method. I found a snippet already which looks promising:

You'll need to add a reference to the MSXML library:

Set sUrl = "http://my.domain.com/service/operation/param"
Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "POST", sURL, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send()

Dim response As String = xmlhttp.responseText

Warwick DAFNE Graduate
Diabetes Australia-Vic, Melbourne, Victoria
389 posts

It would be fabulous to have this feature. I'm so used to using the DAFNE website for entering my values, but having recently been given an AccuChek Expert meter (it was a tough choice between that and the Insulinx), being able to import readings, insulin intake and carb intake directly from these 'smart' meters would a huge time saving.

At the moment, I import the meter readings into the proprietary software, and then manually enter the info into the DAFNE site, but it takes about 15 minutes per day, and I'd love to knock that down to just a couple of minutes.

Still, given that I live in Melbourne, I am all for improvements on the Oz handbook too :-)

Thanks to everyone on this thread for your hard work. It is much appreciated.

Best regards,
Warwick.