Yes, students who are doing BAMS or BHMS can do UPSC CMS. UPSC Combined Medical Service examination has the eligibility criteria that the candidate must have passed MBBS. So after BHMS you can apply for UPSC CMS .
Furthermore, the educational qualification for UPSC Cms is as follows :
Must have completed MBBS final year examination
Furthermore, the age criteria is as follows :
Candidates must be not more that 32 years
UPSC has released the UPSC CMS 2022 application form online on April 6, 2022 at upsc.gov.in. Last date to submit the UPSC CMS application form is April 26, 2022.
Further to know more about the eligibility criteria for UPSC cms, and other necessary information about it you can follow the below mentioned link to know more : https://www.google.com/amp/s/competition.careers360.com/exams/upsc-cms/amp
I hope that this will help.