<?xml version=“1.0” encoding=“UTF-8”?><Consent xmlns=“hl7.org/fhir”>

<id value="consent-example-Emergency"/>

<text>
  <status value="generated"/>
  <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
      Withhold Authorization for Treatment except for Emegency Treatment
      </p><p>
  Patient &quot;P. van de Heuvel&quot; wishes to have no data at the Good Health Psychiatric Hospital 
 available except for Emergency treatment use.
 An overall Deny consent Directive, with an exception &quot;Permit&quot; of purposeOfUse &quot;ETREAT&quot; 
 at &quot;Good Health&quot; hospital, and exception &quot;Deny&quot; all other purposeOfUse from good health hospital.
 </p>
 </div>
</text>

<status value="active"/>

<patient>
  <reference value="Patient/f001"/>
  <display value="P. van de Heuvel"/>
</patient>

<dateTime value="2015-11-18"/>
 <!--  not bound by a timeframe - Consent.period  -->

<!--  I assume the example given is Canada Infoway wide???  AND I assume it is desired to state that in the Consent.authority element  -->
<organization>
  <reference value="Organization/Infoway"/>
        <display value="Canada Infoway"/>
</organization>

<!--  the text terms of the consent in lawyer speak  -->
<sourceAttachment>
         <title value="The terms of the consent in lawyer speak."/>
         <!--  likely use url pointer to common text  -->
      </sourceAttachment>

<!--  
  this is opt-out - e.g. nothing approved unless otherwise stated.
 -->
<policyRule value="http://hl7.org/fhir/ConsentPolicy/opt-out"/>

<except>
  <type value="permit"/>

  <actor>
    <role>
      <coding>
        <system value="http://hl7.org/fhir/v3/ParticipationType"/>
        <code value="CST"/> 
      </coding>
    </role>
    <reference>
       <reference value="Organization/2.16.840.1.113883.19.6"/>
       <display value="Good Health Psychiatric Hospital"/>
    </reference>
  </actor>

  <purpose>
    <system value="http://hl7.org/fhir/v3/ActReason"/>
    <code value="ETREAT"/> 
  </purpose>
</except>
<!--  this except overrides the other one  -->
<except>
  <type value="deny"/>

  <actor>
    <role>
      <coding>
        <system value="http://hl7.org/fhir/v3/ParticipationType"/>
        <code value="CST"/> 
      </coding>
    </role>
    <reference>
       <reference value="Organization/2.16.840.1.113883.19.6"/>
       <display value="Good Health Psychiatric Hospital"/>
    </reference>
  </actor>  
</except>

</Consent>