Change to H1B and continues the current education


I am studying on F1 visa in medical field. I still have 2 more years to go in this masters program. I got an opportunity to work at a medical facility as a clinician and they are willing to sponsor H1B visa and I think it being a community hospital the H1B visa comes under the non-quota category. Can i transfer to the H1B visa and work at the facility there and also finish this program on part time bases. Part time as in finish the remaining two years in 3 or 4 years. Will this process affect my immigration status in any way? My program does not have CPT which I wish was there. Thank you.