You can achieve this with Dynamic Zone & Compoments.
Create a dynamic zone in User’s Model: User Profile
Create two components: patient, doctor.
For each component add its own fields.
Now add these two components in to the User Profile dynamic zone.