class EligibilityOrBenefitInformation(X12SegmentBridge): """Eligibility Information.""" information_type = ElementAccess("EB", 1, x12type=enum( eligibility_or_benefit_code)) coverage_level = ElementAccess("EB", 2, x12type=enum( coverage_level)) service_type = ElementAccess("EB", 3, x12type=enum( service_type_codes)) insurance_type = ElementAccess("EB", 4, x12type=enum( insurance_type)) description = ElementAccess("EB", 5) time_period_type = ElementAccess("EB", 6, x12type=enum(time_period_qualifier)) benefit_amount = ElementAccess("EB", 7, x12type=Money) benefit_percent = ElementAccess("EB", 8, x12type=XDecimal) quantity_type = ElementAccess("EB", 9, x12type=enum(quantity_qualifier)) quantity = ElementAccess("EB", 10) authorization_or_certification = ElementAccess("EB", 11, x12type=boolean("Y")) in_plan_network = ElementAccess("EB", 12, x12type=boolean("Y")) both_in_out_network = ElementAccess("EB", 12, x12type=boolean("W")) ada_code = CompositeAccess("EB", "AD", 13) cpt_code = CompositeAccess("EB", "CJ", 13) hcpcs_code = CompositeAccess("EB", "HC", 13) icd_9_cm_code = CompositeAccess("EB", "ID", 13) ndc_code = CompositeAccess("EB", "ND", 13) zz_code = CompositeAccess("EB", "ZZ", 13)
class Relationship(X12SegmentBridge): is_insured = ElementAccess("INS", 1, x12type=boolean('Y')) relationship = ElementAccess("INS", 2, x12type=enum( { "01": "Spouse", "18": "Self", "19": "Child", "21": "Unknown", "34": "Other Adult" }, raw_unknowns=True)) maintenance_type = ElementAccess("INS", 3, x12type=enum({"001": "Change"}, raw_unknowns=True)) maintenance_reason = ElementAccess( "INS", 4, x12type=enum({"25": "Change in Identifying Data Elements"}, raw_unknowns=True)) student_status = ElementAccess("INS", 9, x12type=enum({ "F": "Full-time", "N": "Not a Student", "P": "Part-time" })) handicapped = ElementAccess("INS", 10, x12type=boolean("Y")) birth_sequence_number = ElementAccess("INS", 17)
class RequestValidation(X12SegmentBridge): valid_request = ElementAccess("AAA", 1, x12type=boolean("Y")) reject_reason = ElementAccess("AAA", 3, x12type=enum(reject_reason_code)) follow_up_action_code = ElementAccess( "AAA", 4, x12type=enum({ "C": "Please Correct and Resubmit", "N": "Resubmission Not Allowed", "P": "Please Resubmit Original Transaction", "R": "Resubmission Allowed", "S": "Do Not Resubmit; Inquiry Initiated to a Third Party", "W": "Please Wait 30 Days and Resubmit", "X": "Please Wait 10 Days and Resubmit", "Y": "Do Not Resubmit; We Will Hold Your Request and Respond Again " "Shortly" }))
class Hierarchy(X12SegmentBridge): id = ElementAccess("HL", 1) parent_id = ElementAccess("HL", 2) level = ElementAccess("HL", 3, x12type=enum({ "20": "Information Source", "21": "Information Receiver", "22": "Subscriber", "23": "Dependent", })) has_children = ElementAccess("HL", 4, x12type=boolean("1"))