@jmandel Based on previous comments, it seems like you have some skill at interpreting these specs... maybe you can help check my reading here...

"2.16.840.1.113883.10.20.22.1.2" seems just be for the ContinuityOfCareDocument sub-type of C-CDAs, so something like a DischargeSummary C-CDA wouldn't include it. I'm pretty confident about that much.

The question is what we ought to use instead to detect a C-CDA. "2.16.840.1.113883.10.20.22.1.1" is apparently the "US Realm Header"? I don't really understand if that means it will sometimes exclude C-CDAs (from other countries) or will sometimes include non-C-CDAs (that still get this header anyways). If it's not the right thing to look at, is our next option to check for all of the C-CDA flavors (DischargeSummary, ContinuityOfCareDocument, ...)?