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
 
(18 intermediate revisions by 2 users not shown)
Line 11: Line 11:
; 6: OID of component
; 6: OID of component
; 7: Comment on component
; 7: Comment on component
; 8: Type of Parent Entry


== Demonstration ==
== Demonstration ==
<div style='font-family: monospace; line-height: 0.9; border: 1px solid black;'>
<pre>
{{Schematron Rule|Type|Name|OID|Required component.|R|ROID|Comment}}
{{Schematron Rule|Section|Name|OID|Required component|R|ROID|Comment|Document}}{{
{{Schematron Rule|Type|Name|OID|Required If Known component.|R2|R2OID|Comment}}
Schematron Rule|Section|Name|OID|Required If Known component|R2|R2OID|Comment|Document}}{{
{{Schematron Rule|Type|Name|OID|Optional component.|O|OptOID|Comment}}
Schematron Rule|Section|Name|OID|Optional component|O|OptOID|Comment|Document}}{{
{{Schematron Rule|Type|Name|OID|Conditional component.|C|COID|Comment}}
Schematron Rule|Section|Name|OID|Conditional component|C|COID|Comment|Document}}{{
{{Schematron Rule|Type|Name|OID|Required|R|ROID|}}
Schematron Rule|Entry|Name|OID|Required|R|ROID|Comment|Section}}{{
{{Schematron Rule|Type|Name|OID|Required If Known|R2|R2OID|}}
Schematron Rule|Entry|Name|OID|Required If Known|R2|R2OID|Comment|Section}}{{
{{Schematron Rule|Type|Name|OID|Optional|O|OptOID|}}
Schematron Rule|Entry|Name|OID|Optional|O|OptOID|Comment|Section}}{{
{{Schematron Rule|Type|Name|OID|Conditional|C|COID|}}
Schematron Rule|Entry|Name|OID|Conditional|C|COID|Comment|Section}}{{
</div>
Schematron Rule|Entry|Name|OID|Over-ridden Conditional|CX|COID|Comment|Section}}
</noinclude><includeonly>&nbsp;&nbsp;&nbsp;&nbsp;<assert test='.//cda:templateId[@root = "{{{6}}}"]'><br/>
</pre>
{{If|test={{Equal|{{{5}}}|R}}|then=
{{Schematron Rule|Section|Name|OID|Required component|R|ROID|Comment|Document}}{{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Verify that all required data elements are present --><br/>
Schematron Rule|Section|Name|OID|Required If Known component|R2|R2OID|Comment|Document}}{{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Error: A {{{2}}} must contain {{{4}}}. <br/>
Schematron Rule|Section|Name|OID|Optional component|O|OptOID|Comment|Document}}{{
}}{{If|test={{Equal|{{{5}}}|R2}}|then=
Schematron Rule|Section|Name|OID|Conditional component|C|COID|Comment|Document}}{{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Alert on any missing required if known elements --><br/>
Schematron Rule|Entry|Name|OID|Required|R|ROID|Comment|Section}}{{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Warning: A {{{2}}} should contain {{{4}}}.<br/>
Schematron Rule|Entry|Name|OID|Required If Known|R2|R2OID|Comment|Section}}{{
}}{{If|test={{Equal|{{{5}}}|O}}|then=
Schematron Rule|Entry|Name|OID|Optional|O|OptOID|Comment|Section}}{{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;-- Note any missing optional elements --><br/>
Schematron Rule|Entry|Name|OID|Conditional|C|COID|Comment|Section}}{{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note: This {{{2}}} does not contain {{{4}}}.<br/>
Schematron Rule|Entry|Name|OID|Over-ridden Conditional|CX|COID|Comment|Section}}
}}{{If|test={{Equal|{{{5}}}|C}}|then=
---
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;-- Manually verify condtional elements --><br/>
</noinclude><includeonly> {{If|test={{Equal|{{{5}}}|CX}}|then=&nbsp;|else=&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manual: This {{{2}}} does not contain {{{4}}}.<br/>
    <assert test='.//cda:templateId[@root = "{{{6}}}"]'>{{If|test={{Equal|{{{5}}}|R}}|then=&nbsp;
      &lt;!-- Verify that all required data elements are present -->
      Error: The {{{2}}} {{{8|}}} must contain a(n) {{{4}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|R2}}|then=&nbsp;
      &lt;!-- Alert on any missing required if known elements -->
      Warning: The  {{{2}}} {{{8|}}} should contain a(n) {{{4}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|O}}|then=&nbsp;
      &lt;!-- Note any missing optional elements -->
      Note: This {{{2}}} {{{8|}}} does not contain a(n) {{{4}}} {{{1}}}.}}{{If|test={{Equal|{{{5}}}|C}}|then=&nbsp;
      &lt;!-- Manually verify condtional elements -->
      Manual: This {{{2}}} {{{8|}}} does not contain a(n) {{{4}}} {{{1}}}.
}}
}}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
      See <nowiki>http://wiki.ihe.net/index.php?title=</nowiki>{{{3}}}{{If|test={{{7|}}}|then=&nbsp;
{{If|test={{{7|}}}|then=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{{7}}}}}<br/>
      }}
&nbsp;&nbsp;&nbsp;&nbsp;</assert>
    </assert>}}</includeonly>
</includeonly>

Latest revision as of 11:55, 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
8
Type of Parent Entry

Demonstration

{{Schematron Rule|Section|Name|OID|Required component|R|ROID|Comment|Document}}{{
Schematron Rule|Section|Name|OID|Required If Known component|R2|R2OID|Comment|Document}}{{
Schematron Rule|Section|Name|OID|Optional component|O|OptOID|Comment|Document}}{{
Schematron Rule|Section|Name|OID|Conditional component|C|COID|Comment|Document}}{{
Schematron Rule|Entry|Name|OID|Required|R|ROID|Comment|Section}}{{
Schematron Rule|Entry|Name|OID|Required If Known|R2|R2OID|Comment|Section}}{{
Schematron Rule|Entry|Name|OID|Optional|O|OptOID|Comment|Section}}{{
Schematron Rule|Entry|Name|OID|Conditional|C|COID|Comment|Section}}{{
Schematron Rule|Entry|Name|OID|Over-ridden Conditional|CX|COID|Comment|Section}}
 
   <assert test='.//cda:templateId[@root = "ROID"]'> 
     <!-- Verify that all required data elements are present -->
     Error: The Name Document 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 Document 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 Document 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 Document 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 Section 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 Section 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 Section 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 Section does not contain a(n) Conditional Entry.
     See http://wiki.ihe.net/index.php?title=OID 
   </assert>  

---