If it's already flat then the hard part is done and it might be doable. From here it's pretty hard to know what to advise. Is it possible to take pictures of the current roof structure. Do you know many supports poles there are located in the building, if any, and if so where are they located. What is the square footage of the deck going to be?
FYI, I am just about to the limit of my knowledge in what you are trying to do. Right now I am just trying to help you determine if it can even be done and if so just how much work it could end up being.
You will have to have an engineer look at your plans and approve them if you are going to be changing the structure at all. Of course once you do that your are going to need building permits as well. You probably need permits regardless but sometimes if the job is small enough you can sneak it by.
