Wouldn’t you query the hospitals first then?
Example:
1) Get all Branch IDs of all hospitals, where Recommended = TRUE
2) Add all those IDs to an array
3) Remove duplicates from the array of Branch IDs
4) Query Branches with Post IDs in ( post__in ) your array
Am I understanding correctly?