<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="CloseOperation" />
  <url value="http://gematik.de/fhir/erp/OperationDefinition/CloseOperationDefinition" />
  <version value="1.2" />
  <name value="Close" />
  <status value="draft" />
  <kind value="operation" />
  <date value="2022-02-01" />
  <description value="The operation $close finishes the e-prescription workflow and creates a receipt. The Output of this operation is a signed Bundle, to be used for further financial processing. The status of the Task then changes into #completed" />
  <affectsState value="true" />
  <code value="close" />
  <resource value="Task" />
  <system value="false" />
  <type value="false" />
  <instance value="true" />
  <outputProfile value="https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Bundle" />
  <parameter>
    <name value="secret" />
    <use value="in" />
    <min value="1" />
    <max value="1" />
    <documentation value="The secret parameter that lets a pharmacy access the Task exclusively as part of the URL. This paramter must be equal to the value stored in Task.identifier:Secret. Otherwise the Operation aborts with an error." />
    <type value="string" />
  </parameter>
  <parameter>
    <name value="MedicationDispense" />
    <use value="in" />
    <min value="1" />
    <max value="1" />
    <documentation value="Information on dispensed Medication(s)" />
    <type value="canonical" />
    <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationDispense" />
    <targetProfile value="http://hl7.org/fhir/StructureDefinition/Bundle" />
  </parameter>
  <parameter>
    <name value="Receipt" />
    <use value="out" />
    <min value="1" />
    <max value="1" />
    <documentation value="The receipt Bundle containing the signing Device, the pharmacy`s TelematikID and a signature." />
    <type value="Bundle" />
  </parameter>
</OperationDefinition>