order doctypes by importance, provider by id