; (B) identify available resources for, and gaps and barriers to, providing residential substance use disorder treatment; and (C) develop a plan to overcome obstacles to administering and offering medication-assisted treatment. (h) Provider affiliation Any entity, including a prison or jail, that receives Federal funds for a program or activity that offers medication-assisted treatment shall have an affiliation with a provider that can— (1) prescribe not less than 1 medication-assisted treatment to patients after release from the entity; and (2) discuss the risks and benefits of, and alternatives to, medication-assisted treatment with patients. ; and (4) in section 1904 ( 34 U.S.C. 10424 )— (A) by amending subsection (c) to read as follows: (c) Local allocation (1) In general Not less than 10 percent of the total amount made available to a State under subsection (a) for any fiscal year shall be used by the State to make grants to local correctional and detention facilities in the State (provided such facilities exist therein). (2) Jail-based substance use treatment programs A jail-based substance use disorder treatment program described in paragraph (1) may be made available to any individual who is— (A) awaiting trial or is otherwise in pre-trial detention; or (B) serving a sentence of imprisonment in the jail. ; and (B) by amending subsection (d) to read as follows: (d) Evidence-Based treatments (1) In general A State may use amounts received under this part to— (A) provide any type of medication-assisted treatment that has been approved to treat substance use disorders pursuant to section 505 of the Federal Food, Drug, and Cosmetic Act ( 21 U.S.C. 355 ), and any type of biological product licensed under section 351 of the Public Health Service Act ( 42 U.S.C. 262 ), and prescribe overdose reversal medications during the residential substance use disorder treatment program or after care; (B) cover costs associated with the training required under section 1902(g)