Detection in body fluids
Cocaine and its major metabolites may be quantified in blood, plasma, or urine to monitor for use, confirm a diagnosis of poisoning, or assist in the forensic investigation of a traffic or other criminal violation or sudden death. Most commercial cocaine immunoassay screening tests cross-react appreciably with the major cocaine metabolites, but chromatographic techniques can easily distinguish and separately measure each of these substances. When interpreting the results of a test, it is important to consider the cocaine usage history of the individual, since a chronic user can develop tolerance to doses that would incapacitate a cocaine-naive individual, and the chronic user often has high baseline values of the metabolites in his system. Cautious interpretation of testing results may allow a distinction between passive or active usage, and between smoking versus other routes of administration. Field analysis
Cocaine may be detected by law enforcement using the Scott reagent. The test can easily generate false positives for common substances and must be confirmed with a laboratory test.Approximate cocaine purity can be determined using 1 mL 2% cupric sulfate pentahydrate in dilute HCl, 1 mL 2% potassium thiocyanate and 2 mL of chloroform. The shade of brown shown by the chloroform is proportional to the cocaine content. This test is not cross sensitive to heroin, methamphetamine, benzocaine, procaine and a number of other drugs but other chemicals could cause false positives.
The Harrison Act did not recognize addiction as a treatable condition and therefore the therapeutic use of cocaine, heroin, or morphine to such individuals was outlawed –  leading a 1915 editorial in the journal American Medicine to remark that the addict "is denied the medical care he urgently needs, open, above-board sources from which he formerly obtained his drug supply are closed to him, and he is driven to the underworld where he can get his drug, but of course, surreptitiously and in violation of the law." The Harrison Act left manufacturers of cocaine untouched so long as they met certain purity and labeling standards. Despite that cocaine was typically illegal to sell and legal outlets were rarer, the quantities of legal cocaine produced declined very little. Legal cocaine quantities did not decrease until the Jones–Miller Act of 1922 put serious restrictions on cocaine manufactures.Before the early 1900s, the primary problem caused by cocaine use was portrayed by newspapers to be addiction, not violence or crime, and the cocaine user was represented as an upper- or middle-class White person. In 1914, The New York Times published an article titled "Negro Cocaine Fiends Are a New Southern Menace", portraying Black cocaine users as dangerous and able to withstand wounds that would normally be fatal. The Anti-Drug Abuse Act of 1986 mandated prison sentences for 500 grams of powdered cocaine and 5 grams of crack cocaine.