PackagesCanonicalsLogsProblems
    Packages
    rs/de.gematik.epa.medication@1.0.1
    https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension
description: This FHIR Extension for multiple prescriptions adds details such as repetition count and time intervals for repeated medication orders to FHIR resources.
package_name: rs/de.gematik.epa.medication
derivation: constraint
name: MultiplePrescriptionExtension
type: Extension
elements:
  extension:
    index: 0
    slicing:
      rules: closed
      description: Extensions are always sliced by (at least) url
      discriminator:
      - {path: url, type: value}
      min: null
      slices:
        indicator:
          match: {url: indicator}
          schema:
            index: 1
            extensions: {}
            elements:
              extension: {index: 2}
              url:
                pattern: {type: uri, value: indicator}
                type: uri
                index: 3
              value:
                short: Multiple Prescription Indicator
                choices: [valueBoolean]
                index: 8
                slicing:
                  slices:
                    valueBoolean:
                      match: {}
                      schema:
                        short: Multiple Prescription Indicator
                        choices: [valueBoolean]
                        _required: true
                        index: 8
                      min: 1
                      max: 1
              valueBoolean:
                short: Multiple Prescription Indicator
                type: boolean
                choiceOf: value
                index: 9
                slicing:
                  slices:
                    valueBoolean:
                      match: {}
                      schema: {short: Multiple Prescription Indicator, type: boolean, _required: true, choiceOf: value, index: 9}
                      min: 1
                      max: 1
            required: [value, valueBoolean]
        counter:
          match: {url: counter}
          schema:
            index: 10
            extensions: {}
            elements:
              extension: {index: 11}
              url:
                pattern: {type: uri, value: counter}
                type: uri
                index: 12
              value:
                choices: [valueRatio]
                index: 17
                slicing:
                  slices:
                    valueRatio:
                      match: {}
                      schema:
                        choices: [valueRatio]
                        _required: true
                        index: 17
                      min: 1
                      max: 1
              valueRatio:
                type: Ratio
                choiceOf: value
                index: 18
                slicing:
                  slices:
                    valueRatio:
                      match: {}
                      schema: {type: Ratio, choiceOf: value, _required: true, index: 18}
                      min: 1
                      max: 1
              value[x]:
                elements:
                  numerator:
                    index: 19
                    elements:
                      value: {short: Multiple Prescription Counter, index: 20}
                      comparator: {index: 21}
                      unit: {index: 22}
                      system: {index: 23}
                      code: {index: 24}
                    required: [value]
                  denominator:
                    index: 25
                    elements:
                      value: {short: Denominator of Multiple Prescription Series, index: 26}
                      comparator: {index: 27}
                      unit: {index: 28}
                      system: {index: 29}
                      code: {index: 30}
                    required: [value]
                required: [denominator, numerator]
            required: [value, valueRatio]
        period:
          match: {url: period}
          schema:
            short: Zeitraum der Einlösefrist
            index: 31
            extensions: {}
            elements:
              extension: {index: 32}
              url:
                pattern: {type: uri, value: period}
                type: uri
                index: 33
              value:
                constraint:
                  -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
                  -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
                choices: [valuePeriod]
                index: 38
                slicing:
                  slices:
                    valuePeriod:
                      match: {}
                      schema:
                        constraint:
                          -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
                          -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
                        choices: [valuePeriod]
                        _required: true
                        index: 38
                      min: 1
                      max: 1
              valuePeriod:
                type: Period
                constraint:
                  -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
                  -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
                choiceOf: value
                index: 39
                slicing:
                  slices:
                    valuePeriod:
                      match: {}
                      schema:
                        type: Period
                        constraint:
                          -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
                          -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
                        choiceOf: value
                        _required: true
                        index: 39
                      min: 1
                      max: 1
              value[x]:
                elements:
                  start: {short: Start Date of the Prescription Redemption Period, index: 40}
                  end: {short: End Date of the Prescription Redemption Period, index: 41}
                required: [start]
            required: [value, valuePeriod]
        id:
          match: {url: id}
          schema:
            index: 42
            extensions: {}
            elements:
              extension: {index: 43}
              url:
                pattern: {type: uri, value: id}
                type: uri
                index: 44
              value:
                choices: [valueIdentifier]
                index: 49
                slicing:
                  slices:
                    valueIdentifier:
                      match: {}
                      schema:
                        choices: [valueIdentifier]
                        _required: true
                        index: 49
                      min: 1
                      max: 1
              valueIdentifier:
                type: Identifier
                choiceOf: value
                index: 50
                slicing:
                  slices:
                    valueIdentifier:
                      match: {}
                      schema: {type: Identifier, choiceOf: value, _required: true, index: 50}
                      min: 1
                      max: 1
              value[x]:
                elements:
                  use: {index: 51}
                  type: {index: 52}
                  system:
                    short: Specification as UUID
                    pattern: {type: uri, value: 'urn:ietf:rfc:3986'}
                    type: uri
                    index: 53
                  value: {short: Multiple Prescription ID, index: 54}
                  period: {index: 55}
                  assigner: {index: 56}
            required: [value, valueIdentifier]
  url:
    pattern: {type: uri, value: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension'}
    type: uri
    index: 57
  value:
    choices: []
    index: 59
package_version: 1.0.1
extensions:
  indicator:
    url: indicator
    index: 1
    extensions: {}
    elements:
      extension: {index: 2}
      url:
        pattern: {type: uri, value: indicator}
        type: uri
        index: 3
      value:
        short: Multiple Prescription Indicator
        choices: [valueBoolean]
        index: 8
        slicing:
          slices:
            valueBoolean:
              match: {}
              schema:
                short: Multiple Prescription Indicator
                choices: [valueBoolean]
                _required: true
                index: 8
              min: 1
              max: 1
      valueBoolean:
        short: Multiple Prescription Indicator
        type: boolean
        choiceOf: value
        index: 9
        slicing:
          slices:
            valueBoolean:
              match: {}
              schema: {short: Multiple Prescription Indicator, type: boolean, _required: true, choiceOf: value, index: 9}
              min: 1
              max: 1
    required: [value, valueBoolean]
  counter:
    url: counter
    index: 10
    extensions: {}
    elements:
      extension: {index: 11}
      url:
        pattern: {type: uri, value: counter}
        type: uri
        index: 12
      value:
        choices: [valueRatio]
        index: 17
        slicing:
          slices:
            valueRatio:
              match: {}
              schema:
                choices: [valueRatio]
                _required: true
                index: 17
              min: 1
              max: 1
      valueRatio:
        type: Ratio
        choiceOf: value
        index: 18
        slicing:
          slices:
            valueRatio:
              match: {}
              schema: {type: Ratio, choiceOf: value, _required: true, index: 18}
              min: 1
              max: 1
      value[x]:
        elements:
          numerator:
            index: 19
            elements:
              value: {short: Multiple Prescription Counter, index: 20}
              comparator: {index: 21}
              unit: {index: 22}
              system: {index: 23}
              code: {index: 24}
            required: [value]
          denominator:
            index: 25
            elements:
              value: {short: Denominator of Multiple Prescription Series, index: 26}
              comparator: {index: 27}
              unit: {index: 28}
              system: {index: 29}
              code: {index: 30}
            required: [value]
        required: [denominator, numerator]
    required: [value, valueRatio]
  period:
    url: period
    short: Zeitraum der Einlösefrist
    index: 31
    extensions: {}
    elements:
      extension: {index: 32}
      url:
        pattern: {type: uri, value: period}
        type: uri
        index: 33
      value:
        constraint:
          -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
          -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
        choices: [valuePeriod]
        index: 38
        slicing:
          slices:
            valuePeriod:
              match: {}
              schema:
                constraint:
                  -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
                  -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
                choices: [valuePeriod]
                _required: true
                index: 38
              min: 1
              max: 1
      valuePeriod:
        type: Period
        constraint:
          -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
          -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
        choiceOf: value
        index: 39
        slicing:
          slices:
            valuePeriod:
              match: {}
              schema:
                type: Period
                constraint:
                  -limitationDateStart: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: start.toString().length()=10}
                  -limitationDateEnd: {human: Limitation of the date format to 10 characters YYYY-MM-DD, source: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension', severity: error, expression: end.exists().not() or end.toString().length()=10}
                choiceOf: value
                _required: true
                index: 39
              min: 1
              max: 1
      value[x]:
        elements:
          start: {short: Start Date of the Prescription Redemption Period, index: 40}
          end: {short: End Date of the Prescription Redemption Period, index: 41}
        required: [start]
    required: [value, valuePeriod]
  id:
    url: id
    index: 42
    extensions: {}
    elements:
      extension: {index: 43}
      url:
        pattern: {type: uri, value: id}
        type: uri
        index: 44
      value:
        choices: [valueIdentifier]
        index: 49
        slicing:
          slices:
            valueIdentifier:
              match: {}
              schema:
                choices: [valueIdentifier]
                _required: true
                index: 49
              min: 1
              max: 1
      valueIdentifier:
        type: Identifier
        choiceOf: value
        index: 50
        slicing:
          slices:
            valueIdentifier:
              match: {}
              schema: {type: Identifier, choiceOf: value, _required: true, index: 50}
              min: 1
              max: 1
      value[x]:
        elements:
          use: {index: 51}
          type: {index: 52}
          system:
            short: Specification as UUID
            pattern: {type: uri, value: 'urn:ietf:rfc:3986'}
            type: uri
            index: 53
          value: {short: Multiple Prescription ID, index: 54}
          period: {index: 55}
          assigner: {index: 56}
    required: [value, valueIdentifier]
class: extension
kind: complex-type
url: https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension
base: http://hl7.org/fhir/StructureDefinition/Extension
version: 1.0.1