Estimation of causal effects of multiple treatments in healthcare database studies with rare outcomes