## Templates: UC and MC vs. XOR, IF and IFF

Hello everybody,

today I have had a thorough look at chapters 6.1.7 and 6.1.8 of PS 3.16 (DCMR).
I have a problem understanding the difference between Requirement Type "UC"
and "MC" in combination with the abbreviations "XOR", "IF" and "IFF".

A.) Definition of XOR
If XOR is used for *mutual exclusion* of template rows, the distinction
between UC and MC makes sense. In the case of "only MC" lines in the XOR
group, you pick one of them and that one "shall" (=must) be present. In the
case of "only UC" lines in the XOR group, you pick one and it "may" be
present, i.e. you could also pick zero rows.

Unfortunately, chapter 6.1.8 defines XOR a different way:
"Exclusive OR. One and only one row shall be selected from mutually-exclusive
options."

I am not a native English speaker, but this sounds like "exactly one" (not:
zero) of the rows *must* be included in the DICOM SR content tree. This way,
UC would behave like MC and would thus become superfluous.

As both UC and MC are used frequently in combination with XOR conditions in
the DCMR, I suppose that UC and MC should in fact make a difference.
Therefore, I suggest a clearer definition of XOR in 6.1.8. I also suggest
adding a remark, that all rows included in one "XOR group" should be of the
same type (MC xor UC :-)). I just checked ALL XOR statements in the DCMR and
was pleased to find no "mixed" groups so far.

B.) Definition of IF and IFF in combination with the definitions of UC and MC
As far as I see, there are 8 combinations for the usage of IF and IFF: The
Reqirement Type is UC or MC, the Condition is IF or IFF and the Condition is
true or false. Let's have a look at all 8 combinations:

1) UC, IF, true: "shall" be present (according to definition of IF)
2) MC, IF, true: "shall" be present (according to definition of IF)
3) UC, IFF, true: "shall" be present (according to definition of IFF)
4) MC, IFF, true: "shall" be present (according to definition of IFF)
5) UC, IF, false: "may" be present (according to definition of IF) or "may
not" be present (according to definition of UC)
6) MC, IF, false: "may" be present (according to definition of IF) or ??? (no
clear remark in definition of MC)
7) UC, IFF, false: "shall not" be present (according to definition of IFF)
8) MC, IFF, false: "shall not" be present (according to definition of IFF)

You see a slight lack of clarity in the definition of MC for case 6. There
should really be a remark how to handle MC elements if the condition is *not*
satisfied.

Let's assume that MC elements "may not" be present, if the condition is not
satisfied. This is how I understand the definition of IF. In this case, again,
there is no difference between UC and MC elements (compare outcome of cases
[1,2], [3,4], [5,6] and [7,8]).