A causal chain in three clauses: pregnant → thought of health → quit smoking. ~ので gives the reason; the te-form 考えて links the thinking to the quitting. 健康のこと ('the matter of health') uses こと to abstract the topic — 'thought about (the matter of) health.' タバコをやめる is the everyday phrase for 'quit smoking.'