"환자는 버둥거리며 몇 자 힘들게 적다가 숨을 거두었다."
- 환자: patient
- 버둥거리다: wriggle, flounder, struggle
- 힘들게 몇 자 적다가: after struggling to write a few words
- 숨을 거두다: die; have one's last breath
So it means "After struggling to write a few words with a wriggle, the patient died".
The priest stepped on the patient's respirator line by mistake cutting oxygen to him. The patient desperately tried to tell him to move his foot but failed and died.