{
  "resourceType": "StructureDefinition",
  "id": "profile-bundle-dischargesummary",
  "url": "https://fhir.synapxe.sg/StructureDefinition/profile-bundle-dischargesummary",
  "name": "DischargeSummary",
  "title": "Discharge Summary Bundle Profile",
  "status": "active",
  "publisher": "Synapxe",
  "description": "Document Bundle containing complete discharge summary with composition and supporting encounter, diagnosis, and medication data.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.meta",
        "path": "Bundle.meta",
        "type": [
          {
            "code": "Meta",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-meta"
            ]
          }
        ]
      },
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-identifier-record-id"
            ]
          }
        ]
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "patternCode": "document"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Bundle.entry:dischargesummary",
        "path": "Bundle.entry",
        "sliceName": "dischargesummary",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:dischargesummary.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-dischargesummary"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:dischargesummary.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:allergyIntolerance",
        "path": "Bundle.entry",
        "sliceName": "allergyIntolerance"
      },
      {
        "id": "Bundle.entry:allergyIntolerance.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-allergyintolerance"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:allergyIntolerance.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:flag",
        "path": "Bundle.entry",
        "sliceName": "flag"
      },
      {
        "id": "Bundle.entry:flag.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-flag"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:flag.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:diagnosis",
        "path": "Bundle.entry",
        "sliceName": "diagnosis",
        "min": 1
      },
      {
        "id": "Bundle.entry:diagnosis.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-ds-diagnosis"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:diagnosis.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:medicationRequest",
        "path": "Bundle.entry",
        "sliceName": "medicationRequest"
      },
      {
        "id": "Bundle.entry:medicationRequest.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-ds-medicationrequest"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:medicationRequest.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:medicalCertificate",
        "path": "Bundle.entry",
        "sliceName": "medicalCertificate"
      },
      {
        "id": "Bundle.entry:medicalCertificate.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-medicalcertificate"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:medicalCertificate.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:procedure",
        "path": "Bundle.entry",
        "sliceName": "procedure"
      },
      {
        "id": "Bundle.entry:procedure.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-ds-procedure"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:procedure.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:fileAttachment",
        "path": "Bundle.entry",
        "sliceName": "fileAttachment"
      },
      {
        "id": "Bundle.entry:fileAttachment.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-fileattachment"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:fileAttachment.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:encounter",
        "path": "Bundle.entry",
        "sliceName": "encounter",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:encounter.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Resource",
            "profile": [
              "https://fhir.synapxe.sg/StructureDefinition/profile-ds-encounter"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:encounter.search",
        "path": "Bundle.entry.search",
        "max": "0"
      }
    ]
  }
}