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 13: Line 13:


== Demonstration ==
== Demonstration ==
<div style='font-family: monospace; line-height: 0.9; border: 1px solid black;'>
{{Schematron Rule|Type|Name|OID|Required component.|R|ROID|Comment}}
{{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|Required If Known component.|R2|R2OID|Comment}}
Line 21: Line 22:
{{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><includeonly>
</div>
&nbsp;&nbsp;&nbsp;&nbsp;<assert test='.//cda:templateId[@root = "{{{6}}}"]'><br/>
</noinclude><includeonly>&nbsp;&nbsp;&nbsp;&nbsp;<assert test='.//cda:templateId[@root = "{{{6}}}"]'><br/>
{{If|test={{Equal|{{{5}}}|R}}|then=
{{If|test={{Equal|{{{5}}}|R}}|then=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Verify that all required data elements are present --><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- Verify that all required data elements are present --><br/>
Line 38: Line 39:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See <nowiki>http://www.ihe.net/index.php/</nowiki>{{{3}}}
{{If|test={{{7|}}}|then=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{{7}}}}}<br/>
{{If|test={{{7|}}}|then=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{{7}}}}}<br/>
&nbsp;&nbsp;&nbsp;&nbsp;</assert><br/>
&nbsp;&nbsp;&nbsp;&nbsp;</assert>
</includeonly>
</includeonly>

Revision as of 17:47, 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..
      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>