I'm not a teacher, but here are the changes I would make:
I had gotten dirty while working in the garden.
Did you slip and fall?
When I was finishing dinner my arm started hurting.
By the time the doctor saw me, my arm had swollen up.
Student or Learner