コード例 #1
0
ファイル: f271.py プロジェクト: zxexz/TigerShark
 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))
コード例 #2
0
ファイル: f270.py プロジェクト: zxexz/TigerShark
    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))
コード例 #3
0
ファイル: f837.py プロジェクト: zentist/TigerShark
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))
コード例 #4
0
ファイル: f270.py プロジェクト: zxexz/TigerShark
    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))
コード例 #5
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))
コード例 #6
0
ファイル: f271.py プロジェクト: zxexz/TigerShark
 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))
コード例 #7
0
ファイル: f271.py プロジェクト: zxexz/TigerShark
    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))
コード例 #8
0
ファイル: f270.py プロジェクト: zxexz/TigerShark
    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))
コード例 #9
0
ファイル: f270.py プロジェクト: zxexz/TigerShark
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)
コード例 #10
0
ファイル: f271.py プロジェクト: zxexz/TigerShark
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)
コード例 #11
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)
コード例 #12
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)
コード例 #13
0
class Footer(Facade, X12LoopBridge):
    loopName = "FOOTER"

    provider_adjustments = SegmentSequenceAccess(
        "PLB", x12type=SegmentConversion(ProviderAdjustments))
コード例 #14
0
ファイル: f270.py プロジェクト: zxexz/TigerShark
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