Can they show that they maintained ties to the US during that 7 months (for example did they continue to pay rent/own a property that they have sole or main access to)? If they can overcome the presumption of breaking residency they can apply, if not they should wait till 5 years after the date of return. The doctor’s letter is irrelevant imo because it is not intent that is the determinant, see excerpt from the uscis policy manual below:
https://www.uscis.gov/policy-manual/volume-12-part-d-chapter-3
1. Absence of More than Six Months (but Less than One Year)
An absence of more than six months [more than 181 days but less than one year (less than 365 days)] during the period for which continuous residence is required is presumed to break the continuity of such residence. This includes any absence that takes place prior to filing the naturalization application or between filing and the applicant’s admission to citizenship.
An applicant’s intent is not relevant in determining the location of his or her residence. The period of absence from the United States is the defining factor in determining whether the applicant is presumed to have disrupted his or her residence.
An applicant may overcome the presumption of loss of his or her continuity of residence by providing evidence to establish that the applicant did not disrupt his or her residence. The evidence may include, but is not limited to, documentation that during the absence:
The applicant did not terminate his or her employment in the United States or obtain employment while abroad.
The applicant’s immediate family remained in the United States.
The applicant retained full access to his or her United States abode.