I had a pneumothorax on my left lung 3 times but have not had surgery and has not happened now for 3 years can I fly to america on a 7 hour flight?

Probably. Typically one does surgery after pneumothorax has happened two times. I am not sure why it was not done in your case. I would not do surgery however just to prevent pneumothorax from happening. It does not work that way.
Not advised. Some one who has 3 episodes of spontaneous pneumothorax , not advisable to go on 7 hr flight trip , main reason if you get pneumothorax , 7 hr urgent delay for medical treatment , could be lethal and another reason cabin pressure is set at 10, 000 ft sea level may precipitate an attach, speak to your doctor .