; and (B) purchased under an agreement in effect under such section. . (b) Application of requirements to Medicare (1) Part D Section 1860D–12(b) of the Social Security Act ( 42 U.S.C. 1395w–112(b) ) is amended by adding at the end the following new paragraph: (8) Application of requirements relating to the 340B drug discount program Each contract entered into under this subsection with a PDP sponsor shall provide that the requirements of section 2730 of the Public Health Service Act apply to such sponsor, and to any pharmacy benefit manager that contracts with such sponsor, in the same manner as such requirements apply with respect to a group health plan, a health insurance issuer, or a pharmacy benefit manager described in such section. . (2) Part C Section 1857(f)(3) of the Social Security Act ( 42 U.S.C. 1395w–27(f)(3) ) is amended by adding at the end the following new subparagraph: (E) 340B drug discount program Section 1860D–12(b)(8). . (c) Medicaid requirements (1) In general Section 1927 of the Social Security Act ( 42 U.S.C. 1396r–8 ) is amended by adding at the end the following new subsection: (l) Review To prevent duplicate discounts (1) In general Not later than 1 year after the date of the enactment of this subsection, the Secretary shall enter into a contract with a third-party entity (who shall be free of conflicts of interest, as specified by the Secretary) for purposes of— (A) identifying claims for 340B drugs (as defined in section 2730(d) of the Public Health Service Act) for which reimbursement was made under a State plan (or waiver of such plan)