Exemple #1
0
 class _Information(X12LoopBridge):
     loopName = "2100B"
     name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
     contact_information = SegmentSequenceAccess(
         "PER", x12type=SegmentConversion(ContactInformation))
     reference_ids = SegmentSequenceAccess(
         "REF", x12type=SegmentConversion(ReferenceID))
     request_validations = SegmentSequenceAccess(
         "AAA", x12type=SegmentConversion(RequestValidation))
Exemple #2
0
    class _EligibilityOrBenefitInformation(Facade, X12LoopBridge):
        loopName = "2110D"

        coverage_information = SegmentAccess(
            "EQ", x12type=SegmentConversion(EligibilityOrBenefitInquiry))
        diagnoses = SegmentSequenceAccess("III",
                                          x12type=SegmentConversion(Diagnosis))
        prior_authorization_or_referral = SegmentAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        date = SegmentAccess("DTP",
                             x12type=SegmentConversion(DateOrTimePeriod))
Exemple #3
0
 class _RelatedEntityInformation(X12LoopBridge):
     loopName = "2120D"
     name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
     address_street = SegmentAccess("N3",
                                    x12type=SegmentConversion(Address))
     address_location = SegmentAccess(
         "N4", x12type=SegmentConversion(Location))
     contact_information = SegmentSequenceAccess(
         "PER", x12type=SegmentConversion(ContactInformation))
     provider_information = SegmentAccess(
         "PRV", x12type=SegmentConversion(ProviderInformation))
Exemple #4
0
class Dependent(Facade, X12LoopBridge):
    """A person identifiable only when associated with a subscriber.

    This person cannot be uniquely identified without the presence of a
    Subscriber. The Dependent isn't a direct member of Source.

    The Dependent is a sub-loop of the Subscriber."""
    loopName = "2000D"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))
    trace_numbers = SegmentSequenceAccess(
        "TRN", x12type=SegmentConversion(TraceNumber))

    class _Information(X12LoopBridge):
        loopName = "2100D"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        address_street = SegmentAccess("N3",
                                       x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                                         x12type=SegmentConversion(Location))
        provider_information = SegmentAccess(
            "PRV", x12type=SegmentConversion(ProviderInformation))
        demographic_information = SegmentAccess(
            "DMG", x12type=SegmentConversion(DemographicInformation))
        relationship = SegmentAccess("INS",
                                     x12type=SegmentConversion(Relationship))
        dates = SegmentSequenceAccess(
            "DTP", x12type=SegmentConversion(DateOrTimePeriod))

    class _EligibilityOrBenefitInformation(Facade, X12LoopBridge):
        loopName = "2110D"

        coverage_information = SegmentAccess(
            "EQ", x12type=SegmentConversion(EligibilityOrBenefitInquiry))
        diagnoses = SegmentSequenceAccess("III",
                                          x12type=SegmentConversion(Diagnosis))
        prior_authorization_or_referral = SegmentAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        date = SegmentAccess("DTP",
                             x12type=SegmentConversion(DateOrTimePeriod))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Dependent, self).__init__(anX12Message, *args, **kwargs)
        self.dependent_information = first(
            self.loops(self._Information, anX12Message))
        self.eligibility_or_benefit_information = self.loops(
            self._EligibilityOrBenefitInformation, anX12Message)
Exemple #5
0
class ClaimDetails(X12LoopBridge):
    """Claim Details from the 2300 Loop."""
    loopName = "2300"
    patAcct = ElementAccess("CLM", 1)
    amount = ElementAccess("CLM", 2)
    serviceLoc = ElementAccess("CLM", 5)
    respCode1 = ElementAccess("CLM", 6)
    medAssign = ElementAccess("CLM", 7)
    assignBenInd = ElementAccess("CLM", 8)
    release = ElementAccess("CLM", 9)
    signature = ElementAccess("CLM", 10)
    relCauses = ElementAccess("CLM", 11)
    progCode = ElementAccess("CLM", 12)
    provAgree = ElementAccess("CLM", 16)
    respCode2 = ElementAccess("CLM", 18)
    delayCode = ElementAccess("CLM", 20)
    admsType = ElementAccess("CL1", 1)
    admsSrc = ElementAccess("CL1", 2)
    dischStat = ElementAccess("CL1", 3)
    coveredDays = ElementAccess("QTY", 2, qualifier=(1, "CA"))
    coveredDays_UOM = ElementAccess("QTY", 3, qualifier=(1, "CA"))
    nonCoveredDays = ElementAccess("QTY", 2, qualifier=(1, "NA"))
    nonCoveredDays_UOM = ElementAccess("QTY", 3, qualifier=(1, "NA"))
    coInsuranceDays = ElementAccess("QTY", 2, qualifier=(1, "CD"))
    coInsuranceDays_UOM = ElementAccess("QTY", 3, qualifier=(1, "CD"))
    reserveDays = ElementAccess("QTY", 2, qualifier=(1, "LA"))
    reserveDays_UOM = ElementAccess("QTY", 3, qualifier=(1, "LA"))
    origClaimNo = ElementAccess("REF", 2, qualifier=(1, "F8"))
    medLRec = ElementAccess("REF", 2, qualifier=(1, "EA"))
    microID = ElementAccess("REF", 2, qualifier=(1, "D9"))
    paperwork = SegmentSequenceAccess("PWK",
                                      x12type=SegmentConversion(Paperwork))
Exemple #6
0
class Receiver(Facade, X12LoopBridge):
    """The entity asking the questions"""
    loopName = "2000B"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))

    class _Information(X12LoopBridge):
        loopName = "2100B"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        address_street = SegmentAccess("N3",
                                       x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                                         x12type=SegmentConversion(Location))
        contact_information = SegmentSequenceAccess(
            "PER", x12type=SegmentConversion(ContactInformation))
        provider_information = SegmentAccess(
            "PRV", x12type=SegmentConversion(ProviderInformation))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Receiver, self).__init__(anX12Message, *args, **kwargs)
        self.receiver_information = first(
            self.loops(self._Information, anX12Message))
        self.subscribers = self.loops(Subscriber, anX12Message)  # N/A for 5010
Exemple #7
0
    class _EligibilityOrBenefitInformation(Facade, X12LoopBridge):
        loopName = "2110D"

        coverage_information = SegmentAccess("EB",
                x12type=SegmentConversion(EligibilityOrBenefitInformation))
        services_deliveries = SegmentSequenceAccess("HSD",
                x12type=SegmentConversion(HealthCareServicesDelivery))
        reference_ids = SegmentSequenceAccess("REF",
                x12type=SegmentConversion(ReferenceID))
        dates = SegmentSequenceAccess("DTP",
                x12type=SegmentConversion(DateOrTimePeriod))
        request_validations = SegmentSequenceAccess("AAA",
                x12type=SegmentConversion(RequestValidation))
        messages = ElementSequenceAccess("MSG", 1)
        additional_information = ElementSequenceAccess("III", 2, x12type=enum(place_of_service))

        class _AdditionalInformation(X12LoopBridge):
            loopName = "2115C"

            diagnosis = SegmentAccess("III",
                x12type=SegmentConversion(Diagnosis))

        class _RelatedEntityInformation(X12LoopBridge):
            loopName = "2120D"
            name = SegmentAccess("NM1",
                    x12type=SegmentConversion(NamedEntity))
            address_street = SegmentAccess("N3",
                    x12type=SegmentConversion(Address))
            address_location = SegmentAccess("N4",
                    x12type=SegmentConversion(Location))
            contact_information = SegmentSequenceAccess("PER",
                    x12type=SegmentConversion(ContactInformation))
            provider_information = SegmentAccess("PRV",
                    x12type=SegmentConversion(ProviderInformation))

        def __init__(self, anX12Message, *args, **kwargs):
            super(Dependent._EligibilityOrBenefitInformation, self).__init__(
                    anX12Message, *args, **kwargs)

            self.additional_information = self.loops(
                    self._AdditionalInformation, anX12Message)
            self.benefit_related_entity = first(self.loops(
                    self._RelatedEntityInformation, anX12Message))
Exemple #8
0
class Source(Facade, X12LoopBridge):
    """The information source is the entity with the eligibility answers"""
    loopName = "2000A"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))
    request_validations = SegmentSequenceAccess(
        "AAA", x12type=SegmentConversion(RequestValidation))

    class _Information(X12LoopBridge):
        loopName = "2100A"
        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        contact_information = SegmentSequenceAccess(
            "PER", x12type=SegmentConversion(ContactInformation))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        request_validations = SegmentSequenceAccess(
            "AAA", x12type=SegmentConversion(RequestValidation))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Source, self).__init__(anX12Message, *args, **kwargs)
        self.source_information = first(
            self.loops(self._Information, anX12Message))
        self.receivers = self.loops(Receiver, anX12Message)
Exemple #9
0
    class _Information(X12LoopBridge):
        loopName = "2100D"
        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        address_street = SegmentAccess("N3",
                                       x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                                         x12type=SegmentConversion(Location))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        contact_information = SegmentSequenceAccess(
            "PER", x12type=SegmentConversion(ContactInformation))

        request_validations = SegmentSequenceAccess(
            "AAA", x12type=SegmentConversion(RequestValidation))
        demographic_information = SegmentAccess(
            "DMG", x12type=SegmentConversion(DemographicInformation))
        relationship = SegmentAccess("INS",
                                     x12type=SegmentConversion(Relationship))
        dates = SegmentSequenceAccess(
            "DTP", x12type=SegmentConversion(DateOrTimePeriod))
Exemple #10
0
class Source(Facade, X12LoopBridge):
    """The information source is the entity with the eligibility answers"""
    loopName = "2000A"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))

    class _Information(X12LoopBridge):
        loopName = "2100A"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Source, self).__init__(anX12Message, *args, **kwargs)
        self.source_information = first(
            self.loops(self._Information, anX12Message))
        self.receivers = self.loops(Receiver, anX12Message)  # N/A for 5010
Exemple #11
0
    class _Information(X12LoopBridge):
        loopName = "2100C"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        address_street = SegmentAccess("N3",
                                       x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                                         x12type=SegmentConversion(Location))
        provider_information = SegmentAccess(
            "PRV", x12type=SegmentConversion(ProviderInformation))
        demographic_information = SegmentAccess(
            "DMG", x12type=SegmentConversion(DemographicInformation))
        relationship = SegmentAccess("INS",
                                     x12type=SegmentConversion(Relationship))
        dates = SegmentSequenceAccess(
            "DTP", x12type=SegmentConversion(DateOrTimePeriod))
Exemple #12
0
    class _Information(X12LoopBridge):
        loopName = "2100B"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        address_street = SegmentAccess("N3",
                                       x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                                         x12type=SegmentConversion(Location))
        contact_information = SegmentSequenceAccess(
            "PER", x12type=SegmentConversion(ContactInformation))
        provider_information = SegmentAccess(
            "PRV", x12type=SegmentConversion(ProviderInformation))
Exemple #13
0
class Header(X12LoopBridge):
    loopName = "HEADER"

    class _HierarchicalTransaction(X12SegmentBridge):
        """Use this to start the transaction set.

        This also indicates the sequence of hierarchical levels of information
        that will follow, though that information is not used at this time."""
        structure = ElementAccess(
            "BHT",
            1,
            x12type=enum(
                {
                    "0022":
                    "Information Source, Information Receiver, Subscriber, "
                    "or Dependent."
                },
                raw_unknowns=True))
        purpose = ElementAccess("BHT",
                                2,
                                x12type=enum(
                                    {
                                        "01": "Cancellation",
                                        "11": "Response",
                                        "13": "Request",
                                        "36": "Authority to Dedduct (Reply)"
                                    },
                                    raw_unknowns=True))
        transaction_id = ElementAccess("BHT", 3)
        creation_date = ElementAccess("BHT", 4, x12type=D8)
        creation_time = ElementAccess("BHT", 5, x12type=TM)
        type = ElementAccess("BHT",
                             6,
                             x12type=enum(
                                 {
                                     "RT": "Spend Down",
                                     "RU": "Medical Services Reservation"
                                 },
                                 raw_unknowns=True))

    hierarchical_transaction_info = SegmentAccess(
        "BHT", x12type=SegmentConversion(_HierarchicalTransaction))
Exemple #14
0
        class _AdditionalInformation(X12LoopBridge):
            loopName = "2115C"

            diagnosis = SegmentAccess("III",
                x12type=SegmentConversion(Diagnosis))
Exemple #15
0
    class _Information(X12LoopBridge):
        loopName = "2100A"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
Exemple #16
0
class Dependent(Facade, X12LoopBridge):
    """The Dependent.

    This person was *NOT* identified as a member of the Source. If this is
    populated, then this is the patient.
    """
    loopName = "2000D"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))
    trace_numbers = SegmentSequenceAccess("TRN",
            x12type=SegmentConversion(TraceNumber))

    class _Information(X12LoopBridge):
        loopName = "2100D"
        name = SegmentAccess("NM1",
                x12type=SegmentConversion(NamedEntity))
        address_street = SegmentAccess("N3",
                x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                x12type=SegmentConversion(Location))
        reference_ids = SegmentSequenceAccess("REF",
                x12type=SegmentConversion(ReferenceID))
        contact_information = SegmentSequenceAccess("PER",
                x12type=SegmentConversion(ContactInformation))

        request_validations = SegmentSequenceAccess("AAA",
                x12type=SegmentConversion(RequestValidation))
        demographic_information = SegmentAccess("DMG",
                x12type=SegmentConversion(DemographicInformation))
        relationship = SegmentAccess("INS",
                x12type=SegmentConversion(Relationship))
        dates = SegmentSequenceAccess("DTP",
                x12type=SegmentConversion(DateOrTimePeriod))

    class _EligibilityOrBenefitInformation(Facade, X12LoopBridge):
        loopName = "2110D"

        coverage_information = SegmentAccess("EB",
                x12type=SegmentConversion(EligibilityOrBenefitInformation))
        services_deliveries = SegmentSequenceAccess("HSD",
                x12type=SegmentConversion(HealthCareServicesDelivery))
        reference_ids = SegmentSequenceAccess("REF",
                x12type=SegmentConversion(ReferenceID))
        dates = SegmentSequenceAccess("DTP",
                x12type=SegmentConversion(DateOrTimePeriod))
        request_validations = SegmentSequenceAccess("AAA",
                x12type=SegmentConversion(RequestValidation))
        messages = ElementSequenceAccess("MSG", 1)
        additional_information = ElementSequenceAccess("III", 2, x12type=enum(place_of_service))

        class _AdditionalInformation(X12LoopBridge):
            loopName = "2115C"

            diagnosis = SegmentAccess("III",
                x12type=SegmentConversion(Diagnosis))

        class _RelatedEntityInformation(X12LoopBridge):
            loopName = "2120D"
            name = SegmentAccess("NM1",
                    x12type=SegmentConversion(NamedEntity))
            address_street = SegmentAccess("N3",
                    x12type=SegmentConversion(Address))
            address_location = SegmentAccess("N4",
                    x12type=SegmentConversion(Location))
            contact_information = SegmentSequenceAccess("PER",
                    x12type=SegmentConversion(ContactInformation))
            provider_information = SegmentAccess("PRV",
                    x12type=SegmentConversion(ProviderInformation))

        def __init__(self, anX12Message, *args, **kwargs):
            super(Dependent._EligibilityOrBenefitInformation, self).__init__(
                    anX12Message, *args, **kwargs)

            self.additional_information = self.loops(
                    self._AdditionalInformation, anX12Message)
            self.benefit_related_entity = first(self.loops(
                    self._RelatedEntityInformation, anX12Message))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Dependent, self).__init__(anX12Message, *args, **kwargs)
        self.personal_information = first(self.loops(
            self._Information, anX12Message))
        self.eligibility_or_benefit_information = \
                self.loops(self._EligibilityOrBenefitInformation, anX12Message)
Exemple #17
0
class Subscriber(Facade, X12LoopBridge):
    """The person uniquely identified by the Source.

    This person was identified as a member of the Source. Subscriber may or
    may not be the patient.

    NOTE: Patient

    The Patient may be the Subscriber or the Dependent. There are several ways
    of identifying which type the Patient is, but the two most common are:

        1. The Source assigns a unique ID number to each member of the
        Subscriber's family. In this case all dependents of a Subscriber are
        uniquely addressable by the Source, and are thus considered proper
        Subscribers, not Dependents.

        2. The Source only gives a unique ID number to the Subscriber, and all
        family members are identifiable only by giving the Subscriber's and the
        Dependent's information. In this case both the Subscriber and Dependent
        will be defined.
    """
    loopName = "2000C"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))
    trace_numbers = SegmentSequenceAccess("TRN",
            x12type=SegmentConversion(TraceNumber))

    class _Information(X12LoopBridge):
        loopName = "2100C"
        name = SegmentAccess("NM1",
                x12type=SegmentConversion(NamedEntity))
        address_street = SegmentAccess("N3",
                x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                x12type=SegmentConversion(Location))
        reference_ids = SegmentSequenceAccess("REF",
                x12type=SegmentConversion(ReferenceID))
        contact_information = SegmentSequenceAccess("PER",
                x12type=SegmentConversion(ContactInformation))

        request_validations = SegmentSequenceAccess("AAA",
                x12type=SegmentConversion(RequestValidation))
        demographic_information = SegmentAccess("DMG",
                x12type=SegmentConversion(DemographicInformation))
        relationship = SegmentAccess("INS",
                x12type=SegmentConversion(Relationship))
        dates = SegmentSequenceAccess("DTP",
                x12type=SegmentConversion(DateOrTimePeriod))

    class _EligibilityOrBenefitInformation(Facade, X12LoopBridge):
        loopName = "2110C"

        coverage_information = SegmentAccess("EB",
                x12type=SegmentConversion(EligibilityOrBenefitInformation))
        services_deliveries = SegmentSequenceAccess("HSD",
                x12type=SegmentConversion(HealthCareServicesDelivery))
        reference_ids = SegmentSequenceAccess("REF",
                x12type=SegmentConversion(ReferenceID))
        dates = SegmentSequenceAccess("DTP",
                x12type=SegmentConversion(DateOrTimePeriod))
        request_validations = SegmentSequenceAccess("AAA",
                x12type=SegmentConversion(RequestValidation))
        messages = ElementSequenceAccess("MSG", 1)
        additional_information = ElementSequenceAccess("III", 2, x12type=enum(place_of_service))

        class _AdditionalInformation(X12LoopBridge):
            loopName = "2115C"

            diagnosis = SegmentAccess("III",
                x12type=SegmentConversion(Diagnosis))

        class _RelatedEntityInformation(X12LoopBridge):
            loopName = "2120C"
            name = SegmentAccess("NM1",
                    x12type=SegmentConversion(NamedEntity))
            address_street = SegmentAccess("N3",
                    x12type=SegmentConversion(Address))
            address_location = SegmentAccess("N4",
                    x12type=SegmentConversion(Location))
            contact_information = SegmentSequenceAccess("PER",
                    x12type=SegmentConversion(ContactInformation))
            provider_information = SegmentAccess("PRV",
                    x12type=SegmentConversion(ProviderInformation))

        def __init__(self, anX12Message, *args, **kwargs):
            super(Subscriber._EligibilityOrBenefitInformation, self).__init__(
                    anX12Message, *args, **kwargs)

            self.additional_information = self.loops(
                    self._AdditionalInformation, anX12Message)
            self.benefit_related_entity = first(self.loops(
                    self._RelatedEntityInformation, anX12Message))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Subscriber, self).__init__(anX12Message, *args, **kwargs)
        self.personal_information = first(self.loops(
            self._Information, anX12Message))
        self.eligibility_or_benefit_information = \
                self.loops(self._EligibilityOrBenefitInformation, anX12Message)
        self.dependents = self.loops(Dependent, anX12Message)
Exemple #18
0
class Footer(Facade, X12LoopBridge):
    loopName = "FOOTER"

    provider_adjustments = SegmentSequenceAccess(
        "PLB", x12type=SegmentConversion(ProviderAdjustments))
Exemple #19
0
class Subscriber(Facade, X12LoopBridge):
    """The person uniquely identified by the Source.

    This person was identified as a member of the Source. Subscriber may or
    may not be the patient.

    NOTE: Patient

    The Patient may be the Subscriber or the Dependent. There are several ways
    of identifying which type the Patient is, but the two most common are:

        1. The Source assigns a unique ID number to each member of the
        Subscriber's family. In this case all dependents of a Subscriber are
        uniquely addressable by the Source, and are thus considered proper
        Subscribers, not Dependents.

        2. The Source only gives a unique ID number to the Subscriber, and all
        family members are identifiable only by giving the Subscriber's and the
        Dependent's information. In this case both the Subscriber and Dependent
        will be defined.
    """
    loopName = "2000C"

    hierarchy = SegmentAccess("HL", x12type=SegmentConversion(Hierarchy))
    trace_numbers = SegmentSequenceAccess(
        "TRN", x12type=SegmentConversion(TraceNumber))

    class _Information(X12LoopBridge):
        loopName = "2100C"

        name = SegmentAccess("NM1", x12type=SegmentConversion(NamedEntity))
        reference_ids = SegmentSequenceAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        address_street = SegmentAccess("N3",
                                       x12type=SegmentConversion(Address))
        address_location = SegmentAccess("N4",
                                         x12type=SegmentConversion(Location))
        provider_information = SegmentAccess(
            "PRV", x12type=SegmentConversion(ProviderInformation))
        demographic_information = SegmentAccess(
            "DMG", x12type=SegmentConversion(DemographicInformation))
        relationship = SegmentAccess("INS",
                                     x12type=SegmentConversion(Relationship))
        dates = SegmentSequenceAccess(
            "DTP", x12type=SegmentConversion(DateOrTimePeriod))

    class _EligibilityOrBenefitInformation(Facade, X12LoopBridge):
        loopName = "2110C"

        coverage_information = SegmentAccess(
            "EQ", x12type=SegmentConversion(EligibilityOrBenefitInquiry))
        monetary_amount = SegmentAccess(
            "AMT", x12type=SegmentConversion(MonetaryAmount))
        diagnoses = SegmentSequenceAccess("III",
                                          x12type=SegmentConversion(Diagnosis))
        prior_authorization_or_referral = SegmentAccess(
            "REF", x12type=SegmentConversion(ReferenceID))
        date = SegmentAccess("DTP",
                             x12type=SegmentConversion(DateOrTimePeriod))

    def __init__(self, anX12Message, *args, **kwargs):
        super(Subscriber, self).__init__(anX12Message, *args, **kwargs)
        self.subscriber_information = first(
            self.loops(self._Information, anX12Message))
        self.eligibility_or_benefit_information = self.loops(
            self._EligibilityOrBenefitInformation, anX12Message)
        self.dependents = self.loops(Dependent, anX12Message)  # N/A for 5010