PackagesCanonicalsLogsProblems
    Packages
    de.gematik.dipag@1.0.3
    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: 76}
  totalNet: {short: Rechnungsbetrag (Netto), mustSupport: true, index: 154}
  recipient:
    type: Reference
    short: Rechnungsempfänger
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Patient', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-patient']
    index: 72
    elements:
      reference: {mustSupport: true, index: 73}
      identifier: {type: Identifier, mustSupport: true, index: 74}
      display: {mustSupport: true, index: 75}
    required: [identifier, reference, display]
  totalPriceComponent:
    mustSupport: true
    index: 101
    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: 102
            extensions:
              Teilsumme:
                url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTeilsumme
                short: Teilsummen in EUR für die Rechnungspositionstyp
                type: Extension
                mustSupport: true
                index: 103
                extensions:
                  Type:
                    url: null
                    short: Rechnungspositionstyp
                    mustSupport: true
                    index: 104
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 106
                    required: [value]
                  Summe:
                    url: null
                    short: Bruttosumme
                    mustSupport: true
                    index: 107
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 109
                      value[x]:
                        elements:
                          value: {mustSupport: true, index: 110}
                          currency: {mustSupport: true, index: 111}
                        required: [currency, value]
                    required: [value]
                  UStProzent:
                    url: null
                    short: Enthaltene Umsatzsteuer in Prozent
                    mustSupport: true
                    index: 112
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 114
                  UStBetrag:
                    url: null
                    short: Enthaltene Umsatzsteuer als Betrag
                    mustSupport: true
                    index: 115
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 117
                      value[x]:
                        elements:
                          value: {mustSupport: true, index: 118}
                          currency: {mustSupport: true, index: 119}
                        required: [currency, value]
                    required: [value]
                elements:
                  extension:
                    short: Rechnungspositionstyp
                    mustSupport: true
                    index: 104
                    slicing:
                      slices:
                        Type:
                          match: {}
                          schema:
                            short: Rechnungspositionstyp
                            mustSupport: true
                            index: 104
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 106
                            required: [value]
                        Summe:
                          match: {}
                          schema:
                            short: Bruttosumme
                            mustSupport: true
                            index: 107
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 109
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 110}
                                  currency: {mustSupport: true, index: 111}
                                required: [currency, value]
                            required: [value]
                        UStProzent:
                          match: {}
                          schema:
                            short: Enthaltene Umsatzsteuer in Prozent
                            mustSupport: true
                            index: 112
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 114
                        UStBetrag:
                          match: {}
                          schema:
                            short: Enthaltene Umsatzsteuer als Betrag
                            mustSupport: true
                            index: 115
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 117
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 118}
                                  currency: {mustSupport: true, index: 119}
                                required: [currency, value]
                            required: [value]
            elements:
              extension:
                short: Teilsummen in EUR für die Rechnungspositionstyp
                type: Extension
                mustSupport: true
                url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTeilsumme
                index: 103
                slicing:
                  slices:
                    Teilsumme:
                      match: {}
                      schema:
                        short: Teilsummen in EUR für die Rechnungspositionstyp
                        type: Extension
                        mustSupport: true
                        url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagTeilsumme
                        index: 103
                        extensions:
                          Type:
                            url: null
                            short: Rechnungspositionstyp
                            mustSupport: true
                            index: 104
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 106
                            required: [value]
                          Summe:
                            url: null
                            short: Bruttosumme
                            mustSupport: true
                            index: 107
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 109
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 110}
                                  currency: {mustSupport: true, index: 111}
                                required: [currency, value]
                            required: [value]
                          UStProzent:
                            url: null
                            short: Enthaltene Umsatzsteuer in Prozent
                            mustSupport: true
                            index: 112
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 114
                          UStBetrag:
                            url: null
                            short: Enthaltene Umsatzsteuer als Betrag
                            mustSupport: true
                            index: 115
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 117
                              value[x]:
                                elements:
                                  value: {mustSupport: true, index: 118}
                                  currency: {mustSupport: true, index: 119}
                                required: [currency, value]
                            required: [value]
                        elements:
                          extension:
                            short: Rechnungspositionstyp
                            mustSupport: true
                            index: 104
                            slicing:
                              slices:
                                Type:
                                  match: {}
                                  schema:
                                    short: Rechnungspositionstyp
                                    mustSupport: true
                                    index: 104
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 106
                                    required: [value]
                                Summe:
                                  match: {}
                                  schema:
                                    short: Bruttosumme
                                    mustSupport: true
                                    index: 107
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 109
                                      value[x]:
                                        elements:
                                          value: {mustSupport: true, index: 110}
                                          currency: {mustSupport: true, index: 111}
                                        required: [currency, value]
                                    required: [value]
                                UStProzent:
                                  match: {}
                                  schema:
                                    short: Enthaltene Umsatzsteuer in Prozent
                                    mustSupport: true
                                    index: 112
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 114
                                UStBetrag:
                                  match: {}
                                  schema:
                                    short: Enthaltene Umsatzsteuer als Betrag
                                    mustSupport: true
                                    index: 115
                                    elements:
                                      value:
                                        mustSupport: true
                                        choices: []
                                        index: 117
                                      value[x]:
                                        elements:
                                          value: {mustSupport: true, index: 118}
                                          currency: {mustSupport: true, index: 119}
                                        required: [currency, value]
                                    required: [value]
              type:
                mustSupport: true
                pattern: {type: Code, value: base}
                index: 120
              code:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: SummeRechnungspositionen, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
                index: 121
              factor: {index: 122}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 123
                elements:
                  value: {mustSupport: true, index: 124}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 125
                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: 126
            elements:
              type:
                mustSupport: true
                pattern: {type: Code, value: deduction}
                index: 127
              code:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: Minderung7GOZ, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
                index: 128
              factor: {index: 129}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 130
                elements:
                  value: {mustSupport: true, index: 131}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 132
                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: 133
            elements:
              type:
                mustSupport: true
                pattern: {type: Code, value: base}
                index: 134
              code:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: Fremdlaborleistungen, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-total-price-component-type-cs'}
                index: 135
              factor: {index: 136}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 137
                elements:
                  value: {mustSupport: true, index: 138}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 139
                required: [currency, value]
            required: [code]
        Abzug:
          match: {code: null}
          schema:
            short: Abzug
            type: BackboneElement
            mustSupport: true
            array: true
            index: 140
            extensions:
              Kassenanteil:
                url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-abzug-kassenanteil
                short: Kassenanteil in Prozent
                type: Extension
                mustSupport: true
                index: 141
                elements:
                  value:
                    mustSupport: true
                    choices: []
                    index: 143
                  value[x]:
                    elements:
                      value: {mustSupport: true, index: 144}
                      unit: {mustSupport: true, index: 145}
                      system: {mustSupport: true, index: 146}
                      code: {mustSupport: true, index: 147}
                required: [value]
            elements:
              extension:
                short: Kassenanteil in Prozent
                type: Extension
                mustSupport: true
                url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-abzug-kassenanteil
                index: 141
                slicing:
                  slices:
                    Kassenanteil:
                      match: {}
                      schema:
                        short: Kassenanteil in Prozent
                        type: Extension
                        mustSupport: true
                        url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-abzug-kassenanteil
                        index: 141
                        elements:
                          value:
                            mustSupport: true
                            choices: []
                            index: 143
                          value[x]:
                            elements:
                              value: {mustSupport: true, index: 144}
                              unit: {mustSupport: true, index: 145}
                              system: {mustSupport: true, index: 146}
                              code: {mustSupport: true, index: 147}
                        required: [value]
              type:
                mustSupport: true
                pattern: {type: Code, value: deduction}
                index: 148
              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: 149
              factor: {index: 150}
              amount:
                short: Wert in EUR
                mustSupport: true
                index: 151
                elements:
                  value: {mustSupport: true, index: 152}
                  currency:
                    mustSupport: true
                    pattern: {type: Code, value: EUR}
                    index: 153
                required: [currency, value]
            required: [code]
  type:
    mustSupport: true
    index: 59
    elements:
      coding:
        mustSupport: true
        index: 60
        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: 61
                extensions:
                  Zusatzinformation:
                    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagZusatzinformationZurAbrechnungsart
                    short: Zusatzinformation zur Abrechnungsart
                    type: Extension
                    mustSupport: true
                    index: 62
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 64
                elements:
                  extension:
                    short: Zusatzinformation zur Abrechnungsart
                    type: Extension
                    mustSupport: true
                    url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagZusatzinformationZurAbrechnungsart
                    index: 62
                    slicing:
                      slices:
                        Zusatzinformation:
                          match: {}
                          schema:
                            short: Zusatzinformation zur Abrechnungsart
                            type: Extension
                            mustSupport: true
                            url: https://gematik.de/fhir/dipag/StructureDefinition/DiPagZusatzinformationZurAbrechnungsart
                            index: 62
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 64
                  system: {mustSupport: true, index: 65}
                  code: {mustSupport: true, index: 66}
                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: 67
                elements:
                  system: {mustSupport: true, index: 68}
                  code: {mustSupport: true, index: 69}
                required: [system, code]
    required: [coding]
  totalGross: {short: Rechnungsbetrag (Brutto), mustSupport: true, index: 155}
  participant:
    short: weitere behandelnde Leistungserbringer oder abweichender Forderungsinhaber
    mustSupport: true
    index: 77
    elements:
      role:
        binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-participant-role-VS'}
        mustSupport: true
        index: 78
    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: 79
            elements:
              role:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: leistungserbringer, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-participant-role-CS'}
                index: 80
              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: 81
            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: 82
            elements:
              role:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: forderungsinhaber, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-participant-role-CS'}
                index: 83
              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: 84
            required: [role]
  note: {short: Hinweise an den Kostenträger, mustSupport: true, index: 159}
  extension:
    array: true
    min: 2
    index: 0
    slicing:
      slices:
        Behandlungszeitraum:
          match: {}
          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: {}
          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: {}
          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: {}
          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: {}
          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: {}
          schema:
            short: Info Korrekturrechnung
            type: Extension
            mustSupport: true
            url: http://hl7.org/fhir/StructureDefinition/replaces
            index: 33
            elements:
              value:
                mustSupport: true
                choices: [valueCanonical]
                index: 35
              valueCanonical: {type: canonical, mustSupport: true, choiceOf: value, index: 36}
        Korrekturtoken:
          match: {}
          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: {}
          schema:
            type: Extension
            mustSupport: true
            url: http://hl7.org/fhir/StructureDefinition/event-basedOn
            index: 42
            elements:
              value:
                mustSupport: true
                choices: []
                index: 44
              value[x]:
                elements:
                  reference: {index: 45}
                  type: {index: 46}
                  identifier:
                    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'}
                    index: 47
                    elements:
                      type:
                        mustSupport: true
                        pattern:
                          type: CodeableConcept
                          value:
                            coding:
                            - {code: antragsreferenz, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                        index: 48
                      system: {short: NamingSystem der Antragsreferenz, mustSupport: true, index: 49}
                      value: {short: Antragsreferenz, mustSupport: true, index: 50}
                    required: [value, type, system]
                  display: {index: 51}
                required: [identifier]
  status:
    short: Status der Rechnung
    mustSupport: true
    pattern: {type: Code, value: issued}
    index: 58
  lineItem:
    short: Rechnungspositionen
    mustSupport: true
    index: 87
    elements:
      sequence: {short: Reihenfolge der Rechnungsposition, mustSupport: true, index: 88}
      chargeItem:
        short: Referenz auf die Instanz der Rechnungsposition
        mustSupport: true
        choices: [chargeItemReference]
        index: 90
      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: 91
      priceComponent:
        mustSupport: true
        index: 92
        slicing:
          rules: open
          discriminator:
          - {path: $this, type: pattern}
          min: null
          slices:
            BruttoBetrag:
              match: {}
              schema:
                short: Betrag pro Rechnungsposition
                mustSupport: true
                index: 93
                elements:
                  type:
                    mustSupport: true
                    pattern: {type: Code, value: base}
                    index: 94
                  factor: {index: 95}
                  amount: {mustSupport: true, index: 96}
                required: [amount]
            Steuern:
              match: {}
              schema:
                short: Steuern enthalten im Brutto Betrag
                mustSupport: true
                index: 97
                elements:
                  type:
                    mustSupport: true
                    pattern: {type: Code, value: tax}
                    index: 98
                  factor: {index: 99}
                  amount: {mustSupport: true, index: 100}
                required: [amount]
    required: [sequence]
  identifier:
    mustSupport: true
    index: 52
    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: 53
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: invoice, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                index: 54
              system: {short: NamingSystem der Rechnungs-Nr. (der LEI), mustSupport: true, index: 55}
              value: {short: Rechnungs-Nr. (der LEI), mustSupport: true, index: 56}
            required: [value, type, system]
        Antragsnummer:
          match: {}
          schema: {mustSupport: true, index: 57}
          min: 0
          max: 1
  issuer:
    type: Reference
    short: Rechnungsersteller
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Organization', 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-institution']
    index: 85
    elements:
      reference: {mustSupport: true, index: 86}
    required: [reference]
  paymentTerms:
    short: Zahlungsdaten Überweisung und weitere Zahlungsmethoden
    mustSupport: true
    index: 156
    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: 158}
    elements:
      extension:
        index: 157
        slicing:
          slices:
            Zahlungsziel:
              match: {}
              schema: {short: Zahlungsziel als Datum oder Fristangabe, type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-zahlungsziel', index: 158}
              min: 1
              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: 70
    elements:
      reference: {mustSupport: true, index: 71}
    required: [reference]
package_version: 1.0.3
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: http://hl7.org/fhir/StructureDefinition/replaces
    short: Info Korrekturrechnung
    type: Extension
    mustSupport: true
    index: 33
    elements:
      value:
        mustSupport: true
        choices: [valueCanonical]
        index: 35
      valueCanonical: {type: canonical, mustSupport: true, choiceOf: value, index: 36}
  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: http://hl7.org/fhir/StructureDefinition/event-basedOn
    type: Extension
    mustSupport: true
    index: 42
    elements:
      value:
        mustSupport: true
        choices: []
        index: 44
      value[x]:
        elements:
          reference: {index: 45}
          type: {index: 46}
          identifier:
            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'}
            index: 47
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: antragsreferenz, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                index: 48
              system: {short: NamingSystem der Antragsreferenz, mustSupport: true, index: 49}
              value: {short: Antragsreferenz, mustSupport: true, index: 50}
            required: [value, type, system]
          display: {index: 51}
        required: [identifier]
class: profile
kind: resource
url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnung
base: http://hl7.org/fhir/StructureDefinition/Invoice
version: 1.0.3
required: [totalNet, totalGross, issuer, recipient, participant, identifier, subject, date]