We consider the critical problem of pharmacosurveillance to monitor for rare adverse events once a drug or product is incorporated into routine clinical care. Key issues are the need to provide formal statistical inference for rare outcomes, and to offer flexible methods to control for many potential confounders. Flexible adjustment of the propensity score in an outcome regression model has been proposed but no formal representation of the statistical procedure has been detailed. We provide a statistical framework that incorporates recent advances from econometrics that permit the study of conditions under which the three-step approach (propensity score estimation, flexible outcome regression, and standardization) would provide valid and efficient estimation. In addition, the representation provides a direct and simple variance estimator that fully accounts for uncertainty of both outcome modeling and propensity score estimation. We conduct extensive simulations to evaluate our proposed strategy and compare the three-step approach to common alternative methods. We conclude with a thorough case study from a recent FDA Sentinel investigation.