42 USC 256b(a)(5)(A)(i) prohibits duplicate discounts; that is, manufacturers are not required to provide a discounted 340B price and a Medicaid drug rebate for the same drug.
Covered entities must have mechanisms in place to prevent duplicate discounts.

All covered entities that use 340B and bill Medicaid must determine whether they will use 340B drugs for their Medicaid patients (carve-in) or whether they will purchase drugs for their Medicaid patients through other mechanisms (carve-out).
Covered entities that will carve-in are required to inform HRSA of their decision by providing their Medicaid provider number/NPI.

If covered entities decide to bill to Medicaid for drugs purchased under 340B with a given Medicaid provider number/NPI (carve-in),
then ALL drugs billed to Medicaid with that number/NPI must be purchased under 340B and that number/NPI must be listed in the 340B program database.
For covered entities that opt to purchase Medicaid drugs outside of the 340B Program (carve-out),
ALL drugs billed under the applicable Medicaid provider number/NPI must be purchased outside the
340B Program and that Medicaid provider number/NPI should not be listed on the HRSA Medicaid Exclusion File.

The files available below allow drug manufacturers/wholesalers and state Medicaid agencies to identify organizations that have chosen to carve-in for a given calendar quarter.
The 340B database takes a snapshot of carve-in/out decisions at 12:01am ET on the 15th day of the month prior to the start of each quarter, irrespective of weekends or holidays.

A change to the Medicaid Exclusion File may be requested at any time, but changes do not take effect until the first day of the following quarter and only if approved by OPA before the time it takes the quarterly snapshot of carve-in/carve-out decisions.
The files contain all entities that had at least one Medicaid provider number/NPI registered with OPA as of the snapshot for each quarter, along with program start and termination dates for those entities.