A doctor not only has the legal right to inform a patient of their medical condition (assuming the patient is over the age of 12), they also have a legal obligation to inform a patient if they have a sexually transmitted infection (STI) like HIV. STI's such as HIV pose a public health hazard, when a doctor diagnoses a patient with an STI like syphilis or HIV they are required to inform the patient to contact their sexual partners and advise them to get tested. However since not everyone is willing to take that step the doctor is also required to report the infection to the local Department of Public Health, who will then take steps to track the spread of this particular outbreak and inform people who have been potentially exposed.
Carla Gallo, who plays 15-year-old Emma in this episode, was actually 24 at the time.