#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#  Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit) on 2019-05-13.
#  2019, SMART Health IT.


from . import domainresource

class ExplanationOfBenefit(domainresource.DomainResource):
    """ Explanation of Benefit resource.

    This resource provides: the claim details; adjudication details from the
    processing of a Claim; and optionally account balance information, for
    informing the subscriber of the benefits provided.
    """

    resource_type = "ExplanationOfBenefit"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.accident = None
        """ Details of the event.
        Type `ExplanationOfBenefitAccident` (represented as `dict` in JSON). """

        self.addItem = None
        """ Insurer added line items.
        List of `ExplanationOfBenefitAddItem` items (represented as `dict` in JSON). """

        self.adjudication = None
        """ Header-level adjudication.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.benefitBalance = None
        """ Balance by Benefit Category.
        List of `ExplanationOfBenefitBenefitBalance` items (represented as `dict` in JSON). """

        self.benefitPeriod = None
        """ When the benefits are applicable.
        Type `Period` (represented as `dict` in JSON). """

        self.billablePeriod = None
        """ Relevant time frame for the claim.
        Type `Period` (represented as `dict` in JSON). """

        self.careTeam = None
        """ Care Team members.
        List of `ExplanationOfBenefitCareTeam` items (represented as `dict` in JSON). """

        self.claim = None
        """ Claim reference.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.claimResponse = None
        """ Claim response reference.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.created = None
        """ Response creation date.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.diagnosis = None
        """ Pertinent diagnosis information.
        List of `ExplanationOfBenefitDiagnosis` items (represented as `dict` in JSON). """

        self.disposition = None
        """ Disposition Message.
        Type `str`. """

        self.enterer = None
        """ Author of the claim.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.facility = None
        """ Servicing Facility.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.form = None
        """ Printed reference or actual form.
        Type `Attachment` (represented as `dict` in JSON). """

        self.formCode = None
        """ Printed form identifier.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.fundsReserve = None
        """ Funds reserved status.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.fundsReserveRequested = None
        """ For whom to reserve funds.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.identifier = None
        """ Business Identifier for the resource.
        List of `Identifier` items (represented as `dict` in JSON). """

        self.insurance = None
        """ Patient insurance information.
        List of `ExplanationOfBenefitInsurance` items (represented as `dict` in JSON). """

        self.insurer = None
        """ Party responsible for reimbursement.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.item = None
        """ Product or service provided.
        List of `ExplanationOfBenefitItem` items (represented as `dict` in JSON). """

        self.originalPrescription = None
        """ Original prescription if superceded by fulfiller.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.outcome = None
        """ queued | complete | error | partial.
        Type `str`. """

        self.patient = None
        """ The recipient of the products and services.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.payee = None
        """ Recipient of benefits payable.
        Type `ExplanationOfBenefitPayee` (represented as `dict` in JSON). """

        self.payment = None
        """ Payment Details.
        Type `ExplanationOfBenefitPayment` (represented as `dict` in JSON). """

        self.preAuthRef = None
        """ Preauthorization reference.
        List of `str` items. """

        self.preAuthRefPeriod = None
        """ Preauthorization in-effect period.
        List of `Period` items (represented as `dict` in JSON). """

        self.precedence = None
        """ Precedence (primary, secondary, etc.).
        Type `int`. """

        self.prescription = None
        """ Prescription authorizing services or products.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.priority = None
        """ Desired processing urgency.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.procedure = None
        """ Clinical procedures performed.
        List of `ExplanationOfBenefitProcedure` items (represented as `dict` in JSON). """

        self.processNote = None
        """ Note concerning adjudication.
        List of `ExplanationOfBenefitProcessNote` items (represented as `dict` in JSON). """

        self.provider = None
        """ Party responsible for the claim.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.referral = None
        """ Treatment Referral.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.related = None
        """ Prior or corollary claims.
        List of `ExplanationOfBenefitRelated` items (represented as `dict` in JSON). """

        self.status = None
        """ active | cancelled | draft | entered-in-error.
        Type `str`. """

        self.subType = None
        """ More granular claim type.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.supportingInfo = None
        """ Supporting information.
        List of `ExplanationOfBenefitSupportingInfo` items (represented as `dict` in JSON). """

        self.total = None
        """ Adjudication totals.
        List of `ExplanationOfBenefitTotal` items (represented as `dict` in JSON). """

        self.type = None
        """ Category or discipline.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.use = None
        """ claim | preauthorization | predetermination.
        Type `str`. """

        super(ExplanationOfBenefit, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefit, self).elementProperties()
        js.extend([
            ("accident", "accident", ExplanationOfBenefitAccident, "ExplanationOfBenefitAccident", False, None, False),
            ("addItem", "addItem", ExplanationOfBenefitAddItem, "ExplanationOfBenefitAddItem", True, None, False),
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("benefitBalance", "benefitBalance", ExplanationOfBenefitBenefitBalance, "ExplanationOfBenefitBenefitBalance", True, None, False),
            ("benefitPeriod", "benefitPeriod", period.Period, "Period", False, None, False),
            ("billablePeriod", "billablePeriod", period.Period, "Period", False, None, False),
            ("careTeam", "careTeam", ExplanationOfBenefitCareTeam, "ExplanationOfBenefitCareTeam", True, None, False),
            ("claim", "claim", fhirreference.FHIRReference, "Reference", False, None, False),
            ("claimResponse", "claimResponse", fhirreference.FHIRReference, "Reference", False, None, False),
            ("created", "created", fhirdate.FHIRDate, "dateTime", False, None, True),
            ("diagnosis", "diagnosis", ExplanationOfBenefitDiagnosis, "ExplanationOfBenefitDiagnosis", True, None, False),
            ("disposition", "disposition", str, "string", False, None, False),
            ("enterer", "enterer", fhirreference.FHIRReference, "Reference", False, None, False),
            ("facility", "facility", fhirreference.FHIRReference, "Reference", False, None, False),
            ("form", "form", attachment.Attachment, "Attachment", False, None, False),
            ("formCode", "formCode", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("fundsReserve", "fundsReserve", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("fundsReserveRequested", "fundsReserveRequested", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("identifier", "identifier", identifier.Identifier, "Identifier", True, None, False),
            ("insurance", "insurance", ExplanationOfBenefitInsurance, "ExplanationOfBenefitInsurance", True, None, True),
            ("insurer", "insurer", fhirreference.FHIRReference, "Reference", False, None, True),
            ("item", "item", ExplanationOfBenefitItem, "ExplanationOfBenefitItem", True, None, False),
            ("originalPrescription", "originalPrescription", fhirreference.FHIRReference, "Reference", False, None, False),
            ("outcome", "outcome", str, "code", False, None, True),
            ("patient", "patient", fhirreference.FHIRReference, "Reference", False, None, True),
            ("payee", "payee", ExplanationOfBenefitPayee, "ExplanationOfBenefitPayee", False, None, False),
            ("payment", "payment", ExplanationOfBenefitPayment, "ExplanationOfBenefitPayment", False, None, False),
            ("preAuthRef", "preAuthRef", str, "string", True, None, False),
            ("preAuthRefPeriod", "preAuthRefPeriod", period.Period, "Period", True, None, False),
            ("precedence", "precedence", int, "positiveInt", False, None, False),
            ("prescription", "prescription", fhirreference.FHIRReference, "Reference", False, None, False),
            ("priority", "priority", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("procedure", "procedure", ExplanationOfBenefitProcedure, "ExplanationOfBenefitProcedure", True, None, False),
            ("processNote", "processNote", ExplanationOfBenefitProcessNote, "ExplanationOfBenefitProcessNote", True, None, False),
            ("provider", "provider", fhirreference.FHIRReference, "Reference", False, None, True),
            ("referral", "referral", fhirreference.FHIRReference, "Reference", False, None, False),
            ("related", "related", ExplanationOfBenefitRelated, "ExplanationOfBenefitRelated", True, None, False),
            ("status", "status", str, "code", False, None, True),
            ("subType", "subType", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("supportingInfo", "supportingInfo", ExplanationOfBenefitSupportingInfo, "ExplanationOfBenefitSupportingInfo", True, None, False),
            ("total", "total", ExplanationOfBenefitTotal, "ExplanationOfBenefitTotal", True, None, False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("use", "use", str, "code", False, None, True),
        ])
        return js


from . import backboneelement

class ExplanationOfBenefitAccident(backboneelement.BackboneElement):
    """ Details of the event.

    Details of a accident which resulted in injuries which required the
    products and services listed in the claim.
    """

    resource_type = "ExplanationOfBenefitAccident"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.date = None
        """ When the incident occurred.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.locationAddress = None
        """ Where the event occurred.
        Type `Address` (represented as `dict` in JSON). """

        self.locationReference = None
        """ Where the event occurred.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.type = None
        """ The nature of the accident.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitAccident, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitAccident, self).elementProperties()
        js.extend([
            ("date", "date", fhirdate.FHIRDate, "date", False, None, False),
            ("locationAddress", "locationAddress", address.Address, "Address", False, "location", False),
            ("locationReference", "locationReference", fhirreference.FHIRReference, "Reference", False, "location", False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
        ])
        return js


class ExplanationOfBenefitAddItem(backboneelement.BackboneElement):
    """ Insurer added line items.

    The first-tier service adjudications for payor added product or service
    lines.
    """

    resource_type = "ExplanationOfBenefitAddItem"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjudication = None
        """ Added items adjudication.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.bodySite = None
        """ Anatomical location.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.detail = None
        """ Insurer added line items.
        List of `ExplanationOfBenefitAddItemDetail` items (represented as `dict` in JSON). """

        self.detailSequence = None
        """ Detail sequence number.
        List of `int` items. """

        self.factor = None
        """ Price scaling factor.
        Type `float`. """

        self.itemSequence = None
        """ Item sequence number.
        List of `int` items. """

        self.locationAddress = None
        """ Place of service or where product was supplied.
        Type `Address` (represented as `dict` in JSON). """

        self.locationCodeableConcept = None
        """ Place of service or where product was supplied.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.locationReference = None
        """ Place of service or where product was supplied.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.modifier = None
        """ Service/Product billing modifiers.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.net = None
        """ Total item cost.
        Type `Money` (represented as `dict` in JSON). """

        self.noteNumber = None
        """ Applicable note numbers.
        List of `int` items. """

        self.productOrService = None
        """ Billing, service, product, or drug code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.programCode = None
        """ Program the product or service is provided under.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.provider = None
        """ Authorized providers.
        List of `FHIRReference` items (represented as `dict` in JSON). """

        self.quantity = None
        """ Count of products or services.
        Type `Quantity` (represented as `dict` in JSON). """

        self.servicedDate = None
        """ Date or dates of service or product delivery.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.servicedPeriod = None
        """ Date or dates of service or product delivery.
        Type `Period` (represented as `dict` in JSON). """

        self.subDetailSequence = None
        """ Subdetail sequence number.
        List of `int` items. """

        self.subSite = None
        """ Anatomical sub-location.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.unitPrice = None
        """ Fee, charge or cost per item.
        Type `Money` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitAddItem, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitAddItem, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("bodySite", "bodySite", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("detail", "detail", ExplanationOfBenefitAddItemDetail, "ExplanationOfBenefitAddItemDetail", True, None, False),
            ("detailSequence", "detailSequence", int, "positiveInt", True, None, False),
            ("factor", "factor", float, "decimal", False, None, False),
            ("itemSequence", "itemSequence", int, "positiveInt", True, None, False),
            ("locationAddress", "locationAddress", address.Address, "Address", False, "location", False),
            ("locationCodeableConcept", "locationCodeableConcept", codeableconcept.CodeableConcept, "CodeableConcept", False, "location", False),
            ("locationReference", "locationReference", fhirreference.FHIRReference, "Reference", False, "location", False),
            ("modifier", "modifier", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("net", "net", money.Money, "Money", False, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("productOrService", "productOrService", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("programCode", "programCode", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("provider", "provider", fhirreference.FHIRReference, "Reference", True, None, False),
            ("quantity", "quantity", quantity.Quantity, "Quantity", False, None, False),
            ("servicedDate", "servicedDate", fhirdate.FHIRDate, "date", False, "serviced", False),
            ("servicedPeriod", "servicedPeriod", period.Period, "Period", False, "serviced", False),
            ("subDetailSequence", "subDetailSequence", int, "positiveInt", True, None, False),
            ("subSite", "subSite", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ExplanationOfBenefitAddItemDetail(backboneelement.BackboneElement):
    """ Insurer added line items.

    The second-tier service adjudications for payor added services.
    """

    resource_type = "ExplanationOfBenefitAddItemDetail"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjudication = None
        """ Added items adjudication.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.factor = None
        """ Price scaling factor.
        Type `float`. """

        self.modifier = None
        """ Service/Product billing modifiers.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.net = None
        """ Total item cost.
        Type `Money` (represented as `dict` in JSON). """

        self.noteNumber = None
        """ Applicable note numbers.
        List of `int` items. """

        self.productOrService = None
        """ Billing, service, product, or drug code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.quantity = None
        """ Count of products or services.
        Type `Quantity` (represented as `dict` in JSON). """

        self.subDetail = None
        """ Insurer added line items.
        List of `ExplanationOfBenefitAddItemDetailSubDetail` items (represented as `dict` in JSON). """

        self.unitPrice = None
        """ Fee, charge or cost per item.
        Type `Money` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitAddItemDetail, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitAddItemDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("factor", "factor", float, "decimal", False, None, False),
            ("modifier", "modifier", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("net", "net", money.Money, "Money", False, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("productOrService", "productOrService", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("quantity", "quantity", quantity.Quantity, "Quantity", False, None, False),
            ("subDetail", "subDetail", ExplanationOfBenefitAddItemDetailSubDetail, "ExplanationOfBenefitAddItemDetailSubDetail", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ExplanationOfBenefitAddItemDetailSubDetail(backboneelement.BackboneElement):
    """ Insurer added line items.

    The third-tier service adjudications for payor added services.
    """

    resource_type = "ExplanationOfBenefitAddItemDetailSubDetail"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjudication = None
        """ Added items adjudication.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.factor = None
        """ Price scaling factor.
        Type `float`. """

        self.modifier = None
        """ Service/Product billing modifiers.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.net = None
        """ Total item cost.
        Type `Money` (represented as `dict` in JSON). """

        self.noteNumber = None
        """ Applicable note numbers.
        List of `int` items. """

        self.productOrService = None
        """ Billing, service, product, or drug code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.quantity = None
        """ Count of products or services.
        Type `Quantity` (represented as `dict` in JSON). """

        self.unitPrice = None
        """ Fee, charge or cost per item.
        Type `Money` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitAddItemDetailSubDetail, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitAddItemDetailSubDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("factor", "factor", float, "decimal", False, None, False),
            ("modifier", "modifier", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("net", "net", money.Money, "Money", False, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("productOrService", "productOrService", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("quantity", "quantity", quantity.Quantity, "Quantity", False, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ExplanationOfBenefitBenefitBalance(backboneelement.BackboneElement):
    """ Balance by Benefit Category.
    """

    resource_type = "ExplanationOfBenefitBenefitBalance"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.category = None
        """ Benefit classification.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.description = None
        """ Description of the benefit or services covered.
        Type `str`. """

        self.excluded = None
        """ Excluded from the plan.
        Type `bool`. """

        self.financial = None
        """ Benefit Summary.
        List of `ExplanationOfBenefitBenefitBalanceFinancial` items (represented as `dict` in JSON). """

        self.name = None
        """ Short name for the benefit.
        Type `str`. """

        self.network = None
        """ In or out of network.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.term = None
        """ Annual or lifetime.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.unit = None
        """ Individual or family.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitBenefitBalance, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitBenefitBalance, self).elementProperties()
        js.extend([
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("description", "description", str, "string", False, None, False),
            ("excluded", "excluded", bool, "boolean", False, None, False),
            ("financial", "financial", ExplanationOfBenefitBenefitBalanceFinancial, "ExplanationOfBenefitBenefitBalanceFinancial", True, None, False),
            ("name", "name", str, "string", False, None, False),
            ("network", "network", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("term", "term", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("unit", "unit", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
        ])
        return js


class ExplanationOfBenefitBenefitBalanceFinancial(backboneelement.BackboneElement):
    """ Benefit Summary.

    Benefits Used to date.
    """

    resource_type = "ExplanationOfBenefitBenefitBalanceFinancial"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.allowedMoney = None
        """ Benefits allowed.
        Type `Money` (represented as `dict` in JSON). """

        self.allowedString = None
        """ Benefits allowed.
        Type `str`. """

        self.allowedUnsignedInt = None
        """ Benefits allowed.
        Type `int`. """

        self.type = None
        """ Benefit classification.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.usedMoney = None
        """ Benefits used.
        Type `Money` (represented as `dict` in JSON). """

        self.usedUnsignedInt = None
        """ Benefits used.
        Type `int`. """

        super(ExplanationOfBenefitBenefitBalanceFinancial, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitBenefitBalanceFinancial, self).elementProperties()
        js.extend([
            ("allowedMoney", "allowedMoney", money.Money, "Money", False, "allowed", False),
            ("allowedString", "allowedString", str, "string", False, "allowed", False),
            ("allowedUnsignedInt", "allowedUnsignedInt", int, "unsignedInt", False, "allowed", False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("usedMoney", "usedMoney", money.Money, "Money", False, "used", False),
            ("usedUnsignedInt", "usedUnsignedInt", int, "unsignedInt", False, "used", False),
        ])
        return js


class ExplanationOfBenefitCareTeam(backboneelement.BackboneElement):
    """ Care Team members.

    The members of the team who provided the products and services.
    """

    resource_type = "ExplanationOfBenefitCareTeam"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.provider = None
        """ Practitioner or organization.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.qualification = None
        """ Practitioner credential or specialization.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.responsible = None
        """ Indicator of the lead practitioner.
        Type `bool`. """

        self.role = None
        """ Function within the team.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.sequence = None
        """ Order of care team.
        Type `int`. """

        super(ExplanationOfBenefitCareTeam, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitCareTeam, self).elementProperties()
        js.extend([
            ("provider", "provider", fhirreference.FHIRReference, "Reference", False, None, True),
            ("qualification", "qualification", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("responsible", "responsible", bool, "boolean", False, None, False),
            ("role", "role", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
        ])
        return js


class ExplanationOfBenefitDiagnosis(backboneelement.BackboneElement):
    """ Pertinent diagnosis information.

    Information about diagnoses relevant to the claim items.
    """

    resource_type = "ExplanationOfBenefitDiagnosis"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.diagnosisCodeableConcept = None
        """ Nature of illness or problem.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.diagnosisReference = None
        """ Nature of illness or problem.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.onAdmission = None
        """ Present on admission.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.packageCode = None
        """ Package billing code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.sequence = None
        """ Diagnosis instance identifier.
        Type `int`. """

        self.type = None
        """ Timing or nature of the diagnosis.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        super(ExplanationOfBenefitDiagnosis, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitDiagnosis, self).elementProperties()
        js.extend([
            ("diagnosisCodeableConcept", "diagnosisCodeableConcept", codeableconcept.CodeableConcept, "CodeableConcept", False, "diagnosis", True),
            ("diagnosisReference", "diagnosisReference", fhirreference.FHIRReference, "Reference", False, "diagnosis", True),
            ("onAdmission", "onAdmission", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("packageCode", "packageCode", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
        ])
        return js


class ExplanationOfBenefitInsurance(backboneelement.BackboneElement):
    """ Patient insurance information.

    Financial instruments for reimbursement for the health care products and
    services specified on the claim.
    """

    resource_type = "ExplanationOfBenefitInsurance"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.coverage = None
        """ Insurance information.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.focal = None
        """ Coverage to be used for adjudication.
        Type `bool`. """

        self.preAuthRef = None
        """ Prior authorization reference number.
        List of `str` items. """

        super(ExplanationOfBenefitInsurance, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitInsurance, self).elementProperties()
        js.extend([
            ("coverage", "coverage", fhirreference.FHIRReference, "Reference", False, None, True),
            ("focal", "focal", bool, "boolean", False, None, True),
            ("preAuthRef", "preAuthRef", str, "string", True, None, False),
        ])
        return js


class ExplanationOfBenefitItem(backboneelement.BackboneElement):
    """ Product or service provided.

    A claim line. Either a simple (a product or service) or a 'group' of
    details which can also be a simple items or groups of sub-details.
    """

    resource_type = "ExplanationOfBenefitItem"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjudication = None
        """ Adjudication details.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.bodySite = None
        """ Anatomical location.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.careTeamSequence = None
        """ Applicable care team members.
        List of `int` items. """

        self.category = None
        """ Benefit classification.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.detail = None
        """ Additional items.
        List of `ExplanationOfBenefitItemDetail` items (represented as `dict` in JSON). """

        self.diagnosisSequence = None
        """ Applicable diagnoses.
        List of `int` items. """

        self.encounter = None
        """ Encounters related to this billed item.
        List of `FHIRReference` items (represented as `dict` in JSON). """

        self.factor = None
        """ Price scaling factor.
        Type `float`. """

        self.informationSequence = None
        """ Applicable exception and supporting information.
        List of `int` items. """

        self.locationAddress = None
        """ Place of service or where product was supplied.
        Type `Address` (represented as `dict` in JSON). """

        self.locationCodeableConcept = None
        """ Place of service or where product was supplied.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.locationReference = None
        """ Place of service or where product was supplied.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.modifier = None
        """ Product or service billing modifiers.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.net = None
        """ Total item cost.
        Type `Money` (represented as `dict` in JSON). """

        self.noteNumber = None
        """ Applicable note numbers.
        List of `int` items. """

        self.procedureSequence = None
        """ Applicable procedures.
        List of `int` items. """

        self.productOrService = None
        """ Billing, service, product, or drug code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.programCode = None
        """ Program the product or service is provided under.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.quantity = None
        """ Count of products or services.
        Type `Quantity` (represented as `dict` in JSON). """

        self.revenue = None
        """ Revenue or cost center code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.sequence = None
        """ Item instance identifier.
        Type `int`. """

        self.servicedDate = None
        """ Date or dates of service or product delivery.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.servicedPeriod = None
        """ Date or dates of service or product delivery.
        Type `Period` (represented as `dict` in JSON). """

        self.subSite = None
        """ Anatomical sub-location.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.udi = None
        """ Unique device identifier.
        List of `FHIRReference` items (represented as `dict` in JSON). """

        self.unitPrice = None
        """ Fee, charge or cost per item.
        Type `Money` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitItem, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitItem, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("bodySite", "bodySite", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("careTeamSequence", "careTeamSequence", int, "positiveInt", True, None, False),
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("detail", "detail", ExplanationOfBenefitItemDetail, "ExplanationOfBenefitItemDetail", True, None, False),
            ("diagnosisSequence", "diagnosisSequence", int, "positiveInt", True, None, False),
            ("encounter", "encounter", fhirreference.FHIRReference, "Reference", True, None, False),
            ("factor", "factor", float, "decimal", False, None, False),
            ("informationSequence", "informationSequence", int, "positiveInt", True, None, False),
            ("locationAddress", "locationAddress", address.Address, "Address", False, "location", False),
            ("locationCodeableConcept", "locationCodeableConcept", codeableconcept.CodeableConcept, "CodeableConcept", False, "location", False),
            ("locationReference", "locationReference", fhirreference.FHIRReference, "Reference", False, "location", False),
            ("modifier", "modifier", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("net", "net", money.Money, "Money", False, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("procedureSequence", "procedureSequence", int, "positiveInt", True, None, False),
            ("productOrService", "productOrService", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("programCode", "programCode", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("quantity", "quantity", quantity.Quantity, "Quantity", False, None, False),
            ("revenue", "revenue", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
            ("servicedDate", "servicedDate", fhirdate.FHIRDate, "date", False, "serviced", False),
            ("servicedPeriod", "servicedPeriod", period.Period, "Period", False, "serviced", False),
            ("subSite", "subSite", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("udi", "udi", fhirreference.FHIRReference, "Reference", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ExplanationOfBenefitItemAdjudication(backboneelement.BackboneElement):
    """ Adjudication details.

    If this item is a group then the values here are a summary of the
    adjudication of the detail items. If this item is a simple product or
    service then this is the result of the adjudication of this item.
    """

    resource_type = "ExplanationOfBenefitItemAdjudication"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.amount = None
        """ Monetary amount.
        Type `Money` (represented as `dict` in JSON). """

        self.category = None
        """ Type of adjudication information.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.reason = None
        """ Explanation of adjudication outcome.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.value = None
        """ Non-monitary value.
        Type `float`. """

        super(ExplanationOfBenefitItemAdjudication, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitItemAdjudication, self).elementProperties()
        js.extend([
            ("amount", "amount", money.Money, "Money", False, None, False),
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("reason", "reason", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("value", "value", float, "decimal", False, None, False),
        ])
        return js


class ExplanationOfBenefitItemDetail(backboneelement.BackboneElement):
    """ Additional items.

    Second-tier of goods and services.
    """

    resource_type = "ExplanationOfBenefitItemDetail"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjudication = None
        """ Detail level adjudication details.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.category = None
        """ Benefit classification.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.factor = None
        """ Price scaling factor.
        Type `float`. """

        self.modifier = None
        """ Service/Product billing modifiers.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.net = None
        """ Total item cost.
        Type `Money` (represented as `dict` in JSON). """

        self.noteNumber = None
        """ Applicable note numbers.
        List of `int` items. """

        self.productOrService = None
        """ Billing, service, product, or drug code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.programCode = None
        """ Program the product or service is provided under.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.quantity = None
        """ Count of products or services.
        Type `Quantity` (represented as `dict` in JSON). """

        self.revenue = None
        """ Revenue or cost center code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.sequence = None
        """ Product or service provided.
        Type `int`. """

        self.subDetail = None
        """ Additional items.
        List of `ExplanationOfBenefitItemDetailSubDetail` items (represented as `dict` in JSON). """

        self.udi = None
        """ Unique device identifier.
        List of `FHIRReference` items (represented as `dict` in JSON). """

        self.unitPrice = None
        """ Fee, charge or cost per item.
        Type `Money` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitItemDetail, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitItemDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("factor", "factor", float, "decimal", False, None, False),
            ("modifier", "modifier", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("net", "net", money.Money, "Money", False, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("productOrService", "productOrService", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("programCode", "programCode", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("quantity", "quantity", quantity.Quantity, "Quantity", False, None, False),
            ("revenue", "revenue", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
            ("subDetail", "subDetail", ExplanationOfBenefitItemDetailSubDetail, "ExplanationOfBenefitItemDetailSubDetail", True, None, False),
            ("udi", "udi", fhirreference.FHIRReference, "Reference", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ExplanationOfBenefitItemDetailSubDetail(backboneelement.BackboneElement):
    """ Additional items.

    Third-tier of goods and services.
    """

    resource_type = "ExplanationOfBenefitItemDetailSubDetail"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjudication = None
        """ Subdetail level adjudication details.
        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """

        self.category = None
        """ Benefit classification.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.factor = None
        """ Price scaling factor.
        Type `float`. """

        self.modifier = None
        """ Service/Product billing modifiers.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.net = None
        """ Total item cost.
        Type `Money` (represented as `dict` in JSON). """

        self.noteNumber = None
        """ Applicable note numbers.
        List of `int` items. """

        self.productOrService = None
        """ Billing, service, product, or drug code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.programCode = None
        """ Program the product or service is provided under.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.quantity = None
        """ Count of products or services.
        Type `Quantity` (represented as `dict` in JSON). """

        self.revenue = None
        """ Revenue or cost center code.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.sequence = None
        """ Product or service provided.
        Type `int`. """

        self.udi = None
        """ Unique device identifier.
        List of `FHIRReference` items (represented as `dict` in JSON). """

        self.unitPrice = None
        """ Fee, charge or cost per item.
        Type `Money` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitItemDetailSubDetail, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitItemDetailSubDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, "ExplanationOfBenefitItemAdjudication", True, None, False),
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("factor", "factor", float, "decimal", False, None, False),
            ("modifier", "modifier", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("net", "net", money.Money, "Money", False, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("productOrService", "productOrService", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("programCode", "programCode", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("quantity", "quantity", quantity.Quantity, "Quantity", False, None, False),
            ("revenue", "revenue", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
            ("udi", "udi", fhirreference.FHIRReference, "Reference", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ExplanationOfBenefitPayee(backboneelement.BackboneElement):
    """ Recipient of benefits payable.

    The party to be reimbursed for cost of the products and services according
    to the terms of the policy.
    """

    resource_type = "ExplanationOfBenefitPayee"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.party = None
        """ Recipient reference.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.type = None
        """ Category of recipient.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitPayee, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitPayee, self).elementProperties()
        js.extend([
            ("party", "party", fhirreference.FHIRReference, "Reference", False, None, False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
        ])
        return js


class ExplanationOfBenefitPayment(backboneelement.BackboneElement):
    """ Payment Details.

    Payment details for the adjudication of the claim.
    """

    resource_type = "ExplanationOfBenefitPayment"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.adjustment = None
        """ Payment adjustment for non-claim issues.
        Type `Money` (represented as `dict` in JSON). """

        self.adjustmentReason = None
        """ Explanation for the variance.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.amount = None
        """ Payable amount after adjustment.
        Type `Money` (represented as `dict` in JSON). """

        self.date = None
        """ Expected date of payment.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.identifier = None
        """ Business identifier for the payment.
        Type `Identifier` (represented as `dict` in JSON). """

        self.type = None
        """ Partial or complete payment.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitPayment, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitPayment, self).elementProperties()
        js.extend([
            ("adjustment", "adjustment", money.Money, "Money", False, None, False),
            ("adjustmentReason", "adjustmentReason", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("amount", "amount", money.Money, "Money", False, None, False),
            ("date", "date", fhirdate.FHIRDate, "date", False, None, False),
            ("identifier", "identifier", identifier.Identifier, "Identifier", False, None, False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
        ])
        return js


class ExplanationOfBenefitProcedure(backboneelement.BackboneElement):
    """ Clinical procedures performed.

    Procedures performed on the patient relevant to the billing items with the
    claim.
    """

    resource_type = "ExplanationOfBenefitProcedure"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.date = None
        """ When the procedure was performed.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.procedureCodeableConcept = None
        """ Specific clinical procedure.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.procedureReference = None
        """ Specific clinical procedure.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.sequence = None
        """ Procedure instance identifier.
        Type `int`. """

        self.type = None
        """ Category of Procedure.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

        self.udi = None
        """ Unique device identifier.
        List of `FHIRReference` items (represented as `dict` in JSON). """

        super(ExplanationOfBenefitProcedure, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitProcedure, self).elementProperties()
        js.extend([
            ("date", "date", fhirdate.FHIRDate, "dateTime", False, None, False),
            ("procedureCodeableConcept", "procedureCodeableConcept", codeableconcept.CodeableConcept, "CodeableConcept", False, "procedure", True),
            ("procedureReference", "procedureReference", fhirreference.FHIRReference, "Reference", False, "procedure", True),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("udi", "udi", fhirreference.FHIRReference, "Reference", True, None, False),
        ])
        return js


class ExplanationOfBenefitProcessNote(backboneelement.BackboneElement):
    """ Note concerning adjudication.

    A note that describes or explains adjudication results in a human readable
    form.
    """

    resource_type = "ExplanationOfBenefitProcessNote"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.language = None
        """ Language of the text.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.number = None
        """ Note instance identifier.
        Type `int`. """

        self.text = None
        """ Note explanatory text.
        Type `str`. """

        self.type = None
        """ display | print | printoper.
        Type `str`. """

        super(ExplanationOfBenefitProcessNote, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitProcessNote, self).elementProperties()
        js.extend([
            ("language", "language", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("number", "number", int, "positiveInt", False, None, False),
            ("text", "text", str, "string", False, None, False),
            ("type", "type", str, "code", False, None, False),
        ])
        return js


class ExplanationOfBenefitRelated(backboneelement.BackboneElement):
    """ Prior or corollary claims.

    Other claims which are related to this claim such as prior submissions or
    claims for related services or for the same event.
    """

    resource_type = "ExplanationOfBenefitRelated"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.claim = None
        """ Reference to the related claim.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.reference = None
        """ File or case reference.
        Type `Identifier` (represented as `dict` in JSON). """

        self.relationship = None
        """ How the reference claim is related.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitRelated, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitRelated, self).elementProperties()
        js.extend([
            ("claim", "claim", fhirreference.FHIRReference, "Reference", False, None, False),
            ("reference", "reference", identifier.Identifier, "Identifier", False, None, False),
            ("relationship", "relationship", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
        ])
        return js


class ExplanationOfBenefitSupportingInfo(backboneelement.BackboneElement):
    """ Supporting information.

    Additional information codes regarding exceptions, special considerations,
    the condition, situation, prior or concurrent issues.
    """

    resource_type = "ExplanationOfBenefitSupportingInfo"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.category = None
        """ Classification of the supplied information.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.code = None
        """ Type of information.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.reason = None
        """ Explanation for the information.
        Type `Coding` (represented as `dict` in JSON). """

        self.sequence = None
        """ Information instance identifier.
        Type `int`. """

        self.timingDate = None
        """ When it occurred.
        Type `FHIRDate` (represented as `str` in JSON). """

        self.timingPeriod = None
        """ When it occurred.
        Type `Period` (represented as `dict` in JSON). """

        self.valueAttachment = None
        """ Data to be provided.
        Type `Attachment` (represented as `dict` in JSON). """

        self.valueBoolean = None
        """ Data to be provided.
        Type `bool`. """

        self.valueQuantity = None
        """ Data to be provided.
        Type `Quantity` (represented as `dict` in JSON). """

        self.valueReference = None
        """ Data to be provided.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.valueString = None
        """ Data to be provided.
        Type `str`. """

        super(ExplanationOfBenefitSupportingInfo, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitSupportingInfo, self).elementProperties()
        js.extend([
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("code", "code", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("reason", "reason", coding.Coding, "Coding", False, None, False),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
            ("timingDate", "timingDate", fhirdate.FHIRDate, "date", False, "timing", False),
            ("timingPeriod", "timingPeriod", period.Period, "Period", False, "timing", False),
            ("valueAttachment", "valueAttachment", attachment.Attachment, "Attachment", False, "value", False),
            ("valueBoolean", "valueBoolean", bool, "boolean", False, "value", False),
            ("valueQuantity", "valueQuantity", quantity.Quantity, "Quantity", False, "value", False),
            ("valueReference", "valueReference", fhirreference.FHIRReference, "Reference", False, "value", False),
            ("valueString", "valueString", str, "string", False, "value", False),
        ])
        return js


class ExplanationOfBenefitTotal(backboneelement.BackboneElement):
    """ Adjudication totals.

    Categorized monetary totals for the adjudication.
    """

    resource_type = "ExplanationOfBenefitTotal"

    def __init__(self, jsondict=None, strict=True):
        """ Initialize all valid properties.

        :raises: FHIRValidationError on validation errors, unless strict is False
        :param dict jsondict: A JSON dictionary to use for initialization
        :param bool strict: If True (the default), invalid variables will raise a TypeError
        """

        self.amount = None
        """ Financial total for the category.
        Type `Money` (represented as `dict` in JSON). """

        self.category = None
        """ Type of adjudication information.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        super(ExplanationOfBenefitTotal, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ExplanationOfBenefitTotal, self).elementProperties()
        js.extend([
            ("amount", "amount", money.Money, "Money", False, None, True),
            ("category", "category", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
        ])
        return js


import sys
try:
    from . import address
except ImportError:
    address = sys.modules[__package__ + '.address']
try:
    from . import attachment
except ImportError:
    attachment = sys.modules[__package__ + '.attachment']
try:
    from . import codeableconcept
except ImportError:
    codeableconcept = sys.modules[__package__ + '.codeableconcept']
try:
    from . import coding
except ImportError:
    coding = sys.modules[__package__ + '.coding']
try:
    from . import fhirdate
except ImportError:
    fhirdate = sys.modules[__package__ + '.fhirdate']
try:
    from . import fhirreference
except ImportError:
    fhirreference = sys.modules[__package__ + '.fhirreference']
try:
    from . import identifier
except ImportError:
    identifier = sys.modules[__package__ + '.identifier']
try:
    from . import money
except ImportError:
    money = sys.modules[__package__ + '.money']
try:
    from . import period
except ImportError:
    period = sys.modules[__package__ + '.period']
try:
    from . import quantity
except ImportError:
    quantity = sys.modules[__package__ + '.quantity']
