# referrer for specified location:
SELECT *
FROM `referrers` r
    JOIN `referrer_department` rd ON rd.`referrer_id` = r.`id` 
    JOIN  `referral_sources` rs ON rd.`parent_organisation_id` = rs.`parent_organisation_id`
WHERE rs.organisation_code = 'RR801';

 
# referrer by request_id:
SELECT *
FROM
  requests t1 
  JOIN patient_case t2 ON (t1.patient_case_id = t2.id)
  JOIN referral_sources t3 ON (t2.referral_source_id = t3.id)   
  JOIN referrer_department t4 ON (t1.referrer_department_id = t4.id)
  JOIN referrers t5 ON (t4.referrer_id = t5.id)  
  JOIN hospital_departments t6 ON (t4.hospital_department_code = t6.id) 
WHERE
  t1.id = 1

