<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="nl-vzvz-notify-document-ready" />
  <language value="nl-NL" />
  <url value="http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-notify-document-ready" />
  <version value="2.0.0-beta.2" />
  <name value="Vzvz_Notify_Document_Ready" />
  <title value="Notify Document Ready" />
  <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="Request to retrieve a document for further processing" />
  <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="CommunicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/CommunicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="CommunicationRequest">
      <path value="CommunicationRequest" />
      <short value="A request to download the Document" />
      <definition value="A request to download the document described in the DocumentReference which is referenced in the reasonReference element." />
      <comment value="Note that the requester is implemented as a reference to a contained Device." />
    </element>
    <element id="CommunicationRequest.identifier">
      <path value="CommunicationRequest.identifier" />
      <comment value="It is advised to use an OID as identifier to allow a mix and match between request notifications and retrieval notifications in V3 and FHIR. This will improve the ease of migration." />
      <min value="1" />
      <example>
        <label value="OID" />
        <valueIdentifier>
          <value value="urn:oid:2.16.840.1.113883.2.4.3.111.5.2.1.12345" />
        </valueIdentifier>
      </example>
    </element>
    <element id="CommunicationRequest.groupIdentifier">
      <path value="CommunicationRequest.groupIdentifier" />
      <short value="Identifier to match both exchanges in a synchronization workflow" />
      <definition value="The groupIdentifier is used to connect both exchanges of the synchronization workflow. Use the same groupIdentifier in all exchanges that refer to the same synchronization.&#xA;&#xA;The groupIdentifier is defined by the client initiating the first request. &#xA;In all subsequent exchanges pertaining to this synchronization this same groupIdentifier is used in the Notifiy Document Ready requests.&#xA;&#xA;The client and server participating in this synchronization should persist this identifier as long as the synchronization is not finalized." />
      <min value="1" />
      <example>
        <label value="groupIdentifier" />
        <valueIdentifier>
          <system value="http://initiatingsystem.nl/myIdentifierSystem" />
          <value value="1.2.3.4.5.6.7" />
        </valueIdentifier>
      </example>
    </element>
    <element id="CommunicationRequest.status">
      <path value="CommunicationRequest.status" />
      <fixedCode value="active" />
    </element>
    <element id="CommunicationRequest.category">
      <path value="CommunicationRequest.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="CommunicationRequest.occurrence[x]">
      <path value="CommunicationRequest.occurrence[x]" />
      <short value="Validity period" />
      <definition value="The period during which the document can be retrieved" />
      <comment value="The start time is the creation date of the document. The end time is the time when the document is no longer available." />
      <min value="1" />
      <type>
        <code value="Period" />
      </type>
      <example>
        <label value="Example validity period" />
        <valuePeriod>
          <start value="2024-05-28T02:00:00+02:00" />
          <end value="2024-05-28T03:00:00+02:00" />
        </valuePeriod>
      </example>
    </element>
    <element id="CommunicationRequest.occurrence[x].start">
      <path value="CommunicationRequest.occurrence[x].start" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.occurrence[x].end">
      <path value="CommunicationRequest.occurrence[x].end" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.authoredOn">
      <path value="CommunicationRequest.authoredOn" />
      <short value="Creation time of the request" />
      <min value="1" />
      <example>
        <label value="RequestCreation" />
        <valueDateTime value="2024-05-28T01:59:55+02:00" />
      </example>
    </element>
    <element id="CommunicationRequest.requester">
      <path value="CommunicationRequest.requester" />
      <comment value="Note that the requester is implemented as a reference to a contained Device." />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.reasonCode">
      <path value="CommunicationRequest.reasonCode" />
      <min value="1" />
      <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="CommunicationRequest.reasonReference">
      <path value="CommunicationRequest.reasonReference" />
      <short value="Information on the document" />
      <definition value="Indicates a DocumentReference that provides the metadata of the document to be retrieved" />
      <comment value="Reference the contained DocumentReference" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
      </type>
    </element>
  </differential>
</StructureDefinition>