Definition of Visit, transfers and referrals, and distinction of ER from hospital visits

Thank you @jenniferduryea

Is this link done thru fact_relationship table? If so, what relationship_id do you use to associate condition_occurrence, procedure_occurrence, drug_occurrence to visit_occurrence (or even a claim_occurrence - custom table?)