refactored use of cataract referral api