G‑d prefaced His explanation of the laws by saying that the Jewish people are required to set up a system of courts in order to try all cases of criminal, civil, and ritual law. G‑d then explained the laws pertaining to servants, marital obligations, murder, honoring parents, kidnapping, and compensation for injuries.
Physical and Spiritual Physicians
רַק שִׁבְתּוֹ יִתֵּן וְרַפֹּא יְרַפֵּא: (שמות כא:יט)
[If someone injures someone else, the injurer] must pay for [the injured party’s] complete cure. Exodus 21:18

Whenever we are ill, G‑d requires us to seek the help of qualified physicians and follow all of their instructions. Likewise, G‑d has empowered physicians to heal the sick. But whereas doctors are merely encouraged to heal whoever is sick, they are obligated to try to save someone’s life when it is threatened.

Just as there are both life-threatening and non-life-threatening bodily illnesses, so it is with spiritual “illnesses.” Spiritually, a person is in “mortal danger” when his condition has begun to affect his ability or desire to fulfill the Torah’s commandments, since it is through our performance of the commandments that our spiritual vitality flows into us.

The rules pertaining to a physical doctor also apply to a spiritual “doctor” – i.e., anyone who is capable of helping someone who is spiritually “ill.” When someone is suffering from a minor spiritual “ailment,” we are encouraged to offer spiritual assistance. But when someone is in spiritually “mortal danger” – i.e., his fulfillment of G‑d’s commandments is threatened – we are obligated to offer assistance, not allowing any other considerations to get in the way.1