Comparison of historical medical spending patterns among the BRICS and G7