He did not pray in congregation because he was afraid that it would delay healing of his feet
Question

                I am a young man and praise be to Allaah, I pray regularly in congregation, But sometimes when my feet get hurt, I put a dressing on my feet and I do not go to the prayer, because I am afraid of the pain being made worse by walking there and back, and I pray at home, because if the problem gets worse, I will have to rest for a longer time, then I will not go to the mosque. What is the ruling on that?.
Praise be to Allah.May Allaah 
    bless you for your eagerness to pray in congregation. I ask Allaah to make 
    us and you steadfast in obeying Him and to accept it from us and from you. 
Yes, 
    sickness is one of the excuses for which one may stay away from prayer in 
    congregation. 
It says in
    al-Mawsoo’ah al-Fiqhiyyah (27/187): 
This refers 
    to sickness which makes it difficult to go to the mosque in order to pray in 
    congregation. 
Ibn 
    al-Mundhir said: I do not know of any difference of opinion among the 
    scholars concerning the fact that a sick person may stay away from prayer in 
    congregation because of his sickness. When the Prophet  (peace and 
    blessings of Allaah be upon him) was sick he stayed away from the mosque and 
    said: “Tell Abu Bakr to lead the people in prayer.” End quote. 
The fuqaha’ 
    (may Allaah have mercy on them) have stated that if the sick person is 
    afraid that his recovery may be delayed, then he is excused and the duty of 
    worship is reduced in his case, whether it is prayer, fasting, purification 
    or anything else.  
See: 
    al-Insaaf (2/305) and al-Mawsoo’ah al-Fiqhiyyah (14/258). 
What counts 
    in such cases is the opinion of a trustworthy doctor, or knowledge of that 
    due to experience. 
If a great 
    deal of walking will delay recovery, then there is no sin on you if you do 
    not attend prayers in congregation in the mosque. So long as you pray 
    regularly, you will have the reward of praying in congregation in sha 
    Allaah, because of the hadeeth of Abu Moosa al-Ash’ari (may Allaah be 
    pleased with him), according to which the Prophet  (peace and blessings 
    of Allaah be upon him) said: “If a person falls sick or travels, there will 
    be recorded for him the same reward as that for what he did when he was 
    healthy or was at home.” Narrated by al-Bukhaari (2834). 
And Allaah 
    knows best.