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

<Parameters xmlns="http://hl7.org/fhir">
  <id value="example-epa-op-eml-entry-cancelled-output-parameters-1"/>
  <meta>
    <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-op-eml-entry-output-parameters"/>
  </meta>
  <parameter>
    <name value="medicationStatement"/>
    <resource>
      <MedicationStatement>
        <id value="6e340b90-35cd-4070-bad8-c26704d85d55"/>
        <meta>
          <versionId value="2"/>
          <lastUpdated value="2026-02-23T15:00:00.444Z"/>
          <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-statement"/>
        </meta>
        <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/context-extension">
          <valueCode value="MANUAL"/>
        </extension>
        <status value="entered-in-error"/>
        <medicationReference>
          <reference value="Medication/2571d29b-e213-40ec-b817-a1490718f491"/>
        </medicationReference>
        <subject>
          <identifier>
            <system value="http://fhir.de/sid/gkv/kvid-10"/>
            <value value="X110411319"/>
          </identifier>
        </subject>
        <effectivePeriod>
          <start value="2026-02-10"/>
        </effectivePeriod>
        <dosage>
          <extension url="http://ig.fhir.de/igs/medication/StructureDefinition/GeneratedDosageInstructions">
            <extension url="algorithm">
              <valueCoding>
                <system value="http://ig.fhir.de/igs/medication/CodeSystem/DosageTextAlgorithm"/>
                <version value="1.0.0"/>
                <code value="GematikDosageTextGenerator"/>
              </valueCoding>
            </extension>
            <extension url="algorithmVersion">
              <valueString value="1.0.0"/>
            </extension>
            <extension url="language">
              <valueCode value="de-DE"/>
            </extension>
            <extension url="text">
              <valueString value="2 x täglich: morgens und abends — je 1 Stück"/>
            </extension>
          </extension>
          <timing>
            <repeat>
              <frequency value="2"/>
              <period value="1"/>
              <periodUnit value="d"/>
              <when value="MORN"/>
              <when value="EVE"/>
            </repeat>
          </timing>
          <doseAndRate>
            <doseQuantity>
              <value value="1"/>
              <unit value="Stück"/>
              <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_BMP_DOSIEREINHEIT"/>
              <code value="1"/>
            </doseQuantity>
          </doseAndRate>
        </dosage>
      </MedicationStatement>
    </resource>
  </parameter>
  <parameter>
    <name value="medication"/>
    <resource>
      <Medication>
        <id value="16920f85-569e-415b-8b01-476bb018c794"/>
        <meta>
          <versionId value="2"/>
          <lastUpdated value="2026-02-23T15:00:00.500Z"/>
          <profile value="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication"/>
        </meta>
        <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/epa-medication-type-extension">
          <valueCoding>
            <system value="http://snomed.info/sct"/>
            <code value="781405001"/>
            <display value="Medicinal product package (product)"/>
          </valueCoding>
        </extension>
        <extension url="http://fhir.de/StructureDefinition/normgroesse">
          <valueCode value="N1"/>
        </extension>
        <identifier>
          <system value="https://gematik.de/fhir/epa-medication/sid/epa-medication-unique-identifier"/>
          <value value="B849184C973EA5FA7D9751E6FAA6AFCFFD100183596239F84DD2C0FG4C751D67"/>
        </identifier>
        <code>
          <coding>
            <system value="http://fhir.de/CodeSystem/ifa/pzn"/>
            <code value="14170042"/>
            <display value="Diclo-ratiopharm® bei Schmerzen und Fieber 25 mg Filmtabletten"/>
          </coding>
          <text value="Diclo-ratiopharm® bei Schmerzen und Fieber 25 mg Filmtabletten"/>
        </code>
        <status value="entered-in-error"/>
        <form>
          <coding>
            <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM"/>
            <code value="TAB"/>
          </coding>
        </form>
        <amount>
          <numerator>
            <extension url="https://gematik.de/fhir/epa-medication/StructureDefinition/medication-total-quantity-formulation-extension">
              <valueString value="20 St."/>
            </extension>
            <value value="20"/>
            <unit value="St"/>
          </numerator>
          <denominator>
            <value value="1"/>
          </denominator>
        </amount>
      </Medication>
    </resource>
  </parameter>
  <parameter>
    <name value="relatedActivity"/>
    <resource>
      <Provenance>
        <id value="39475183-3444-4b63-bfed-ae0741f4496b"/>
        <meta>
          <profile value="https://gematik.de/fhir/epa/StructureDefinition/epa-activity-provenance"/>
        </meta>
        <target>
          <reference value="MedicationStatement/6e340b90-35cd-4070-bad8-c26704d85d55/_history/2"/>
        </target>
        <recorded value="2026-02-23T15:00:00.550Z"/>
        <activity>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v3-DataOperation"/>
            <code value="UPDATE"/>
          </coding>
        </activity>
        <agent>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/provenance-participant-type"/>
              <code value="author"/>
            </coding>
          </type>
          <who>
            <reference value="Organization/8B421590-9F7F-46BE-BD1E-C987063AC4F5"/>
            <identifier>
              <type>
                <coding>
                  <system value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
                  <code value="PRN"/>
                </coding>
              </type>
              <system value="https://gematik.de/fhir/sid/telematik-id"/>
              <value value="9-2.58.00000060"/>
            </identifier>
            <display value="Die Apotheke"/>
          </who>
        </agent>
      </Provenance>
    </resource>
  </parameter>
</Parameters>