Imagine looking for a job at the same exact time that everyone else is doing it, and you have to adhere to rigid interviewing and application standards. Now imagine that to get the job you have to be matched with your prospective employer by a national computer system. The program is designed to take into account your preferences and your prospective employer's. That is precisely what is going on next week, when medical students from all over North America participate in what is called Match Day. For more than 50 years, Match Day has happened in March, on the third Thursday, which is next week.

Medical students around the country are finishing up their studies and have spent the last several months trying to figure out where they will next spend their residency years: going to interviews, studying the online reputations of their schools, and filing out applications. The program is administered by the National Resident Matching Program (NRMP) out of Washington DC, part of the American Association of Medical Colleges that represent the 150 North American accredited academic medical schools. To give you an idea of the numbers involved, there are 38,000 applicants, 27,000 positions to be filled in 4,000 residency programs. Each school has several specialty programs, such as internal medicine or surgery, for example.

Future physicians in both the U.S. and Canada must decide what program to apply to and rank their top five choices of residency programs they desire according to a rigid schedule. The tens of thousands of students all submit their preferences and hear about where they have been chosen next week, and as you imagine it is a nail-biting sleepless night for many of them.

There are actually, two pieces of software behind the matching process, according to Mona Signer, the Executive Director of NRMP. The first is the outward-facing registration software that is used by both schools and students to specify their preferences. Once everyone registers this information, the data is then downloaded into a separate PC that sits behind NRMP's firewall. This runs the actual matching algorithm itself. As you might imagine, this PC isn't connected to the Internet for security reasons.

"The matching algorithm is unique," said Signer. "It handles couples as participants and links their lists to the requests of both partners, and it also matches applicants simultaneously to both of their first and second year training requests. Plus, program directors can donate unfilled positions in one program to other programs. There are a lot of subtleties." She told me that the actual software run takes about 10 minutes, but that is the easy part. "We have to verify everyone's credentials for each applicant, and do other clean ups of the data. That is what takes some time. Once we processed the algorithm, we have to create individualized emails and Web pages and prepare a lot of reports that we post on our Web site. All of that is done before Match Day begins."

The results are available electronically for all concerned parties. The schools receive a special secure file with the consolidated results, which they then download and print out and mail to their prospective students. Many schools plan Match Day events so everyone can open their envelope together. "I like the fact that you still get to open an envelope, at least for your residencies," said Dr. Jeff Lowell, a Professor of Surgery at Washington University Medical School in St. Louis. "The old school touch is still nice and has more drama than just logging into a website and you get to do it with classmates and family."

Fortran and Visual Basic

This is actually the second version of the matching algorithm. The original one was written in Fortran, it was rewritten a few years in Visual Basic, and this was done for maintenance reasons: "Few people know Fortran anymore." NRMP is in the process of looking for a new outsourcing partner for its IT and operations. Currently, they are using the services of the medical college association but haven't been happy with the service disruptions. Plus, the outward-facing software is a decade old and in need of refreshing. They will make the decision later this year.

As Signer said, one of the interesting factors of the algorithm is the way it matches couples who want to have their matches considered together as well as singles, and she is proud of the fact that the success factor on couples is close to what it is for the single students. Dr. Karl Weyrauch is a former family practice physician who met his wife in medical school. She is also a family practice doctor. "We had a lot harder time because we were trying to match as a couple to go to the same program. It wasn't as stressful as initially applying to med school because we had both applied under an early decision program, but it was still a bit tricky to understand the process and make sure that we both filled out our matches exactly the same. While we were both attractive as potential residents, it could have been a problem if my wife and I weren't close in terms of our rankings."

The residency matching program is just one of 25 other matches that NRMP runs all year, including matching for fellowships and other medical programs. We hope all the students get their first choice next week!