1. Short title This Act may be cited as the Mental Health and Substance Abuse Treatment Accessibility Act of 2017 . 2. Loans and loan guarantees Part P of title III of the Public Health Service Act is amended by inserting after section 399V–6 of such Act ( 42 U.S.C. 280g–17 ) the following: 399V–7. Loans and loan guarantees for constructing or renovating, or planning construction or renovation of, certain qualified psychiatric and substance abuse treatment facilities (a) In general The Secretary may— (1) make loans and loan guarantees for the purpose of constructing or renovating, including planning the construction or renovation of, a qualified psychiatric treatment facility or a qualified substance abuse treatment facility to public, private for-profit, or private not-for-profit— (A) psychiatric treatment facilities; (B) substance abuse treatment facilities; (C) psychiatric hospitals; and (D) alliances of such facilities or hospitals; and (2) subject to subsection (d), make loans and loan guarantees for refinancing loans that were made for such purpose to an entity listed in paragraph (1). (b) Preference In making loans and loan guarantees under this section, the Secretary shall give preference to psychiatric treatment facilities and substance abuse treatment facilities that propose to construct or renovate a qualified psychiatric treatment facility or qualified substance abuse treatment facility in a county that has insufficient inpatient psychiatric or substance abuse treatment capacity. (c) Terms and conditions Loans and loan guarantees under this section shall be made on such terms and conditions as the Secretary may prescribe, subject to the provisions of this section including the following: (1) The Secretary may allow credit to a prospective borrower only where— (A) it is necessary to increase the number of psychiatric or substance use disorder treatment beds to enhance the public’s access to acute inpatient mental health and substance abuse services