{
  "resourceType": "StructureDefinition",
  "id": "profile-Bundle-coverage-family",
  "url": "https://bpcs.exchange/fhir/StructureDefinition/profile-Bundle-coverage-family",
  "name": "BundleCoverageFamily",
  "title": "Coverage Family Search Result Bundle Profile",
  "status": "active",
  "experimental": false,
  "description": "A profile on Bundle for a search result of coverage records for a family",
  "fhirVersion": "5.0.0",
  "mapping": [
    {
      "identity": "BPCS",
      "name": "Internal BPCS API"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "https://bpcs.exchange/fhir/StructureDefinition/profile-Bundle-query",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "min": 12
      },
      {
        "id": "Bundle.entry:coverage",
        "path": "Bundle.entry",
        "sliceName": "coverage",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:coverage.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Coverage",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-family"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:coverage.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "match"
      },
      {
        "id": "Bundle.entry:family",
        "path": "Bundle.entry",
        "sliceName": "family",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:family.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Group",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Group-search"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:family.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:request",
        "path": "Bundle.entry",
        "sliceName": "request",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:request.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "EnrollmentRequest",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentRequest-search"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:request.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:enrollment",
        "path": "Bundle.entry",
        "sliceName": "enrollment",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:enrollment.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "EnrollmentResponse",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentResponse"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:enrollment.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:delegate",
        "path": "Bundle.entry",
        "sliceName": "delegate",
        "max": "1"
      },
      {
        "id": "Bundle.entry:delegate.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "RelatedPerson",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-RelatedPerson-delegate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:delegate.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:familyExpense",
        "path": "Bundle.entry",
        "sliceName": "familyExpense",
        "min": 4,
        "max": "4"
      },
      {
        "id": "Bundle.entry:familyExpense.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "ExplanationOfBenefit",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-ExplanationOfBenefit-expenses-family-quarterly"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:familyExpense.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:memberCoverage",
        "path": "Bundle.entry",
        "sliceName": "memberCoverage",
        "min": 1
      },
      {
        "id": "Bundle.entry:memberCoverage.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Coverage",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-individual-public"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:memberCoverage.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:recipient",
        "path": "Bundle.entry",
        "sliceName": "recipient",
        "min": 1
      },
      {
        "id": "Bundle.entry:recipient.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Patient",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Patient-search"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:recipient.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:income",
        "path": "Bundle.entry",
        "sliceName": "income"
      },
      {
        "id": "Bundle.entry:income.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Observation",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Observation-income-search"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:income.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:consent",
        "path": "Bundle.entry",
        "sliceName": "consent"
      },
      {
        "id": "Bundle.entry:consent.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Consent",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Consent"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:consent.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:privateInsurance",
        "path": "Bundle.entry",
        "sliceName": "privateInsurance"
      },
      {
        "id": "Bundle.entry:privateInsurance.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Coverage",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-individual-private"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:privateInsurance.resource.extension",
        "path": "Bundle.entry.resource.extension",
        "min": 1
      },
      {
        "id": "Bundle.entry:privateInsurance.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      },
      {
        "id": "Bundle.entry:expenses",
        "path": "Bundle.entry",
        "sliceName": "expenses",
        "min": 1
      },
      {
        "id": "Bundle.entry:expenses.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "ExplanationOfBenefit",
            "profile": [
              "https://bpcs.exchange/fhir/StructureDefinition/profile-ExplanationOfBenefit-expenses-quarterly"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:expenses.search.mode",
        "path": "Bundle.entry.search.mode",
        "patternCode": "include"
      }
    ]
  }
}