Template:Schematron Rule: Difference between revisions

From IHE Wiki
Jump to navigation Jump to search
Kboone (talk | contribs)
mNo edit summary
Kboone (talk | contribs)
mNo edit summary
Line 1: Line 1:
      <assert test='.//cda:templateId[@root = "{{{6}}}"]'><br/>
<noinclude>
{{If|test={{Equal|{{{5}}}|R}}|then=
== Instructions ==
&nbsp;      &lt;!-- Verify that all required data elements are present -->
&nbsp;      Error: A {{{2}}} must contain {{{4}}}. }}{{If|test={{Equal|{{{5}}}|R2}}|then=<br/>
&nbsp;      &lt;!-- Alert on any missing required if known elements -->
&nbsp;      Warning: A {{{2}}} should contain {{{4}}}.}}{{If|test={{Equal|{{{5}}}|O}}|then=<br/>
&nbsp;      &lt;!-- Note any missing optional elements -->
&nbsp;      Note: This {{{2}}} does not contain {{{4}}}.}}{{If|test={{Equal|{{{5}}}|C}}|then=<br/>
&nbsp;      &lt;!-- Manually test conditional elements -->
&nbsp;      Manual: This {{{2}}} does not contain {{{4}}}.}}{{If|test={{{7|}}}|then=
&nbsp;      {{{7}}}}}<br/>        <nowiki>See http://www.ihe.net/index.php/</nowiki>{{{3}}}
      </assert><br/>    &nbsp;<noinclude>
<pre>
<pre>
  {{Schematron Rule|1|2|3|4|5|6|7}}
  {{Schematron Rule|1|2|3|4|5|6|7}}
Line 21: Line 11:
; 6: OID of component
; 6: OID of component
; 7: Comment on component
; 7: Comment on component
== Demonstration ==
{{Schematron Rule|Type|Name|OID|Required component.|R|ROID|Comment}}
{{Schematron Rule|Type|Name|OID|Required If Known component.|R2|R2OID|Comment}}
{{Schematron Rule|Type|Name|OID|Optional component.|O|OptOID|Comment}}
{{Schematron Rule|Type|Name|OID|Conditional component.|C|COID|Comment}}
{{Schematron Rule|Type|Name|OID|Required|R|ROID|}}
{{Schematron Rule|Type|Name|OID|Required If Known|R2|R2OID|}}
{{Schematron Rule|Type|Name|OID|Optional|O|OptOID|}}
{{Schematron Rule|Type|Name|OID|Conditional|C|COID|}}
</noinclude>
</noinclude>
<includeonly>
<pr<noinclude></noinclude>e>
{{If|test={{Equal|{{{5}}}|R}}|then=<br/>
      <assert test='.//cda:templateId[@root = "{{{6}}}"]'>
        &lt;!-- Verify that all required data elements are present -->
        Error: A {{{2}}} must contain {{{4}}}.
        See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
        {{{7}}}
      </assert>}}{{If|test={{Equal|{{{5}}}|R2}}|then=<br/>
      <assert test='.//cda:templateId[@root = "{{{6}}}"]'>
        &lt;!-- Alert on any missing required if known elements -->
        Warning: A {{{2}}} should contain {{{4}}}. {{{7|}}}
        See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
      </assert>}}{{If|test={{Equal|{{{5}}}|O}}|then=<br/>
      <assert test='.//cda:templateId[@root = "{{{6}}}"]'>
        &lt;-- Note any missing optional elements -->
        Note: This {{{2}}} does not contain {{{4}}}. {{{7|}}}
        See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
      </assert>}}{{If|test={{Equal|{{{5}}}|C}}|then=<br/>
      <assert test='.//cda:templateId[@root = "{{{6}}}"]'>
        Manual: This {{{2}}} does not contain {{{4}}}. {{{7|}}}
        See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
      </assert>}}
</pr<noinclude></noinclude>e>
</includeonly>

Revision as of 16:23, 18 May 2007

Instructions

 {{Schematron Rule|1|2|3|4|5|6|7}}
1
Type of Entry
2
Name of Entry being tested
3
OID of Entry being tested
4
Name of component.
5
Optionality of component
6
OID of component
7
Comment on component

Demonstration


<assert test='.//cda:templateId[@root = "ROID"]'> <!-- Verify that all required data elements are present --> Error: A Name must contain Required component.. See http://www.ihe.net/index.php/OID Comment </assert>



<assert test='.//cda:templateId[@root = "R2OID"]'> <!-- Alert on any missing required if known elements --> Warning: A Name should contain Required If Known component.. Comment See http://www.ihe.net/index.php/OID </assert>



<assert test='.//cda:templateId[@root = "OptOID"]'> <-- Note any missing optional elements --> Note: This Name does not contain Optional component.. Comment See http://www.ihe.net/index.php/OID </assert>



<assert test='.//cda:templateId[@root = "COID"]'> Manual: This Name does not contain Conditional component.. Comment See http://www.ihe.net/index.php/OID </assert>



<assert test='.//cda:templateId[@root = "ROID"]'> <!-- Verify that all required data elements are present --> Error: A Name must contain Required. See http://www.ihe.net/index.php/OID </assert>



<assert test='.//cda:templateId[@root = "R2OID"]'> <!-- Alert on any missing required if known elements --> Warning: A Name should contain Required If Known. See http://www.ihe.net/index.php/OID </assert>



<assert test='.//cda:templateId[@root = "OptOID"]'> <-- Note any missing optional elements --> Note: This Name does not contain Optional. See http://www.ihe.net/index.php/OID </assert>



<assert test='.//cda:templateId[@root = "COID"]'> Manual: This Name does not contain Conditional. See http://www.ihe.net/index.php/OID </assert>