I am looking for an advice on sample size and power calculation for an intervention study. The study uses a stepped wedged design.

The study aims to evaluate the effectiveness of case managers (intervention) in improving linkage and retention rates to HIV care among newly diagnosed HIV-infected persons. The study has two arms i.e., the control arm and the intervention arm. The setup is a hospital facility with 12 departments. We will randomize 6 departments to begin intervention in the 3rd month and the remaining 6 to commence intervention in the 6th month. A previous study done in the facility showed that 38% of the patients are linked to care. We anticipate that using the case-managers (intervention) will increase the linkage rate by approximately 20%. In the past 9 months, 1137 patients tested HIV positive. I have tried to follow Hussey and Hughes paper in the link below but it wasn’t promising. Equally other papers have not yielded fruits for me. http://www.google.co.ke/url?sa=t&rct...76247554,d.c2E

My questions are:-
i) I would like to have a code to calculate a sample size for this study, given the above information. (code in either SAS,Stata or R is okay with me)
ii) Given any arbitrary (naïve) sample size of say 960, from the information provided above, is there a code in Stata that I can calculate the power of the study? (code in either SAS,Stata or R is okay with me)
iii) In addition to that, can I get a code to generate the power curves? (code in either SAS,Stata or R is okay with me)

Please bear with my long email.
Thanks in advance.