{
  "resourceType": "StructureDefinition",
  "id": "gap-bundle-profile",
  "url": "http://akinox.com/fhir/StructureDefinition/gap-bundle-profile",
  "version": "1.0.0",
  "name": "GapBundle",
  "title": "GAP Bundle Profile",
  "status": "draft",
  "description": "Bundle profile for GAP transaction submissions.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "min": 1,
        "fixedCode": "transaction"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Bundle.entry:patient",
        "path": "Bundle.entry",
        "sliceName": "patient",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:patient.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Patient",
            "profile": [
              "http://akinox.com/fhir/StructureDefinition/gap-patient-profile"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:task",
        "path": "Bundle.entry",
        "sliceName": "task",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:task.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Task",
            "profile": [
              "http://akinox.com/fhir/StructureDefinition/gap-task-profile"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:relatedPerson",
        "path": "Bundle.entry",
        "sliceName": "relatedPerson",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Bundle.entry:relatedPerson.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "RelatedPerson",
            "profile": [
              "http://akinox.com/fhir/StructureDefinition/gap-related-person-profile"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:provenance",
        "path": "Bundle.entry",
        "sliceName": "provenance",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Bundle.entry:provenance.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Provenance",
            "profile": [
              "http://akinox.com/fhir/StructureDefinition/gap-provenance-profile"
            ]
          }
        ]
      }
    ]
  }
}