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