Karma of Fatal Illness

How does medical attention for a potentially fatal illness square with living out our karma by being afflicted with the condition and perhaps eventual death. If the illness, suffering and perhaps death are needed for our karma to be fulfilled, should we not seek medical attention?