Andrew Beckett (Tom Hanks) is a Senior Associate at the largest corporate law firm in Philadelphia. Beckett hides his homosexuality and his status as an AIDS patient from the other members of the law firm. On the day Beckett is assigned the firm's newest and most important case, a partner in the firm notices a lesion on Beckett's forehead. Although Beckett attributes the lesion to a racquetball injury, it is actually due to Kaposi's Sarcoma, a form of cancer marked by multiple tumors on the lymph nodes and skin.
Shortly thereafter, Beckett stays home from work for several days to try to find a way to hide his lesions. While at home, he finishes the paperwork for the case he has been assigned and then brings it to his office, leaving instructions for his assistants to file the paperwork the following day, which marks the end of the statute of limitations for the case. Later that morning he receives a call asking for the paperwork, as the paper copy cannot be found and there are no copies on the computer's hard drive. The paperwork is finally discovered in an alternate location and is filed with the court at the last possible moment. The following day Beckett is fired by the firm's partners.
Beckett believes that someone deliberately hid his paperwork to give the firm an excuse to fire him, and that the firing is actually as a result of his diagnosis with AIDS. He asks several attorneys to take his case, including personal injury lawyer Joe Miller (Denzel Washington). Miller knows little about AIDS and appears to be worried that he could contract Beckett's illness. After declining to take the case, Miller immediately visits his doctor to find out if he could have contracted the disease. The doctor explains that the routes of HIV infection do not include casual contact such as a business meeting.
Unable to find a lawyer willing to represent him, Beckett is compelled to act as his own attorney. While researching a case at a law library, Miller sees Beckett at a nearby table. After a librarian announces that he has found a book on AIDS discrimination for Beckett, others in the library begin to first stare and then move away, and the librarian suggests Beckett retire to a private room. Disgusted by the other people's behavior, Miller approaches Beckett, reviews the material Beckett has gathered, and takes the case.
As the case goes before the court, the partners of the firm take the stand, each claiming that Beckett was incompetent and that he had deliberately tried to hide his condition. The defense repeatedly suggests that Beckett had invited his illness through his homosexual acts and was therefore not a victim. In the course of testimony, it is revealed that the partner who had noticed Beckett's lesion had previously worked with a woman who had contracted AIDS after a blood transfusion and so should have recognized the lesion as relating to AIDS. According to that partner, the woman was an innocent victim, unlike Beckett, and further testified that he did not recognize Beckett's lesions. To prove that the lesions would have been visible, Miller asks Beckett to unbutton his shirt while on the witness stand, revealing that his lesions were indeed visible and recognizable as such.
Beckett eventually collapses during the trial. After Beckett is hospitalized, the partner who noticed Beckett's lesions confesses that he suspected Beckett had AIDS but never gave him the opportunity to explain himself. The partner remorsefully confesses that he would regret betraying Beckett for the rest of his life. During his hospitalization, the jury votes in his favor, awarding him back pay, damages for pain and suffering, and punitive damages. Miller visits the visibly failing Beckett in the hospital after the verdict and overcomes his fear enough to touch Beckett's face. After Beckett's family leaves the room, he tells his partner Miguel (Antonio Banderas) that he is ready to die. At the Miller home, Joe and his wife are awakened by a phone call from Miguel, presumably to tell them that Beckett has died. The movie ends with a reception at Beckett's home following the funeral, where many mourners, including Miller, view home movies of Beckett as a happy child.

Question: Why did Miller go to the doctor to be evaluated?
Answer: He though he might have contracted HIV from casual contact with Beckett.