<!--  Payers section: 2.16.840.1.113883.10.20.1.9 -->

<!-- errors -->

<pattern id='p-2.16.840.1.113883.10.20.1.9-errors' see='#p-2.16.840.1.113883.10.20.1.9-errors'>
	<title>Payers section - errors validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.9"]'>
	<assert test="self::cda:section">The root of a Payers section shall be 'section' in the HL7 namespace.</assert>
	<assert test="cda:text">The Payers section SHALL contain a narrative block.</assert>
	<assert test="cda:code[@code='48768-6'][@codeSystem='2.16.840.1.113883.6.1']">The value for Section / code in a Payers section SHALL be "35525-5" "Financing and insurance" 2.16.840.1.113883.6.1 LOINC STATIC.</assert>
	<assert test="cda:title">The Payers section SHALL contain Section / title.</assert>
	</rule>
</pattern>

<!-- warning -->

<pattern id='p-2.16.840.1.113883.10.20.1.9-warning' see='#p-2.16.840.1.113883.10.20.1.9-warning'>
	<title>Payers section - warning validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.9"]'>
	<assert test='descendant::*[cda:templateId/@root="2.16.840.1.113883.10.20.1.20"]'>The Payers section SHOULD include one or more coverage activities (templateId 2.16.840.1.113883.10.20.1.20). </assert>
	<assert test="contains(translate(cda:title,'QWERTYUIOPASDFGHJKLZXCVBNM','qwertyuiopasdfghjklzxcvbnm'),'insurance') or contains(translate(cda:title,'QWERTYUIOPASDFGHJKLZXCVBNM','qwertyuiopasdfghjklzxcvbnm'),'payers')">Section / title SHOULD be valued with a case-insensitive language-insensitive text string containing “insurance” or “payers”.</assert>
	</rule>
</pattern>

<!-- manual -->

<pattern id='p-2.16.840.1.113883.10.20.1.9-manual' see='#p-2.16.840.1.113883.10.20.1.9-manual'>
	<title>Payers section - manual validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.9"]'>
	<report test='.'></report>
	</rule>
</pattern>

