Constructing optimal medical management areas for health services research