• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Optimal Database Structure and Joins

nrsmoll

Member
I've been working to create a medical app (CRUD app) to be used for research. You can see the basics at painclinicsofaustralia.com. (Joomla 3.7 and Fabrik 3.7)

I come from the research and analytics field, and have some app development experience in filemaker (though long ago). This is my first web app. I would consider myself inexperienced, but keen as mustard because of the possible uses of this application.

The app is to be used to input patient details (list=main), visit notes and types of contact (list=visits) with several associated outcome measures. I have a textarea element to put in information about each visit using a WSYWYG editor (great module/addition btw), and I would like it to be able to create a printout or pdf form of each visit (with the summary statistics of the outcome measures), and a separate pdf form for each of my procedures.

Question 1) What is the best overall approach to join methods to create the most userfriendly app.
So far, in my main list, I have created a 1:M left join to visit list. And then, I have created multiple joins in the Visit list, one left join for each of the outcome measures.

The joins are:
1) Main List: Main -> 1:M -> Visits
2) Visit List:
Visits -> 1:1 ->
Procedure
Outcome Measure 1 (eg. EQ5D or VAS)
Outcome Measure 2
Outcome Measure 3
Outcome Measure 4
Outcome Measure (N), for "N" numbers of outcome measures.​

The problem with this method is that I end up creating lots of records (32/64 or 128) when I input a record and fill out all the details. And I have difficulty retrieving a single visit to update the details within.
I have also tried a single list, with the visits and outcomes joined to the one list (list=main).
I am not sure which is the best way of doing this.

2) I would also like to create a list view where I see only the visit records (list=visit) that were searched using info from the "main" list (related records) and then visit records are shown, and I can choose which one to create, update, edit or delete. I imagine it would be using a list view of visits tied to the main menu. But each time I have tried this, I get errors, and I don't have the "main" list info in the "visits" list view to search from.


For you guys, this is very basic stuff, and I have been wasting a lot of time trying different methods, and while that was good to learn the basics of fabrik (have watched all the tutorials), I would like some advice from experienced people to help guide me forward, and get me on the right track.

I'd be happy to organize a formal login to the website if it is required.

Nick

__________
This is a question about a feature


3) Is there a module that creates a "stamp" like function (or auto-complete/enter, but only where my cursor is)? It would be a button (or several buttons) that would "stamp" or auto-input information into the WYSWYG editor (textarea) element? Like a summary statistics from several tables, or a predefined template of free text? The button would be tied to a table of templates possibly.
 
Last edited:
OK, one question at a time ...

1) - in the list's Data tab, under Joins, at the bottom is an option for how to display the data. Have you set that to "Merge rows and reduce"?

-- hugh
 
Hi,
Thanks, it does work.
I hadn't explained something though.
I was working on this earlier, and I suspect the multiple extra rows that were appearing were because I also had put all the joins that were in the "visit" list, in the "main" list (the DB structure listed in my first message only had a single joins in the "main" list). This provided me with the ability to edit the related "visits" and all the "outcome measures" lists when I clicked the edit button/icon in the list. But I suspect this was the source of the multiple extra records. The extra records are all gone, even if I don't use the "merge rows" (not even trying the merge rows and reduce).



Should I keep the multiple joins on both the "visits" and the "main" table that caused all the extra rows to pop up (and use the merge rows and reduce), so that I can access and update/delete all the related records from the main table, or should I just have the structure that is mentioned in my first message? (This is effectively my second question, cause I need to be able to update the outcome measures records)

Thanks so much for your thoughts

Nick
 
Ok it seems that the way I have solved my issue is with the following:

All joins are done in the main visit list (with none in the visits or other list view)
Main -> Visits
Visits -> Procedure ->
Visits -> Outcome Measure 1 (eg. EQ5D or VAS)
Visits -> Outcome Measure 2
Visits -> Outcome Measure 3
Visits -> Outcome Measure 4
Visits -> Outcome Measure (N), for "N" numbers of outcome measures.

Next in the groups section, I think it was in the Main group, I hide the "main" group in the bootstrap-tabs layout.

That way, I create a new patient (mains), then when I click on "new visit" the bootstrap tabs layout opens, but the patient info is hidden.

I hope this helps someone making a medical related database at some stage.

Nick

PS. This thread can be closed now.
 
Last edited:
Also, for my new feature/module question (question 3), is there a good site you would recommend I look for Fabrik freelancers to help develop it?

Anyone a Fabrik Freelancer on here?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top