<?xml version="1.0" encoding="UTF-8"?>

<Parameters xmlns="http://hl7.org/fhir">
  <id value="example-epa-op-provide-dispensation-erp-input-parameters-3"/>
  <meta>
    <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-provide-dispensation-erp-input-parameters"/>
  </meta>
  <parameter>
    <name value="rxDispensation"/>
    <part>
      <name value="prescriptionId"/>
      <valueIdentifier>
        <system value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId"/>
        <value value="160.100.000.000.006.24"/>
      </valueIdentifier>
    </part>
    <part>
      <name value="authoredOn"/>
      <valueDate value="2025-05-20"/>
    </part>
    <part>
      <name value="medicationDispense"/>
      <resource>
        <MedicationDispense>
          <id value="5d8fbf7c-bdb0-44c2-95fe-423ae0404ccd"/>
          <meta>
            <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-dispense"/>
          </meta>
          <status value="completed"/>
          <medicationReference>
            <reference value="Medication/ec4d55a0-dec1-46b7-96cc-096845b74c4b"/>
          </medicationReference>
          <subject>
            <identifier>
              <system value="http://fhir.de/sid/gkv/kvid-10"/>
              <value value="X110411319"/>
            </identifier>
          </subject>
          <performer>
            <actor>
              <reference value="Organization/ccc03731-4c38-4b48-bd41-583766b796c6"/>
              <identifier>
                <type>
                  <coding>
                    <system value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
                    <version value="2.9.0"/>
                    <code value="PRN"/>
                    <display value="Provider number"/>
                  </coding>
                </type>
                <system value="https://gematik.de/fhir/sid/telematik-id"/>
                <value value="9-2.58.00000023"/>
              </identifier>
              <display value="gematik Apotheke"/>
            </actor>
          </performer>
          <whenHandedOver value="2025-05-22"/>
          <substitution>
            <wasSubstituted value="false"/>
          </substitution>
        </MedicationDispense>
      </resource>
    </part>
    <part>
      <name value="medication"/>
      <resource>
        <Medication>
          <id value="ec4d55a0-dec1-46b7-96cc-096845b74c4b"/>
          <meta>
            <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication"/>
          </meta>
          <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/drug-category-extension">
            <valueCoding>
              <system value="https://gematik.de/fhir/epa-medication/CodeSystem/epa-drug-category-cs"/>
              <code value="00"/>
            </valueCoding>
          </extension>
          <extension url="http://fhir.de/StructureDefinition/normgroesse">
            <valueCode value="N1"/>
          </extension>
          <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/medication-id-vaccine-extension">
            <valueBoolean value="false"/>
          </extension>
          <code>
            <coding>
              <system value="http://fhir.de/CodeSystem/ifa/pzn"/>
              <code value="00814665"/>
            </coding>
            <text value="Januvia® 50 mg 28 Filmtabletten N1"/>
          </code>
          <status value="active"/>
          <form>
            <coding>
              <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM"/>
              <code value="FTA"/>
              <display value="Tabletten"/>
            </coding>
          </form>
        </Medication>
      </resource>
    </part>
    <part>
      <name value="organization"/>
      <resource>
        <Organization>
          <id value="ccc03731-4c38-4b48-bd41-583766b796c6"/>
          <meta>
            <profile value="https://gematik.de/fhir/directory/StructureDefinition/OrganizationDirectory"/>
            <tag>
              <system value="https://gematik.de/fhir/directory/CodeSystem/Origin"/>
              <code value="ldap"/>
            </tag>
          </meta>
          <identifier>
            <system value="https://gematik.de/fhir/sid/telematik-id"/>
            <value value="9-2.58.00000023"/>
          </identifier>
          <active value="true"/>
          <type>
            <coding>
              <system value="https://gematik.de/fhir/directory/CodeSystem/OrganizationProfessionOID"/>
              <code value="1.2.276.0.76.4.54"/>
              <display value="Öffentliche Apotheke"/>
            </coding>
          </type>
          <name value="gematik Apotheke"/>
          <alias value="Apotheke"/>
          <address>
            <text value="gematik Apotheke&#xA;Friedrichstr. 136,&#xA;10117 Berlin"/>
            <line value="Friedrichstr. 136"/>
            <city value="Berlin"/>
            <district value="Mitte"/>
            <state value="Berlin"/>
            <postalCode value="10117"/>
            <country value="DE"/>
          </address>
          <contact>
            <purpose>
              <coding>
                <system value="http://terminology.hl7.org/CodeSystem/contactentity-type"/>
                <code value="ADMIN"/>
              </coding>
            </purpose>
            <name>
              <text value="gematik ITSM"/>
            </name>
            <telecom>
              <system value="email"/>
              <value value="betrieb@gematik.de"/>
            </telecom>
          </contact>
        </Organization>
      </resource>
    </part>
    <part>
      <name value="status"/>
      <valueCode value="in-progress"/>
    </part>
  </parameter>
</Parameters>