No, it's not that I didn't work. I just became lazy at work because I was medically unfit. Does it still make the earning haraam?

No I dont think it's haram because you were used to go but did your job with a bit laziness