NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.4k stars 1.14k forks source link

Web Service returning max of 1000 entries #1017

Closed dkmsoft closed 3 years ago

dkmsoft commented 5 years ago

I thought of writing a reporting module and PDF generation for xDrip glucose data (know you can do it via Nightscout but this would be for those not using any cloud service). Tried the API to the local web service and it will only return a max of 1000 readings (less than 4 days worth) using the 'count' option. I have also set 'all_data=Y'. The xDrip database contains many thousands of bg readings. Is this just an efficiency limitation? Any way around this?

jsPl commented 5 years ago

A 1000 is a pretty big record count for a response from a web service. I guess its intention is not to serve data for reporting. That said, you could modify app/src/main/java/com/eveningoutpost/dexdrip/webservices/WebServiceSgv.java, increase the limit and/or implement pagination and possibly other filtering.

dkmsoft commented 5 years ago

Thanks for response. Yes, clearly web server not meant for reporting as 1000 records gives less than 4 days so not nearly enough for reporting. There is no point in me modifying the source to create a special version - the reporting is not for me. It's only of use if every user out there has this in their version so has to be part of standard release. I now have a prototype working using the CSV export option but it's clunky as user has to execute a couple of manual steps. Still deciding whether to release.

k2s commented 5 years ago

@dkmsoft will you share your report generator ?

I think it should not be complicated to add export CSV to the webservice API and do pull request. After some time it would be merged into master and released in alpha versions.

dkmsoft commented 5 years ago

Yes, extending the web service API to export multiple days data in CSV or JSON format would be best way to go. My intention is to share report generator - just not sure how much demand there is for it and whether worth the effort. If you have a nightscout server and xDrip sending data to it (or to Dexcom server), then already have reporting facilites. This would be for other users (eg Libre/MM). The reports would be available to view on any device and also generate PDFs if so required. I may post something on xDrip facebook group to gauge interest.

k2s commented 5 years ago

I wonder why there should not be huge demand on it. Libre/MM are also able to use NighScout, but have to install and manage it.

let me know if you would be insterrested in any help from me

MasterPlexus commented 5 years ago

Please think also on some additional topics on that:

My points does not mean that I don't find your idea bad, and it could be a solution for those which don't want to establish a NS-Instance, or want to have a better control over the data. But at the end, it must be well tested, also on older phones, that those dataexports which will be run then in the background does not effect the xDrip-Stability.

k2s commented 5 years ago

@MasterPlexus ns.1be.de is not working.

I started to play with NS months ago and quickly added some information to reports that i was missing.

I paused my work on it because the missing BASAL information in NS and xDrip seams to me to be a huge show stopper and also my current knowledge about T1 is very limitted. This seams to be soon solved in xDrip soon by #973.

In compare to Medtronic, LibreView and also Tidepool portal I am missing in NightScout a one-click-report-everything function, maybe with some advices how to use it for newly diagnosed people.

And yes, I agree that downloading CSV data should be done sparingly, by users request and protected from unwanted requests.

One is for sure: it is amazing what the community is able to build and share with others.

MasterPlexus commented 5 years ago

@k2s: did you know this tool: https://nightscout-reporter.zreptil.de/beta/ This is just a "one-click" solution for nice reports, based on the data wich are stored in Nightscout.

Navid200 commented 3 years ago

A benefit of Nightscout, other than reporting, is to have a repository of blood glucose readings. Whether it is Nightscout or any other form of repository, having one is a very good idea.

If you just want to create a report, you can easily generate images from the xDrip statistical pages and import them into your favorite word processor to create a report.

Navid200 commented 3 years ago

Closing due to inactivity