<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="nl-vzvz-notify-document-retrieved" />
  <language value="nl-NL" />
  <url value="http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-notify-document-retrieved" />
  <version value="2.0.0-beta.2" />
  <name value="Vzvz_Notify_Document_Retrieved" />
  <title value="Notify Document Retrieved" />
  <status value="draft" />
  <publisher value="VZVZ" />
  <contact>
    <name value="VZVZ" />
    <telecom>
      <system value="email" />
      <value value="standaardisatie@vzvz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Notify the requesting party that the document is retrieved" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="NL" />
      <display value="Netherlands" />
    </coding>
  </jurisdiction>
  <copyright value="VZVZ" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Communication" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Communication" />
  <derivation value="constraint" />
  <differential>
    <element id="Communication.basedOn">
      <path value="Communication.basedOn" />
      <definition value="Reference to the CommunicationRequest this Communication is based on" />
      <comment value="Reference to the nl-vzvz-notify-document-ready profile which initiated this workflow." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CommunicationRequest" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="Communication.basedOn.identifier">
      <path value="Communication.basedOn.identifier" />
      <example>
        <label value="OID of NotifyDocumentReady instance" />
        <valueIdentifier>
          <value value="urn:oid:2.16.840.1.113883.2.4.3.111.5.2.1.12345" />
        </valueIdentifier>
      </example>
    </element>
    <element id="Communication.status">
      <path value="Communication.status" />
      <definition value="Indication of the result of the retrieval and/or file processing&#xA;Use `completed` to indicate a successful retrieval and file processing&#xA;Use `not-done` to indicate something went wrong. When this value is used `statusReason` MUST be filled" />
    </element>
    <element id="Communication.statusReason">
      <path value="Communication.statusReason" />
      <definition value="Define the reason why the retrieval or processing of the document went wrong.&#xA;This element is only filled when the `status` value is set to `not-done`" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://vzvz.nl/fhir/ValueSet/aorta-document-download-errors" />
      </binding>
    </element>
    <element id="Communication.category">
      <path value="Communication.category" />
      <short value="Context of document exchange" />
      <definition value="The category is used to indicate in which context this document exchange takes place" />
      <min value="1" />
      <example>
        <label value="RegisterSync" />
        <valueCodeableConcept>
          <coding>
            <system value="http://vzvz.nl/fhir/CodeSystem/doc-exchange-category" />
            <code value="RegisterSync" />
          </coding>
        </valueCodeableConcept>
      </example>
      <binding>
        <strength value="extensible" />
        <valueSet value="http://vzvz.nl/fhir/ValueSet/doc-exchange-category" />
      </binding>
    </element>
    <element id="Communication.reasonCode">
      <path value="Communication.reasonCode" />
      <example>
        <label value="VWI-sync" />
        <valueCodeableConcept>
          <coding>
            <system value="http://vzvz.nl/fhir/CodeSystem/aorta-sync" />
            <code value="vwi_sync" />
          </coding>
        </valueCodeableConcept>
      </example>
      <binding>
        <strength value="extensible" />
        <description value="Code for describing reason for this request" />
        <valueSet value="http://vzvz.nl/fhir/ValueSet/aorta-sync" />
      </binding>
    </element>
    <element id="Communication.reasonReference">
      <path value="Communication.reasonReference" />
      <short value="Reference to the document transferred" />
      <definition value="Reference to the identifier of the DocumentReference that defines the document to be transferred" />
      <comment value="It is sufficient to refer to the DocumentReference by identifier." />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>