Difference between revisions of "Template:Schematron Rule"

From IHE Wiki
Jump to navigation Jump to search
m
m
Line 24: Line 24:
 
</div>
 
</div>
 
</noinclude><includeonly>
 
</noinclude><includeonly>
     <assert test='.//cda:templateId[@root = "{{{6}}}"]'>
+
     <assert test='.//cda:templateId[@root = "{{{6}}}"]'>{{If|test={{Equal|{{{5}}}|R}}|then=&nbsp;
{{If|test={{Equal|{{{5}}}|R}}|then=&nbsp;
 
 
       &lt;!-- Verify that all required data elements are present -->
 
       &lt;!-- Verify that all required data elements are present -->
       Error: A {{{2}}} must contain {{{4}}}.  
+
       Error: A {{{2}}} must contain {{{4}}}.}}{{If|test={{Equal|{{{5}}}|R2}}|then=&nbsp;
}}{{If|test={{Equal|{{{5}}}|R2}}|then=&nbsp;
 
 
       &lt;!-- Alert on any missing required if known elements -->
 
       &lt;!-- Alert on any missing required if known elements -->
       Warning: A {{{2}}} should contain {{{4}}}.
+
       Warning: A {{{2}}} should contain {{{4}}}.}}{{If|test={{Equal|{{{5}}}|O}}|then=&nbsp;
}}{{If|test={{Equal|{{{5}}}|O}}|then=&nbsp;
 
 
       &lt;-- Note any missing optional elements -->
 
       &lt;-- Note any missing optional elements -->
       Note: This {{{2}}} does not contain {{{4}}}.
+
       Note: This {{{2}}} does not contain {{{4}}}.}}{{If|test={{Equal|{{{5}}}|C}}|then=&nbsp;
}}{{If|test={{Equal|{{{5}}}|C}}|then=&nbsp;
 
 
       &lt;-- Manually verify condtional elements -->
 
       &lt;-- Manually verify condtional elements -->
 
       Manual: This {{{2}}} does not contain {{{4}}}.
 
       Manual: This {{{2}}} does not contain {{{4}}}.
 
}}
 
}}
       See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
+
       See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}{{If|test={{{7|}}}|then=&nbsp;
{{If|test={{{7|}}}|then=&nbsp;
 
 
       {{{7}}}}}
 
       {{{7}}}}}
 
     </assert>
 
     </assert>
 
</includeonly>
 
</includeonly>

Revision as of 21:14, 19 June 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..
     See http://www.ihe.net/index.php/OID 
     Comment
   </assert>


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


   <assert test='.//cda:templateId[@root = "COID"]'> 
     <-- Manually verify condtional elements -->
     Manual: This Name does not contain Conditional component..
     See http://www.ihe.net/index.php/OID 
     Comment
   </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"]'> 
     <-- Manually verify condtional elements -->
     Manual: This Name does not contain Conditional.
     See http://www.ihe.net/index.php/OID
   </assert>