{
  "resourceType": "StructureDefinition",
  "id": "MatchOutputBundle",
  "url": "https://emiga.rki.de/fhir/common/StructureDefinition/MatchOutputBundle",
  "version": "0.1.0",
  "name": "MatchOutputBundle",
  "title": "Match Output Bundle",
  "status": "active",
  "experimental": false,
  "date": "2026-05-12",
  "publisher": "Robert Koch-Institut",
  "description": "Dieses Profil bildet ein Match-Output-Bundle ab. Es dient der strukturierten Zusammenführung und gemeinsamen Übertragung von Match-Ergebnissen (z.B. Dublettenprüfungen) zu Fällen, Ausbrüchen, Personen oder anderen Entitäten innerhalb eines fachlichen Vorgangs.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.meta.profile",
        "path": "Bundle.meta.profile",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Bundle.meta.profile:emigaprofile",
        "path": "Bundle.meta.profile",
        "sliceName": "emigaprofile",
        "min": 1,
        "max": "1",
        "patternCanonical": "https://emiga.rki.de/fhir/common/StructureDefinition/MatchOutputBundle",
        "mustSupport": true
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "short": "Typ des Bundles",
        "fixedCode": "searchset",
        "mustSupport": true
      },
      {
        "id": "Bundle.total",
        "path": "Bundle.total",
        "short": "Anzahl der Suchergebnisse",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient",
        "path": "Bundle.entry",
        "sliceName": "Patient",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Patient",
            "profile": [
              "https://emiga.rki.de/fhir/common/StructureDefinition/AffectedPerson"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.search",
        "path": "Bundle.entry.search",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.search.extension",
        "path": "Bundle.entry.search.extension",
        "min": 2,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.search.extension:MatchGrade",
        "path": "Bundle.entry.search.extension",
        "sliceName": "MatchGrade",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/match-grade"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.search.extension:DuplicateMatchMetadata",
        "path": "Bundle.entry.search.extension",
        "sliceName": "DuplicateMatchMetadata",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://emiga.rki.de/fhir/common/StructureDefinition/DuplicateMatchMetadata"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.search.mode",
        "path": "Bundle.entry.search.mode",
        "min": 1,
        "patternCode": "match",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Patient.search.score",
        "path": "Bundle.entry.search.score",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}