<!--  Family history observation: 2.16.840.1.113883.10.20.1.22 -->

<!-- errors -->

<pattern id='p-2.16.840.1.113883.10.20.1.22-errors' see='#p-2.16.840.1.113883.10.20.1.22-errors'>
	<title>Family history observation - errors validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.22"]'>
	<assert test="self::cda:observation">A family history observation (templateId 2.16.840.1.113883.10.20.1.22) SHALL be represented with Observation.</assert>
	<assert test="@moodCode='EVN'">The value for "Observation / moodCode" in a family history observation SHALL be "EVN" 2.16.840.1.113883.5.1001 ActMood STATIC.</assert>
	<assert test="cda:id">A family history observation SHALL contain at least one Observation / id.</assert>
	<assert test="count(cda:statusCode)=1">A family history observation SHALL include exactly one Observation / statusCode.</assert>
	<assert test="cda:statusCode/@code='completed'">The value for "Observation / statusCode" in a family history observation SHALL be "completed"  2.16.840.1.113883.5.14 ActStatus STATIC.</assert>
	</rule>
</pattern>

<!-- warning -->

<pattern id='p-2.16.840.1.113883.10.20.1.22-warning' see='#p-2.16.840.1.113883.10.20.1.22-warning'>
	<title>Family history observation - warning validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.22"]'>
	<assert test="cda:effectiveTime">A family history observation SHOULD include Observation / effectiveTime.</assert>
	</rule>
</pattern>

<!-- manual -->

<pattern id='p-2.16.840.1.113883.10.20.1.22-manual' see='#p-2.16.840.1.113883.10.20.1.22-manual'>
	<title>Family history observation - manual validation phase</title>
	<rule context='*[cda:templateId/@root="2.16.840.1.113883.10.20.1.22"]'>
	<report test='.'></report>
	</rule>
</pattern>

