How do I add different information on each item in list? (Make a patient database)

I am making an app for therapists to store information for each their patients. I made a list so that users(the therapists) can add their patients but i want them to be able to click each patient to retrieve the related clinical information. Now I am trying to enable the therapists to edit the information and save it for each patient seperately. Can anyone help me achieve this. thank you so much


The tutorial described in the following link a 'simple' medical storing app for patient information. It uses a TinyDB for on device storage but can be modified easily to use a CloudDB or a FirebaseDB. You may find it useful for your app design and be able to adapt it for your purposes.

One of the best ways to manipulate data using a flat database (nonSQL) is to use Lists to do the heavy lifting. Here is a great tutorial by Sajal List Blocks On App Inventor that explains how you can edit, store, add and remove data from a database by using a List of csv .

Does this help information help?

Here is a general purpose Tinydb editor app that you can repurpose, if you use the right tag structures.

Sample tags/values:

/Patients/ABG/Symptoms/Delusions of being able to code
/Patients/ABG/Sessions/2021-03-14/Attempted to answer an AI2 help post

thank you so much for your reply. I am trying to code this at the moment. i was just wondering what are the block(s) after "intialize duplicatePatient" and the other variables. Thank you.

Do you mean the Blocks in Screen1.Initialize event? That is a temporary sample database.

Perhaps you mean the Procedure isitADuplicatePatient. The Procedure is called in Button4 (addPatient)The Button is used to enter new patients but the code first determines if the name you enter for a new patient is a new name or a duplicate. isitADuplicatePatient looks through the entire patient List looking for the name you enter; if it finds the name, it notifies you that you cannot use that name again. The procedure prevents duplicate patients.

Is that what you wanted to know? Experiment and see what the app does? This tutorial is not beginners code and most things are not explained in detail. Ask a specific question, I or someone else are happy to help. Some of this you need to figure out and you can do it using these resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here and the aia files for the projects in the book are here:

How to do a lot of basic things with App Inventor are described here: .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials.

Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU

thank you so much for guidance and help.
Sorry for being unclear but i cant figure out what block to put after "initialize global name to". i have attached a picture. thank you.


These are the required starting values. I do not know where you found a Patient_name Block. There is a disabled block in the Blocks editor called patientName, but the Block is disabled and is not used in the final example app.

Thank you so much! This has helped me a lot.
oh and i forgot to ask what will the Recordindex variable be.

thank you so much for your reply regarding the variables.
i forgot to ask what the recordindex variable will be.

:cry: all this information is available in the aia file; you can load the aia and see all the Blocks in the Blocks screen.

What you would find :

I hope all this helps.

yes it helps enormously.
thank you so much.

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