Ellis returned to England in April 1879. He had decided to take up the study of sex, and felt his first step must be to qualify as a physician. He studied at St Thomas's Hospital Medical School now part of King's College London, but never had a regular medical practice. His training was aided by a small legacy and also income earned from editing works in the Mermaid Series of lesser known Elizabethan and Jacobean drama. He joined The Fellowship of the New Life in 1883, meeting other social reformers Eleanor Marx, Edward Carpenter and George Bernard Shaw.  The 1897 English translation of Ellis's book Sexual Inversion, co-authored with John Addington Symonds and originally published in German in 1896, was the first English medical textbook on homosexuality. It describes the sexual relations of homosexual males, including men with boys. Ellis wrote the first objective study of homosexuality, as he did not characterise it as a disease, immoral, or a crime. The work assumes that same-sex love transcended age taboos as well as gender taboos.  In 1897 a bookseller was prosecuted for stocking Ellis's book. Although the term homosexual is attributed to Ellis, he wrote in 1897, "'Homosexual' is a barbarously hybrid word, and I claim no responsibility for it."  Ellis may have developed psychological concepts of autoerotism and narcissism, both of which were later developed further by Sigmund Freud. Ellis's influence may have reached Radclyffe Hall, who would have been about 17 years old at the time Sexual Inversion was published. She later referred to herself as a sexual invert and wrote of female "sexual inverts" in Miss Ogilvy Finds Herself and The Well of Loneliness. When Ellis bowed out as the star witness in the trial of The Well of Loneliness on 14 May 1928, Norman Haire was set to replace him but no witnesses were called.

Answer this question "What type of medicine was Ellis involved in?" by extracting the answer from the text above.
He had decided to take up the study of sex, and felt his first step must be to qualify as a physician.