PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.us.carin@bb-2.0.0
    http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy
description: This profile is used for Explanation of Benefits (EOBs) based on claims submitted by retail pharmacies.\nThe claims data is based on submission standards adopted by the Department of Health and Human Services defined by NCPDP (National Council for Prescription Drug Program)
package_name: hl7.fhir.us.carin
derivation: constraint
name: C4BBExplanationOfBenefitPharmacy
type: ExplanationOfBenefit
elements:
  processNote:
    elements:
      text: {mustSupport: true, index: 70}
  adjudication:
    type: BackboneElement
    mustSupport: true
    index: 55
    elements:
      category:
        binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBAdjudicationCategoryDiscriminator'}
        mustSupport: true
        index: 56
    slicing:
      rules: open
      ordered: false
      description: Slice based on value pattern
      discriminator:
      - {path: category, type: pattern}
      min: 1
      slices:
        billingnetworkstatus:
          match:
            category:
              coding:
              - {code: billingnetworkstatus, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
          schema:
            short: Billing provider networking status
            mustSupport: true
            index: 57
            elements:
              category:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: billingnetworkstatus, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
                index: 58
              reason:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBPayerProviderNetworkStatus'}
                mustSupport: true
                index: 59
            required: [reason]
        benefitpaymentstatus:
          match:
            category:
              coding:
              - {code: benefitpaymentstatus, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
          schema:
            short: Indicates the in network or out of network payment status of the claim. (142)
            mustSupport: true
            _required: true
            index: 60
            elements:
              category:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: benefitpaymentstatus, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
                index: 61
              reason:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBPayerBenefitPaymentStatus'}
                mustSupport: true
                index: 62
            required: [reason]
  supportingInfo:
    array: true
    min: 4
    index: 5
    slicing:
      rules: open
      ordered: false
      description: Slice based on $this pattern
      discriminator:
      - {path: category, type: pattern}
      min: 4
      slices:
        dayssupply:
          match:
            category:
              coding:
              - {code: dayssupply, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Days supply
            mustSupport: true
            _required: true
            index: 6
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: dayssupply, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 7
              value:
                mustSupport: true
                choices: [valueQuantity]
                index: 9
              valueQuantity: {type: Quantity, mustSupport: true, choiceOf: value, index: 10}
            required: [value, valueQuantity]
        dawcode:
          match:
            category:
              coding:
              - {code: dawcode, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Dispense and written product selection code
            mustSupport: true
            _required: true
            index: 11
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: dawcode, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 12
              code:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/NCPDPDispensedAsWrittenOrProductSelectionCode'}
                mustSupport: true
                index: 13
            required: [code]
        refillNum:
          match:
            category:
              coding:
              - {code: refillnum, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: The number fill of the claim dispensed supply
            mustSupport: true
            _required: true
            index: 14
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: refillnum, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 15
              value:
                mustSupport: true
                choices: [valueQuantity]
                index: 17
              valueQuantity: {type: Quantity, mustSupport: true, choiceOf: value, index: 18}
            required: [value, valueQuantity]
        refillsAuthorized:
          match:
            category:
              coding:
              - {code: refillsauthorized, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Number or refills authorized by prescriber
            _required: true
            index: 19
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: refillsauthorized, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 20
              value:
                mustSupport: true
                choices: [valueQuantity]
                index: 22
              valueQuantity: {type: Quantity, mustSupport: true, choiceOf: value, index: 23}
            required: [value, valueQuantity]
        brandgenericindicator:
          match:
            category:
              coding:
              - {code: brandgenericindicator, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Plan reported brand or generic drug indicator
            mustSupport: true
            index: 24
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: brandgenericindicator, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 25
              code:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/NCPDPBrandGenericIndicator'}
                mustSupport: true
                index: 26
            required: [code]
        rxoriginCode:
          match:
            category:
              coding:
              - {code: rxorigincode, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Prescription origin code
            mustSupport: true
            index: 27
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: rxorigincode, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 28
              code:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/NCPDPPrescriptionOriginCode'}
                mustSupport: true
                index: 29
            required: [code]
        clmrecvddate:
          match:
            category:
              coding:
              - {code: clmrecvddate, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Claim received date
            mustSupport: true
            index: 30
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: clmrecvddate, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 31
              timing:
                mustSupport: true
                choices: [timingDate]
                index: 33
              timingDate: {type: date, mustSupport: true, choiceOf: timing, index: 34}
            required: [timingDate, timing]
        compoundcode:
          match:
            category:
              coding:
              - {code: compoundcode, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
          schema:
            short: Code indicating whether or not the prescription is a compound
            mustSupport: true
            index: 35
            elements:
              category:
                mustSupport: true
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: compoundcode, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType'}
                index: 36
              code:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/NCPDPCompoundCode'}
                mustSupport: true
                index: 37
            required: [code]
  payment:
    elements:
      date: {mustSupport: true, index: 69}
  item:
    elements:
      productOrService:
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/FDANDCOrCompound'}
        mustSupport: true
        index: 38
      serviced:
        choices: [servicedDate]
        index: 40
      servicedDate: {type: date, choiceOf: serviced, index: 41}
      quantity: {mustSupport: true, index: 43}
      adjudication:
        mustSupport: true
        index: 44
        elements:
          category:
            binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBAdjudicationCategoryDiscriminator'}
            index: 45
        slicing:
          rules: open
          ordered: false
          description: Slice based on value pattern
          discriminator:
          - {path: category, type: pattern}
          min: 1
          slices:
            adjudicationamounttype:
              match: {category: null}
              schema:
                short: Line level adjudication type and amount
                mustSupport: true
                array: true
                min: 1
                _required: true
                index: 46
                elements:
                  category:
                    binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBAdjudication'}
                    index: 47
                  amount: {mustSupport: true, index: 48}
                required: [amount]
            rejectreason:
              match:
                category:
                  coding:
                  - {code: rejectreason, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
              schema:
                short: Reason codes used to interpret the Non-Covered Amount (92)
                mustSupport: true
                index: 49
                elements:
                  category:
                    pattern:
                      type: CodeableConcept
                      value:
                        coding:
                        - {code: rejectreason, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
                    index: 50
                  reason:
                    binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/NCPDPRejectCode'}
                    mustSupport: true
                    index: 51
                required: [reason]
      detail:
        mustSupport: true
        index: 52
        elements:
          productOrService:
            binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/FDANationalDrugCode'}
            mustSupport: true
            index: 53
          quantity: {mustSupport: true, index: 54}
    required: [adjudication, servicedDate, serviced]
  type:
    pattern:
      type: CodeableConcept
      value:
        coding:
        - {code: pharmacy, system: 'http://terminology.hl7.org/CodeSystem/claim-type'}
    index: 1
  created: {mustSupport: true, index: 2}
  total:
    index: 63
    elements:
      category:
        binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBTotalCategoryDiscriminator'}
        mustSupport: true
        index: 64
      amount: {mustSupport: true, index: 65}
    slicing:
      rules: open
      ordered: false
      description: Slice based on value pattern
      discriminator:
      - {path: category, type: pattern}
      min: null
      slices:
        adjudicationamounttype:
          match: {category: null}
          schema:
            short: Total adjudication type and amount
            mustSupport: true
            array: true
            min: 1
            _required: true
            index: 66
            elements:
              category:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBAdjudication'}
                index: 67
              amount: {mustSupport: true, index: 68}
  identifier: {mustSupport: true, index: 0}
  careTeam:
    constraint:
      EOB-pharm-careTeam-practitioner:
        human: 'Pharmacy EOB: Careteam roles refer to a practitioner'
        source: http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy
        severity: error
        expression: |-
          (
          role.where(coding.where(code in ('primary' | 'prescribing' )).exists()).exists() implies
          role.where(coding.where(code in ('primary' | 'prescribing' )).exists()).exists().provider.all(resolve() is Organization)
          )
      EOB-pharm-careTeam-organization:
        human: 'Pharmacy EOB: Careteam roles refer to an organization'
        source: http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy
        severity: error
        expression: |-
          (
          role.where(coding.where(code in ('rendering' )).exists()).exists() implies
          role.where(coding.where(code in ('rendering' )).exists()).exists().provider.all(resolve() is Organization)
          )
    index: 3
    elements:
      role:
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBClaimPharmacyTeamRole'}
        index: 4
    required: [role]
package_version: bb-2.0.0
class: profile
kind: resource
url: http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy
base: http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit
version: 2.0.0
required: [adjudication]