PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.us.carin-bb@2.1.0
    http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy-Basis
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)\nThe basis profile does not have requirements for financial data.
package_name: hl7.fhir.us.carin-bb
derivation: constraint
name: C4BBExplanationOfBenefitPharmacyBasis
type: ExplanationOfBenefit
elements:
  processNote:
    elements:
      text: {mustSupport: true, index: 61}
  adjudication:
    type: BackboneElement
    mustSupport: true
    index: 51
    elements:
      category:
        binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBAdjudicationCategoryDiscriminator'}
        mustSupport: true
        index: 52
    slicing:
      rules: open
      ordered: false
      description: Slice based on value
      discriminator:
      - {path: category, type: value}
      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: 53
            elements:
              category:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: billingnetworkstatus, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
                index: 54
              reason:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBPayerProviderNetworkStatus'}
                mustSupport: true
                index: 55
            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: 56
            elements:
              category:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: benefitpaymentstatus, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
                index: 57
              reason:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBPayerBenefitPaymentStatus'}
                mustSupport: true
                index: 58
            required: [reason]
  supportingInfo:
    array: true
    min: 4
    index: 5
    slicing:
      rules: open
      ordered: false
      description: Slice based on $this value
      discriminator:
      - {path: category, type: value}
      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: 60}
  item:
    elements:
      productOrService:
        binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/FDANDCOrCompound'}
        mustSupport: true
        index: 38
      serviced:
        mustSupport: true
        choices: [servicedDate]
        index: 40
      servicedDate: {type: date, mustSupport: true, choiceOf: serviced, index: 41}
      quantity: {mustSupport: true, index: 42}
      adjudication:
        mustSupport: true
        index: 43
        elements:
          category:
            binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/C4BBAdjudicationCategoryDiscriminator'}
            index: 44
        slicing:
          rules: open
          ordered: false
          description: Slice based on value
          discriminator:
          - {path: category, type: value}
          min: null
          slices:
            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: 45
                elements:
                  category:
                    pattern:
                      type: CodeableConcept
                      value:
                        coding:
                        - {code: rejectreason, system: 'http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator'}
                    index: 46
                  reason:
                    binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/NCPDPRejectCode'}
                    mustSupport: true
                    index: 47
                required: [reason]
      detail:
        mustSupport: true
        index: 48
        elements:
          productOrService:
            binding: {strength: required, valueSet: 'http://hl7.org/fhir/us/carin-bb/ValueSet/FDANationalDrugCode'}
            mustSupport: true
            index: 49
          quantity: {mustSupport: true, index: 50}
    required: [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:
    elements:
      amount: {mustSupport: true, index: 59}
  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-Basis
        severity: error
        expression: |-
          (
          role.where(coding.where(code in ('primary' | 'prescribing' )).exists()).exists() implies
          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-Basis
        severity: error
        expression: |-
          (
          role.where(coding.where(code in ('rendering' )).exists()).exists() implies
          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: 2.1.0
class: profile
kind: resource
url: http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy-Basis
base: http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit
version: 2.1.0
required: [adjudication]