Do we really understand the side effects of using many drugs at once?

I had to do a care plan on a patient for nursing school last semester who was on seventeen different prescription (and a few OTC) medications. My wife is a nurse and she says that she commonly see’s patients on over thirty different meds (some being prn or as needed). Do we really understand the physiological effects of so many medications? It is one thing to understand a simple interaction such as alcohol consumption making one more succeptible to liver damage from Tylenol or vitamin E supplementation lowering the effectiveness of statin type drugs (one possible cause for the studies showing vitamin E supplementation being harmful above 200IU’s), but when you add more chemical agents I would think that it becomes almost impossible. How do we know that so called “emergent properties” from synergistic drug interactions don’t occur? Consider that drugs A, B, and C, may be fine together except when drug D is also taken in which case the liver is overloaded by B. That’s a relatively simple four drug scenario, how about a situation where drug D is handeled great except when it’s in the presence of drugs G,I, and N combined in which case its half live is tripled? Are there computer models which attempt to address multiple drug interactions that take account of these potential “emergent” scenarios?