Multiple Similar Operations for a row in a table

Hello Gliders. Need some help in designing table. I need to store the data of patients in a single row and I find the best way to make modifications easier.

For eg : Lets say each patient’s data is being recorded for every organ. There are 20 organs - Brain, Heart, Lungs, Stomach etc. And each organ has 6 metadata - Front, Back, Top, Bottom, Left, Right. So there are 6 x 20 columns for each patient (Brain/Front, Brain/Back, Brain/Left, Brain/Right etc… ).

If I have a container component for each organ and its metadata, and to calculate the visibility for each organ to show on UI, I have to create 20 more computed columns to set visibility. Is there a way to have 1 logic and repeat this for 20 times depending on the organ?
Currently I have to create 20 columns for 1 functionality - visibility. If there are 5 functionalities for each organs (say IsVisible, IsGood, IsTreated , IsSuccessful, IsNormal etc) I need 20 X 5 = 100 columns. If there is some logic change, I have to keep repeating the change 20 times. Whats the best way to do this ?

Few other challenges that I face :
If I want to reference those 20 x 6 columns in another table, I have to re-create those column lookups
Cant duplicate multiple columns - Even though I have grouped it with ‘/’ in table name
Cant delete multiple columns

I’m fairly new to Glide and any ideas are appreciated.

You can’t do this as of now.

Can you tell us more what decides if a component should be visible or not? It sounds like you can group them into a container, but it might be more complex than I think.

For visibility - If one of the values of the meta data is updated, then it should be visible.

Another major issue is that if I want to reference those 20 x 6 columns in another table, I have to re-create those columns. Is there a work around ?

If I can speak programatically, I want to pass an organ name and the value I need (top / bottom / left / right / front / back) , I should get the right column value. This might be helpful in some cases.

You should carefully check Glides Terms of Use, and in particular the restrictions on User Data.

From the above:

1 Like

Thank you. I just gave an example whereas what I’m working on is totally different and doesn’t fall under HIPAA. But thanks for letting me know as I didn’t know about this earlier.

I’m still not entirely sure if it works, but maybe you can try putting each group’s data into a container and set the visibility conditions on the container level?

May we know why you need to have another table here?

Thats what I’m doing. even with that I have 20 containers for each ‘organ’ and have to do this in both add and edit screen just for visibility. Also 20 computed columns for each organ for visiblity all with almost similar logic.

And I used another table (a temp table) in order to transpose the columns into rows for viewing purpose. But its uses up my update quota. Hence not the best solution. Exploring alternative ways.

Without knowing a lot about the specific structure of your db I may not be able to help more. Why do you need to have 20 containers for each organ though? Wouldn’t it be 1 per each organ, and 20 in total since you mentioned 20 organs?

It is actually 20 containers - 1 container / organ. Don’t worry about it for now as it is getting too technical. But thank you for trying . Appreciate it.

1 Like