{
  "resourceType": "StructureDefinition",
  "id": "ncdhc-bundle-document",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Foundation.Other"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "not-classified"
    }
  ],
  "url": "http://build.fhir.org/ig/hl7au/au-fhir-childhealth/StructureDefinition/ncdhc-bundle-document",
  "version": "current",
  "name": "NCDHCBundleDocument",
  "title": "NCDHC FHIR Document Base",
  "status": "active",
  "description": "NCDHC FHIR document profile using Bundle resource",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": true,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "short": "Document Identifier",
        "min": 1
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "document"
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "short": "Document creation time",
        "min": 1
      },
      {
        "id": "Bundle.total",
        "path": "Bundle.total",
        "max": "0"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "fullUrl"
            },
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "rules": "open",
          "description": "Slice based on the resource type and fullurl"
        },
        "short": "Document must have atleast one entry",
        "min": 1
      },
      {
        "id": "Bundle.entry.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry.resource",
        "path": "Bundle.entry.resource",
        "short": "Other resource entries in the document.",
        "min": 1
      },
      {
        "id": "Bundle.entry.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:compositionEntry",
        "path": "Bundle.entry",
        "sliceName": "compositionEntry",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:compositionEntry.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:compositionEntry.resource",
        "path": "Bundle.entry.resource",
        "short": "Composition should be the first resource in the Bundle document",
        "min": 1,
        "type": [
          {
            "code": "Composition",
            "profile": [
              "http://build.fhir.org/ig/hl7au/au-fhir-childhealth/StructureDefinition/ncdhc-composition-clinical-document-base"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:compositionEntry.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:compositionEntry.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:compositionEntry.response",
        "path": "Bundle.entry.response",
        "max": "0"
      }
    ]
  }
}