Medicine and Destiny

Since we are here to learn lessons and there are no accidents, why should we seek medical attention if the illness we encounter is a karmic lesson? If our death is pre-ordained and will occur from a certain malady at a certain time, is medical intervention useless?