Residency or postgraduate training is a stage of graduate medical education. It refers to a qualified physician, podiatrist, dentist, optometrist, veterinarian, or pharmacist (one who holds the degree of MD, DPM, DDS, DMD, DVM, DO, OD, PharmD, BDS, or BDent; or MB; BS, MBChB, or BMed) who practices medicine, usually in a hospital or clinic, under the direct or indirect supervision of a senior clinician registered in that specialty such as an attending physician or consultant. In many jurisdictions, successful completion of such training is a requirement in order to obtain an unrestricted license to practice medicine, and in particular a license to practice a chosen specialty. An individual engaged in such training may be referred to as a resident, house officer, registrar or trainee depending on the jurisdiction. Residency training may be followed by fellowship or sub-specialty training. Whereas medical school teaches physicians a broad range of medical knowledge, basic clinical skills, and supervised experience practicing medicine in a variety of fields, medical residency gives in-depth training within a specific branch of medicine. A resident physician is more commonly referred to as a resident, senior house officer (in Commonwealth countries), or alternatively as a senior resident medical officer or house officer. Residents have graduated from an accredited medical school and hold a medical degree (MD, MBBS, MBChB). Residents are, collectively, the house staff of a hospital. This term comes from the fact that resident physicians traditionally spend the majority of their training 'in house,' i.e., the hospital. Duration of residencies can range from three years to seven years, depending upon the program and specialty. A year in residency begins between late June and early July depending on the individual program, and ends one calendar year later. In the United States, the first year of residency is known as an internship with those physicians being termed 'interns.' Depending on the number of years a specialty requires, the term junior resident may refer to residents that have not completed half their residency. Senior residents are residents in their final year of residency, although this can vary. Some residency programs refer to residents in their final year as chief residents (typically in surgical branches). Alternatively, a chief resident may describe a resident who has been selected to extend his or her residency by one year and organize the activities and training of the other residents (typically in internal medicine and pediatrics). If a physician finishes a residency and decides to further his or her education in a fellowship, he or she is referred to as a 'fellow.' Physicians who have fully completed their training in a particular field are referred to as attending physicians, or consultants (in Commonwealth countries). However, the above nomenclature applies only in educational institutes in which the period of training is specified in advance. In privately owned, non-training hospitals, in certain countries, the above terminology may reflect the level of responsibility held by a physician rather than their level of education. Residency as an opportunity for advanced training in a medical or surgical specialty evolved in the late 19th century from brief and informal programs for extra training in a special area of interest. The first formal residency programs were established by Sir William Osler and William Stewart Halsted at the Johns Hopkins Hospital. Residencies elsewhere then became formalized and institutionalized for the principal specialties in the early 20th century. But even mid-century, residency was not seen as necessary for general practice and only a minority of primary care physicians participated. By the end of the 20th century in North America though, very few new doctors went directly from medical school into independent, unsupervised medical practice, and more state and provincial governments began requiring one or more years of postgraduate training for medical licensure.