no body can retain your original documents in any scenario, though, they can harass you as you have broken their terms,
keep one thing in your mind absolutely clear that in such (any) training programs companies makes huge expenses only to shine its employees so as you back go from your words company will definitely harass you as they had made expenses,
as far as your excuse is concerned (medical issue) if its genuine you can submit proof before them and explicate the actual and exact reason for not completing the training program,
once again -
no one can keep your original documents in any scenario
for further clarifications/informations you can mail/whatsapp me.
17th July 2017