Last I heard, the pharmaceutical companies had come up with various ways of artificially manipulating the price they officially sold drugs for in order to take advantage of this, such as making direct offsetting payments to hospitals rather than discounting the prices.
Providing rebates after purchase is pretty common in the pharmaceutical industry and yes, they are included in ASP.
There was some manipulation of the ASP back in the early 2000's, but those companies were charged under the False Claims Act and paid a pretty significant penalty. I don't think there is widespread manipulation at this point.