Here is the constraint in question...
i. This associatedEntity SHALL contain exactly one [1..1] id (CONF:CMS_0005) such that it
1. SHALL NOT contain [0..0] @nullFlavor (CONF:CMS_0052).
2. SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.2074.1" CMS EHR Certification Number (formerly known as Office of the National Coordinator Certification Number) (CONF:CMS_0006).
3. SHALL contain exactly one [1..1] @extension (CONF:CMS_0008).
The problems with this constraint are...
- CMS_0052 is a meaningless sub-constraint and should be deleted
- as a 'such that' constraint, all four constraints should be tested together and pass or fail together. Unfortunately, the developer, didn't code it htat way
- Even the incorrect way the developer coded this is not consistent. He just included 0005 and 0006.
CMS_0005 and CMS_0006 are implemented in one assertion and CMS_0052 and CMS_0008 are implemented in two separate assertions.
If it is necessary for CMS_0008 to be implemented as a separate assertion then the constraint should have been written this way...
i. This associatedEntity SHALL contain exactly one [1..1] id (CONF:CMS_0005) such that it
1. SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.2074.1" CMS EHR Certification Number (formerly known as Office of the National Coordinator Certification Number) (CONF:CMS_0006).
a. This id SHALL contain exactly one [1..1] @extension (CONF:CMS_0008).
However, I can see no advantage to wording it that way. The correct wording of the constraint should be:
i. This associatedEntity SHALL contain exactly one [1..1] id (CONF:CMS_0005) such that it
1. SHALL contain exactly one [1..1] @root="2.16.840.1.113883.3.2074.1" CMS EHR Certification Number (formerly known as Office of the National Coordinator Certification Number) (CONF:CMS_0006).
2. This id SHALL contain exactly one [1..1] @extension (CONF:CMS_0008).
And this should be implemented in a single assertion in the Schematron rules.