Storing items in a symptom diary

Hi all,
I am making an app to track symptoms and triggers for a chronical illness.
I would like to get so far that I can make a csv or pdf-file from the data that are entered in the app.
Now I am using TinyDb to store the input, but how can I make sure that the stored data is under the right 'tag'.
I mean that I can have a csv file with the date, the different symptoms etcetera..
I was thinking about lists, but this is like chinese to me. Can somebody help me?

This is an example of how the symptom selection works right now.

Provide an example of the data you wish to store and how you would like it to look when exported to a csv file.

I would like to store data like date, location (which is an image from a canvas), painscore, kind of pain..
Here is an example of a excel file to which the csv file needs to be converted after download.

Do you want to store the file path for the image or the actual image (you cannot store a binary image in tinydb but you could convert to base64 string (1.3 x the size of the image)) ?

I would like the image, or if that is not possible, I would like categories of coordinates of the image. for example: the image is a human body, if the position that had a circle drawn in the app is around the belly, i could possibly make a categorie for that position.. (I think, I am a beginner)

Something like this ?

(these should be draggable to your project)

You should be able to see how you can use the outputs to recreate the circle position.....

bodyCircle.aia (15.5 KB)

Yes exactly like that and that I would like to save together with the other data en the date and to be able to retrieve a csv file after a period of time

OK, you could go straight to storing a list of lists in tinydb, this then simplifies the extract to csv for Excel.

I will put together a quick example

Something like this:

In this way, you keep the tinydb synchronised with your in app recordsList.

When you return the value of records from the tinydb, you should get a list of lists (like a csv table) that you can work with and convert to a csv table for export to file.

I believe this is a better method that saving each record directly to file.

Thank you very much for the help !!

One more question, if I for example set the date in Screen1 and the symptoms in Screen2. Is this also possible?

You can pass the date as a separate tinydb tag/value to Screen2, get it before building your record.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.