FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Explanationofbenefit.shex

Responsible Owner: Financial Management Work GroupStandards Status: InformativeCompartments: Device, Encounter, Group, Patient, Practitioner, RelatedPerson

Raw ShEx

ShEx statement for explanationofbenefit

PREFIX fhir: <http://hl7.org/fhir/> 
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

# ShEx Version 2.2
IMPORT <Id.shex>
IMPORT <Oid.shex>
IMPORT <Uri.shex>
IMPORT <Url.shex>
IMPORT <Age.shex>
IMPORT <Code.shex>
IMPORT <Date.shex>
IMPORT <Time.shex>
IMPORT <Uuid.shex>
IMPORT <Meta.shex>
IMPORT <Group.shex>
IMPORT <Claim.shex>
IMPORT <Money.shex>
IMPORT <Count.shex>
IMPORT <Range.shex>
IMPORT <Ratio.shex>
IMPORT <String.shex>
IMPORT <Period.shex>
IMPORT <Timing.shex>
IMPORT <Coding.shex>
IMPORT <Dosage.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <Address.shex>
IMPORT <Decimal.shex>
IMPORT <Boolean.shex>
IMPORT <Instant.shex>
IMPORT <Integer.shex>
IMPORT <DateTime.shex>
IMPORT <Location.shex>
IMPORT <Quantity.shex>
IMPORT <Markdown.shex>
IMPORT <Distance.shex>
IMPORT <Duration.shex>
IMPORT <Coverage.shex>
IMPORT <Reference.shex>
IMPORT <Condition.shex>
IMPORT <Procedure.shex>
IMPORT <Canonical.shex>
IMPORT <Integer64.shex>
IMPORT <HumanName.shex>
IMPORT <Signature.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Attachment.shex>
IMPORT <Annotation.shex>
IMPORT <RatioRange.shex>
IMPORT <Expression.shex>
IMPORT <PositiveInt.shex>
IMPORT <UnsignedInt.shex>
IMPORT <SampledData.shex>
IMPORT <Practitioner.shex>
IMPORT <Organization.shex>
IMPORT <Base64Binary.shex>
IMPORT <ContactPoint.shex>
IMPORT <UsageContext.shex>
IMPORT <Availability.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DeviceRequest.shex>
IMPORT <ClaimResponse.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <ServiceRequest.shex>
IMPORT <NutritionOrder.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <DataRequirement.shex>
IMPORT <RelatedArtifact.shex>
IMPORT <PractitionerRole.shex>
IMPORT <MedicationRequest.shex>
IMPORT <CodeableReference.shex>
IMPORT <TriggerDefinition.shex>
IMPORT <VisionPrescription.shex>
IMPORT <ParameterDefinition.shex>
IMPORT <VirtualServiceDetail.shex>
IMPORT <ExtendedContactDetail.shex>

start=@<ExplanationOfBenefit> AND {fhir:nodeRole [fhir:treeRoot]}

# Explanation of Benefit resource
<ExplanationOfBenefit> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:ExplanationOfBenefit]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier for the 
                                            # resource 
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:status @<Code> AND
    	{fhir:v @fhirvs:explanationofbenefit-status};  # active | cancelled | draft | 
                                            # entered-in-error 
    fhir:statusReason @<String>?;           # Reason for status change
    fhir:type @<CodeableConcept>;           # Category or discipline
    fhir:subType @<CodeableConcept>?;       # More granular claim type
    fhir:use @<Code> AND
    	{fhir:v @fhirvs:claim-use};  # claim | preauthorization | 
                                            # predetermination 
    fhir:subject @<Reference> AND {fhir:l 
    			@<Group> OR 
    			@<Patient> ? };  # The recipient(s) of the products 
                                            # and services 
    fhir:billablePeriod @<Period>?;         # Relevant time frame for the claim
    fhir:created @<DateTime>;               # Response creation date
    fhir:enterer @<Reference> AND {fhir:l 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Author of the claim
    fhir:insurer @<Reference> AND {fhir:l 
    			@<Organization> ? }?;  # Party responsible for reimbursement
    fhir:provider @<Reference> AND {fhir:l 
    			@<Organization> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Party responsible for the claim
    fhir:priority @<CodeableConcept>?;      # Desired processing urgency
    fhir:fundsReserveRequested @<CodeableConcept>?;  # For whom to reserve funds
    fhir:fundsReserve @<CodeableConcept>?;  # Funds reserved status
    fhir:related @<OneOrMore_ExplanationOfBenefit.related>?;  # Prior or corollary claims
    fhir:prescription @<Reference> AND {fhir:l 
    			@<DeviceRequest> OR 
    			@<MedicationRequest> OR 
    			@<ServiceRequest> OR 
    			@<VisionPrescription> ? }?;  # Prescription authorizing services 
                                            # or products 
    fhir:originalPrescription @<Reference> AND {fhir:l 
    			@<DeviceRequest> OR 
    			@<MedicationRequest> OR 
    			@<ServiceRequest> OR 
    			@<VisionPrescription> ? }?;  # Original prescription if 
                                            # superceded by fulfiller 
    fhir:event @<OneOrMore_ExplanationOfBenefit.event>?;  # Event information
    fhir:payee @<ExplanationOfBenefit.payee>?;  # Recipient of benefits payable
    fhir:referral @<Reference> AND {fhir:l 
    			@<ServiceRequest> ? }?;  # Treatment Referral
    fhir:encounter @<OneOrMore_Reference_Encounter>?;  # Encounters associated with the 
                                            # listed treatments 
    fhir:facility @<Reference> AND {fhir:l 
    			@<Location> OR 
    			@<Organization> ? }?;  # Servicing Facility
    fhir:claim @<Reference> AND {fhir:l 
    			@<Claim> ? }?;  # Claim reference
    fhir:claimResponse @<Reference> AND {fhir:l 
    			@<ClaimResponse> ? }?;  # Claim response reference
    fhir:outcome @<Code> AND
    	{fhir:v @fhirvs:claim-outcome};  # queued | complete | error | partial
    fhir:decision @<CodeableConcept>?;      # Result of the adjudication
    fhir:disposition @<String>?;            # Disposition Message
    fhir:preAuthRef @<OneOrMore_String>?;   # Preauthorization reference
    fhir:preAuthRefPeriod @<OneOrMore_Period>?;  # Preauthorization in-effect period
    fhir:diagnosisRelatedGroup @<CodeableConcept>?;  # Package billing code
    fhir:careTeam @<OneOrMore_ExplanationOfBenefit.careTeam>?;  # Care Team members
    fhir:supportingInfo @<OneOrMore_ExplanationOfBenefit.supportingInfo>?;  # Supporting information
    fhir:diagnosis @<OneOrMore_ExplanationOfBenefit.diagnosis>?;  # Pertinent diagnosis information
    fhir:procedure @<OneOrMore_ExplanationOfBenefit.procedure>?;  # Clinical procedures performed
    fhir:precedence @<PositiveInt>?;        # Precedence (primary, secondary, 
                                            # etc.) 
    fhir:insurance @<OneOrMore_ExplanationOfBenefit.insurance>?;  # Patient insurance information
    fhir:accident @<ExplanationOfBenefit.accident>?;  # Details of the event
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:item @<OneOrMore_ExplanationOfBenefit.item>?;  # Product or service provided
    fhir:addItem @<OneOrMore_ExplanationOfBenefit.addItem>?;  # Insurer added line items
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Header-level adjudication
    fhir:total @<OneOrMore_ExplanationOfBenefit.total>?;  # Adjudication totals
    fhir:payment @<ExplanationOfBenefit.payment>?;  # Payment Details
    fhir:formCode @<CodeableConcept>?;      # Printed form identifier
    fhir:form @<Attachment>?;               # Printed reference or actual form
    fhir:processNote @<OneOrMore_ExplanationOfBenefit.processNote>?;  # Note concerning adjudication
    fhir:benefitPeriod @<Period>?;          # When the benefits are applicable
    fhir:benefitBalance @<OneOrMore_ExplanationOfBenefit.benefitBalance>?;  # Balance by Benefit Category
}  

# Insurer added line items
<ExplanationOfBenefit.addItem> EXTENDS @<BackboneElement> CLOSED {   
    fhir:itemSequence @<OneOrMore_PositiveInt>?;  # Item sequence number
    fhir:detailSequence @<OneOrMore_PositiveInt>?;  # Detail sequence number
    fhir:subDetailSequence @<OneOrMore_PositiveInt>?;  # Subdetail sequence number
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:subject @<Reference> AND {fhir:l 
    			@<Group> OR 
    			@<Patient> ? }?;  # The recipient of the products and 
                                            # services 
    fhir:informationSequence @<OneOrMore_PositiveInt>?;  # Applicable exception and 
                                            # supporting information 
    fhir:provider @<OneOrMore_Reference_Organization_OR_Practitioner_OR_PractitionerRole>?;  # Authorized providers
    fhir:revenue @<CodeableConcept>?;       # Revenue or cost center code
    fhir:category @<CodeableConcept>?;      # Benefit classification
    fhir:productOrService @<CodeableConcept>?;  # Billing, service, product, or drug 
                                            # code 
    fhir:productOrServiceEnd @<CodeableConcept>?;  # End of a range of codes
    fhir:request @<OneOrMore_Reference_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_ServiceRequest_OR_VisionPrescription>?;  # Request or Referral for Service
    fhir:modifier @<OneOrMore_CodeableConcept>?;  # Service/Product billing modifiers
    fhir:programCode @<OneOrMore_CodeableConcept>?;  # Program the product or service is 
                                            # provided under 
    fhir:serviced @<Date>  OR 
    			@<Period>  ?;  # Date or dates of service or 
                                            # product delivery 
    fhir:location @<CodeableConcept>  OR 
    			@<Address>  OR 
    			(@<Reference>  AND {fhir:l @<Location> })  ?;  # Place of service or where product 
                                            # was supplied 
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:quantity @<Quantity>?;             # Count of products or services
    fhir:unitPrice @<Money>?;               # Fee, charge or cost per item
    fhir:factor @<Decimal>?;                # Price scaling factor
    fhir:tax @<Money>?;                     # Total tax
    fhir:net @<Money>?;                     # Total item cost
    fhir:bodySite @<OneOrMore_ExplanationOfBenefit.addItem.bodySite>?;  # Anatomical location
    fhir:noteNumber @<OneOrMore_PositiveInt>?;  # Applicable note numbers
    fhir:reviewOutcome @<ExplanationOfBenefit.item.reviewOutcome>?;  # Additem level adjudication results
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Added items adjudication
    fhir:detail @<OneOrMore_ExplanationOfBenefit.addItem.detail>?;  # Insurer added line items
}  

# Note concerning adjudication
<ExplanationOfBenefit.processNote> EXTENDS @<BackboneElement> CLOSED {   
    fhir:class @<CodeableConcept>?;         # Business kind of note
    fhir:number @<PositiveInt>?;            # Note instance identifier
    fhir:type @<CodeableConcept>?;          # Note purpose
    fhir:text @<Markdown>?;                 # Note explanatory text
    fhir:language @<CodeableConcept>?;      # Language of the text
}  

# Benefit Summary
<ExplanationOfBenefit.benefitBalance.financial> EXTENDS @<BackboneElement> CLOSED {   
    fhir:type @<CodeableConcept>;           # Benefit classification
    fhir:allowed @<UnsignedInt>  OR 
    			@<String>  OR 
    			@<Money>  ?;  # Benefits allowed
    fhir:used @<UnsignedInt>  OR 
    			@<Money>  ?;  # Benefits used
}  

# Additional items
<ExplanationOfBenefit.item.detail.subDetail> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Product or service provided
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:revenue @<CodeableConcept>?;       # Revenue or cost center code
    fhir:category @<CodeableConcept>?;      # Benefit classification
    fhir:productOrService @<CodeableConcept>?;  # Billing, service, product, or drug 
                                            # code 
    fhir:productOrServiceEnd @<CodeableConcept>?;  # End of a range of codes
    fhir:modifier @<OneOrMore_CodeableConcept>?;  # Service/Product billing modifiers
    fhir:programCode @<OneOrMore_CodeableConcept>?;  # Program the product or service is 
                                            # provided under 
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:quantity @<Quantity>?;             # Count of products or services
    fhir:unitPrice @<Money>?;               # Fee, charge or cost per item
    fhir:factor @<Decimal>?;                # Price scaling factor
    fhir:tax @<Money>?;                     # Total tax
    fhir:net @<Money>?;                     # Total item cost
    fhir:udi @<OneOrMore_Reference_Device>?;  # Unique device identifier
    fhir:noteNumber @<OneOrMore_PositiveInt>?;  # Applicable note numbers
    fhir:reviewOutcome @<ExplanationOfBenefit.item.reviewOutcome>?;  # Subdetail level adjudication 
                                            # results 
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Subdetail level adjudication 
                                            # details 
}  

# Balance by Benefit Category
<ExplanationOfBenefit.benefitBalance> EXTENDS @<BackboneElement> CLOSED {   
    fhir:category @<CodeableConcept>;       # Benefit classification
    fhir:excluded @<Boolean>?;              # Excluded from the plan
    fhir:name @<String>?;                   # Short name for the benefit
    fhir:description @<String>?;            # Description of the benefit or 
                                            # services covered 
    fhir:network @<CodeableConcept>?;       # In or out of network
    fhir:unit @<CodeableConcept>?;          # Individual or family
    fhir:term @<CodeableConcept>?;          # Annual or lifetime
    fhir:financial @<OneOrMore_ExplanationOfBenefit.benefitBalance.financial>?;  # Benefit Summary
}  

# Recipient of benefits payable
<ExplanationOfBenefit.payee> EXTENDS @<BackboneElement> CLOSED {   
    fhir:type @<CodeableConcept>?;          # Category of recipient
    fhir:party @<Reference> AND {fhir:l 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Recipient reference
}  

# Pertinent diagnosis information
<ExplanationOfBenefit.diagnosis> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Diagnosis instance identifier
    fhir:diagnosis @<CodeableConcept>  OR 
    			(@<Reference>  AND {fhir:l @<Condition> })  ;  # Nature of illness or problem
    fhir:type @<OneOrMore_CodeableConcept>?;  # Timing or nature of the diagnosis
    fhir:onAdmission @<CodeableConcept>?;   # Present on admission
}  

# Details of the event
<ExplanationOfBenefit.accident> EXTENDS @<BackboneElement> CLOSED {   
    fhir:date @<Date>?;                     # When the incident occurred
    fhir:type @<CodeableConcept>?;          # The nature of the accident
    fhir:location @<Address>  OR 
    			(@<Reference>  AND {fhir:l @<Location> })  ?;  # Where the event occurred
}  

# Insurer added line items
<ExplanationOfBenefit.addItem.detail.subDetail> EXTENDS @<BackboneElement> CLOSED {   
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:revenue @<CodeableConcept>?;       # Revenue or cost center code
    fhir:productOrService @<CodeableConcept>?;  # Billing, service, product, or drug 
                                            # code 
    fhir:productOrServiceEnd @<CodeableConcept>?;  # End of a range of codes
    fhir:modifier @<OneOrMore_CodeableConcept>?;  # Service/Product billing modifiers
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:quantity @<Quantity>?;             # Count of products or services
    fhir:unitPrice @<Money>?;               # Fee, charge or cost per item
    fhir:factor @<Decimal>?;                # Price scaling factor
    fhir:tax @<Money>?;                     # Total tax
    fhir:net @<Money>?;                     # Total item cost
    fhir:noteNumber @<OneOrMore_PositiveInt>?;  # Applicable note numbers
    fhir:reviewOutcome @<ExplanationOfBenefit.item.reviewOutcome>?;  # Additem subdetail level 
                                            # adjudication results 
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Added items adjudication
}  

# Payment Details
<ExplanationOfBenefit.payment> EXTENDS @<BackboneElement> CLOSED {   
    fhir:type @<CodeableConcept>?;          # Partial or complete payment
    fhir:adjustment @<Money>?;              # Payment adjustment for non-claim 
                                            # issues 
    fhir:adjustmentReason @<CodeableConcept>?;  # Explanation for the variance
    fhir:date @<Date>?;                     # Expected date of payment
    fhir:amount @<Money>?;                  # Payable amount after adjustment
    fhir:identifier @<Identifier>?;         # Business identifier for the payment
}  

# Clinical procedures performed
<ExplanationOfBenefit.procedure> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Procedure instance identifier
    fhir:type @<OneOrMore_CodeableConcept>?;  # Category of Procedure
    fhir:date @<DateTime>?;                 # When the procedure was performed
    fhir:procedure @<CodeableConcept>  OR 
    			(@<Reference>  AND {fhir:l @<Procedure> })  ;  # Specific clinical procedure
    fhir:udi @<OneOrMore_Reference_Device>?;  # Unique device identifier
}  

# Care Team members
<ExplanationOfBenefit.careTeam> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Order of care team
    fhir:provider @<Reference> AND {fhir:l 
    			@<Organization> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? };  # Practitioner or organization
    fhir:role @<CodeableConcept>?;          # Function within the team
    fhir:specialty @<CodeableConcept>?;     # Practitioner or provider 
                                            # specialization 
}  

# Adjudication totals
<ExplanationOfBenefit.total> EXTENDS @<BackboneElement> CLOSED {   
    fhir:category @<CodeableConcept>;       # Type of adjudication information
    fhir:amount @<Money>;                   # Financial total for the category
}  

# Supporting information
<ExplanationOfBenefit.supportingInfo> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Information instance identifier
    fhir:category @<CodeableConcept>;       # Classification of the supplied 
                                            # information 
    fhir:code @<CodeableConcept>?;          # Type of information
    fhir:timing @<DateTime>  OR 
    			@<Period>  OR 
    			@<Timing>  ?;  # When it occurred
    fhir:value @<Base64Binary>  OR 
    			@<Boolean>  OR 
    			@<Canonical>  OR 
    			@<Code>  OR 
    			@<Date>  OR 
    			@<DateTime>  OR 
    			@<Decimal>  OR 
    			@<Id>  OR 
    			@<Instant>  OR 
    			@<Integer>  OR 
    			@<Integer64>  OR 
    			@<Markdown>  OR 
    			@<Oid>  OR 
    			@<PositiveInt>  OR 
    			@<String>  OR 
    			@<Time>  OR 
    			@<UnsignedInt>  OR 
    			@<Uri>  OR 
    			@<Url>  OR 
    			@<Uuid>  OR 
    			@<Address>  OR 
    			@<Age>  OR 
    			@<Annotation>  OR 
    			@<Attachment>  OR 
    			@<CodeableConcept>  OR 
    			@<CodeableReference>  OR 
    			@<Coding>  OR 
    			@<ContactPoint>  OR 
    			@<Count>  OR 
    			@<Distance>  OR 
    			@<Duration>  OR 
    			@<HumanName>  OR 
    			@<Identifier>  OR 
    			@<Money>  OR 
    			@<Period>  OR 
    			@<Quantity>  OR 
    			@<Range>  OR 
    			@<Ratio>  OR 
    			@<RatioRange>  OR 
    			@<Reference>  OR 
    			@<SampledData>  OR 
    			@<Signature>  OR 
    			@<Timing>  OR 
    			@<ContactDetail>  OR 
    			@<DataRequirement>  OR 
    			@<Expression>  OR 
    			@<ParameterDefinition>  OR 
    			@<RelatedArtifact>  OR 
    			@<TriggerDefinition>  OR 
    			@<UsageContext>  OR 
    			@<Availability>  OR 
    			@<ExtendedContactDetail>  OR 
    			@<VirtualServiceDetail>  OR 
    			@<Dosage>  OR 
    			@<Meta>  ?;  # Data to be provided
    fhir:reason @<Coding>?;                 # Explanation for the information
}  

# Patient insurance information
<ExplanationOfBenefit.insurance> EXTENDS @<BackboneElement> CLOSED {   
    fhir:focal @<Boolean>;                  # Coverage to be used for 
                                            # adjudication 
    fhir:coverage @<Reference> AND {fhir:l 
    			@<Coverage> ? };  # Insurance information
    fhir:preAuthRef @<OneOrMore_String>?;   # Prior authorization reference 
                                            # number 
}  

# Event information
<ExplanationOfBenefit.event> EXTENDS @<BackboneElement> CLOSED {   
    fhir:type @<CodeableConcept>;           # Specific event
    fhir:when @<DateTime>  OR 
    			@<Period>  ;  # Occurance date or period
}  

# Anatomical location
<ExplanationOfBenefit.item.bodySite> EXTENDS @<BackboneElement> CLOSED {   
    fhir:site @<OneOrMore_CodeableReference>;  # Location
    fhir:subSite @<OneOrMore_CodeableConcept>?;  # Sub-location
}  

# Prior or corollary claims
<ExplanationOfBenefit.related> EXTENDS @<BackboneElement> CLOSED {   
    fhir:claim @<Reference> AND {fhir:l 
    			@<Claim> OR 
    			@<ExplanationOfBenefit> ? }?;  # Reference to the related claim
    fhir:relationship @<CodeableConcept>?;  # How the reference claim is related
    fhir:reference @<Identifier>?;          # File or case reference
}  

# Adjudication results
<ExplanationOfBenefit.item.reviewOutcome> EXTENDS @<BackboneElement> CLOSED {   
    fhir:decision @<CodeableConcept>?;      # Result of the adjudication
    fhir:reason @<OneOrMore_CodeableConcept>?;  # Reason for result of the 
                                            # adjudication 
    fhir:preAuthRef @<String>?;             # Preauthorization reference
    fhir:preAuthPeriod @<Period>?;          # Preauthorization reference 
                                            # effective period 
}  

# Product or service provided
<ExplanationOfBenefit.item> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Item instance identifier
    fhir:careTeamSequence @<OneOrMore_PositiveInt>?;  # Applicable care team members
    fhir:diagnosisSequence @<OneOrMore_PositiveInt>?;  # Applicable diagnoses
    fhir:procedureSequence @<OneOrMore_PositiveInt>?;  # Applicable procedures
    fhir:informationSequence @<OneOrMore_PositiveInt>?;  # Applicable exception and 
                                            # supporting information 
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:subject @<Reference> AND {fhir:l 
    			@<Group> OR 
    			@<Patient> ? }?;  # The recipient of the products and 
                                            # services 
    fhir:revenue @<CodeableConcept>?;       # Revenue or cost center code
    fhir:category @<CodeableConcept>?;      # Benefit classification
    fhir:productOrService @<CodeableConcept>?;  # Billing, service, product, or drug 
                                            # code 
    fhir:productOrServiceEnd @<CodeableConcept>?;  # End of a range of codes
    fhir:request @<OneOrMore_Reference_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_ServiceRequest_OR_VisionPrescription>?;  # Request or Referral for Service
    fhir:modifier @<OneOrMore_CodeableConcept>?;  # Product or service billing 
                                            # modifiers 
    fhir:programCode @<OneOrMore_CodeableConcept>?;  # Program the product or service is 
                                            # provided under 
    fhir:serviced @<Date>  OR 
    			@<Period>  ?;  # Date or dates of service or 
                                            # product delivery 
    fhir:location @<CodeableConcept>  OR 
    			@<Address>  OR 
    			(@<Reference>  AND {fhir:l @<Location> })  ?;  # Place of service or where product 
                                            # was supplied 
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:quantity @<Quantity>?;             # Count of products or services
    fhir:unitPrice @<Money>?;               # Fee, charge or cost per item
    fhir:factor @<Decimal>?;                # Price scaling factor
    fhir:tax @<Money>?;                     # Total tax
    fhir:net @<Money>?;                     # Total item cost
    fhir:udi @<OneOrMore_Reference_Device>?;  # Unique device identifier
    fhir:bodySite @<OneOrMore_ExplanationOfBenefit.item.bodySite>?;  # Anatomical location
    fhir:encounter @<OneOrMore_Reference_Encounter>?;  # Encounters associated with the 
                                            # listed treatments 
    fhir:noteNumber @<OneOrMore_PositiveInt>?;  # Applicable note numbers
    fhir:reviewOutcome @<ExplanationOfBenefit.item.reviewOutcome>?;  # Adjudication results
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Adjudication details
    fhir:detail @<OneOrMore_ExplanationOfBenefit.item.detail>?;  # Additional items
}  

# Anatomical location
<ExplanationOfBenefit.addItem.bodySite> EXTENDS @<BackboneElement> CLOSED {   
    fhir:site @<OneOrMore_CodeableReference>;  # Location
    fhir:subSite @<OneOrMore_CodeableConcept>?;  # Sub-location
}  

# Insurer added line items
<ExplanationOfBenefit.addItem.detail> EXTENDS @<BackboneElement> CLOSED {   
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:revenue @<CodeableConcept>?;       # Revenue or cost center code
    fhir:productOrService @<CodeableConcept>?;  # Billing, service, product, or drug 
                                            # code 
    fhir:productOrServiceEnd @<CodeableConcept>?;  # End of a range of codes
    fhir:modifier @<OneOrMore_CodeableConcept>?;  # Service/Product billing modifiers
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:quantity @<Quantity>?;             # Count of products or services
    fhir:unitPrice @<Money>?;               # Fee, charge or cost per item
    fhir:factor @<Decimal>?;                # Price scaling factor
    fhir:tax @<Money>?;                     # Total tax
    fhir:net @<Money>?;                     # Total item cost
    fhir:noteNumber @<OneOrMore_PositiveInt>?;  # Applicable note numbers
    fhir:reviewOutcome @<ExplanationOfBenefit.item.reviewOutcome>?;  # Additem detail level adjudication 
                                            # results 
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Added items adjudication
    fhir:subDetail @<OneOrMore_ExplanationOfBenefit.addItem.detail.subDetail>?;  # Insurer added line items
}  

# Additional items
<ExplanationOfBenefit.item.detail> EXTENDS @<BackboneElement> CLOSED {   
    fhir:sequence @<PositiveInt>;           # Product or service provided
    fhir:traceNumber @<OneOrMore_Identifier>?;  # Number for tracking
    fhir:revenue @<CodeableConcept>?;       # Revenue or cost center code
    fhir:category @<CodeableConcept>?;      # Benefit classification
    fhir:productOrService @<CodeableConcept>?;  # Billing, service, product, or drug 
                                            # code 
    fhir:productOrServiceEnd @<CodeableConcept>?;  # End of a range of codes
    fhir:modifier @<OneOrMore_CodeableConcept>?;  # Service/Product billing modifiers
    fhir:programCode @<OneOrMore_CodeableConcept>?;  # Program the product or service is 
                                            # provided under 
    fhir:patientPaid @<Money>?;             # Paid by the patient
    fhir:quantity @<Quantity>?;             # Count of products or services
    fhir:unitPrice @<Money>?;               # Fee, charge or cost per item
    fhir:factor @<Decimal>?;                # Price scaling factor
    fhir:tax @<Money>?;                     # Total tax
    fhir:net @<Money>?;                     # Total item cost
    fhir:udi @<OneOrMore_Reference_Device>?;  # Unique device identifier
    fhir:noteNumber @<OneOrMore_PositiveInt>?;  # Applicable note numbers
    fhir:reviewOutcome @<ExplanationOfBenefit.item.reviewOutcome>?;  # Detail level adjudication results
    fhir:adjudication @<OneOrMore_ExplanationOfBenefit.item.adjudication>?;  # Detail level adjudication details
    fhir:subDetail @<OneOrMore_ExplanationOfBenefit.item.detail.subDetail>?;  # Additional items
}  

# Adjudication details
<ExplanationOfBenefit.item.adjudication> EXTENDS @<BackboneElement> CLOSED {   
    fhir:category @<CodeableConcept>;       # Type of adjudication information
    fhir:reason @<CodeableConcept>?;        # Explanation of adjudication outcome
    fhir:amount @<Money>?;                  # Monetary amount
    fhir:quantity @<Quantity>?;             # Non-monitary value
    fhir:decisionDate @<DateTime>?;         # When was adjudication performed
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_ExplanationOfBenefit.related> CLOSED {
    rdf:first @<ExplanationOfBenefit.related>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.related> 
}
<OneOrMore_ExplanationOfBenefit.event> CLOSED {
    rdf:first @<ExplanationOfBenefit.event>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.event> 
}
<OneOrMore_Reference_Encounter> CLOSED {
    rdf:first @<Reference> AND {fhir:l 
			@<Encounter> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Encounter> 
}
<OneOrMore_String> CLOSED {
    rdf:first @<String>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_String> 
}
<OneOrMore_Period> CLOSED {
    rdf:first @<Period>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Period> 
}
<OneOrMore_ExplanationOfBenefit.careTeam> CLOSED {
    rdf:first @<ExplanationOfBenefit.careTeam>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.careTeam> 
}
<OneOrMore_ExplanationOfBenefit.supportingInfo> CLOSED {
    rdf:first @<ExplanationOfBenefit.supportingInfo>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.supportingInfo> 
}
<OneOrMore_ExplanationOfBenefit.diagnosis> CLOSED {
    rdf:first @<ExplanationOfBenefit.diagnosis>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.diagnosis> 
}
<OneOrMore_ExplanationOfBenefit.procedure> CLOSED {
    rdf:first @<ExplanationOfBenefit.procedure>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.procedure> 
}
<OneOrMore_ExplanationOfBenefit.insurance> CLOSED {
    rdf:first @<ExplanationOfBenefit.insurance>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.insurance> 
}
<OneOrMore_ExplanationOfBenefit.item> CLOSED {
    rdf:first @<ExplanationOfBenefit.item>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.item> 
}
<OneOrMore_ExplanationOfBenefit.addItem> CLOSED {
    rdf:first @<ExplanationOfBenefit.addItem>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.addItem> 
}
<OneOrMore_ExplanationOfBenefit.item.adjudication> CLOSED {
    rdf:first @<ExplanationOfBenefit.item.adjudication>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.item.adjudication> 
}
<OneOrMore_ExplanationOfBenefit.total> CLOSED {
    rdf:first @<ExplanationOfBenefit.total>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.total> 
}
<OneOrMore_ExplanationOfBenefit.processNote> CLOSED {
    rdf:first @<ExplanationOfBenefit.processNote>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.processNote> 
}
<OneOrMore_ExplanationOfBenefit.benefitBalance> CLOSED {
    rdf:first @<ExplanationOfBenefit.benefitBalance>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.benefitBalance> 
}
<OneOrMore_PositiveInt> CLOSED {
    rdf:first @<PositiveInt>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_PositiveInt> 
}
<OneOrMore_Reference_Organization_OR_Practitioner_OR_PractitionerRole> CLOSED {
    rdf:first @<Reference> AND {fhir:l 
			@<Organization> OR 
			@<Practitioner> OR 
			@<PractitionerRole> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Organization_OR_Practitioner_OR_PractitionerRole> 
}
<OneOrMore_Reference_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_ServiceRequest_OR_VisionPrescription> CLOSED {
    rdf:first @<Reference> AND {fhir:l 
			@<DeviceRequest> OR 
			@<MedicationRequest> OR 
			@<NutritionOrder> OR 
			@<ServiceRequest> OR 
			@<VisionPrescription> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_ServiceRequest_OR_VisionPrescription> 
}
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}
<OneOrMore_ExplanationOfBenefit.addItem.bodySite> CLOSED {
    rdf:first @<ExplanationOfBenefit.addItem.bodySite>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.addItem.bodySite> 
}
<OneOrMore_ExplanationOfBenefit.addItem.detail> CLOSED {
    rdf:first @<ExplanationOfBenefit.addItem.detail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.addItem.detail> 
}
<OneOrMore_Reference_Device> CLOSED {
    rdf:first @<Reference> AND {fhir:l 
			@<Device> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Device> 
}
<OneOrMore_ExplanationOfBenefit.benefitBalance.financial> CLOSED {
    rdf:first @<ExplanationOfBenefit.benefitBalance.financial>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.benefitBalance.financial> 
}
<OneOrMore_CodeableReference> CLOSED {
    rdf:first @<CodeableReference>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference> 
}
<OneOrMore_ExplanationOfBenefit.item.bodySite> CLOSED {
    rdf:first @<ExplanationOfBenefit.item.bodySite>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.item.bodySite> 
}
<OneOrMore_ExplanationOfBenefit.item.detail> CLOSED {
    rdf:first @<ExplanationOfBenefit.item.detail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.item.detail> 
}
<OneOrMore_ExplanationOfBenefit.addItem.detail.subDetail> CLOSED {
    rdf:first @<ExplanationOfBenefit.addItem.detail.subDetail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.addItem.detail.subDetail> 
}
<OneOrMore_ExplanationOfBenefit.item.detail.subDetail> CLOSED {
    rdf:first @<ExplanationOfBenefit.item.detail.subDetail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ExplanationOfBenefit.item.detail.subDetail> 
}

#---------------------- Value Sets ------------------------

# This value set includes Claim Processing Outcome codes.
fhirvs:claim-outcome ["queued" "complete" "error" "partial"]

# The purpose of the Claim: predetermination, preauthorization, claim.
fhirvs:claim-use ["claim" "preauthorization" "predetermination"]

# A code specifying the state of the resource instance.
fhirvs:explanationofbenefit-status ["active" "cancelled" "draft" "entered-in-error"]


Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.