PackagesCanonicalsLogsProblems
    Packages
    de.gematik.epa.medication@1.0.0-RC
    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: 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: 1
      slices:
        indicator:
          match: {url: indicator}
          schema:
            _required: true
            index: 1
            extensions: {}
            elements:
              extension: {index: 2}
              url:
                pattern: {type: Uri, value: indicator}
                index: 3
              value:
                short: Multiple Prescription Indicator
                choices: [valueBoolean]
                index: 5
              valueBoolean: {type: boolean, short: Multiple Prescription Indicator, choiceOf: value, index: 6}
            required: [value, valueBoolean]
        counter:
          match: {url: counter}
          schema:
            index: 7
            extensions: {}
            elements:
              extension: {index: 8}
              url:
                pattern: {type: Uri, value: counter}
                index: 9
              value:
                choices: [valueRatio]
                index: 11
              valueRatio: {type: Ratio, choiceOf: value, index: 12}
              value[x]:
                elements:
                  numerator:
                    index: 13
                    elements:
                      value: {short: Multiple Prescription Counter, index: 14}
                      comparator: {index: 15}
                      unit: {index: 16}
                      system: {index: 17}
                      code: {index: 18}
                    required: [value]
                  denominator:
                    index: 19
                    elements:
                      value: {short: Denominator of Multiple Prescription Series, index: 20}
                      comparator: {index: 21}
                      unit: {index: 22}
                      system: {index: 23}
                      code: {index: 24}
                    required: [value]
                required: [denominator, numerator]
            required: [valueRatio, value]
        period:
          match: {url: period}
          schema:
            short: Redemption Period
            index: 25
            extensions: {}
            elements:
              extension: {index: 26}
              url:
                pattern: {type: Uri, value: period}
                index: 27
              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: 29
              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: 30
              value[x]:
                elements:
                  start: {short: Start Date of the Prescription Redemption Period, index: 31}
                  end: {short: End Date of the Prescription Redemption Period, index: 32}
                required: [start]
            required: [valuePeriod, value]
        id:
          match: {url: id}
          schema:
            index: 33
            extensions: {}
            elements:
              extension: {index: 34}
              url:
                pattern: {type: Uri, value: id}
                index: 35
              value:
                choices: [valueIdentifier]
                index: 37
              valueIdentifier: {type: Identifier, choiceOf: value, index: 38}
              value[x]:
                elements:
                  use: {index: 39}
                  type: {index: 40}
                  system:
                    short: Specification as UUID
                    pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                    index: 41
                  value: {short: Multiple Prescription ID, index: 42}
                  period: {index: 43}
                  assigner: {index: 44}
            required: [valueIdentifier, value]
  url:
    pattern: {type: Uri, value: 'https://gematik.de/fhir/epa-medication/StructureDefinition/multiple-prescription-extension'}
    index: 45
  value:
    choices: []
    index: 47
package_version: 1.0.0-RC
extensions:
  indicator:
    url: indicator
    _required: true
    index: 1
    extensions: {}
    elements:
      extension: {index: 2}
      url:
        pattern: {type: Uri, value: indicator}
        index: 3
      value:
        short: Multiple Prescription Indicator
        choices: [valueBoolean]
        index: 5
      valueBoolean: {type: boolean, short: Multiple Prescription Indicator, choiceOf: value, index: 6}
    required: [value, valueBoolean]
  counter:
    url: counter
    index: 7
    extensions: {}
    elements:
      extension: {index: 8}
      url:
        pattern: {type: Uri, value: counter}
        index: 9
      value:
        choices: [valueRatio]
        index: 11
      valueRatio: {type: Ratio, choiceOf: value, index: 12}
      value[x]:
        elements:
          numerator:
            index: 13
            elements:
              value: {short: Multiple Prescription Counter, index: 14}
              comparator: {index: 15}
              unit: {index: 16}
              system: {index: 17}
              code: {index: 18}
            required: [value]
          denominator:
            index: 19
            elements:
              value: {short: Denominator of Multiple Prescription Series, index: 20}
              comparator: {index: 21}
              unit: {index: 22}
              system: {index: 23}
              code: {index: 24}
            required: [value]
        required: [denominator, numerator]
    required: [valueRatio, value]
  period:
    url: period
    short: Redemption Period
    index: 25
    extensions: {}
    elements:
      extension: {index: 26}
      url:
        pattern: {type: Uri, value: period}
        index: 27
      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: 29
      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: 30
      value[x]:
        elements:
          start: {short: Start Date of the Prescription Redemption Period, index: 31}
          end: {short: End Date of the Prescription Redemption Period, index: 32}
        required: [start]
    required: [valuePeriod, value]
  id:
    url: id
    index: 33
    extensions: {}
    elements:
      extension: {index: 34}
      url:
        pattern: {type: Uri, value: id}
        index: 35
      value:
        choices: [valueIdentifier]
        index: 37
      valueIdentifier: {type: Identifier, choiceOf: value, index: 38}
      value[x]:
        elements:
          use: {index: 39}
          type: {index: 40}
          system:
            short: Specification as UUID
            pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
            index: 41
          value: {short: Multiple Prescription ID, index: 42}
          period: {index: 43}
          assigner: {index: 44}
    required: [valueIdentifier, value]
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.0
required: [extension]