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


from . import domainresource

class ClaimResponse(domainresource.DomainResource):
    """ Response to a claim predetermination or preauthorization.

    This resource provides the adjudication details from the processing of a
    Claim resource.
    """

    resource_type = "ClaimResponse"

    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.addItem = None
        """ Insurer added line items.
        List of `ClaimResponseAddItem` items (represented as `dict` in JSON). """

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

        self.communicationRequest = None
        """ Request for additional information.
        List of `FHIRReference` items (represented as `dict` in JSON). """

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

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

        self.error = None
        """ Processing errors.
        List of `ClaimResponseError` items (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.identifier = None
        """ Business Identifier for a claim response.
        List of `Identifier` items (represented as `dict` in JSON). """

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

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

        self.item = None
        """ Adjudication for claim line items.
        List of `ClaimResponseItem` items (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.payeeType = None
        """ Party to be paid any benefits payable.
        Type `CodeableConcept` (represented as `dict` in JSON). """

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

        self.preAuthPeriod = None
        """ Preauthorization reference effective period.
        Type `Period` (represented as `dict` in JSON). """

        self.preAuthRef = None
        """ Preauthorization reference.
        Type `str`. """

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

        self.request = None
        """ Id of resource triggering adjudication.
        Type `FHIRReference` (represented as `dict` in JSON). """

        self.requestor = None
        """ Party responsible for the claim.
        Type `FHIRReference` (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.total = None
        """ Adjudication totals.
        List of `ClaimResponseTotal` items (represented as `dict` in JSON). """

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

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

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

    def elementProperties(self):
        js = super(ClaimResponse, self).elementProperties()
        js.extend([
            ("addItem", "addItem", ClaimResponseAddItem, "ClaimResponseAddItem", True, None, False),
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, False),
            ("communicationRequest", "communicationRequest", fhirreference.FHIRReference, "Reference", True, None, False),
            ("created", "created", fhirdate.FHIRDate, "dateTime", False, None, True),
            ("disposition", "disposition", str, "string", False, None, False),
            ("error", "error", ClaimResponseError, "ClaimResponseError", True, 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),
            ("identifier", "identifier", identifier.Identifier, "Identifier", True, None, False),
            ("insurance", "insurance", ClaimResponseInsurance, "ClaimResponseInsurance", True, None, False),
            ("insurer", "insurer", fhirreference.FHIRReference, "Reference", False, None, True),
            ("item", "item", ClaimResponseItem, "ClaimResponseItem", True, None, False),
            ("outcome", "outcome", str, "code", False, None, True),
            ("patient", "patient", fhirreference.FHIRReference, "Reference", False, None, True),
            ("payeeType", "payeeType", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("payment", "payment", ClaimResponsePayment, "ClaimResponsePayment", False, None, False),
            ("preAuthPeriod", "preAuthPeriod", period.Period, "Period", False, None, False),
            ("preAuthRef", "preAuthRef", str, "string", False, None, False),
            ("processNote", "processNote", ClaimResponseProcessNote, "ClaimResponseProcessNote", True, None, False),
            ("request", "request", fhirreference.FHIRReference, "Reference", False, None, False),
            ("requestor", "requestor", fhirreference.FHIRReference, "Reference", False, None, False),
            ("status", "status", str, "code", False, None, True),
            ("subType", "subType", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("total", "total", ClaimResponseTotal, "ClaimResponseTotal", True, None, False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("use", "use", str, "code", False, None, True),
        ])
        return js


from . import backboneelement

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

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

    resource_type = "ClaimResponseAddItem"

    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 `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """

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

        self.detail = None
        """ Insurer added line details.
        List of `ClaimResponseAddItemDetail` 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.subSite = None
        """ Anatomical sub-location.
        List of `CodeableConcept` items (represented as `dict` in JSON). """

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

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

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

    def elementProperties(self):
        js = super(ClaimResponseAddItem, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, True),
            ("bodySite", "bodySite", codeableconcept.CodeableConcept, "CodeableConcept", False, None, False),
            ("detail", "detail", ClaimResponseAddItemDetail, "ClaimResponseAddItemDetail", 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),
            ("subSite", "subSite", codeableconcept.CodeableConcept, "CodeableConcept", True, None, False),
            ("subdetailSequence", "subdetailSequence", int, "positiveInt", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


class ClaimResponseAddItemDetail(backboneelement.BackboneElement):
    """ Insurer added line details.

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

    resource_type = "ClaimResponseAddItemDetail"

    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 detail adjudication.
        List of `ClaimResponseItemAdjudication` 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 `ClaimResponseAddItemDetailSubDetail` items (represented as `dict` in JSON). """

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

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

    def elementProperties(self):
        js = super(ClaimResponseAddItemDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, True),
            ("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", ClaimResponseAddItemDetailSubDetail, "ClaimResponseAddItemDetailSubDetail", True, None, False),
            ("unitPrice", "unitPrice", money.Money, "Money", False, None, False),
        ])
        return js


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

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

    resource_type = "ClaimResponseAddItemDetailSubDetail"

    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 detail adjudication.
        List of `ClaimResponseItemAdjudication` 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(ClaimResponseAddItemDetailSubDetail, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ClaimResponseAddItemDetailSubDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, True),
            ("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 ClaimResponseError(backboneelement.BackboneElement):
    """ Processing errors.

    Errors encountered during the processing of the adjudication.
    """

    resource_type = "ClaimResponseError"

    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.code = None
        """ Error code detailing processing issues.
        Type `CodeableConcept` (represented as `dict` in JSON). """

        self.detailSequence = None
        """ Detail sequence number.
        Type `int`. """

        self.itemSequence = None
        """ Item sequence number.
        Type `int`. """

        self.subDetailSequence = None
        """ Subdetail sequence number.
        Type `int`. """

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

    def elementProperties(self):
        js = super(ClaimResponseError, self).elementProperties()
        js.extend([
            ("code", "code", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
            ("detailSequence", "detailSequence", int, "positiveInt", False, None, False),
            ("itemSequence", "itemSequence", int, "positiveInt", False, None, False),
            ("subDetailSequence", "subDetailSequence", int, "positiveInt", False, None, False),
        ])
        return js


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

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

    resource_type = "ClaimResponseInsurance"

    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.businessArrangement = None
        """ Additional provider contract number.
        Type `str`. """

        self.claimResponse = None
        """ Adjudication results.
        Type `FHIRReference` (represented as `dict` in JSON). """

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

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

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

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

    def elementProperties(self):
        js = super(ClaimResponseInsurance, self).elementProperties()
        js.extend([
            ("businessArrangement", "businessArrangement", str, "string", False, None, False),
            ("claimResponse", "claimResponse", fhirreference.FHIRReference, "Reference", False, None, False),
            ("coverage", "coverage", fhirreference.FHIRReference, "Reference", False, None, True),
            ("focal", "focal", bool, "boolean", False, None, True),
            ("sequence", "sequence", int, "positiveInt", False, None, True),
        ])
        return js


class ClaimResponseItem(backboneelement.BackboneElement):
    """ Adjudication for claim line items.

    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 = "ClaimResponseItem"

    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 `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """

        self.detail = None
        """ Adjudication for claim details.
        List of `ClaimResponseItemDetail` items (represented as `dict` in JSON). """

        self.itemSequence = None
        """ Claim item instance identifier.
        Type `int`. """

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

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

    def elementProperties(self):
        js = super(ClaimResponseItem, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, True),
            ("detail", "detail", ClaimResponseItemDetail, "ClaimResponseItemDetail", True, None, False),
            ("itemSequence", "itemSequence", int, "positiveInt", False, None, True),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
        ])
        return js


class ClaimResponseItemAdjudication(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 = "ClaimResponseItemAdjudication"

    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-monetary value.
        Type `float`. """

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

    def elementProperties(self):
        js = super(ClaimResponseItemAdjudication, 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 ClaimResponseItemDetail(backboneelement.BackboneElement):
    """ Adjudication for claim details.

    A claim detail. Either a simple (a product or service) or a 'group' of sub-
    details which are simple items.
    """

    resource_type = "ClaimResponseItemDetail"

    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 `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """

        self.detailSequence = None
        """ Claim detail instance identifier.
        Type `int`. """

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

        self.subDetail = None
        """ Adjudication for claim sub-details.
        List of `ClaimResponseItemDetailSubDetail` items (represented as `dict` in JSON). """

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

    def elementProperties(self):
        js = super(ClaimResponseItemDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, True),
            ("detailSequence", "detailSequence", int, "positiveInt", False, None, True),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("subDetail", "subDetail", ClaimResponseItemDetailSubDetail, "ClaimResponseItemDetailSubDetail", True, None, False),
        ])
        return js


class ClaimResponseItemDetailSubDetail(backboneelement.BackboneElement):
    """ Adjudication for claim sub-details.

    A sub-detail adjudication of a simple product or service.
    """

    resource_type = "ClaimResponseItemDetailSubDetail"

    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 `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """

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

        self.subDetailSequence = None
        """ Claim sub-detail instance identifier.
        Type `int`. """

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

    def elementProperties(self):
        js = super(ClaimResponseItemDetailSubDetail, self).elementProperties()
        js.extend([
            ("adjudication", "adjudication", ClaimResponseItemAdjudication, "ClaimResponseItemAdjudication", True, None, False),
            ("noteNumber", "noteNumber", int, "positiveInt", True, None, False),
            ("subDetailSequence", "subDetailSequence", int, "positiveInt", False, None, True),
        ])
        return js


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

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

    resource_type = "ClaimResponsePayment"

    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 adjustment.
        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(ClaimResponsePayment, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ClaimResponsePayment, 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, True),
            ("date", "date", fhirdate.FHIRDate, "date", False, None, False),
            ("identifier", "identifier", identifier.Identifier, "Identifier", False, None, False),
            ("type", "type", codeableconcept.CodeableConcept, "CodeableConcept", False, None, True),
        ])
        return js


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

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

    resource_type = "ClaimResponseProcessNote"

    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(ClaimResponseProcessNote, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ClaimResponseProcessNote, 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, True),
            ("type", "type", str, "code", False, None, False),
        ])
        return js


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

    Categorized monetary totals for the adjudication.
    """

    resource_type = "ClaimResponseTotal"

    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(ClaimResponseTotal, self).__init__(jsondict=jsondict, strict=strict)

    def elementProperties(self):
        js = super(ClaimResponseTotal, 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 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']
