"Urine is the most rigorously evaluated and most commonly used matrix for drug testing (Watson et al., 2006). All results are affected by laboratory test or point-of-care test (POCT) cutoff concentrations. Therefore, practitioners should always consult with laboratory staff when ordering laboratory tests or carefully read POCT package inserts before using the test. Numerous POCTs are available for urine drug testing.
"Window of Detection
"The window of detection for urine falls in the intermediate range, compared with the detection period or window for other matrices. Many factors influence the window of detection for a substance. Factors include, but are not limited to, the frequency of use (chronic or acute), amount taken, rate at which the substance is metabolized, cutoff concentration of the test, patient’s physical condition and, in many cases, body fat. Some hepatic, renal, endocrine, and other pathologies may extend the detection window."
"Drugs are present in urine from within minutes of use to several days after, depending on the substance; quantity ingested; the degree to which the bladder was filled with drug-free urine at the start of drug use; the patient’s hepatic, cardiac, and renal function; the patient’s state of hydration; and drug type. Drugs that are smoked or injected are detectable in urine samples almost immediately. Detection rates for drugs taken orally are slower, taking up to several hours and peaking at about 6 hours (Dolan et al., 2004).
"The window-of-detection estimates used in this chapter are from several sources: Cone (1997), Dasgupta (2008), Verstraete (2004), Warner (2003), White and Black (2007), Wolff et al. (1999), and Wong and Tse (2005).
"Many urine drug tests detect the drug metabolite, rather than the drug itself. As a general rule, drug metabolites remain in the body for a longer period than does the parent drug, allowing for a longer detection period. For example, when the test is for cocaine using urine, the target compound is usually the metabolite, benzoylecgonine, rather than the parent cocaine molecule."

Source

"Clinical Drug Testing in Primary Care," Technical Assistance Publication (TAP) 32, Substance Abuse and Mental Health Services Administration, Clinical Drug Testing in Primary Care (Rockville, MD: U.S. Department of Health and Human Services, 2012), p. 51.
http://www.kap.samhsa.gov/pro…