PackagesCanonicalsLogsProblems
    Packages
    de.gematik.dipag@1.0.8
    https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnung
description: null
package_name: de.gematik.dipag
derivation: constraint
name: DiPagRechnung
type: Invoice
elements:
  date: {short: Rechnungsdatum, mustSupport: true, index: 71}
  totalNet: {short: Rechnungsbetrag (Netto), mustSupport: true, index: 147}
  recipient:
    type: Reference
    short: Rechnungsempfänger
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Patient', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-patient']
    index: 67
    elements:
      reference: {mustSupport: true, index: 68}
      identifier: {type: Identifier, mustSupport: true, index: 69}
      display: {mustSupport: true, index: 70}
    required: [identifier, reference, display]
  totalPriceComponent:
    mustSupport: true
    index: 96
    slicing:
      rules: open
      discriminator:
      - {path: code, type: pattern}
      min: null
      slices:
        SummeRechnungspositionen:
          match:
            code:
              coding:
              - {code: SummeRechnungspositionen, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
          schema:
            short: Summe aller Rechnungspositionen
            type: BackboneElement
            mustSupport: true
            index: 97
            extensions:
              TeilSummenRechnungspositionen:
                url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTeilsumme
                type: Extension
                mustSupport: true
                index: 99
                extensions:
                  type:
                    url: null
                    mustSupport: true
                    index: 100
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 102
                      value[x]:
                        elements:
                          system: {mustSupport: true, index: 103}
                          code: {mustSupport: true, index: 104}
                        required: [system, code]
                  summe:
                    url: null
                    mustSupport: true
                    index: 105
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 107
                      value[x]:
                        elements:
                          value: {mustSupport: true, index: 108}
                          currency: {mustSupport: true, index: 109}
                        required: [currency, value]
                  uStProzent:
                    url: null
                    mustSupport: true
                    index: 110
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 112
                    required: [value]
                  uStBetrag:
                    url: null
                    mustSupport: true
                    index: 113
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 115
                      value[x]:
                        elements:
                          value: {mustSupport: true, index: 116}
                          currency: {mustSupport: true, index: 117}
                        required: [currency, value]
                elements:
                  extension:
                    mustSupport: true
                    index: 100
                    slicing:
                      slices:
                        type:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 100
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 102
                              value[x]:
                                elements:
                                  system: {mustSupport: true, index: 103}
                                  code: {mustSupport: true, index: 104}
                                required: [system, code]
                        summe:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 105
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 107
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 108}
                                  currency: {mustSupport: true, index: 109}
                                required: [currency, value]
                        uStProzent:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 110
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 112
                            required: [value]
                        uStBetrag:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 113
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 115
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 116}
                                  currency: {mustSupport: true, index: 117}
                                required: [currency, value]
            elements:
              extension:
                index: 98
                slicing:
                  rules: open
                  ordered: false
                  discriminator:
                  - {path: url, type: value}
                  min: null
                  slices:
                    TeilSummenRechnungspositionen:
                      match: {url: null}
                      schema:
                        type: Extension
                        mustSupport: true
                        url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTeilsumme
                        index: 99
                        extensions:
                          type:
                            url: null
                            mustSupport: true
                            index: 100
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 102
                              value[x]:
                                elements:
                                  system: {mustSupport: true, index: 103}
                                  code: {mustSupport: true, index: 104}
                                required: [system, code]
                          summe:
                            url: null
                            mustSupport: true
                            index: 105
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 107
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 108}
                                  currency: {mustSupport: true, index: 109}
                                required: [currency, value]
                          uStProzent:
                            url: null
                            mustSupport: true
                            index: 110
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 112
                            required: [value]
                          uStBetrag:
                            url: null
                            mustSupport: true
                            index: 113
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 115
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 116}
                                  currency: {mustSupport: true, index: 117}
                                required: [currency, value]
                        elements:
                          extension:
                            mustSupport: true
                            index: 100
                            slicing:
                              slices:
                                type:
                                  match: {}
                                  schema:
                                    mustSupport: true
                                    index: 100
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 102
                                      value[x]:
                                        elements:
                                          system: {mustSupport: true, index: 103}
                                          code: {mustSupport: true, index: 104}
                                        required: [system, code]
                                summe:
                                  match: {}
                                  schema:
                                    mustSupport: true
                                    index: 105
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 107
                                      value[x]:
                                        elements:
                                          value: {mustSupport: true, index: 108}
                                          currency: {mustSupport: true, index: 109}
                                        required: [currency, value]
                                uStProzent:
                                  match: {}
                                  schema:
                                    mustSupport: true
                                    index: 110
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 112
                                    required: [value]
                                uStBetrag:
                                  match: {}
                                  schema:
                                    mustSupport: true
                                    index: 113
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 115
                                      value[x]:
                                        elements:
                                          value: {mustSupport: true, index: 116}
                                          currency: {mustSupport: true, index: 117}
                                        required: [currency, value]
              type:
                mustSupport: true
                pattern: {type: Code, value: base}
                index: 118
              code:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: SummeRechnungspositionen, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
                index: 119
              factor: {index: 120}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 121
                elements:
                  value: {mustSupport: true, index: 122}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 123
                required: [currency, value]
            required: [code]
        MinderungNachGOZ:
          match:
            code:
              coding:
              - {code: Minderung7GOZ, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
          schema:
            short: Minderungen nach §7 GOZ
            type: BackboneElement
            mustSupport: true
            index: 124
            elements:
              type:
                mustSupport: true
                pattern: {type: Code, value: deduction}
                index: 125
              code:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: Minderung7GOZ, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
                index: 126
              factor: {index: 127}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 128
                elements:
                  value: {mustSupport: true, index: 129}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 130
                required: [currency, value]
            required: [code]
        Fremdlaborleistungen:
          match:
            code:
              coding:
              - {code: Fremdlaborleistungen, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
          schema:
            short: Summe aller Fremdlaborleistungen
            type: BackboneElement
            mustSupport: true
            index: 131
            elements:
              type:
                mustSupport: true
                pattern: {type: Code, value: base}
                index: 132
              code:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: Fremdlaborleistungen, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
                index: 133
              factor: {index: 134}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 135
                elements:
                  value: {mustSupport: true, index: 136}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 137
                required: [currency, value]
            required: [code]
        Abzug:
          match: {code: null}
          schema:
            short: Abzug
            type: BackboneElement
            mustSupport: true
            array: true
            index: 138
            extensions:
              Kassenanteil: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-abzug-kassenanteil', min: 0, max: 1, short: Kassenanteil in Prozent, type: Extension, mustSupport: true, index: 140}
            elements:
              extension:
                index: 139
                slicing:
                  rules: open
                  ordered: false
                  discriminator:
                  - {path: url, type: value}
                  min: null
                  slices:
                    Kassenanteil:
                      match: {url: null}
                      schema: {short: Kassenanteil in Prozent, type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-abzug-kassenanteil', index: 140}
                      min: 0
                      max: 1
              type:
                mustSupport: true
                pattern: {type: Code, value: deduction}
                index: 141
              code:
                short: Kategorisierung des Abzugs
                binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-total-price-component-deduction-type-vs'}
                mustSupport: true
                index: 142
              factor: {index: 143}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 144
                elements:
                  value: {mustSupport: true, index: 145}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 146
                required: [currency, value]
            required: [code]
  type:
    mustSupport: true
    index: 54
    elements:
      coding:
        mustSupport: true
        index: 55
        slicing:
          rules: open
          discriminator:
          - {path: $this, type: pattern}
          min: 1
          slices:
            AusrichtungDerRechnung:
              match: {system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-abrechnungsart-cs'}
              schema:
                short: Abrechnungsart der Rechnung
                mustSupport: true
                binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-rechnung-abrechnungsart-vs'}
                pattern:
                  type: Coding
                  value: {system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-abrechnungsart-cs'}
                index: 56
                extensions:
                  Zusatzinformation:
                    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagZusatzinformationZurAbrechnungsart
                    short: Zusatzinformation zur Abrechnungsart
                    type: Extension
                    mustSupport: true
                    index: 57
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 59
                elements:
                  extension:
                    short: Zusatzinformation zur Abrechnungsart
                    type: Extension
                    mustSupport: true
                    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagZusatzinformationZurAbrechnungsart
                    index: 57
                    slicing:
                      slices:
                        Zusatzinformation:
                          match: {}
                          schema:
                            short: Zusatzinformation zur Abrechnungsart
                            type: Extension
                            mustSupport: true
                            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagZusatzinformationZurAbrechnungsart
                            index: 57
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 59
                  system: {mustSupport: true, index: 60}
                  code: {mustSupport: true, index: 61}
                required: [system, code]
            Rechnungsart:
              match: {system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnungsart-cs'}
              schema:
                short: Rechnungsart
                mustSupport: true
                binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-rechnungsart-vs'}
                pattern:
                  type: Coding
                  value: {system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnungsart-cs'}
                index: 62
                elements:
                  system: {mustSupport: true, index: 63}
                  code: {mustSupport: true, index: 64}
                required: [system, code]
    required: [coding]
  totalGross: {short: Rechnungsbetrag (Brutto), mustSupport: true, index: 148}
  participant:
    short: weitere behandelnde Leistungserbringer oder abweichender Forderungsinhaber
    mustSupport: true
    index: 72
    elements:
      role:
        binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-participant-role-VS'}
        mustSupport: true
        index: 73
    slicing:
      rules: open
      discriminator:
      - {path: role, type: pattern}
      min: 1
      slices:
        Leistungserbringer:
          match:
            role:
              coding:
              - {code: leistungserbringer, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-participant-role-cs'}
          schema:
            short: Weitere behandelnde Leistungserbringer
            mustSupport: true
            array: true
            min: 1
            _required: true
            index: 74
            elements:
              role:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: leistungserbringer, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-participant-role-cs'}
                index: 75
              actor:
                type: Reference
                refers: ['http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-institution', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-person']
                index: 76
            required: [role]
        Forderungsinhaber:
          match:
            role:
              coding:
              - {code: forderungsinhaber, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-participant-role-cs'}
          schema:
            short: Abweichender Forderungsinhaber
            mustSupport: true
            index: 77
            elements:
              role:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: forderungsinhaber, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-participant-role-cs'}
                index: 78
              actor:
                type: Reference
                refers: ['http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-institution', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-person']
                index: 79
            required: [role]
  note: {short: Hinweise an den Kostenträger, mustSupport: true, index: 153}
  extension:
    array: true
    min: 2
    index: 0
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: url, type: value}
      min: 2
      slices:
        Behandlungszeitraum:
          match: {url: null}
          schema:
            short: Behandlungszeitraum
            type: Extension
            mustSupport: true
            url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Invoice.period[x]
            index: 1
            elements:
              value:
                short: Behandlungsdatum
                mustSupport: true
                choices: [valueDate]
                index: 10
                slicing:
                  slices:
                    valueDate:
                      match: {}
                      schema:
                        short: Behandlungsdatum
                        mustSupport: true
                        choices: [valueDate]
                        index: 10
                      min: 0
                      max: 1
              valuePeriod:
                type: Period
                mustSupport: true
                choiceOf: value
                index: 6
                slicing:
                  slices:
                    valuePeriod:
                      match: {}
                      schema: {type: Period, mustSupport: true, choiceOf: value, index: 6}
                      min: 0
                      max: 1
              value[x]:
                elements:
                  start: {short: Startdatum, mustSupport: true, index: 7}
                  end: {short: Enddatum, mustSupport: true, index: 8}
              valueDate:
                short: Behandlungsdatum
                type: date
                mustSupport: true
                choiceOf: value
                index: 11
                slicing:
                  slices:
                    valueDate:
                      match: {}
                      schema: {short: Behandlungsdatum, type: date, mustSupport: true, choiceOf: value, index: 11}
                      min: 0
                      max: 1
        AbrechnungsDiagnoseProzedur:
          match: {url: null}
          schema:
            short: Diagnose
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagAbrechnungsDiagnoseProzedur
            index: 12
            extensions:
              Use:
                url: null
                index: 13
                elements:
                  value:
                    short: Kennzeichen Hauptdiagnose
                    mustSupport: true
                    choices: []
                    index: 15
                  value[x]:
                    elements:
                      code:
                        pattern: {type: Code, value: main-diagnosis}
                        index: 16
              Referenz:
                url: null
                index: 17
                elements:
                  value:
                    short: Zuordnung von Diagnosen oder Prozeduren zur Rechnung
                    mustSupport: true
                    choices: []
                    index: 19
            elements:
              extension:
                index: 13
                slicing:
                  slices:
                    Use:
                      match: {}
                      schema:
                        index: 13
                        elements:
                          value:
                            short: Kennzeichen Hauptdiagnose
                            mustSupport: true
                            choices: []
                            index: 15
                          value[x]:
                            elements:
                              code:
                                pattern: {type: Code, value: main-diagnosis}
                                index: 16
                    Referenz:
                      match: {}
                      schema:
                        index: 17
                        elements:
                          value:
                            short: Zuordnung von Diagnosen oder Prozeduren zur Rechnung
                            mustSupport: true
                            choices: []
                            index: 19
        AbrechnungsDiagnoseProzedurFreitext:
          match: {url: null}
          schema:
            short: Einleitung (Diagnose und Prozedure als Freitextangabe)
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagAbrechnungsDiagnoseProzedurFreitext
            index: 20
            elements:
              value:
                mustSupport: true
                choices: []
                index: 22
            required: [value]
        Behandlungsart:
          match: {url: null}
          schema:
            short: Behandlungsart
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-behandlungsart
            index: 23
            elements:
              value:
                mustSupport: true
                choices: []
                index: 25
              value[x]:
                elements:
                  system: {mustSupport: true, index: 26}
                  code: {mustSupport: true, index: 27}
                required: [system, code]
            required: [value]
        Fachrichtung:
          match: {url: null}
          schema:
            short: Fachrichtung
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-fachrichtung
            index: 28
            elements:
              value:
                mustSupport: true
                choices: []
                index: 30
              value[x]:
                elements:
                  system: {mustSupport: true, index: 31}
                  code: {mustSupport: true, index: 32}
                required: [system, code]
            required: [value]
        Korrekturrechnung:
          match: {url: null}
          schema:
            short: Info Korrekturrechnung
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagInvoiceReplaces
            index: 33
            elements:
              value:
                mustSupport: true
                choices: [valueReference]
                index: 35
              valueReference:
                type: Reference
                mustSupport: true
                choiceOf: value
                refers: ['http://hl7.org/fhir/StructureDefinition/Invoice', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnung']
                index: 36
            required: [valueReference, value]
        Korrekturtoken:
          match: {url: null}
          schema:
            short: Info Korrekturtoken
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTokenStornierteRechnung
            index: 37
            elements:
              value:
                mustSupport: true
                choices: []
                index: 39
              value[x]:
                elements:
                  system: {mustSupport: true, index: 40}
                  value: {mustSupport: true, index: 41}
                required: [value, system]
        Antragsreferenz:
          match: {url: null}
          schema:
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagInvoiceBasedOn
            index: 42
            elements:
              value:
                short: Referenz auf Heil- und Kostenplan, Kostenvoranschlag oder Kostenübernahmeantrag
                mustSupport: true
                pattern:
                  type: Identifier
                  value:
                    type:
                      coding:
                      - {code: antragsreferenz, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                choices: []
                index: 44
              value[x]:
                elements:
                  type:
                    mustSupport: true
                    pattern:
                      type: CodeableConcept
                      value:
                        coding:
                        - {code: antragsreferenz, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                    index: 45
                  system: {short: NamingSystem der Antragsreferenz, mustSupport: true, index: 46}
                  value: {short: Antragsreferenz, mustSupport: true, index: 47}
                required: [value, type, system]
            required: [value]
  status:
    short: Status der Rechnung
    mustSupport: true
    pattern: {type: Code, value: issued}
    index: 53
  lineItem:
    short: Rechnungspositionen
    mustSupport: true
    index: 82
    elements:
      sequence: {short: Reihenfolge der Rechnungsposition, mustSupport: true, index: 83}
      chargeItem:
        short: Referenz auf die Instanz der Rechnungsposition
        mustSupport: true
        choices: [chargeItemReference]
        index: 85
      chargeItemReference:
        type: Reference
        short: Referenz auf die Instanz der Rechnungsposition
        mustSupport: true
        choiceOf: chargeItem
        refers: ['http://hl7.org/fhir/StructureDefinition/ChargeItem', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnungsposition']
        index: 86
      priceComponent:
        mustSupport: true
        index: 87
        slicing:
          rules: open
          discriminator:
          - {path: type, type: pattern}
          min: null
          slices:
            BruttoBetrag:
              match: {type: base}
              schema:
                short: Betrag pro Rechnungsposition
                mustSupport: true
                index: 88
                elements:
                  type:
                    mustSupport: true
                    pattern: {type: Code, value: base}
                    index: 89
                  factor: {index: 90}
                  amount: {mustSupport: true, index: 91}
                required: [amount]
            Steuern:
              match: {type: tax}
              schema:
                short: Steuern enthalten im Brutto Betrag
                mustSupport: true
                index: 92
                elements:
                  type:
                    mustSupport: true
                    pattern: {type: Code, value: tax}
                    index: 93
                  factor: {index: 94}
                  amount: {mustSupport: true, index: 95}
                required: [amount]
    required: [sequence]
  identifier:
    mustSupport: true
    index: 48
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: 1
      slices:
        Rechnungsnummer:
          match:
            type:
              coding:
              - {code: invoice, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
          schema:
            short: Rechnungs-Nr. (der LEI)
            mustSupport: true
            _required: true
            pattern:
              type: Identifier
              value:
                type:
                  coding:
                  - {code: invoice, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
            index: 49
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: invoice, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                index: 50
              system: {short: NamingSystem der Rechnungs-Nr. (der LEI), mustSupport: true, index: 51}
              value: {short: Rechnungs-Nr. (der LEI), mustSupport: true, index: 52}
            required: [value, type, system]
  issuer:
    type: Reference
    short: Rechnungsersteller
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Organization', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-institution']
    index: 80
    elements:
      reference: {mustSupport: true, index: 81}
    required: [reference]
  paymentTerms:
    short: Zahlungsdaten Überweisung und weitere Zahlungsmethoden
    mustSupport: true
    index: 149
    extensions:
      Zahlungsziel: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-zahlungsziel', min: 1, max: 1, short: Zahlungsziel als Datum oder Fristangabe, type: Extension, mustSupport: true, index: 151}
      PaymentTo: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/DiPagPaymentTo', min: 0, max: 1, short: Zahlungsverbindung für die Überweisung (basiert auf HL7 FM WG Draft), type: Extension, mustSupport: true, index: 152}
    elements:
      extension:
        index: 150
        slicing:
          rules: open
          ordered: false
          discriminator:
          - {path: url, type: value}
          min: 1
          slices:
            Zahlungsziel:
              match: {url: null}
              schema: {short: Zahlungsziel als Datum oder Fristangabe, type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-zahlungsziel', index: 151}
              min: 1
              max: 1
            PaymentTo:
              match: {url: null}
              schema: {short: Zahlungsverbindung für die Überweisung (basiert auf HL7 FM WG Draft), type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/DiPagPaymentTo', index: 152}
              min: 0
              max: 1
    required: [extension]
  subject:
    type: Reference
    short: Behandelte Person
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Patient', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-patient']
    index: 65
    elements:
      reference: {mustSupport: true, index: 66}
    required: [reference]
package_version: 1.0.8
extensions:
  Behandlungszeitraum:
    url: http://hl7.org/fhir/5.0/StructureDefinition/extension-Invoice.period[x]
    short: Behandlungszeitraum
    type: Extension
    mustSupport: true
    index: 1
    elements:
      value:
        short: Behandlungsdatum
        mustSupport: true
        choices: [valueDate]
        index: 10
        slicing:
          slices:
            valueDate:
              match: {}
              schema:
                short: Behandlungsdatum
                mustSupport: true
                choices: [valueDate]
                index: 10
              min: 0
              max: 1
      valuePeriod:
        type: Period
        mustSupport: true
        choiceOf: value
        index: 6
        slicing:
          slices:
            valuePeriod:
              match: {}
              schema: {type: Period, mustSupport: true, choiceOf: value, index: 6}
              min: 0
              max: 1
      value[x]:
        elements:
          start: {short: Startdatum, mustSupport: true, index: 7}
          end: {short: Enddatum, mustSupport: true, index: 8}
      valueDate:
        short: Behandlungsdatum
        type: date
        mustSupport: true
        choiceOf: value
        index: 11
        slicing:
          slices:
            valueDate:
              match: {}
              schema: {short: Behandlungsdatum, type: date, mustSupport: true, choiceOf: value, index: 11}
              min: 0
              max: 1
  AbrechnungsDiagnoseProzedur:
    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagAbrechnungsDiagnoseProzedur
    short: Diagnose
    type: Extension
    mustSupport: true
    index: 12
    extensions:
      Use:
        url: null
        index: 13
        elements:
          value:
            short: Kennzeichen Hauptdiagnose
            mustSupport: true
            choices: []
            index: 15
          value[x]:
            elements:
              code:
                pattern: {type: Code, value: main-diagnosis}
                index: 16
      Referenz:
        url: null
        index: 17
        elements:
          value:
            short: Zuordnung von Diagnosen oder Prozeduren zur Rechnung
            mustSupport: true
            choices: []
            index: 19
    elements:
      extension:
        index: 13
        slicing:
          slices:
            Use:
              match: {}
              schema:
                index: 13
                elements:
                  value:
                    short: Kennzeichen Hauptdiagnose
                    mustSupport: true
                    choices: []
                    index: 15
                  value[x]:
                    elements:
                      code:
                        pattern: {type: Code, value: main-diagnosis}
                        index: 16
            Referenz:
              match: {}
              schema:
                index: 17
                elements:
                  value:
                    short: Zuordnung von Diagnosen oder Prozeduren zur Rechnung
                    mustSupport: true
                    choices: []
                    index: 19
  AbrechnungsDiagnoseProzedurFreitext:
    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagAbrechnungsDiagnoseProzedurFreitext
    short: Einleitung (Diagnose und Prozedure als Freitextangabe)
    type: Extension
    mustSupport: true
    index: 20
    elements:
      value:
        mustSupport: true
        choices: []
        index: 22
    required: [value]
  Behandlungsart:
    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-behandlungsart
    short: Behandlungsart
    type: Extension
    mustSupport: true
    index: 23
    elements:
      value:
        mustSupport: true
        choices: []
        index: 25
      value[x]:
        elements:
          system: {mustSupport: true, index: 26}
          code: {mustSupport: true, index: 27}
        required: [system, code]
    required: [value]
  Fachrichtung:
    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-fachrichtung
    short: Fachrichtung
    type: Extension
    mustSupport: true
    index: 28
    elements:
      value:
        mustSupport: true
        choices: []
        index: 30
      value[x]:
        elements:
          system: {mustSupport: true, index: 31}
          code: {mustSupport: true, index: 32}
        required: [system, code]
    required: [value]
  Korrekturrechnung:
    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagInvoiceReplaces
    short: Info Korrekturrechnung
    type: Extension
    mustSupport: true
    index: 33
    elements:
      value:
        mustSupport: true
        choices: [valueReference]
        index: 35
      valueReference:
        type: Reference
        mustSupport: true
        choiceOf: value
        refers: ['http://hl7.org/fhir/StructureDefinition/Invoice', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnung']
        index: 36
    required: [valueReference, value]
  Korrekturtoken:
    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTokenStornierteRechnung
    short: Info Korrekturtoken
    type: Extension
    mustSupport: true
    index: 37
    elements:
      value:
        mustSupport: true
        choices: []
        index: 39
      value[x]:
        elements:
          system: {mustSupport: true, index: 40}
          value: {mustSupport: true, index: 41}
        required: [value, system]
  Antragsreferenz:
    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagInvoiceBasedOn
    type: Extension
    mustSupport: true
    index: 42
    elements:
      value:
        short: Referenz auf Heil- und Kostenplan, Kostenvoranschlag oder Kostenübernahmeantrag
        mustSupport: true
        pattern:
          type: Identifier
          value:
            type:
              coding:
              - {code: antragsreferenz, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
        choices: []
        index: 44
      value[x]:
        elements:
          type:
            mustSupport: true
            pattern:
              type: CodeableConcept
              value:
                coding:
                - {code: antragsreferenz, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
            index: 45
          system: {short: NamingSystem der Antragsreferenz, mustSupport: true, index: 46}
          value: {short: Antragsreferenz, mustSupport: true, index: 47}
        required: [value, type, system]
    required: [value]
class: profile
kind: resource
url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnung
base: http://hl7.org/fhir/StructureDefinition/Invoice
version: 1.0.7
required: [totalNet, totalGross, issuer, recipient, participant, identifier, subject, date]