(A) The fact that an individual, child, or pregnant woman may be denied aid under part A of subchapter IV pursuant to section 602(a)(43) 1 of this title shall not be construed as denying (or permitting a State to deny) medical assistance under this subchapter to such individual, child, or woman who is eligible for assistance under this subchapter on a basis other than the receipt of aid under such part.
(B) If an individual, child, or pregnant woman is receiving aid under part A of subchapter IV and such aid is terminated pursuant to section 602(a)(43) 1 of this title, the State may not discontinue medical assistance under this subchapter for the individual, child, or woman until the State has determined that the individual, child, or woman is not eligible for assistance under this subchapter on a basis other than the receipt of aid under such part.