30, 2020: Provided further , That funds made available under this heading may be used to supplement program support funding provided under the headings Mental Health , Substance Abuse Treatment , and Substance Abuse Prevention . Agency for healthcare research and quality Healthcare research and quality For carrying out titles III and IX of the PHS Act , part A of title XI of the Social Security Act , and section 1013 of the Medicare Prescription Drug, Improvement, and Modernization Act of 2003, $334,000,000: Provided , That section 947(c) of the PHS Act shall not apply in fiscal year 2018: Provided further , That in addition, amounts received from Freedom of Information Act fees, reimbursable and interagency agreements, and the sale of data shall be credited to this appropriation and shall remain available until September 30, 2020. Centers for medicare & medicaid services Grants to states for medicaid For carrying out, except as otherwise provided, titles XI and XIX of the Social Security Act, $276,236,212,000, to remain available until expended. For making, after May 31, 2019, payments to States under title XIX or in the case of section 1928 on behalf of States under title XIX of the Social Security Act for the last quarter of fiscal year 2019 for unanticipated costs incurred for the current fiscal year, such sums as may be necessary. For making payments to States or in the case of section 1928 on behalf of States under title XIX of the Social Security Act for the first quarter of fiscal year 2020, $137,931,797,000, to remain available until expended. Payment under such title XIX may be made for any quarter with respect to a State plan or plan amendment in effect during such quarter, if submitted in or prior to such quarter and approved in that or any subsequent quarter. Payments to the health care trust funds For payment to the Federal Hospital Insurance Trust Fund and the Federal Supplementary Medical Insurance Trust Fund, as provided under sections 217(g), 1844, and 1860D–16 of the Social Security Act,