Claiming a Dependent

If my 15 year old was in juvenile detention from January 15 - March 2, and again from April 13-May 29, and then he was sent to an in patient mental health facility for 6 months, do I claim him? I cannot seem to find the answer anywhere. If I don’t claim him, who does?