That could be a good lawsuit. Product defect and doctor negligence
What is the brand name and type of ICD you have ? Many have been recalled and by some stupid law the doctor does not have to tell you unless you ask him direct.
You should call the manufacturer of your device and see what they have to say. You can find a toll free number on your ID card or owners manual. If you need help getting this info I will give you a hand.
By using the word work, are you referring to a pacemaker, etc. Generally, with a law suit there needs to be provable damages, and did the doctor know or should have known any risks associated with the procedure, and then did not properly evaluate risk or neglected to perform the treatment without due care. Most importantly is the extend of provable damages. Just stress from the ordeal may not carry much weight, etc.
What did the Doctor put into your body exactly?