<!--  Immunizations section: 2.16.840.1.113883.10.20.1.6 -->

<!-- errors -->

<pattern id='p-2.16.840.1.113883.10.20.1.6-errors' see='#p-2.16.840.1.113883.10.20.1.6-errors'>
	<title>Immunizations section - errors validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.6"]'>
	<assert test="self::cda:section">The root of an Immunizations section shall be 'section' in the HL7 namespace.</assert>
	<assert test="cda:text">The Immunizations section SHALL contain a narrative block.</assert>
	<assert test="cda:code">The immunizations section SHALL contain Section / code</assert>
	<assert test="cda:code[@code='11369-6'][@codeSystem='2.16.840.1.113883.6.1']">The value for “Section / code” SHALL be “11369-6” “History of immunizations” 2.16.840.1.113883.6.1 LOINC STATIC.</assert>
	<assert test="cda:title">The immunizations section SHALL contain Section / title.</assert>
	</rule>
</pattern>

<!-- warning -->

<pattern id='p-2.16.840.1.113883.10.20.1.6-warning' see='#p-2.16.840.1.113883.10.20.1.6-warning'>
	<title>Immunizations section - warning validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.6"]'>
	<assert test='descendant::*[cda:templateId/@root="2.16.840.1.113883.10.20.1.24"]|descendant::*[cda:templateId/@root="2.16.840.1.113883.10.20.1.34"]'>The Immunizations section SHOULD include one or more medication activities (templateId 2.16.840.1.113883.10.20.1.24) and/or supply activities (templateId 2.16.840.1.113883.10.20.1.34). </assert>
	<assert test="contains(translate(cda:title,'QWERTYUIOPASDFGHJKLZXCVBNM','qwertyuiopasdfghjklzxcvbnm'),'immunization')">Section / title SHOULD be valued with a case-insensitive language-insensitive text string containing “immunization”.</assert>
	</rule>
</pattern>

<!-- manual -->

<pattern id='p-2.16.840.1.113883.10.20.1.6-manual' see='#p-2.16.840.1.113883.10.20.1.6-manual'>
	<title>Immunizations section - manual validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.6"]'>
	<report test='.'></report>
	</rule>
</pattern>

