Difference between revisions of "Template:Schematron Rule"

From IHE Wiki
Jump to navigation Jump to search
m
Line 2: Line 2:
 
== Instructions ==
 
== Instructions ==
 
<pre>
 
<pre>
  {{Schematron Rule|1|2|3|4|5|6|7}}
+
  {{Schematron Rule|1|2|3|4|5|6|7|8}}
 
</pre>
 
</pre>
 
; 1: Type of Entry
 
; 1: Type of Entry
Line 11: Line 11:
 
; 6: OID of component
 
; 6: OID of component
 
; 7: Comment on component
 
; 7: Comment on component
 +
; 8: Optional replacement Shematron to use
  
 
== Demonstration ==
 
== Demonstration ==
Line 31: Line 32:
 
Schematron Rule|Type|Name|OID|Optional|O|OptOID|}}{{
 
Schematron Rule|Type|Name|OID|Optional|O|OptOID|}}{{
 
Schematron Rule|Type|Name|OID|Conditional|C|COID|}}
 
Schematron Rule|Type|Name|OID|Conditional|C|COID|}}
</noinclude><onlyinclude> &nbsp;
+
</noinclude><onlyinclude> {{If|test={{{8|}}}|then={{{8}}}|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 -->
Line 44: Line 45:
 
       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></onlyinclude>
+
     </assert>}}</onlyinclude>

Revision as of 08:56, 2 October 2008

Instructions

 {{Schematron Rule|1|2|3|4|5|6|7|8}}
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
8
Optional replacement Shematron to use

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|}}
 
   <assert test='.//cda:templateId[@root = "ROID"]'> 
     <!-- Verify that all required data elements are present -->
     Error: A(n) Name must contain Required component..
     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: A(n) Name should contain Required If Known component..
     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 Optional component..
     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 Conditional component..
     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: A(n) Name must contain Required.
     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: A(n) Name should contain Required If Known.
     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 Optional.
     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 Conditional.
     See http://wiki.ihe.net/index.php?title=OID
   </assert>
 
   <assert test='.//cda:templateId[@root = "{{{6}}}"]'>
     See http://wiki.ihe.net/index.php?title={{{3}}}
   </assert>