Hi Max,
-
The
Commentssounds like a good place. This field is there to store notes or extra info about the Subject. Since this is rarely used, if you want to sort Subjects by their group, you would need to do as you are doing now. Retrieve all the protocol Subjects, and check theirCommentsfield. -
Yes, use
bst_set('ProtocolSubjects', s);after you the FOR loop -
You approach is a good way. Unfortunately, the Subject grouping will not be reflected on the DB explorer tree. If you want that, the only way would be to rename the Subjects to
Group_SubjectName. To do so checkdb_rename_subject. Please note that this changes also the path in the HDD for the Subject files.