Yes. That is considered a temporary absence from your home. For child under 19, you did not have to provide any support.
A child of a taxpayer can still be a “Qualifying Child” (QC) dependent, regardless of his/her income, if:
1. He is under age 19, or under 24
if a full time student for at least 5 months of the year, or is totally &
permanently disabled
2. He did not provide more than 1/2 his own support. The facility isconsidered third party support and not as support provided by the student.
3. He lived with the parent
(including temporary absences such as away at school or rehab) for more than half
the year