Section 31. (a) This subsection shall apply to estates of individuals dying prior to April first, nineteen hundred and ninety-five. There shall be no adjustment or recovery of medical assistance correctly paid except as follows:

(1) Recovery from the Permanently Institutionalized: From the estate of an individual, regardless of age, who was an inpatient in a nursing facility or other medical institution when he or she received such assistance. Recovery of such assistance shall be limited to assistance provided on or after March twenty-second, nineteen hundred and ninety-one.

(2) Recovery from Persons Age 65 and Over: From the estate of an individual who was sixty-five years of age or older when such individual received such assistance. Any recovery may be made only after the death of the surviving spouse, if any, and only at a time when such individual has no surviving child who is under age twenty-one or is blind or permanently and totally disabled. The division shall waive recovery where it would result in undue hardship, as defined by the division in its regulations.

(b) This subsection shall apply to estates of individuals dying on or after April first, nineteen hundred and ninety-five. There shall be no adjustments or recovery of medical assistance correctly paid except as follows:

(1) Recovery from the Permanently Institutionalized: From the estate of an individual, regardless of age, who was an inpatient in a nursing facility or other medical institution when he or she received such assistance. Recovery of such assistance shall be limited to assistance provided on or after March twenty-second, nineteen hundred and ninety-one.

(2) Recovery from Persons Age 65 and Over: From the estate of an individual who was sixty-five years of age or older when he or she received such assistance.

(3) Recovery from Persons Age 55 and Over for Post-October 1, 1993 Medicaid: From the estate of an individual who was fifty-five years of age or older when he or she received such assistance, where such assistance was for services provided on or after October first, nineteen hundred and ninety-three.

Any recovery may be made only after the death of the surviving spouse, if any, and only at a time when he or she has no surviving child who is under age twenty-one or is blind or permanently and totally disabled. The division shall waive recovery if such recovery would work an undue hardship, as defined by the division in its regulations.

(c) For purposes of this section, “estate” shall mean all real and personal property and other assets includable in the decedent’s probate estate under the General Laws.

(d) The division is also authorized during an individual’s lifetime to recover all assistance correctly provided on or after April 1, 1995, if property against which the division has a lien or encumbrance under section 34 is sold. No lien or encumbrance shall be valid against any bona fide purchaser for value or take priority against any subsequent mortgagee for value unless and until it is recorded in the registry of deeds where the property lies.

Repayment shall not be required under this subsection while any of the following relatives lawfully resides in the property: (1) a sibling who had been residing in the property for at least one year immediately prior to the individual being admitted to a nursing facility or other medical institution; or (2) a child who (i) had been residing in the property for at least two years immediately prior to the parent being admitted to a nursing facility or other medical institution; and (ii) establishes to the satisfaction of the division that he provided care which permitted the parent to reside at home during that two year period rather than in an institution; and (iii) has lawfully resided in the property on a continuous basis while the parent has been in the medical institution.

If repayment is not yet required because a relative specified above is still lawfully residing in the property and the individual wishes to sell the property, the purchaser shall take possession subject to the lien or the division shall release the lien if the individual agrees to (1) either set aside sufficient assets to satisfy the lien or give bond to the division with sufficient sureties and (2) repay the division as soon as the specified relative is no longer lawfully residing in the property. Notwithstanding the foregoing or any general or special law to the contrary, the division and the parties to the sale may by agreement enter into an alternative resolution of the division’s lien.

This subsection shall not limit the division’s ability to recover from the individual’s estate under subsection (a) or (b) or as otherwise provided under any general or special law.