、。
She traveled all the way to see the doctor, but he wasn't in.
Literal
She [topic-は] all-the-way doctor [to-に] examined-receive [purpose-に] went [but-が], doctor [topic-は] not-present-was.
診てもらう ('have someone examine you') is a giving-and-receiving verb construction: 診る ('to examine') in the te-form plus もらう ('receive a favor'). Together it means 'receive the favor of being examined' — the standard way Japanese expresses 'going to the doctor' from the patient's perspective. The に preceding 診て here marks the agent (the doctor) of the receiving construction. ~に行く ('go to do X') uses the connective stem ~に for purpose — 診てもらいに行く ('go to be examined'). 不在 ('absent, not present') is a Sino-Japanese word for being away from one's expected place.