PackagesCanonicalsLogsProblems
    Packages
    de.gematik.dipag@1.3.0-beta
    https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-intern
description: Repräsentation der Dokumentenmetadaten innerhalb des Fachdienstes. Das Profil deckt sowohl Rechnungen an Versicherte (Rechnungsempfänger) als auch Rechnungen an Kostenträger-Organisationen ab. Die Mindestkardinalitäten der kontextspezifischen Elemente (Markierungen, Rechnungsempfänger-Referenz) sind entsprechend gelockert; welche Elemente im jeweiligen Kontext vorhanden sind, ist in den Kommentaren und den Szenariobeschreibungen festgelegt.
package_name: de.gematik.dipag
derivation: constraint
name: DiPagDokumentenmetadatenIntern
type: DocumentReference
elements:
  description: {mustSupport: true, index: 68}
  meta:
    extensions:
      markierung:
        url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-markierung
        type: Extension
        mustSupport: true
        index: 2
        extensions:
          markierung:
            url: null
            mustSupport: true
            index: 3
            elements:
              value:
                mustSupport: true
                choices: []
                index: 5
          zeitpunkt:
            url: null
            mustSupport: true
            index: 6
            elements:
              value:
                mustSupport: true
                choices: []
                index: 8
          details:
            url: null
            mustSupport: true
            index: 9
            elements:
              value:
                mustSupport: true
                choices: []
                index: 11
          artDerArchivierung:
            url: null
            mustSupport: true
            index: 12
            elements:
              value:
                mustSupport: true
                choices: []
                index: 14
          kostentraeger:
            url: null
            mustSupport: true
            index: 15
            elements:
              value:
                mustSupport: true
                choices: []
                index: 17
              value[x]:
                elements:
                  identifier: {mustSupport: true, index: 18}
                  display: {mustSupport: true, index: 19}
        elements:
          extension:
            mustSupport: true
            index: 3
            slicing:
              slices:
                markierung:
                  match: {}
                  schema:
                    mustSupport: true
                    index: 3
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 5
                zeitpunkt:
                  match: {}
                  schema:
                    mustSupport: true
                    index: 6
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 8
                details:
                  match: {}
                  schema:
                    mustSupport: true
                    index: 9
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 11
                artDerArchivierung:
                  match: {}
                  schema:
                    mustSupport: true
                    index: 12
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 14
                kostentraeger:
                  match: {}
                  schema:
                    mustSupport: true
                    index: 15
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 17
                      value[x]:
                        elements:
                          identifier: {mustSupport: true, index: 18}
                          display: {mustSupport: true, index: 19}
    elements:
      extension:
        mustSupport: true
        index: 1
        slicing:
          slices:
            markierung:
              match: {}
              schema:
                type: Extension
                mustSupport: true
                url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-markierung
                index: 2
                extensions:
                  markierung:
                    url: null
                    mustSupport: true
                    index: 3
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 5
                  zeitpunkt:
                    url: null
                    mustSupport: true
                    index: 6
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 8
                  details:
                    url: null
                    mustSupport: true
                    index: 9
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 11
                  artDerArchivierung:
                    url: null
                    mustSupport: true
                    index: 12
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 14
                  kostentraeger:
                    url: null
                    mustSupport: true
                    index: 15
                    elements:
                      value:
                        mustSupport: true
                        choices: []
                        index: 17
                      value[x]:
                        elements:
                          identifier: {mustSupport: true, index: 18}
                          display: {mustSupport: true, index: 19}
                elements:
                  extension:
                    mustSupport: true
                    index: 3
                    slicing:
                      slices:
                        markierung:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 3
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 5
                        zeitpunkt:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 6
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 8
                        details:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 9
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 11
                        artDerArchivierung:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 12
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 14
                        kostentraeger:
                          match: {}
                          schema:
                            mustSupport: true
                            index: 15
                            elements:
                              value:
                                mustSupport: true
                                choices: []
                                index: 17
                              value[x]:
                                elements:
                                  identifier: {mustSupport: true, index: 18}
                                  display: {mustSupport: true, index: 19}
      tag:
        mustSupport: true
        index: 20
        slicing:
          rules: open
          discriminator:
          - {path: $this, type: pattern}
          min: null
          slices:
            dipag-rechnungsstatus:
              match: {}
              schema:
                binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-rechnungsstatus-vs'}
                mustSupport: true
                index: 21
                elements:
                  system: {mustSupport: true, index: 22}
                  code: {mustSupport: true, index: 23}
                required: [system, code]
            dipag-workflowtyp:
              match: {}
              schema:
                short: Workflowtyp
                mustSupport: true
                binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-workflowtyp-vs'}
                index: 24
                elements:
                  system: {mustSupport: true, index: 25}
                  code: {mustSupport: true, index: 26}
                required: [system, code]
  content:
    mustSupport: true
    index: 69
    slicing:
      rules: open
      discriminator:
      - {path: format, type: pattern}
      min: null
      slices:
        originaleRechnung:
          match:
            format: {code: originaleRechnung, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
          schema:
            mustSupport: true
            index: 70
            elements:
              attachment:
                mustSupport: true
                index: 71
                extensions:
                  signature:
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    type: Extension
                    mustSupport: true
                    index: 72
                    elements:
                      value[x]:
                        elements:
                          type:
                            mustSupport: true
                            pattern:
                              type: Coding
                              value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                            index: 73
                          when: {mustSupport: true, index: 74}
                          who:
                            mustSupport: true
                            index: 75
                            elements:
                              identifier:
                                mustSupport: true
                                index: 76
                                elements:
                                  system:
                                    pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                    mustSupport: true
                                    index: 77
                                  value:
                                    mustSupport: true
                                    pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                    index: 78
                          targetFormat:
                            binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                            mustSupport: true
                            index: 79
                          sigFormat: {mustSupport: true, index: 80}
                          data: {mustSupport: true, index: 81}
                elements:
                  extension:
                    type: Extension
                    mustSupport: true
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    index: 72
                    slicing:
                      slices:
                        signature:
                          match: {}
                          schema:
                            type: Extension
                            mustSupport: true
                            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                            index: 72
                            elements:
                              value[x]:
                                elements:
                                  type:
                                    mustSupport: true
                                    pattern:
                                      type: Coding
                                      value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                                    index: 73
                                  when: {mustSupport: true, index: 74}
                                  who:
                                    mustSupport: true
                                    index: 75
                                    elements:
                                      identifier:
                                        mustSupport: true
                                        index: 76
                                        elements:
                                          system:
                                            pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                            mustSupport: true
                                            index: 77
                                          value:
                                            mustSupport: true
                                            pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                            index: 78
                                  targetFormat:
                                    binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                                    mustSupport: true
                                    index: 79
                                  sigFormat: {mustSupport: true, index: 80}
                                  data: {mustSupport: true, index: 81}
                  contentType:
                    mustSupport: true
                    pattern: {type: Code, value: application/pdf}
                    index: 82
                  data: {index: 83}
                  url: {mustSupport: true, index: 84}
                required: [url, contentType]
              format:
                mustSupport: true
                pattern:
                  type: Coding
                  value: {code: originaleRechnung, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
                index: 85
            required: [format]
        angereicherteRechnung:
          match:
            format: {code: angereichertesPDF, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
          schema:
            mustSupport: true
            index: 86
            elements:
              attachment:
                mustSupport: true
                index: 87
                extensions:
                  signature:
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    type: Extension
                    mustSupport: true
                    index: 88
                    elements:
                      value[x]:
                        elements:
                          type:
                            mustSupport: true
                            pattern:
                              type: Coding
                              value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                            index: 89
                          when: {mustSupport: true, index: 90}
                          who:
                            mustSupport: true
                            index: 91
                            elements:
                              identifier:
                                mustSupport: true
                                index: 92
                                elements:
                                  system:
                                    pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                    mustSupport: true
                                    index: 93
                                  value:
                                    mustSupport: true
                                    pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                    index: 94
                          targetFormat:
                            binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                            mustSupport: true
                            index: 95
                          sigFormat: {mustSupport: true, index: 96}
                          data: {mustSupport: true, index: 97}
                elements:
                  extension:
                    type: Extension
                    mustSupport: true
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    index: 88
                    slicing:
                      slices:
                        signature:
                          match: {}
                          schema:
                            type: Extension
                            mustSupport: true
                            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                            index: 88
                            elements:
                              value[x]:
                                elements:
                                  type:
                                    mustSupport: true
                                    pattern:
                                      type: Coding
                                      value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                                    index: 89
                                  when: {mustSupport: true, index: 90}
                                  who:
                                    mustSupport: true
                                    index: 91
                                    elements:
                                      identifier:
                                        mustSupport: true
                                        index: 92
                                        elements:
                                          system:
                                            pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                            mustSupport: true
                                            index: 93
                                          value:
                                            mustSupport: true
                                            pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                            index: 94
                                  targetFormat:
                                    binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                                    mustSupport: true
                                    index: 95
                                  sigFormat: {mustSupport: true, index: 96}
                                  data: {mustSupport: true, index: 97}
                  contentType:
                    mustSupport: true
                    pattern: {type: Code, value: application/pdf}
                    index: 98
                  data: {index: 99}
                  url: {mustSupport: true, index: 100}
                required: [url, contentType]
              format:
                mustSupport: true
                pattern:
                  type: Coding
                  value: {code: angereichertesPDF, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
                index: 101
            required: [format]
        strukturierterRechnungsinhalt:
          match:
            format: {code: rechnungsinhalt, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
          schema:
            mustSupport: true
            index: 102
            elements:
              attachment:
                mustSupport: true
                index: 103
                extensions:
                  signature:
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    type: Extension
                    mustSupport: true
                    index: 104
                    elements:
                      value[x]:
                        elements:
                          type:
                            mustSupport: true
                            pattern:
                              type: Coding
                              value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                            index: 105
                          when: {mustSupport: true, index: 106}
                          who:
                            mustSupport: true
                            index: 107
                            elements:
                              identifier:
                                mustSupport: true
                                index: 108
                                elements:
                                  system:
                                    pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                    mustSupport: true
                                    index: 109
                                  value:
                                    mustSupport: true
                                    pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                    index: 110
                          targetFormat:
                            binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                            mustSupport: true
                            index: 111
                          sigFormat: {mustSupport: true, index: 112}
                          data: {mustSupport: true, index: 113}
                elements:
                  extension:
                    type: Extension
                    mustSupport: true
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    index: 104
                    slicing:
                      slices:
                        signature:
                          match: {}
                          schema:
                            type: Extension
                            mustSupport: true
                            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                            index: 104
                            elements:
                              value[x]:
                                elements:
                                  type:
                                    mustSupport: true
                                    pattern:
                                      type: Coding
                                      value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                                    index: 105
                                  when: {mustSupport: true, index: 106}
                                  who:
                                    mustSupport: true
                                    index: 107
                                    elements:
                                      identifier:
                                        mustSupport: true
                                        index: 108
                                        elements:
                                          system:
                                            pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                            mustSupport: true
                                            index: 109
                                          value:
                                            mustSupport: true
                                            pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                            index: 110
                                  targetFormat:
                                    binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                                    mustSupport: true
                                    index: 111
                                  sigFormat: {mustSupport: true, index: 112}
                                  data: {mustSupport: true, index: 113}
                  contentType:
                    mustSupport: true
                    pattern: {type: Code, value: application/fhir+json}
                    index: 114
                  data: {index: 115}
                  url: {mustSupport: true, index: 116}
                required: [url, contentType]
              format:
                mustSupport: true
                pattern:
                  type: Coding
                  value: {code: rechnungsinhalt, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
                index: 117
            required: [format]
        anhang:
          match:
            format: {code: rechnungsanhang, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
          schema:
            mustSupport: true
            index: 118
            elements:
              attachment:
                mustSupport: true
                index: 119
                extensions:
                  signature:
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    type: Extension
                    mustSupport: true
                    index: 120
                    elements:
                      value[x]:
                        elements:
                          type:
                            mustSupport: true
                            pattern:
                              type: Coding
                              value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                            index: 121
                          when: {mustSupport: true, index: 122}
                          who:
                            mustSupport: true
                            index: 123
                            elements:
                              identifier:
                                mustSupport: true
                                index: 124
                                elements:
                                  system:
                                    pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                    mustSupport: true
                                    index: 125
                                  value:
                                    mustSupport: true
                                    pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                    index: 126
                          targetFormat:
                            binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                            mustSupport: true
                            index: 127
                          sigFormat: {mustSupport: true, index: 128}
                          data: {mustSupport: true, index: 129}
                elements:
                  extension:
                    type: Extension
                    mustSupport: true
                    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                    index: 120
                    slicing:
                      slices:
                        signature:
                          match: {}
                          schema:
                            type: Extension
                            mustSupport: true
                            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
                            index: 120
                            elements:
                              value[x]:
                                elements:
                                  type:
                                    mustSupport: true
                                    pattern:
                                      type: Coding
                                      value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                                    index: 121
                                  when: {mustSupport: true, index: 122}
                                  who:
                                    mustSupport: true
                                    index: 123
                                    elements:
                                      identifier:
                                        mustSupport: true
                                        index: 124
                                        elements:
                                          system:
                                            pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                                            mustSupport: true
                                            index: 125
                                          value:
                                            mustSupport: true
                                            pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                                            index: 126
                                  targetFormat:
                                    binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                                    mustSupport: true
                                    index: 127
                                  sigFormat: {mustSupport: true, index: 128}
                                  data: {mustSupport: true, index: 129}
                  contentType:
                    mustSupport: true
                    pattern: {type: Code, value: application/pdf}
                    index: 130
                  data: {index: 131}
                  url: {mustSupport: true, index: 132}
                required: [url, contentType]
              format:
                mustSupport: true
                pattern:
                  type: Coding
                  value: {code: rechnungsanhang, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs'}
                index: 133
            required: [format]
  type:
    mustSupport: true
    index: 56
    elements:
      coding:
        index: 57
        slicing:
          rules: open
          discriminator:
          - {path: $this, type: pattern}
          min: 1
          slices:
            DokumentenKlassifizierung:
              match: {}
              schema:
                binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-sonstigesdokument-type-vs'}
                mustSupport: true
                index: 58
                elements:
                  system: {mustSupport: true, index: 59}
                  code: {mustSupport: true, index: 60}
                  display: {maxLength: 1024, mustSupport: true, index: 61}
                required: [display, system, code]
            Rechnungstyp:
              match: {code: AM010106, system: 'http://dvmd.de/fhir/CodeSystem/kdl'}
              schema:
                mustSupport: true
                pattern:
                  type: Coding
                  value: {code: AM010106, system: 'http://dvmd.de/fhir/CodeSystem/kdl'}
                index: 62
              min: 0
              max: 1
    required: [coding]
  author:
    mustSupport: true
    index: 65
    elements:
      identifier: {type: Identifier, mustSupport: true, index: 66}
      display: {maxLength: 1024, mustSupport: true, index: 67}
    required: [identifier, display]
  extension:
    mustSupport: true
    index: 27
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: url, type: value}
      min: null
      slices:
        docRef-signature:
          match: {url: null}
          schema:
            type: Extension
            mustSupport: true
            url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
            index: 28
            elements:
              value[x]:
                elements:
                  type:
                    mustSupport: true
                    pattern:
                      type: Coding
                      value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
                    index: 29
                  when: {mustSupport: true, index: 30}
                  who:
                    mustSupport: true
                    index: 31
                    elements:
                      identifier:
                        mustSupport: true
                        index: 32
                        elements:
                          system:
                            pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                            mustSupport: true
                            index: 33
                          value:
                            mustSupport: true
                            pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                            index: 34
                  targetFormat:
                    binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
                    mustSupport: true
                    index: 35
                  sigFormat: {mustSupport: true, index: 36}
                  data: {mustSupport: true, index: 37}
        rechnungsdatum:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-rechnungsdatum', index: 38}
          min: 0
          max: 1
        zahlungszieldatum:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-zahlungsziel', index: 39}
          min: 0
          max: 1
        gesamtbetrag:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-gesamtbetrag', index: 40}
          min: 0
          max: 1
        fachrichtung:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-fachrichtung', index: 41}
          min: 0
          max: 1
        behandlungsart:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-behandlungsart', index: 42}
          min: 0
          max: 1
  status:
    mustSupport: true
    pattern: {type: Code, value: current}
    index: 55
  id: {index: 0}
  identifier:
    mustSupport: true
    index: 43
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: 1
      slices:
        Token:
          match: {system: 'https://gematik.de/fhir/sid/dipag-token'}
          schema:
            short: Rechnungs-Token (Dokumenttoken)
            mustSupport: true
            _required: true
            pattern:
              type: Identifier
              value: {system: 'https://gematik.de/fhir/sid/dipag-token'}
            index: 44
            elements:
              system:
                short: NamingSystem des Rechnungs-Tokens
                pattern: {type: Uri, value: 'https://gematik.de/fhir/sid/dipag-token'}
                mustSupport: true
                index: 45
              value: {short: Rechnungs-Token (Dokumenttoken), mustSupport: true, index: 46}
            required: [value, system]
        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
            pattern:
              type: Identifier
              value:
                type:
                  coding:
                  - {code: invoice, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
            index: 47
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: invoice, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                index: 48
              system: {short: NamingSystem der Rechnungs-Nr. (der LEI), mustSupport: true, index: 49}
              value: {short: Rechnungs-Nr. (der LEI), mustSupport: true, index: 50}
            required: [value, type, system]
        AnhangIdentifier:
          match:
            type:
              coding:
              - {code: anhang, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
          schema:
            short: Anhangs-Identifier
            mustSupport: true
            pattern:
              type: Identifier
              value:
                type:
                  coding:
                  - {code: anhang, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
            index: 51
            elements:
              type:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: anhang, system: 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs'}
                index: 52
              system: {short: NamingSystem des Anhangs-Identifier, mustSupport: true, index: 53}
              value: {short: Anhangs-Identifier, mustSupport: true, index: 54}
            required: [value, type, system]
  context:
    mustSupport: true
    index: 134
    elements:
      related:
        mustSupport: true
        index: 135
        slicing:
          rules: open
          discriminator:
          - {path: type, type: pattern}
          min: 1
          slices:
            patient:
              match: {type: Patient}
              schema:
                short: Rechnungsempfänger:in (Versicherte:r)
                refers: ['http://hl7.org/fhir/StructureDefinition/Patient']
                type: Reference
                mustSupport: true
                index: 136
                elements:
                  type:
                    pattern: {type: Uri, value: Patient}
                    mustSupport: true
                    index: 137
                required: [type]
            empfaenger:
              match: {type: Organization}
              schema:
                short: Empfangende Kostenträger-Organisation
                refers: ['http://hl7.org/fhir/StructureDefinition/Organization']
                type: Reference
                mustSupport: true
                index: 138
                elements:
                  type:
                    pattern: {type: Uri, value: Organization}
                    mustSupport: true
                    index: 139
                required: [type]
            anhaenge:
              match: {type: DocumentReference}
              schema:
                type: Reference
                mustSupport: true
                refers: ['http://hl7.org/fhir/StructureDefinition/DocumentReference']
                array: true
                index: 140
                elements:
                  type:
                    pattern: {type: Uri, value: DocumentReference}
                    mustSupport: true
                    index: 141
                required: [type]
    required: [related]
  subject:
    mustSupport: true
    index: 63
    elements:
      display: {maxLength: 1024, mustSupport: true, index: 64}
    required: [display]
package_version: 1.3.0-beta
extensions:
  docRef-signature:
    url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature
    type: Extension
    mustSupport: true
    index: 28
    elements:
      value[x]:
        elements:
          type:
            mustSupport: true
            pattern:
              type: Coding
              value: {code: 1.2.840.10065.1.12.1.13, system: 'urn:iso-astm:E1762-95:2013'}
            index: 29
          when: {mustSupport: true, index: 30}
          who:
            mustSupport: true
            index: 31
            elements:
              identifier:
                mustSupport: true
                index: 32
                elements:
                  system:
                    pattern: {type: Uri, value: 'urn:ietf:rfc:3986'}
                    mustSupport: true
                    index: 33
                  value:
                    mustSupport: true
                    pattern: {type: String, value: 'urn:oid:1.2.276.0.76.4.323'}
                    index: 34
          targetFormat:
            binding: {strength: required, valueSet: 'https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-in-binary-vs'}
            mustSupport: true
            index: 35
          sigFormat: {mustSupport: true, index: 36}
          data: {mustSupport: true, index: 37}
  rechnungsdatum: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-rechnungsdatum', min: 0, max: 1, type: Extension, mustSupport: true, index: 38}
  zahlungszieldatum: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-zahlungsziel', min: 0, max: 1, type: Extension, mustSupport: true, index: 39}
  gesamtbetrag: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-gesamtbetrag', min: 0, max: 1, type: Extension, mustSupport: true, index: 40}
  fachrichtung: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-fachrichtung', min: 0, max: 1, type: Extension, mustSupport: true, index: 41}
  behandlungsart: {url: 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-behandlungsart', min: 0, max: 1, type: Extension, mustSupport: true, index: 42}
class: profile
kind: resource
url: https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-intern
base: http://hl7.org/fhir/StructureDefinition/DocumentReference
version: 1.1.0-beta
required: [identifier, subject, type, description]