; and (B) until— (i) such time as the veteran can be transferred safely to a Department facility or community care provider authorized by the Secretary and such facility or provider is capable of accepting such transfer; or (ii) such time as a Department facility or community care provider authorized by the Secretary accepts such transfer if— (I) at the time the veteran could have been transferred safely to such a facility or provider, no such facility or provider agreed to accept such transfer