She had been hospitalized for a week before her husband came back.

Literal

She [topic-は] husband [subject-が] return [before-前に] one-week hospitalized was.

入院していた uses ~ていた to mark a state that was already in progress. ~前に sets the temporal boundary.