Added support for min/max values for record fields, applies to vital signs only for now.
Added cached store of record types on device along with basic metadata information to speed up chart filtering and creation. The schema for the cached value is:
{
"encryptionInfo": <the same key/iv stored by the regular record store>
"hash":
"time":
Moved the add records button up to allow for more records to be added without hiding the button.
Added the View Charts button:
takes you to a screen where you can select the time frame you'd like to investigate. Vital records is currently the only supported record. Validation is added to ensure the time frame is valid.
Generate Chart button attempts to generate a chart for that time frame:
if the cached store cannot be found for that record type an alert is thrown.
if there are no records of that type in the given time frame an alert is thrown.
generates a chart with all fields of the record WIP
Bugfix:
If you try to decrypt more than one record at a time you'd hit a URI exception because the md5 file name would often collide. Changed the md5 name to be based off a snowflake id rather than the current time.
Issues concerning the graph:
Phone width is limiting the ability to display date/time information on the x-axis, possibly having multiple records on the same day means we can't just have each tick represent one day on the x-axis
Multiple units on the same graph can be confusing. Two y axis can be used, or we can just make a separate graph for each type of unit (eg, one graph for blood pressure (diastolic/systolic) and one for breathing). Maybe just a button to toggle between them rather than being able to hide/show in the legend?
Legend is difficult to fit due to size constraints.
We could allow horizontal scrolling for the graph, but that might appear to be messy. Wanted to get opinions on it.
Changes in this PR:
New record type, Vital Signs:
Added support for min/max values for record fields, applies to vital signs only for now.
Added cached store of record types on device along with basic metadata information to speed up chart filtering and creation. The schema for the cached value is: { "encryptionInfo": <the same key/iv stored by the regular record store> "hash":
"time":
Moved the add records button up to allow for more records to be added without hiding the button.
Added the View Charts button:
Bugfix: If you try to decrypt more than one record at a time you'd hit a URI exception because the md5 file name would often collide. Changed the md5 name to be based off a snowflake id rather than the current time.
Issues concerning the graph:
We could allow horizontal scrolling for the graph, but that might appear to be messy. Wanted to get opinions on it.
@nosequeldeebee @grcevski