SuccessConsole Output

Skipping 2,837 KB.. Full Log
eference)&gt;=1">(IHEExternalReferenceEntry): element hl7:reference is required [min 1x].</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']" id="d506897e4596-false-d672185e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEExternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.4')">(IHEExternalReferenceEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.4'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:id[not(@nullFlavor)]" id="d506897e4599-false-d672199e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEExternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:code" id="d506897e4601-false-d672209e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEExternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="string(@nullFlavor)=('NA')">(IHEExternalReferenceEntry): The value for @nullFlavor SHALL be 'NA'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:text" id="d506897e4604-false-d672223e0">
        <extends rule="ED" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEExternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ED", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:reference" id="d506897e4606-false-d672233e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="@typeCode">(IHEExternalReferenceEntry): attribute @typeCode SHALL be present.</assert>
        <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@typeCode),' '))" />
        <let name="theAttCheck" value="distinct-values(for $code in tokenize(@typeCode,' ') return if ($code=('SPRT','REFR')) then ($code) else ())" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="not(@typeCode) or count($theAttValue) = count($theAttCheck)">(IHEExternalReferenceEntry): The value for typeCode SHALL be 'code SPRT or code REFR'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="count(hl7:externalDocument)&gt;=1">(IHEExternalReferenceEntry): element hl7:externalDocument is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="count(hl7:externalDocument)&lt;=1">(IHEExternalReferenceEntry): element hl7:externalDocument appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:reference/hl7:externalDocument" id="d506897e4611-false-d672269e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="string(@classCode)=('DOC') or not(@classCode)">(IHEExternalReferenceEntry): The value for @classCode SHALL be 'DOC'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="string(@moodCode)=('EVN') or not(@moodCode)">(IHEExternalReferenceEntry): The value for @moodCode SHALL be 'EVN'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHEExternalReferenceEntry): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="count(hl7:id[not(@nullFlavor)])&lt;=1">(IHEExternalReferenceEntry): element hl7:id[not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="count(hl7:text)&lt;=1">(IHEExternalReferenceEntry): element hl7:text appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:reference/hl7:externalDocument/hl7:id[not(@nullFlavor)]" id="d506897e4614-false-d672300e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEExternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4']]/hl7:reference/hl7:externalDocument/hl7:text" id="d506897e4616-false-d672310e0">
        <extends rule="ED" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEExternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ED", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.5.3.1.4.4.1-2013-12-20T000000">
    <title>IHE Internal Reference Entry</title>
   


    <rule context="*[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]]/hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]" id="d506897e4629-false-d672338e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="@classCode">(IHEInternalReferenceEntry): attribute @classCode SHALL be present.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="not(@classCode) or (string-length(@classCode)&gt;0 and not(matches(@classCode,'\s')))">(IHEInternalReferenceEntry): Attribute @classCode SHALL be of data type 'cs'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="@moodCode">(IHEInternalReferenceEntry): attribute @moodCode SHALL be present.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="not(@moodCode) or (string-length(@moodCode)&gt;0 and not(matches(@moodCode,'\s')))">(IHEInternalReferenceEntry): Attribute @moodCode SHALL be of data type 'cs'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1'])&gt;=1">(IHEInternalReferenceEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1'])&lt;=1">(IHEInternalReferenceEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHEInternalReferenceEntry): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="count(hl7:id[not(@nullFlavor)])&lt;=1">(IHEInternalReferenceEntry): element hl7:id[not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="count(hl7:code)&gt;=1">(IHEInternalReferenceEntry): element hl7:code is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="count(hl7:code)&lt;=1">(IHEInternalReferenceEntry): element hl7:code appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]]/hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']" id="d506897e4632-false-d672390e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEInternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.4.1')">(IHEInternalReferenceEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.4.1'.</assert>
    </rule>
   
    <rule context="*[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]]/hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]/hl7:id[not(@nullFlavor)]" id="d506897e4635-false-d672404e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEInternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]]/hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]/hl7:code" id="d506897e4637-false-d672414e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEInternalReferenceEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.4.1" test="string(@nullFlavor)=('NA') or not(@nullFlavor)">(IHEInternalReferenceEntry): The value for @nullFlavor SHALL be 'NA'.</assert>
    </rule>
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.5.3.1.4.5-2016-09-26T095055">
    <title>IHE Problem Entry</title>
   


    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]" id="d506897e4654-false-d672471e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="string(@moodCode)=('EVN')">(IHEProblemEntry): The value for @moodCode SHALL be 'EVN'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'])&gt;=1">(IHEProblemEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'])&lt;=1">(IHEProblemEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.28'])&gt;=1">(IHEProblemEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.28'] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.28'])&lt;=1">(IHEProblemEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.28'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHEProblemEntry): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:id[not(@nullFlavor)])&lt;=1">(IHEProblemEntry): element hl7:id[not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:code)&gt;=1">(IHEProblemEntry): element hl7:code is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:code)&lt;=1">(IHEProblemEntry): element hl7:code appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:text[not(@nullFlavor)])&gt;=1">(IHEProblemEntry): element hl7:text[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:text[not(@nullFlavor)])&lt;=1">(IHEProblemEntry): element hl7:text[not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:statusCode[@code='completed' or @nullFlavor])&lt;=1">(IHEProblemEntry): element hl7:statusCode[@code='completed' or @nullFlavor] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:effectiveTime)&lt;=1">(IHEProblemEntry): element hl7:effectiveTime appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:value)&gt;=1">(IHEProblemEntry): element hl7:value is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:entryRelationship[hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.55']]])&lt;=1">(IHEProblemEntry): element hl7:entryRelationship[hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.55']]] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:entryRelationship[@typeCode='REFR'][hl7:observation[hl7:templateId[@root='2.16.840.1.113883.10.20.1.57'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.50'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1.1']]])&lt;=1">(IHEProblemEntry): element hl7:entryRelationship[@typeCode='REFR'][hl7:observation[hl7:templateId[@root='2.16.840.1.113883.10.20.1.57'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.50'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1.1']]] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:entryRelationship[@typeCode='REFR'][hl7:observation[hl7:templateId[@root='2.16.840.1.113883.10.20.1.51'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1.2']]])&lt;=1">(IHEProblemEntry): element hl7:entryRelationship[@typeCode='REFR'][hl7:observation[hl7:templateId[@root='2.16.840.1.113883.10.20.1.51'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1.2']]] appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5']" id="d506897e4662-false-d672590e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.5')">(IHEProblemEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.5'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']" id="d506897e4664-false-d672605e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="string(@root)=('2.16.840.1.113883.10.20.1.28')">(IHEProblemEntry): The value for @root SHALL be '2.16.840.1.113883.10.20.1.28'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:id[not(@nullFlavor)]" id="d506897e4666-false-d672619e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:code" id="d506897e4668-false-d672629e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:text[not(@nullFlavor)]" id="d506897e4670-false-d672639e0">
        <extends rule="ED" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ED", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:statusCode[@code='completed' or @nullFlavor]" id="d506897e4678-false-d672650e0">
        <extends rule="CS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="@nullFlavor or (@code='completed')">(IHEProblemEntry): The element value SHALL be one of 'code 'completed''.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:effectiveTime" id="d506897e4683-false-d672666e0">
        <extends rule="IVL_TS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVL_TS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:value" id="d506897e4685-false-d672676e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:originalText)&gt;=1">(IHEProblemEntry): element hl7:originalText is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:originalText)&lt;=1">(IHEProblemEntry): element hl7:originalText appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:value/hl7:originalText" id="d506897e4687-false-d672696e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="count(hl7:reference)&lt;=1">(IHEProblemEntry): element hl7:reference appears too often [max 1x].</assert>
    </rule>
   





    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:entryRelationship[@typeCode='REFR'][hl7:observation[hl7:templateId[@root='2.16.840.1.113883.10.20.1.57'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.50'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1.1']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="string(@typeCode)=('REFR')">(IHEProblemEntry): The value for @typeCode SHALL be 'REFR'.</assert>
    </rule>

   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]/hl7:entryRelationship[@typeCode='REFR'][hl7:observation[hl7:templateId[@root='2.16.840.1.113883.10.20.1.51'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.1.2']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5" test="string(@typeCode)=('REFR')">(IHEProblemEntry): The value for @typeCode SHALL be 'REFR'.</assert>
    </rule>
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.5.3.1.4.5.2-2016-09-26T085028">
    <title>IHE Problem Concern Entry</title>
   


    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]" id="d506897e4720-false-d672831e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@classCode)=('ACT')">(IHEProblemConcernEntry): The value for @classCode SHALL be 'ACT'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@moodCode)=('EVN')">(IHEProblemConcernEntry): The value for @moodCode SHALL be 'EVN'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'])&gt;=1">(IHEProblemConcernEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'])&lt;=1">(IHEProblemConcernEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'])&gt;=1">(IHEProblemConcernEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'])&lt;=1">(IHEProblemConcernEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2'])&gt;=1">(IHEProblemConcernEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2'])&lt;=1">(IHEProblemConcernEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHEProblemConcernEntry): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:code)&gt;=1">(IHEProblemConcernEntry): element hl7:code is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:code)&lt;=1">(IHEProblemConcernEntry): element hl7:code appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:statusCode)&lt;=1">(IHEProblemConcernEntry): element hl7:statusCode appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:effectiveTime)&lt;=1">(IHEProblemConcernEntry): element hl7:effectiveTime appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="count(hl7:entryRelationship[@typeCode='SUBJ'][hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]])&gt;=1">(IHEProblemConcernEntry): element hl7:entryRelationship[@typeCode='SUBJ'][hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]] is required [min 1x].</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:templateId[@root='2.16.840.1.113883.10.20.1.27']" id="d506897e4723-false-d672930e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@root)=('2.16.840.1.113883.10.20.1.27')">(IHEProblemConcernEntry): The value for @root SHALL be '2.16.840.1.113883.10.20.1.27'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1']" id="d506897e4726-false-d672945e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.5.1')">(IHEProblemConcernEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.5.1'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']" id="d506897e4729-false-d672960e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.5.2')">(IHEProblemConcernEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.5.2'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:id[not(@nullFlavor)]" id="d506897e4732-false-d672974e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:code" id="d506897e4734-false-d672984e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@nullFlavor)=('NA')">(IHEProblemConcernEntry): The value for @nullFlavor SHALL be 'NA'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:statusCode" id="d506897e4739-false-d672998e0">
        <extends rule="CS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:effectiveTime" id="d506897e4742-false-d673008e0">
        <extends rule="IVL_TS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProblemConcernEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVL_TS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>

   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:entryRelationship[@typeCode='SUBJ'][hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.28']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@typeCode)=('SUBJ')">(IHEProblemConcernEntry): The value for @typeCode SHALL be 'SUBJ'.</assert>
    </rule>
   
    <rule context="*[hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]]/hl7:act[@classCode='ACT'][@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.27'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.1'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.5.2']]/hl7:entryRelationship[@typeCode='REFR']" id="d506897e4746-false-d673045e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.5.2" test="string(@typeCode)=('REFR')">(IHEProblemConcernEntry): The value for @typeCode SHALL be 'REFR'.</assert>
    </rule>
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.5.3.1.4.7-2013-12-20T000000">
    <title>IHE Medications Entry</title>
   


    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]" id="d506897e4760-false-d673117e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@classCode)=('SBADM')">(IHEMedicationsEntry): The value for @classCode SHALL be 'SBADM'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="@moodCode">(IHEMedicationsEntry): attribute @moodCode SHALL be present.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="not(@moodCode) or (string-length(@moodCode)&gt;0 and not(matches(@moodCode,'\s')))">(IHEMedicationsEntry): Attribute @moodCode SHALL be of data type 'cs'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="@moodCode='INT' or @moodCode='EVN'">(IHEMedicationsEntry): moodCode attribute SHALL have the value 'INT' or 'EVN'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.24'][not(@nullFlavor)])&gt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.24'][not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.24'][not(@nullFlavor)])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.24'][not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7'])&gt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7'] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7'])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.1'])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.1'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.8'])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.8'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.9'])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.9'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.10'])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.10'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.11'])&lt;=1">(IHEMedicationsEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.11'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHEMedicationsEntry): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:id[not(@nullFlavor)])&lt;=1">(IHEMedicationsEntry): element hl7:id[not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:code)&lt;=1">(IHEMedicationsEntry): element hl7:code appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:text)&gt;=1">(IHEMedicationsEntry): element hl7:text is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:text)&lt;=1">(IHEMedicationsEntry): element hl7:text appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:statusCode[@code='completed'])&gt;=1">(IHEMedicationsEntry): element hl7:statusCode[@code='completed'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:statusCode[@code='completed'])&lt;=1">(IHEMedicationsEntry): element hl7:statusCode[@code='completed'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:effectiveTime)&gt;=1">(IHEMedicationsEntry): element hl7:effectiveTime is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:effectiveTime)&lt;=1">(IHEMedicationsEntry): element hl7:effectiveTime appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:effectiveTime[@operator='A'])&lt;=1">(IHEMedicationsEntry): element hl7:effectiveTime[@operator='A'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:routeCode)&lt;=1">(IHEMedicationsEntry): element hl7:routeCode appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:doseQuantity)&lt;=1">(IHEMedicationsEntry): element hl7:doseQuantity appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:rateQuantity)&lt;=1">(IHEMedicationsEntry): element hl7:rateQuantity appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:consumable[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]])&gt;=1">(IHEMedicationsEntry): element hl7:consumable[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:consumable[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]])&lt;=1">(IHEMedicationsEntry): element hl7:consumable[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]] appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='2.16.840.1.113883.10.20.1.24'][not(@nullFlavor)]" id="d506897e4765-false-d673296e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('2.16.840.1.113883.10.20.1.24')">(IHEMedicationsEntry): The value for @root SHALL be '2.16.840.1.113883.10.20.1.24'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']" id="d506897e4770-false-d673311e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.7')">(IHEMedicationsEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.7'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.1']" id="d506897e4775-false-d673323e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.7.1')">(IHEMedicationsEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.7.1'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.8']" id="d506897e4778-false-d673335e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.8')">(IHEMedicationsEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.8'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.9']" id="d506897e4781-false-d673347e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.9')">(IHEMedicationsEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.9'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.10']" id="d506897e4784-false-d673359e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.10')">(IHEMedicationsEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.10'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.11']" id="d506897e4787-false-d673371e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.11')">(IHEMedicationsEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.11'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:id[not(@nullFlavor)]" id="d506897e4791-false-d673385e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:code" id="d506897e4793-false-d673395e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:text" id="d506897e4795-false-d673405e0">
        <extends rule="ED" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ED", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:reference)&gt;=1">(IHEMedicationsEntry): element hl7:reference is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:reference)&lt;=1">(IHEMedicationsEntry): element hl7:reference appears too often [max 1x].</assert>
    </rule>
   


    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:statusCode[@code='completed']" id="d506897e4798-false-d673433e0">
        <extends rule="CS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="@nullFlavor or (@code='completed')">(IHEMedicationsEntry): The element value SHALL be one of 'code 'completed''.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:effectiveTime" id="d506897e4801-false-d673449e0">
        <extends rule="IVL_TS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVL_TS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:low)&gt;=1">(IHEMedicationsEntry): element hl7:low is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:low)&lt;=1">(IHEMedicationsEntry): element hl7:low appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:high)&gt;=1">(IHEMedicationsEntry): element hl7:high is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:high)&lt;=1">(IHEMedicationsEntry): element hl7:high appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:effectiveTime/hl7:low" id="d506897e4803-false-d673479e0">
        <extends rule="IVXB_TS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVXB_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVXB_TS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@nullFlavor)=('UNK') or not(@nullFlavor)">(IHEMedicationsEntry): The value for @nullFlavor SHALL be 'UNK'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:effectiveTime/hl7:high" id="d506897e4805-false-d673493e0">
        <extends rule="IVXB_TS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVXB_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVXB_TS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@nullFlavor)=('UNK') or not(@nullFlavor)">(IHEMedicationsEntry): The value for @nullFlavor SHALL be 'UNK'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:effectiveTime[@operator='A']" id="d506897e4807-false-d673505e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@operator)=('A')">(IHEMedicationsEntry): The value for @operator SHALL be 'A'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:routeCode" id="d506897e4810-false-d673515e0">
        <extends rule="CE" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEMedicationsEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CE", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   









    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:entryRelationship[@typeCode='REFR'][hl7:supply[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@typeCode)=('REFR')">(IHEMedicationsEntry): The value for @typeCode SHALL be 'REFR'.</assert>
    </rule>
   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:entryRelationship[@typeCode='COMP']" id="d506897e4824-false-d673584e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@typeCode)=('COMP')">(IHEMedicationsEntry): The value for @typeCode SHALL be 'COMP'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:sequenceNumber)&gt;=1">(IHEMedicationsEntry): element hl7:sequenceNumber is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="count(hl7:sequenceNumber)&lt;=1">(IHEMedicationsEntry): element hl7:sequenceNumber appears too often [max 1x].</assert>
    </rule>
   



    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:entryRelationship[@typeCode='SUBJ'][hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.3']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@typeCode)=('SUBJ')">(IHEMedicationsEntry): The value for @typeCode SHALL be 'SUBJ'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@inversionInd)=('true')">(IHEMedicationsEntry): The value for @inversionInd SHALL be 'true'.</assert>
    </rule>

   
    <rule context="*[hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]]/hl7:substanceAdministration[@classCode='SBADM'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7']]/hl7:entryRelationship[@typeCode='RSON'][hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7" test="string(@typeCode)=('RSON')">(IHEMedicationsEntry): The value for @typeCode SHALL be 'RSON'.</assert>
    </rule>
   
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.5.3.1.4.7.2-2016-01-08T125158">
    <title>IHE Product Entry</title>
   


    <rule context="*[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]]/hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]" id="d506897e4850-false-d673683e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="string(@classCode)=('MANU') or not(@classCode)">(IHEProductEntry): The value for @classCode SHALL be 'MANU'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'])&gt;=1">(IHEProductEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'])&lt;=1">(IHEProductEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.53'])&gt;=1">(IHEProductEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.53'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.53'])&lt;=1">(IHEProductEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.53'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:manufacturedMaterial)&lt;=1">(IHEProductEntry): element hl7:manufacturedMaterial appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]]/hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2']" id="d506897e4852-false-d673723e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProductEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.7.2')">(IHEProductEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.7.2'.</assert>
    </rule>
   
    <rule context="*[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]]/hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]/hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']" id="d506897e4855-false-d673738e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHEProductEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="string(@root)=('2.16.840.1.113883.10.20.1.53')">(IHEProductEntry): The value for @root SHALL be '2.16.840.1.113883.10.20.1.53'.</assert>
    </rule>
   
    <rule context="*[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]]/hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]/hl7:manufacturedMaterial" id="d506897e4858-false-d673752e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:code)&lt;=1">(IHEProductEntry): element hl7:code appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]]/hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]/hl7:manufacturedMaterial/hl7:code" id="d506897e4859-false-d673765e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:originalText)&lt;=1">(IHEProductEntry): element hl7:originalText appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]]/hl7:manufacturedProduct[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.2'] and hl7:templateId[@root='2.16.840.1.113883.10.20.1.53']]/hl7:manufacturedMaterial/hl7:code/hl7:originalText" id="d506897e4860-false-d673778e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:reference)&gt;=1">(IHEProductEntry): element hl7:reference is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.2" test="count(hl7:reference)&lt;=1">(IHEProductEntry): element hl7:reference appears too often [max 1x].</assert>
    </rule>
   
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.5.3.1.4.7.3-2013-12-20T000000">
    <title>IHE Supply Entry</title>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]" id="d506897e4872-false-d673831e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="string(@classCode)=('SPLY')">(IHESupplyEntry): The value for @classCode SHALL be 'SPLY'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="@moodCode">6.3.4.18.4: attribute @moodCode SHALL be present.</assert>
        <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@moodCode),' '))" />
        <let name="theAttCheck" value="distinct-values(for $code in tokenize(@moodCode,' ') return if ($code=('EVN','INT')) then ($code) else ())" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="not(@moodCode) or count($theAttValue) = count($theAttCheck)">6.3.4.18.4: The value for moodCode SHALL be 'code EVN or code INT'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.34'][not(@nullFlavor)])&gt;=1">(IHESupplyEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.34'][not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.34'][not(@nullFlavor)])&lt;=1">(IHESupplyEntry): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.34'][not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3'])&gt;=1">(IHESupplyEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3'])&lt;=1">(IHESupplyEntry): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHESupplyEntry): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:quantity)&lt;=1">(IHESupplyEntry): element hl7:quantity appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:entryRelationship[@typeCode='SUBJ'][hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.3.1']]])&lt;=1">(IHESupplyEntry): element hl7:entryRelationship[@typeCode='SUBJ'][hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.3.1']]] appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:templateId[@root='2.16.840.1.113883.10.20.1.34'][not(@nullFlavor)]" id="d506897e4878-false-d673914e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHESupplyEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="string(@root)=('2.16.840.1.113883.10.20.1.34')">(IHESupplyEntry): The value for @root SHALL be '2.16.840.1.113883.10.20.1.34'.</assert>
    </rule>
   
    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']" id="d506897e4881-false-d673929e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHESupplyEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.4.7.3')">(IHESupplyEntry): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.4.7.3'.</assert>
    </rule>
   
    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:id[not(@nullFlavor)]" id="d506897e4884-false-d673943e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHESupplyEntry): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:quantity" id="d506897e4888-false-d673960e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="@value">(IHESupplyEntry): attribute @value SHALL be present.</assert>
    </rule>
   
    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:author" id="d506897e4891-false-d673970e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:time)&gt;=1">(IHESupplyEntry): element hl7:time is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:time)&lt;=1">(IHESupplyEntry): element hl7:time appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:assignedAuthor)&gt;=1">(IHESupplyEntry): element hl7:assignedAuthor is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:assignedAuthor)&lt;=1">(IHESupplyEntry): element hl7:assignedAuthor appears too often [max 1x].</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:author/hl7:assignedAuthor" id="d506897e4895-false-d674003e0">
        <let name="elmcount" value="count(hl7:assignedPerson|hl7:representedOrganization)" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="$elmcount&gt;=1">(IHESupplyEntry): choice (hl7:assignedPerson or hl7:representedOrganization) does not contain enough elements [min 1x]</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:assignedPerson)&lt;=1">(IHESupplyEntry): element hl7:assignedPerson appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:representedOrganization)&lt;=1">(IHESupplyEntry): element hl7:representedOrganization appears too often [max 1x].</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:author/hl7:assignedAuthor/hl7:assignedPerson" id="d506897e4901-false-d674046e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:name)&gt;=1">(IHESupplyEntry): element hl7:name is required [min 1x].</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:author/hl7:assignedAuthor/hl7:representedOrganization" id="d506897e4903-false-d674066e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:name)&gt;=1">(IHESupplyEntry): element hl7:name is required [min 1x].</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:performer" id="d506897e4905-false-d674086e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="string(@typeCode)=('PRF') or not(@typeCode)">(IHESupplyEntry): The value for @typeCode SHALL be 'PRF'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:time)&gt;=1">(IHESupplyEntry): element hl7:time is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:time)&lt;=1">(IHESupplyEntry): element hl7:time appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:assignedEntity[not(@nullFlavor)])&gt;=1">(IHESupplyEntry): element hl7:assignedEntity[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:assignedEntity[not(@nullFlavor)])&lt;=1">(IHESupplyEntry): element hl7:assignedEntity[not(@nullFlavor)] appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:performer/hl7:time" id="d506897e4908-false-d674116e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="string(@nullFlavor)=('UNK') or not(@nullFlavor)">(IHESupplyEntry): The value for @nullFlavor SHALL be 'UNK'.</assert>
    </rule>
   
    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:performer/hl7:assignedEntity[not(@nullFlavor)]" id="d506897e4911-false-d674126e0">
        <let name="elmcount" value="count(hl7:assignedPerson|hl7:representedOrganization)" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="$elmcount&gt;=1">(IHESupplyEntry): choice (hl7:assignedPerson or hl7:representedOrganization) does not contain enough elements [min 1x]</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:assignedPerson)&lt;=1">(IHESupplyEntry): element hl7:assignedPerson appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:representedOrganization)&lt;=1">(IHESupplyEntry): element hl7:representedOrganization appears too often [max 1x].</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:performer/hl7:assignedEntity[not(@nullFlavor)]/hl7:assignedPerson" id="d506897e4917-false-d674169e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:name)&gt;=1">(IHESupplyEntry): element hl7:name is required [min 1x].</assert>
    </rule>
   


    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:performer/hl7:assignedEntity[not(@nullFlavor)]/hl7:representedOrganization" id="d506897e4919-false-d674189e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="count(hl7:name)&gt;=1">(IHESupplyEntry): element hl7:name is required [min 1x].</assert>
    </rule>
   



    <rule context="*[hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]]/hl7:supply[@classCode='SPLY'][hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3']]/hl7:entryRelationship[@typeCode='SUBJ'][hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.3.1']]]">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.5.3.1.4.7.3" test="string(@typeCode)=('SUBJ')">(IHESupplyEntry): The value for @typeCode SHALL be 'SUBJ'.</assert>
    </rule>
</pattern>
   
    <pattern id="template-1.3.6.1.4.1.19376.1.7.3.1.1.13.7-2017-03-24T141618">
    <title>IHE Coded Event Outcomes</title>
   


    <rule context="*[hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]]/hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]" id="d506897e5039-false-d674787e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'])&gt;=1">(IHECodedEventOutcomes): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'])&lt;=1">(IHECodedEventOutcomes): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9'])&gt;=1">(IHECodedEventOutcomes): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9'] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9'])&lt;=1">(IHECodedEventOutcomes): element hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:id[not(@nullFlavor)])&gt;=1">(IHECodedEventOutcomes): element hl7:id[not(@nullFlavor)] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:id[not(@nullFlavor)])&lt;=1">(IHECodedEventOutcomes): element hl7:id[not(@nullFlavor)] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:code[(@code='42545-4' and @codeSystem='2.16.840.1.113883.6.1')])&gt;=1">(IHECodedEventOutcomes): element hl7:code[(@code='42545-4' and @codeSystem='2.16.840.1.113883.6.1')] is mandatory [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:code[(@code='42545-4' and @codeSystem='2.16.840.1.113883.6.1')])&lt;=1">(IHECodedEventOutcomes): element hl7:code[(@code='42545-4' and @codeSystem='2.16.840.1.113883.6.1')] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:text)&gt;=1">(IHECodedEventOutcomes): element hl7:text is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:text)&lt;=1">(IHECodedEventOutcomes): element hl7:text appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="count(hl7:entry[hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.13']]])&gt;=1">(IHECodedEventOutcomes): element hl7:entry[hl7:observation[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.13']]] is mandatory [min 1x].</assert>
    </rule>
   
    <rule context="*[hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]]/hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7']" id="d506897e5040-false-d674878e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHECodedEventOutcomes): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="string(@root)=('1.3.6.1.4.1.19376.1.7.3.1.1.13.7')">(IHECodedEventOutcomes): The value for @root SHALL be '1.3.6.1.4.1.19376.1.7.3.1.1.13.7'.</assert>
    </rule>
   
    <rule context="*[hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]]/hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]/hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']" id="d506897e5042-false-d674893e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHECodedEventOutcomes): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="string(@root)=('1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9')">(IHECodedEventOutcomes): The value for @root SHALL be '1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9'.</assert>
    </rule>
   
    <rule context="*[hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]]/hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]/hl7:id[not(@nullFlavor)]" id="d506897e5044-false-d674907e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHECodedEventOutcomes): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]]/hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]/hl7:code[(@code='42545-4' and @codeSystem='2.16.840.1.113883.6.1')]" id="d506897e5045-false-d674918e0">
        <extends rule="CE" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHECodedEventOutcomes): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CE", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="@nullFlavor or (@code='42545-4' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='EVENT OUTCOME' and @codeSystemName='LOINC')">(IHECodedEventOutcomes): The element value SHALL be one of 'code '42545-4' codeSystem '2.16.840.1.113883.6.1' displayName='EVENT OUTCOME' codeSystemName='LOINC''.</assert>
    </rule>
   
    <rule context="*[hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]]/hl7:section[hl7:templateId[@root='1.3.6.1.4.1.19376.1.7.3.1.1.13.7'] and hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.1.21.2.9']]/hl7:text" id="d506897e5047-false-d674934e0">
        <extends rule="SD.TEXT" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=1.3.6.1.4.1.19376.1.7.3.1.1.13.7" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='SD.TEXT' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(IHECodedEventOutcomes): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:SD.TEXT", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>

   




</pattern>
   
    <pattern id="template-2.16.840.1.113883.10.20.1.46-2007-04-01T000000">
    <title>Medication series number observation</title>
   


    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]" id="d506897e5173-false-d675022e0">
        <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@classCode),' '))" />
        <let name="theAttCheck" value="distinct-values(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.11529-DYNAMIC.xml')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@classCode) or count($theAttValue) = count($theAttCheck)">CONF-341: The value for classCode SHALL be selected from value set '2.16.840.1.113883.1.11.11529' ActClassObservation (DYNAMIC).</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="string(@moodCode)=('EVN')">CONF-342: The value for @moodCode SHALL be 'EVN'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@negationInd) or string(@negationInd)=('true','false')">(MedicationSeriesNumberObservation): Attribute @negationInd SHALL be of data type 'bl'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.46'])&gt;=1">(MedicationSeriesNumberObservation): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.46'] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:templateId[@root='2.16.840.1.113883.10.20.1.46'])&lt;=1">(MedicationSeriesNumberObservation): element hl7:templateId[@root='2.16.840.1.113883.10.20.1.46'] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:code[(@code='30973-2' and @codeSystem='2.16.840.1.113883.6.1') or @nullFlavor])&gt;=1">(MedicationSeriesNumberObservation): element hl7:code[(@code='30973-2' and @codeSystem='2.16.840.1.113883.6.1') or @nullFlavor] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:code[(@code='30973-2' and @codeSystem='2.16.840.1.113883.6.1') or @nullFlavor])&lt;=1">(MedicationSeriesNumberObservation): element hl7:code[(@code='30973-2' and @codeSystem='2.16.840.1.113883.6.1') or @nullFlavor] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:derivationExpr)&lt;=1">(MedicationSeriesNumberObservation): element hl7:derivationExpr appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:text)&lt;=1">(MedicationSeriesNumberObservation): element hl7:text appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:statusCode[@code=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.15933-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor])&gt;=1">(MedicationSeriesNumberObservation): element hl7:statusCode[@code=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.15933-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:statusCode[@code=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.15933-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor])&lt;=1">(MedicationSeriesNumberObservation): element hl7:statusCode[@code=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.15933-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:effectiveTime)&lt;=1">(MedicationSeriesNumberObservation): element hl7:effectiveTime appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:priorityCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor])&lt;=1">(MedicationSeriesNumberObservation): element hl7:priorityCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor] appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:repeatNumber)&lt;=1">(MedicationSeriesNumberObservation): element hl7:repeatNumber appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:languageCode)&lt;=1">(MedicationSeriesNumberObservation): element hl7:languageCode appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:value)&gt;=1">(MedicationSeriesNumberObservation): element hl7:value is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:value)&lt;=1">(MedicationSeriesNumberObservation): element hl7:value appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:subject)&lt;=1">(MedicationSeriesNumberObservation): element hl7:subject appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']" id="d506897e5183-false-d675186e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="string(@root)=('2.16.840.1.113883.10.20.1.46')">(MedicationSeriesNumberObservation): The value for @root SHALL be '2.16.840.1.113883.10.20.1.46'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:id" id="d506897e5185-false-d675200e0">
        <extends rule="II" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='II' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:II", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:code[(@code='30973-2' and @codeSystem='2.16.840.1.113883.6.1') or @nullFlavor]" id="d506897e5186-false-d675211e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@nullFlavor or (@code='30973-2' and @codeSystem='2.16.840.1.113883.6.1' and @displayName='Dose number')">(MedicationSeriesNumberObservation): The element value SHALL be one of 'code '30973-2' codeSystem '2.16.840.1.113883.6.1' displayName='Dose number''.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:derivationExpr" id="d506897e5189-false-d675227e0">
        <extends rule="ST" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ST' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ST", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:text" id="d506897e5190-false-d675237e0">
        <extends rule="ED" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ED", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:statusCode[@code=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.15933-DYNAMIC.xml')//valueSet[1]/conceptList/*/@code or @nullFlavor]" id="d506897e5191-false-d675250e0">
        <extends rule="CS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <let name="theCode" value="@code" />
        <let name="theCodeSystem" value="@codeSystem" />
        <let name="theCodeSystemVersion" value="@codeSystemVersion" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@nullFlavor or exists(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.15933-DYNAMIC.xml')//valueSet[1]/conceptList/concept[@code = $theCode] or completeCodeSystem)">(MedicationSeriesNumberObservation): The element value SHALL be one of '2.16.840.1.113883.1.11.15933 ActStatus (DYNAMIC)'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:effectiveTime" id="d506897e5196-false-d675271e0">
        <extends rule="IVL_TS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_TS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVL_TS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:priorityCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor]" id="d506897e5198-false-d675284e0">
        <extends rule="CE" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CE", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <let name="theCode" value="@code" />
        <let name="theCodeSystem" value="@codeSystem" />
        <let name="theCodeSystemVersion" value="@codeSystemVersion" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@nullFlavor or exists(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.16866-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(MedicationSeriesNumberObservation): The element value SHALL be one of '2.16.840.1.113883.1.11.16866 ActPriority (DYNAMIC)'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:repeatNumber" id="d506897e5202-false-d675305e0">
        <extends rule="IVL_INT" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='IVL_INT' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:IVL_INT", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:languageCode" id="d506897e5203-false-d675318e0">
        <extends rule="CS" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CS' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CS", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:value" id="d506897e5207-false-d675331e0">
        <extends rule="INT" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='INT' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:INT", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@value) or matches(@value, '^-?[1-9]\d*$|^+?\d*$')">(MedicationSeriesNumberObservation): @value is not a valid INT number <value-of select="@value" />
        </assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:interpretationCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.78-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor]" id="d506897e5209-false-d675347e0">
        <extends rule="CE" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CE", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <let name="theCode" value="@code" />
        <let name="theCodeSystem" value="@codeSystem" />
        <let name="theCodeSystemVersion" value="@codeSystemVersion" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@nullFlavor or exists(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.78-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(MedicationSeriesNumberObservation): The element value SHALL be one of '2.16.840.1.113883.1.11.78 ObservationInterpretation (DYNAMIC)'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:methodCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.14079-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor]" id="d506897e5213-false-d675371e0">
        <extends rule="CE" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CE", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <let name="theCode" value="@code" />
        <let name="theCodeSystem" value="@codeSystem" />
        <let name="theCodeSystemVersion" value="@codeSystemVersion" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@nullFlavor or exists(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.14079-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(MedicationSeriesNumberObservation): The element value SHALL be one of '2.16.840.1.113883.1.11.14079 ObservationMethod (DYNAMIC)'.</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:targetSiteCode" id="d506897e5217-false-d675392e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>

   








    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:entryRelationship">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@typeCode">(MedicationSeriesNumberObservation): attribute @typeCode SHALL be present.</assert>
        <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@typeCode),' '))" />
        <let name="theAttCheck" value="distinct-values(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.19447-DYNAMIC.xml')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@typeCode) or count($theAttValue) = count($theAttCheck)">(MedicationSeriesNumberObservation): The value for typeCode SHALL be selected from value set '2.16.840.1.113883.1.11.19447' x_ActRelationshipEntryRelationship (DYNAMIC).</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@contextConductionInd) or string(@contextConductionInd)=('true','false')">(MedicationSeriesNumberObservation): Attribute @contextConductionInd SHALL be of data type 'bl'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@inversionInd) or string(@inversionInd)=('true','false')">(MedicationSeriesNumberObservation): Attribute @inversionInd SHALL be of data type 'bl'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@negationInd) or string(@negationInd)=('true','false')">(MedicationSeriesNumberObservation): Attribute @negationInd SHALL be of data type 'bl'</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:sequenceNumber)&lt;=1">(MedicationSeriesNumberObservation): element hl7:sequenceNumber appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:seperatableInd)&lt;=1">(MedicationSeriesNumberObservation): element hl7:seperatableInd appears too often [max 1x].</assert>
    </rule>

   





    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:referenceRange" id="d506897e5258-false-d675522e0">
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="string(@typeCode)=('REFV') or not(@typeCode)">(MedicationSeriesNumberObservation): The value for @typeCode SHALL be 'REFV'.</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:observationRange)&gt;=1">(MedicationSeriesNumberObservation): element hl7:observationRange is required [min 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:observationRange)&lt;=1">(MedicationSeriesNumberObservation): element hl7:observationRange appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:referenceRange/hl7:observationRange" id="d506897e5260-false-d675542e0">
        <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@classCode),' '))" />
        <let name="theAttCheck" value="distinct-values(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.11529-DYNAMIC.xml')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@classCode) or count($theAttValue) = count($theAttCheck)">(MedicationSeriesNumberObservation): The value for classCode SHALL be selected from value set '2.16.840.1.113883.1.11.11529' ActClassObservation (DYNAMIC).</assert>
        <let name="theAttValue" value="distinct-values(tokenize(normalize-space(@moodCode),' '))" />
        <let name="theAttCheck" value="distinct-values(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.20268-DYNAMIC.xml')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="not(@moodCode) or count($theAttValue) = count($theAttCheck)">(MedicationSeriesNumberObservation): The value for moodCode SHALL be selected from value set '2.16.840.1.113883.1.11.20268' ActMoodEventCriterion (DYNAMIC).</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:code)&lt;=1">(MedicationSeriesNumberObservation): element hl7:code appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:text)&lt;=1">(MedicationSeriesNumberObservation): element hl7:text appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:value)&lt;=1">(MedicationSeriesNumberObservation): element hl7:value appears too often [max 1x].</assert>
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="count(hl7:interpretationCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.78-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor])&lt;=1">(MedicationSeriesNumberObservation): element hl7:interpretationCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.78-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor] appears too often [max 1x].</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:referenceRange/hl7:observationRange/hl7:code" id="d506897e5269-false-d675609e0">
        <extends rule="CD" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CD' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CD", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   
    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:referenceRange/hl7:observationRange/hl7:text" id="d506897e5271-false-d675619e0">
        <extends rule="ED" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='ED' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:ED", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
    </rule>
   


    <rule context="*[hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]]/hl7:observation[@moodCode='EVN'][hl7:templateId[@root='2.16.840.1.113883.10.20.1.46']]/hl7:referenceRange/hl7:observationRange/hl7:interpretationCode[concat(@code,@codeSystem)=doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.78-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code,@codeSystem) or @nullFlavor]" id="d506897e5273-false-d675639e0">
        <extends rule="CE" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="(local-name-from-QName(resolve-QName(@xsi:type,.))='CE' and namespace-uri-from-QName(resolve-QName(@xsi:type,.))='urn:hl7-org:v3') or not(@xsi:type)">(MedicationSeriesNumberObservation): If an @xsi:type instruction is present it SHALL be valued "{urn:hl7-org:v3}:CE", found "{<value-of select="namespace-uri-from-QName(resolve-QName(@xsi:type,.))" />}:<value-of select="local-name-from-QName(resolve-QName(@xsi:type,.))" />"</assert>
        <let name="theCode" value="@code" />
        <let name="theCodeSystem" value="@codeSystem" />
        <let name="theCodeSystemVersion" value="@codeSystemVersion" />
        <assert role="error" see="https://poc-art-decor.kereval.com/art-decor/decor-templates--ASIP-CSE-?id=2.16.840.1.113883.10.20.1.46" test="@nullFlavor or exists(doc('src/test/resources/bin/schematron/asip-ad/ASIP-CSE/include/voc-2.16.840.1.113883.1.11.78-DYNAMIC.xml')//valueSet[1][conceptList/concept[@code = $theCode][@codeSystem = $theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion] or completeCodeSystem[@codeSystem=$theCodeSystem][not(@codeSystemVersion) or @codeSystemVersion=$theCodeSystemVersion]])">(MedicationSeriesNumberObservation): The element value SHALL be one of '2.16.840.1.113883.1.11.78 ObservationInterpretation (DYNAMIC)'.</assert>
    </rule>
</pattern>
</schema>

processing schematron
INFO  2019-11-22 17:06:03,768 [main] net.ihe.gazelle.schematron.compiler.SchematronCompiler: The Schematron [ASIP - Certificat de sante du 8e jour] compiled with success. The result of compilation available on bin/compilations/1.xsl
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.617 s - in net.ihe.gazelle.schematron.compiler.SchematronCompilerTest
[INFO] Running net.ihe.gazelle.schematron.validation.ValidationProcessTest
INFO  2019-11-22 17:06:03,977 [main] net.ihe.gazelle.schematron.validation.ValidationProcess: /tmp/FileToValidate6952543054896702105.xml
INFO  2019-11-22 17:06:03,978 [main] net.ihe.gazelle.schematron.validation.ValidationProcess: deleting temp file
INFO  2019-11-22 17:06:03,985 [main] net.ihe.gazelle.schematron.validation.ValidationProcess: /tmp/FileToValidate7783568705507028469.xml
INFO  2019-11-22 17:06:03,990 [main] net.ihe.gazelle.schematron.validation.ValidationProcess: /tmp/FileToValidate1388632173245091723.xml
INFO  2019-11-22 17:06:03,991 [main] net.ihe.gazelle.schematron.validation.ValidationProcess: deleting temp file
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.057 s - in net.ihe.gazelle.schematron.validation.ValidationProcessTest
[INFO] Running net.ihe.gazelle.schematron.validation.XMLValidationTest
ERROR 2019-11-22 17:06:04,573 [main] net.ihe.gazelle.schematron.validation.XMLValidation: XSD file missing
INFO  2019-11-22 17:06:04,579 [main] net.ihe.gazelle.schematron.validation.XMLValidation: XML validation using XSD 1.0
ERROR 2019-11-22 17:06:05,259 [main] net.ihe.gazelle.schematron.validation.XMLValidation: XSD file missing: the file /path is missing
ERROR 2019-11-22 17:06:05,298 [main] net.ihe.gazelle.schematron.validation.XMLValidation: There is no XSD file defined.
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.316 s - in net.ihe.gazelle.schematron.validation.XMLValidationTest
[INFO] Running net.ihe.gazelle.schematron.validation.SchematronValidatorTest
ERROR 2019-11-22 17:06:05,355 [main] net.ihe.gazelle.schematron.validation.SchematronValidator: schematron is null
ERROR 2019-11-22 17:06:57,456 [main] net.ihe.gazelle.schematron.validation.SchematronValidator: file is null
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 63.405 s - in net.ihe.gazelle.schematron.validation.SchematronValidatorTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 37, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[JENKINS] Recording test results
[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.9:report (default-report) @ SchematronValidator-ejb ---
[INFO] Loading execution data file /home/jenkins/.hudson/jobs/SchematronValidator/workspace/SchematronValidator-ejb/target/jacoco.exec
[INFO] Analyzed bundle 'SchematronValidator-ejb' with 50 classes
[INFO] 
[INFO] --- maven-ejb-plugin:2.3:ejb (default-ejb) @ SchematronValidator-ejb ---
[INFO] Building EJB SchematronValidator-ejb with EJB version 3.0
[INFO] Building jar: /home/jenkins/.hudson/jobs/SchematronValidator/workspace/SchematronValidator-ejb/target/SchematronValidator-ejb.jar
[INFO] 
[INFO] --- maven-source-plugin:3.0.1:jar-no-fork (attach-sources) @ SchematronValidator-ejb ---
[INFO] Building jar: /home/jenkins/.hudson/jobs/SchematronValidator/workspace/SchematronValidator-ejb/target/SchematronValidator-ejb-sources.jar
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:test-jar (default) @ SchematronValidator-ejb ---
[INFO] Building jar: /home/jenkins/.hudson/jobs/SchematronValidator/workspace/SchematronValidator-ejb/target/SchematronValidator-ejb-tests.jar