Add infinite records of a patient

Hello. I have an app to track my patients pain after surgery. After i add the patient to the app, i have created action buttons called Day1, Day2, Day3, and every day i click on the corresponding day to record patient's pain. When the patient has no pain, is discharged and disapears from my app list.

In my table I have the variables pain_day1, pain_day2 and pain_day3.

My question is that since some patients may need more than 3 days of records, is there any way to create only 1 action button called "Add new pain record" that would add one more variable automaticaly with the pain score for that day? 

I am asking this because the way i made the app seams to me too hardcoded and I believe there must be a much smarter way.uda_g.png

 

PS: on that image, please ignore the Disappear and the red rectangle and where it's Dia it means Day in english.

Thanks

Solved Solved
0 2 149
1 ACCEPTED SOLUTION

You want to create a Parent/Child relationship where your Patient table is the parent and the Days table is the child where you record the daily Pain assessment.  Add a new table named Days and give it the columns of - ID, Patient, Day, Pain and any other data you wish recorded here.  Set the Patient column as a Ref type column with the table being the Patients table and turn on the "Is part of" property.  In your Patient Form View and the new automatically created column named [Related Days] to the column list.

This setup will automatically shown an Inline table in your Patient Form view with a 'New" button.  Tapping new will open a Days form where you can record the Day and Pain information

I hope this helps1

View solution in original post

2 REPLIES 2

You want to create a Parent/Child relationship where your Patient table is the parent and the Days table is the child where you record the daily Pain assessment.  Add a new table named Days and give it the columns of - ID, Patient, Day, Pain and any other data you wish recorded here.  Set the Patient column as a Ref type column with the table being the Patients table and turn on the "Is part of" property.  In your Patient Form View and the new automatically created column named [Related Days] to the column list.

This setup will automatically shown an Inline table in your Patient Form view with a 'New" button.  Tapping new will open a Days form where you can record the Day and Pain information

I hope this helps1

Perfect! It woked seamlessly

Top Labels in this Space