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 14: Line 14:
== Demonstration ==
== Demonstration ==
<pre>
<pre>
{{Schematron Rule|Type|Name|OID|Required component.|R|ROID|Comment}}{{
{{Schematron Rule|Section|Name|OID|Required component|R|ROID|Comment}}{{
Schematron Rule|Type|Name|OID|Required If Known component.|R2|R2OID|Comment}}{{
Schematron Rule|Section|Name|OID|Required If Known component|R2|R2OID|Comment}}{{
Schematron Rule|Type|Name|OID|Optional component.|O|OptOID|Comment}}{{
Schematron Rule|Section|Name|OID|Optional component|O|OptOID|Comment}}{{
Schematron Rule|Type|Name|OID|Conditional component.|C|COID|Comment}}{{
Schematron Rule|Section|Name|OID|Conditional component|C|COID|Comment}}{{
Schematron Rule|Type|Name|OID|Required|R|ROID|}}{{
Schematron Rule|Entry|Name|OID|Required|R|ROID|}}{{
Schematron Rule|Type|Name|OID|Required If Known|R2|R2OID|}}{{
Schematron Rule|Entry|Name|OID|Required If Known|R2|R2OID|}}{{
Schematron Rule|Type|Name|OID|Optional|O|OptOID|}}{{
Schematron Rule|Entry|Name|OID|Optional|O|OptOID|}}{{
Schematron Rule|Type|Name|OID|Conditional|C|COID|}}
Schematron Rule|Entry|Name|OID|Conditional|C|COID|}}{{
Schematron Rule|Entry|Name|OID|Over-ridden Conditional|CX|COID|}}
</pre>
</pre>
{{Schematron Rule|Type|Name|OID|Required component.|R|ROID|Comment}}{{
{{Schematron Rule|Section|Name|OID|Required component|R|ROID|Comment}}{{
Schematron Rule|Type|Name|OID|Required If Known component.|R2|R2OID|Comment}}{{
Schematron Rule|Section|Name|OID|Required If Known component|R2|R2OID|Comment}}{{
Schematron Rule|Type|Name|OID|Optional component.|O|OptOID|Comment}}{{
Schematron Rule|Section|Name|OID|Optional component|O|OptOID|Comment}}{{
Schematron Rule|Type|Name|OID|Conditional component.|C|COID|Comment}}{{
Schematron Rule|Section|Name|OID|Conditional component|C|COID|Comment}}{{
Schematron Rule|Type|Name|OID|Required|R|ROID|}}{{
Schematron Rule|Entry|Name|OID|Required|R|ROID|}}{{
Schematron Rule|Type|Name|OID|Required If Known|R2|R2OID|}}{{
Schematron Rule|Entry|Name|OID|Required If Known|R2|R2OID|}}{{
Schematron Rule|Type|Name|OID|Optional|O|OptOID|}}{{
Schematron Rule|Entry|Name|OID|Optional|O|OptOID|}}{{
Schematron Rule|Type|Name|OID|Conditional|C|COID|}}{{
Schematron Rule|Entry|Name|OID|Conditional|C|COID|}}{{
Schematron Rule|Type|Name|OID|Over-ridden Conditional|CX|COID|}}
Schematron Rule|Entry|Name|OID|Over-ridden Conditional|CX|COID|}}
---
---
</noinclude><includeonly> {{If|test={{Equal|{{{5}}}|CX}}|then=&nbsp;|else=&nbsp;
</noinclude><includeonly> {{If|test={{Equal|{{{5}}}|CX}}|then=&nbsp;|else=&nbsp;
     <assert test='.//cda:templateId[@root = "{{{6}}}"]'>{{If|test={{Equal|{{{5}}}|R}}|then=&nbsp;
     <assert test='.//cda:templateId[@root = "{{{6}}}"]'>{{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(n) {{{2}}} must contain {{{4}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|R2}}|then=&nbsp;
       Error: The {{{2}}} must contain a(n) {{{4}}} {{{1}}}.}}{{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(n) {{{2}}} should contain {{{4}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|O}}|then=&nbsp;
       Warning: The  {{{2}}} should contain a(n) {{{4}}} {{{1}}}.}}{{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}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|C}}|then=&nbsp;
       Note: This {{{2}}} does not contain a(n) {{{4}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|C}}|then=&nbsp;
       &lt;!-- Manually verify condtional elements -->
       &lt;!-- Manually verify condtional elements -->
       Manual: This {{{2}}} does not contain {{{4}}} {{{1}}}.
       Manual: This {{{2}}} does not contain a(n) {{{4}}} {{{1}}}.
}}
}}
       See <nowiki>http://wiki.ihe.net/index.php?title=</nowiki>{{{3}}}{{If|test={{{7|}}}|then=&nbsp;
       See <nowiki>http://wiki.ihe.net/index.php?title=</nowiki>{{{3}}}{{If|test={{{7|}}}|then=&nbsp;
       }}
       }}
     </assert>}}</includeonly>
     </assert>}}</includeonly>

Revision as of 11:02, 2 October 2008

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

{{Schematron Rule|Section|Name|OID|Required component|R|ROID|Comment}}{{
Schematron Rule|Section|Name|OID|Required If Known component|R2|R2OID|Comment}}{{
Schematron Rule|Section|Name|OID|Optional component|O|OptOID|Comment}}{{
Schematron Rule|Section|Name|OID|Conditional component|C|COID|Comment}}{{
Schematron Rule|Entry|Name|OID|Required|R|ROID|}}{{
Schematron Rule|Entry|Name|OID|Required If Known|R2|R2OID|}}{{
Schematron Rule|Entry|Name|OID|Optional|O|OptOID|}}{{
Schematron Rule|Entry|Name|OID|Conditional|C|COID|}}{{
Schematron Rule|Entry|Name|OID|Over-ridden Conditional|CX|COID|}}
 
   <assert test='.//cda:templateId[@root = "ROID"]'> 
     <!-- Verify that all required data elements are present -->
     Error: The Name must contain a(n) Required component Section.
     See http://wiki.ihe.net/index.php?title=OID 
   </assert>  
   <assert test='.//cda:templateId[@root = "R2OID"]'> 
     <!-- Alert on any missing required if known elements -->
     Warning: The  Name should contain a(n) Required If Known component Section.
     See http://wiki.ihe.net/index.php?title=OID 
   </assert>  
   <assert test='.//cda:templateId[@root = "OptOID"]'> 
     <!-- Note any missing optional elements -->
     Note: This Name does not contain a(n) Optional component Section.
     See http://wiki.ihe.net/index.php?title=OID 
   </assert>  
   <assert test='.//cda:templateId[@root = "COID"]'> 
     <!-- Manually verify condtional elements -->
     Manual: This Name does not contain a(n) Conditional component Section.
     See http://wiki.ihe.net/index.php?title=OID 
   </assert>  
   <assert test='.//cda:templateId[@root = "ROID"]'> 
     <!-- Verify that all required data elements are present -->
     Error: The Name must contain a(n) Required Entry.
     See http://wiki.ihe.net/index.php?title=OID
   </assert>  
   <assert test='.//cda:templateId[@root = "R2OID"]'> 
     <!-- Alert on any missing required if known elements -->
     Warning: The  Name should contain a(n) Required If Known Entry.
     See http://wiki.ihe.net/index.php?title=OID
   </assert>  
   <assert test='.//cda:templateId[@root = "OptOID"]'> 
     <!-- Note any missing optional elements -->
     Note: This Name does not contain a(n) Optional Entry.
     See http://wiki.ihe.net/index.php?title=OID
   </assert>  
   <assert test='.//cda:templateId[@root = "COID"]'> 
     <!-- Manually verify condtional elements -->
     Manual: This Name does not contain a(n) Conditional Entry.
     See http://wiki.ihe.net/index.php?title=OID
   </assert>  

---