Hmm, I think the main difference would be just the level of politeness. Those expressions can mean "What did you/they do after that?/What's happened after that?" other than "What's the matter?/Are you OK?", and どうしたんですか? is more common than どうしましたか? for the former meaning since the explanatory ん is there, but actually, どうしましたか? can be used also in those situations.
どうしたんですか? is basically a spoken language, so this isn't used, for instance, in a long-text reading comprehension test (e.g. 主人公はそのあとどうしましたか), but those are interchangeable in most cases.