Hermione hears the sound of his increasing heart rate coming from the diagnostic charms she’d cast. She knows that the door to the room is open, that anyone could walk by and see her kissing a patient. Understands the implication and the consequences that could follow. 