health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] MyGNUHealth: Import recordings - first test results


From: Luis Falcon
Subject: Re: [Health-dev] MyGNUHealth: Import recordings - first test results
Date: Wed, 21 Jul 2021 14:00:12 +0100

Hi, Mat!

Thank you for testing and for such a detailed description!

Some comments inline

On Wed, 21 Jul 2021 13:36:19 +0200
Mat Knoll <research@aeyon.de> wrote:

> Hi Luis,
> 
> As promised I tested the import-script mygh_import_readings.py (more 
> from a user perspective, not a developer perspective). Test system is 
> Arch, latest version with Plasma (KDE) running.
> Imported values are bp and hr (14 lines): 4 records as of 2020-01-04,
> 5 records as of 2020-01-05 and 5 records as of 2020-01-06
> 
> Preparing Steps:
> - Update to version 1.0.2
> - Backing up ~/mygh and starting with a fresh config (only user data,
> no medical recordings)
> 
> Test results:
> - When accidentally incorrectly formatting date or time the
> respective line is skipped ("Error on the date or time: Skipping...")
> 
Great! Worked as expected :)

> - When omitting the date, an error occurred and nothing is imported: 
> "Error in date: Skipping line x" where "x" is the row that does not 
> contain a date record
>
> - When (accidentally) inserting an empty row (even at the end of the 
> csv) an error occurred:
> Traceback (most recent call last):
>    File 
> "/home/USERNAME/.local/lib/python3.9/site-packages/mygnuhealth/mygh_import_readings.py",
>  
> line 146, in <module>
>      parse_values()
>    File 
> "/home/USERNAME/.local/lib/python3.9/site-packages/mygnuhealth/mygh_import_readings.py",
>  
> line 100, in parse_values
>      vdate = line[0]
> IndexError: list index out of range
> 

Will fix :)

> - With correct date and time all 14 bp and hr values are imported 
> without errors. Sample console log record (last insert):
>   Inserting into DB <Table name='bloodpressure', total=13, 
> storage=<tinydb.storages.JSONStorage object at 0x7fdf8f061730>> 
> {'timestamp': '2020-01-06T21:06:00', 'event_id': 
> '8680af83-dc55-4b1d-a99d-cc38eade891c', 'systolic': 133, 'diastolic':
> 88} Saved event {'timestamp': '2020-01-06T21:06:00', 'event_id': 
> '8680af83-dc55-4b1d-a99d-cc38eade891c', 'systolic': 133, 'diastolic':
> 88} Inserting into DB <Table name='heart_rate', total=13, 
> storage=<tinydb.storages.JSONStorage object at 0x7fdf8f061730>> 
> {'timestamp': '2020-01-06T21:06:00', 'event_id': 
> '8680af83-dc55-4b1d-a99d-cc38eade891c', 'heart_rate': 72}
> Saved event {'timestamp': '2020-01-06T21:06:00', 'event_id': 
> '8680af83-dc55-4b1d-a99d-cc38eade891c', 'heart_rate': 72}
> 

Excellent!

> One more little thing:
> Typo found in header of sample_reading.csv: date(yyymmdd) - y is
> missing
> 
Yes :)

> Possible issues/problems/limitations:
> - The bp/hr card correctly shows the last imported value. However,
> when viewing the chart strange x-axis values are shown (screenshot is 
> available, but I'm unsure if I could attach it here). The result is 
> unchanged (again strange x-axis values) if import is limited to one 
> value per day.

Please do, we can see what's going on... sometimes, when there is little
data, matlotlib takes the hour of the day, instead of showing the whole
date, but I don't know whether that's the case.

The best is to upload the screenshot to imgur and provide here the
link :)
 
> 
> Suggestion:
> I have a lot of test data that records the values individually per 
> column (>1500). I know this is a fundamental design aspect and
> certainly there are very good reasons for the current design, however
> would it be conceivable to separate the two values systolic and
> diastolic by comma? Otherwise I need to write a small macro to merge
> the two columns using the "/" separator. Possibly not only my import
> data is stored in separate columns?

We can do that by having two columns (one for systolic and another for
diastolic).

We could have both in one column, but then we need to enclose it in
quotes, (eg, "120,74") because we are dealing with CSV files. Both
possibilities are OK.


> 
> When a decision is made on how to proceed, I prepare the test data 
> accordingly and test further cases (invalid values etc.)
> 
> I hope I was able to support. If there are any questions, please do
> not hesitate to contact me.
>

Thanks a lot again for testing, and let us know your thoughts!

All the best,
Luis
 
> Best,
> Mat
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]