{
  "resourceType": "StructureDefinition",
  "id": "profile-Bundle",
  "url": "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-bundle",
  "version": "2.0.0",
  "name": "Bundle",
  "title": "MHA Bundle Profile",
  "status": "active",
  "date": "2025-05-17T20:17:06.3613088+00:00",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "MHA-PDS-Mapping",
      "name": "MHA PDS Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle",
        "path": "Bundle",
        "constraint": [
          {
            "key": "mha-pds-bundle-inv-1",
            "severity": "error",
            "human": "Must contain exactly one patient resource in the bundle",
            "expression": "entry.resource.ofType(Patient).count() = 1"
          },
          {
            "key": "mha-pds-bundle-inv-2",
            "severity": "error",
            "human": "Must contain exactly one organization resource in the bundle",
            "expression": "entry.resource.ofType(Organization).count() = 1"
          },
          {
            "key": "mha-pds-bundle-inv-3",
            "severity": "error",
            "human": "Must contain exactly one location resource in the bundle",
            "expression": "entry.resource.ofType(Location).count() = 1"
          }
        ]
      },
      {
        "id": "Bundle.meta",
        "path": "Bundle.meta",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.meta.lastUpdated",
        "path": "Bundle.meta.lastUpdated",
        "mustSupport": true
      },
      {
        "id": "Bundle.meta.profile",
        "path": "Bundle.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-bundle",
        "mustSupport": true
      },
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "mustSupport": true
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "collection",
        "mustSupport": true
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry.resource",
        "path": "Bundle.entry.resource",
        "mustSupport": true
      }
    ]
  }
}