You have to be careful with the difference between A and D.
First thing you want to know, A - Initial encounter, is not "first time visit," the best keyword to remember "A" is "active treatment" so the way I like to think basically for most cases, is hospital setting for A.
D - Subsequent encounter is used for when patient has completed active treatment of the condition and is now receiving routine care, keyword I like to apply here for "D" is "follow up."
So for instance, lets say I broke my right arm right now, I go to the hospital today, they do surgery to fix it, it will be coded as "A" since I am receiving active treatment of my injury. The doctor will have me do a follow up in 2 weeks to make sure is healing properly. I go to my appointment in 2 weeks with my PCP to check on my injury and is healing well, so character "D" comes in now. If I re-break my same exact arm/bone and go to the hospital again for surgery, it will be once again a "A" case, and not a "D" case.
So just remember, "initial encounter" doesn't mean first, and "subsequent" doesn't mean second, you have to read carefully the guidelines, most of the outpatient follow-up cases for injuries are coded to "D" and there are also other 7th characters besides A,D,S that will specify that its a subsequent encounter but the injury is not healing properly (nonunion or malunion).
Hope this helps!