I'm afraid I can't follow your post. You mention portals and filtering, but don't mention what each of the 3 portals need to do/show. You could make 2 more TO's of DrugLists, then have each of the 3 DrugLists portals (3 different TO's) filtered to show different records. Without a clearer understanding, I can't provide any other suggestions.
List your tables and what they mean. You mentions DrugLists on the Patient layout (2 tables), but then show relationships referencing a "Calc" table and an IO table. What do these tables do/mean/represent?
Tables and the direction of 1 to many relationships: Patient < Calc < IO < DrugList > Drugs
3 Portals on Patient layout are for drugs given: by tube, IV, orally.
I currently have 2 TOs of DrugList: a) The primary one to IO and b) A secondary one (DrugList2) that shows only the records of the selected IO record.
I currently use a script to add new records via the DrugList2 portal using a value list from DrugList; DrugList is limited to 'by tube' drugs by other, hierarchical, relationships. However, for IV and oral routes I can list all drugs for those routes so the relationship will be simple.
I've tried this script in order to produce a new record in DrugsUsed3, but I've failed to keep the focus on this portal, it instead produces a new Patient record.
Set Variable [ $DrugsUsedID; Value:Patient::IO_n ]
Go to Object [ Object Name: "DrugsUsed3" ]
Go to Layout [ “DrugsUsed” (DrugsUsed) ]
Set Field [ DrugsUsed::_IOID; $DrugsUsedID ]
Go to Layout [ “Patient_L” (Patient) ]
This topic of producing records from multiple portals from the same table on a single layout was discussed at the end of http://forums.filemaker.com/posts/0796c66657 by PhilModJunkbut the critical line of syntax wasn't mentioned.