of longtime hypodermic usage, was arrested by Officer Baker, advised of his rights, and taken to a police station. At the station he was again advised of his rights and questioned by Sergeant Hannon of the narcotic division. Thereafter Lipscomb was taken to the county jail infirmary, where an application was made for his admission under section 3100.6, Welfare and Institutions Code, as one believed to be addicted to narcotics or in imminent danger of becoming so addicted. A copy of the application was given to Lipscomb, who acknowledged its receipt in writing.  [fn. 1] In the infirmary Lipscomb was *62 examined by a staff physician, Dr. Wetzel, and detained 48 hours by the infirmary for further examination. Dr. Wetzel thereafter declared he believed Lipscomb to beaddicted to narcotics or in imminent danger of becoming so addicted, and a petition for Lipscomb's commitment was filed by the district attorney on 30 November 1966. The examinations, detentions, declarations, and petition were as prescribed by section 3100.6.
 Lipscomb was next taken before the superior court, where counsel was appointed to represent him at the hearing on his commitment. At the hearing on 14 December 1966 Dr. Wetzel testified that appellant had a current narcotic addiction and an emotional dependency on heroin. The court ordered Lipscomb committed as an addict, and at a second hearing the following week, the court again ordered his commitment.
 On appeal, Lipscomb contends the testimony of the examining physician should not have been received in evidence because (1) the testimony was based