The duration of prescribed drugs stay in the system is not same for every drug or medication. Primarily it depends on upon physiological conditions, such as body weight, height, muscle mass, age, health condition, lifestyle pattern, stress level, etc.
Other considerable factors include the frequency of taking the particular drug or same categories of drugs, the dose of the drugs, duration of intake of the medicines and the quality of the active ingredients are also determined that how long drug will stay in the system.
The approximate length of time require to stay the drug in the system is determined through the laboratory tests and if the test result is positive, then that indicates drug stay in the physiological system of the body. 
What are Opiates?
Opium poppy is the plant and the active components derived from this plant are known as Opiates. 
Classification of Opiates
There are three types of Opiates are available:
- Natural – Morphine and Codeine
- Semi-Synthetic- Hydrocodone or Vicodin
- Synthetic – Heroin and Oxycodone
Therapeutic Use of Opiates
Clinically opiates are prescribed as sedative and analgesic purpose, but Opiates are available only through prescription due to restricting abuse. Prescribing Opiates are usually come in pill forms.
Abuse of Opiates
Opiates have a high addiction tendency and therefore the chances of abusing these drugs are very common. It has been observed that medically authorized drugs also available illegally for addiction purposes.
The data generated from the United Nations Office on Drugs and Crime 2012 World Drug Report estimated that almost 26.4 to 36 million people abusing Opiates due to their recreational effect. Heroin is one of the most commonly abusing opiates.
The effect of Opiates stay in the physiological system is extended depending upon the duration of their stay in the system. 
How Long Opiates Stay in System
Apart from the generally considerable factors for drugs can stay in the system, which includes the metabolism rate, BMI, liver and kidney condition, the age of the person, frequency of abusing the medicine, quality and dose of the Opiates and fluid volume in the system, the types of opiate are also considerable. 
The dried latex of the Opium sativum plant is known as opium and all the opiates are derived from opium by further processing. In the blood test opium can detect 6 hours, in urine test it showed 2 to 4 days, saliva test 1-4 days and hair test 90 days respectively. Opiates are highly absorbable in body fat system and gradually reached in the systemic circulation. Opiates can easily reach to the brain due to its high solubility. The recreational effect and duration depend on upon the type of opiates and how long then stay in the different physiological system.  The most commonly used opiates are heroin, hydrocodone, morphine, and codeine.
Heroin is fast acting narcotic opiates and half-life is quite short than the other opiates.
- The saliva test detects the heroin in the system after first 5 hours of oral ingestion.
- A blood test can detect the drug in the system after first 6 hours.
- A urine test can detect 2 to 7 days after the last use of heroin.
- In hair follicle tests, the Heroin is found up to 90 days.
Hydrocodone leaves the physiological system is not following the same pattern, in saliva test it leaves comparatively slow than the Heroin, but in urine test it is fast.
- The saliva test detects the heroin in the system after first 12-36 hours of oral ingestion.
- A urine test can detect 2 to 4 days after the last use of heroin.
- In hair follicle tests, the hydrocodone is found up to 90 days.
Morphine is slow acting narcotic opiates and half life is quite prolonged than the other opiates.
- Blood test can detect morphine in the system after first 12 hours of the last dose
- A urine test can detect 3 days after the last use of morphine.
- The saliva test detects the morphine in the system after first 4 days of oral ingestion.
- In hair follicle tests, the morphine is found up to 90 days.
Codeine is fast moving opiates from the system. In blood it stays for 24 hours and in urine test it found 24-48 hours. The saliva test detects the Codeine in the system after first 1 to 4 days of oral ingestion.
In hair follicle tests, the result is same like as others opiates mean the Codeine is found up to 90 days.
How Opiates can Eliminate Quickly From System
The fast elimination can be possible by pushing the opiates from the system in the following ways:
Increase intake of water
More water intake helps to easy elimination of opiates through urine. But the result is not uniform in every individual. This process is usually helpful for very occasionally users the drugs, but does not show any change for frequent users.
Intake vitamin B tablets are also useful for easy detection.
Apart from increased water intake, another method to increase urinate out is possible through diuretics. Diuretics are the drugs provided for forceful urination. cranberry juice, tea and coffee are the natural diuretics. Other than these many synthetic diuretics are also available in a pharmacy store. The first sample of urine has more concentrated with opiates and gradually subsequent urine samples are less concentrated with opiates.
Regular exercising habit helps to enhance metabolism functioning of the body and quick metabolism of the opiates can be possible. Metabolism of opiates also assists to fast excretion of these drugs from the system. Experts advise regular two times exercise in a day prevents drugs including opiates accumulation in the body. 
- Detection Time-Frame; OHS Health & Safety Services inc.; Retrieved from: http://www.ohsinc.com/info/detection-time-frame/
- How Long Do Opiates Stay in Your System?; American Addiction Centers; Retrieved from: http://americanaddictioncenters.org/prescription-drugs/how-long-in-system/
- How Long Do Opiates Stay in Your System?; New Health Advisor; Retrieved from: http://www.newhealthadvisor.com/How-Long-Do-Opiates-Stay-in-Your-System.html