Shouldn't need a script trigger for this, but then you shouldn't try to link to a referring doctor name directly by name either as two doctors could have the same name (and even doctors might change their name on you).
If you have a relationship to your table of referring doctors like this:
YourTable::DoctorID = ReferringDoctors::DoctorID
Then you can either place fields from ReferringDoctors directly on the YourTable layout and they will display the information from the selected doctor when you enter/select the Doctor's ID or you can define fields in your table that use this same relationship with looked up value auto-enter settings to copy this data from the other table. (You'll need to decide which works better for you.)
Either way, no script trigger is required. The trick is to set up DoctorID with a value list of DoctorID's and names in order to select a doctor. Since you have a very large list of doctors to choose from, you'll likely need to set up either a conditional value list based on doctor specialties or some other category so that you can produce a shorter list of doctors, or use an enhanced value list selection technique that relies on a script to find the doctor record in the ReferringDoctors table and then enter the located record's DoctorID into the DoctorID field of your current record.
Here's a demo file that illustrates 3 such methods. You'll need to modify the scripts to work with your file, but if you can figure out how they work, then you shouldn't have too much trouble doing so. (The scripts in the demo are set up to create new records in a portal which doesn't seem to be the case for you here.)
Feel free to post back with questions if you can't figure out how the demo file works or how to adapt it's tricks to your system.
Thank you for your help, I'll play around with the different options and hopefully one will work out!