rbedi 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/edi +897 -0
- data/lib/rbedi/codes/aaa.rb +437 -0
- data/lib/rbedi/codes/ak1.rb +278 -0
- data/lib/rbedi/codes/ak2.rb +336 -0
- data/lib/rbedi/codes/ak9.rb +55 -0
- data/lib/rbedi/codes/bht.rb +706 -0
- data/lib/rbedi/codes/codeset.rb +27 -0
- data/lib/rbedi/codes/dmg.rb +1583 -0
- data/lib/rbedi/codes/dtp.rb +1342 -0
- data/lib/rbedi/codes/eb.rb +1511 -0
- data/lib/rbedi/codes/eq.rb +286 -0
- data/lib/rbedi/codes/ge.rb +14 -0
- data/lib/rbedi/codes/gs.rb +287 -0
- data/lib/rbedi/codes/hl.rb +273 -0
- data/lib/rbedi/codes/iea.rb +14 -0
- data/lib/rbedi/codes/ik3.rb +32 -0
- data/lib/rbedi/codes/ik4.rb +37 -0
- data/lib/rbedi/codes/ik5.rb +56 -0
- data/lib/rbedi/codes/isa.rb +137 -0
- data/lib/rbedi/codes/le.rb +13 -0
- data/lib/rbedi/codes/ls.rb +13 -0
- data/lib/rbedi/codes/msg.rb +25 -0
- data/lib/rbedi/codes/n3.rb +14 -0
- data/lib/rbedi/codes/n4.rb +706 -0
- data/lib/rbedi/codes/nm1.rb +1916 -0
- data/lib/rbedi/codes/per.rb +308 -0
- data/lib/rbedi/codes/ref.rb +1749 -0
- data/lib/rbedi/codes/se.rb +14 -0
- data/lib/rbedi/codes/segment_names.rb +44 -0
- data/lib/rbedi/codes/st.rb +336 -0
- data/lib/rbedi/codes/trn.rb +22 -0
- data/lib/rbedi/codes.rb +8 -0
- data/lib/rbedi/edi_date_time.rb +69 -0
- data/lib/rbedi/functional_group.rb +52 -0
- data/lib/rbedi/non_existent_element_error.rb +4 -0
- data/lib/rbedi/parser.rb +102 -0
- data/lib/rbedi/segment.rb +114 -0
- data/lib/rbedi/transaction_envelope.rb +77 -0
- data/lib/rbedi/transaction_set.rb +40 -0
- data/lib/rbedi.rb +20 -4
- metadata +79 -10
@@ -0,0 +1,308 @@
|
|
1
|
+
module RBEDI
|
2
|
+
module Codes
|
3
|
+
module PER
|
4
|
+
extend CodeSet
|
5
|
+
|
6
|
+
SEGMENT_POSITIONS = {
|
7
|
+
1 => :contact_function_code,
|
8
|
+
2 => :name,
|
9
|
+
3 => :communication_number_qualifier_1,
|
10
|
+
4 => :communication_number_1,
|
11
|
+
5 => :communication_number_qualifier_2,
|
12
|
+
6 => :communication_number_2,
|
13
|
+
7 => :communication_number_qualifier_3,
|
14
|
+
8 => :communication_number_3,
|
15
|
+
9 => :contact_inquiry_reference
|
16
|
+
}
|
17
|
+
|
18
|
+
CODES = {
|
19
|
+
1 => {
|
20
|
+
"1a" => :reviewrepricing_contact,
|
21
|
+
"1b" => :preferred_provider_organization_ppo_contact,
|
22
|
+
"1c" => :health_maintenance_organization_hmo_contact,
|
23
|
+
"1d" => :thirdparty_administrator_tpa_contact,
|
24
|
+
"1e" => :new_business_processing,
|
25
|
+
"1f" => :physician,
|
26
|
+
"1g" => :service_team,
|
27
|
+
"1h" => :underwriter,
|
28
|
+
"1i" => :local_contact,
|
29
|
+
"3a" => :automated_clearinghouse_ach_contact,
|
30
|
+
"a1" => :claim_approver,
|
31
|
+
"a2" => :applicant,
|
32
|
+
"a3" => :interviewer,
|
33
|
+
"a4" => :owner_representative,
|
34
|
+
"a5" => :appointment_scheduler,
|
35
|
+
"a6" => :concurrent_employer_contact,
|
36
|
+
"aa" => :authorized_representative,
|
37
|
+
"ab" => :appraiser,
|
38
|
+
"ac" => :administrative_contracting_officer,
|
39
|
+
"ad" => :accounting_department,
|
40
|
+
"ae" => :corporate_purchasing_agent,
|
41
|
+
"af" => :authorized_financial_contact,
|
42
|
+
"ag" => :agent,
|
43
|
+
"ah" => :afterhours_contact,
|
44
|
+
"ai" => :additional_insurance_information_contact,
|
45
|
+
"aj" => :primary_contact,
|
46
|
+
"al" => :alternate_contactperson_to_be_contacted_when_the_main_contact_is_not_available,
|
47
|
+
"am" => :administrator,
|
48
|
+
"an" => :attentionto_partyparty_to_whose_attention_information_is_sent_via_us_post_office__us_mail,
|
49
|
+
"ap" => :accounts_payable_department,
|
50
|
+
"ar" => :accounts_receivable_department,
|
51
|
+
"as" => :authorized_signature,
|
52
|
+
"at" => :material_safety_data_sheet_contact,
|
53
|
+
"au" => :report_authorizer,
|
54
|
+
"av" => :advisor,
|
55
|
+
"aw" => :coinvestigator,
|
56
|
+
"ax" => :additional_contact_points_at_institutions,
|
57
|
+
"ba" => :broker,
|
58
|
+
"bb" => :local_purchasing_agent,
|
59
|
+
"bc" => :broker_contact,
|
60
|
+
"bd" => :buyer_name_or_department,
|
61
|
+
"bi" => :bill_inquiry_contactservice_provider_contact_for_making_inquires_about_information_on_the_invoice,
|
62
|
+
"bj" => :operations,
|
63
|
+
"bk" => :marketing_department,
|
64
|
+
"bl" => :technical_department,
|
65
|
+
"bm" => :work_broker_maintenance_manager,
|
66
|
+
"bp" => :school_principal,
|
67
|
+
"bs" => :board_staff,
|
68
|
+
"bu" => :business_unit_manager,
|
69
|
+
"c1" => :carrier_contact,
|
70
|
+
"c2" => :coborrower,
|
71
|
+
"ca" => :customer_contact_granting_appointment,
|
72
|
+
"cb" => :changed_by,
|
73
|
+
"cc" => :computer_systems_contact,
|
74
|
+
"cd" => :contract_contact,
|
75
|
+
"ce" => :certifier,
|
76
|
+
"cf" => :customer_engineera_person_who_maintains_or_repairs_computer_hardware_or_software,
|
77
|
+
"cg" => :chief_executive_officer,
|
78
|
+
"ch" => :change_order_approver,
|
79
|
+
"ci" => :chief_financial_officer,
|
80
|
+
"cj" => :chief_information_officer,
|
81
|
+
"ck" => :chairman_of_the_board,
|
82
|
+
"cl" => :chief_operating_officer,
|
83
|
+
"cm" => :container_manager,
|
84
|
+
"cn" => :general_contact,
|
85
|
+
"co" => :component_engineer,
|
86
|
+
"cp" => :cost_and_schedule_coordinator,
|
87
|
+
"cr" => :customer_relations,
|
88
|
+
"cs" => :cadcam_specialist,
|
89
|
+
"ct" => :claimant,
|
90
|
+
"cu" => :auditing_contact,
|
91
|
+
"cv" => :clearinghouse_contact,
|
92
|
+
"cw" => :confirmed_with,
|
93
|
+
"cx" => :payers_claim_officelocation_responsible_for_paying_bills_related_to_medical_care_received,
|
94
|
+
"cy" => :case_manager,
|
95
|
+
"cz" => :claim_recipient,
|
96
|
+
"da" => :directory_advertising_contactservice_provider_contact_for_questions_about_and_changes_to_directory_advertising,
|
97
|
+
"dc" => :delivery_contact,
|
98
|
+
"dd" => :division_director,
|
99
|
+
"de" => :design_engineer,
|
100
|
+
"df" => :director,
|
101
|
+
"di" => :delivery_instructions_contact,
|
102
|
+
"dm" => :division_manager,
|
103
|
+
"dn" => :dental_school_admissions_office,
|
104
|
+
"dv" => :development,
|
105
|
+
"e1" => :estimator,
|
106
|
+
"e2" => :evening_programs_office,
|
107
|
+
"ea" => :edi_coordinator,
|
108
|
+
"eb" => :entered_by,
|
109
|
+
"ec" => :emergency_contactshipper,
|
110
|
+
"ed" => :emergency_contactconsignee,
|
111
|
+
"ef" => :emergency_contactmilitary_traffic_management_command_mtmc,
|
112
|
+
"eg" => :engineering,
|
113
|
+
"em" => :emergency_contact,
|
114
|
+
"en" => :engineer,
|
115
|
+
"eo" => :executive_officer,
|
116
|
+
"ep" => :employer_contact,
|
117
|
+
"es" => :electronic_submission_recipient,
|
118
|
+
"ev" => :executive_vicepresident,
|
119
|
+
"ex" => :expeditor,
|
120
|
+
"fa" => :financial_aid_office,
|
121
|
+
"fb" => :coordinator,
|
122
|
+
"fc" => :forwarder_contact,
|
123
|
+
"fd" => :primary_control_point,
|
124
|
+
"ff" => :licensee,
|
125
|
+
"fl" => :foreclosing_lender_administrative_contact,
|
126
|
+
"fm" => :functional_manager,
|
127
|
+
"fn" => :joint_work_agent,
|
128
|
+
"fo" => :office_manager,
|
129
|
+
"fp" => :marketing_director,
|
130
|
+
"fq" => :staff,
|
131
|
+
"fr" => :compliance_officer,
|
132
|
+
"ga" => :graduate_fine_arts_office,
|
133
|
+
"gb" => :graduate_business_office,
|
134
|
+
"gc" => :guidance_counselor,
|
135
|
+
"ge" => :graduate_engineering_office,
|
136
|
+
"gr" => :graduate_admissions_office,
|
137
|
+
"hm" => :hazardous_material_contact,
|
138
|
+
"hr" => :human_resources,
|
139
|
+
"ic" => :information_contact,
|
140
|
+
"io" => :issuing_officer,
|
141
|
+
"ip" => :insured_party,
|
142
|
+
"is" => :law_firm,
|
143
|
+
"ka" => :authorized_negotiator,
|
144
|
+
"kb" => :preaward_survey_manager,
|
145
|
+
"kc" => :accepting_official,
|
146
|
+
"kp" => :attorney,
|
147
|
+
"kt" => :clerk_of_court,
|
148
|
+
"ld" => :law_school_admissions_office,
|
149
|
+
"lg" => :logistics_contact,
|
150
|
+
"ma" => :maintenance_contactservice_provider_contact_for_requesting_service_maintenance_or_reporting_problems,
|
151
|
+
"mb" => :mayor,
|
152
|
+
"mc" => :medical_contact,
|
153
|
+
"md" => :medical_admissions_office,
|
154
|
+
"me" => :manufacturing,
|
155
|
+
"mg" => :manager,
|
156
|
+
"mk" => :multiple_listing_service_staff,
|
157
|
+
"ml" => :multiple_listing_service_vendor,
|
158
|
+
"mm" => :customer_maintenance_manager,
|
159
|
+
"na" => :national_agent,
|
160
|
+
"nc" => :numerical_control_engineer,
|
161
|
+
"np" => :notary_public,
|
162
|
+
"nt" => :notification_contact,
|
163
|
+
"oa" => :other_adult,
|
164
|
+
"oc" => :order_contact,
|
165
|
+
"od" => :order_department,
|
166
|
+
"os" => :office_staff,
|
167
|
+
"ow" => :owner,
|
168
|
+
"pa" => :president,
|
169
|
+
"pb" => :plant_manager,
|
170
|
+
"pc" => :purchasing_contracting_officer_pcoperson_to_whom_a_warrant_has_been_issued_authorizing_that_person_to_obligate_funds_on_behalf_of_the_government,
|
171
|
+
"pd" => :project_director,
|
172
|
+
"pe" => :process_engineer,
|
173
|
+
"pf" => :price_administration,
|
174
|
+
"pg" => :program_director,
|
175
|
+
"ph" => :providerentity_providing_health_care_services,
|
176
|
+
"pi" => :preparera_firm_organization_or_individual_who_determines_the_tax_liability_from_information_supplied_by_the_taxpayer,
|
177
|
+
"pj" => :project_manager,
|
178
|
+
"pk" => :performance_evaluation_committee,
|
179
|
+
"pl" => :manufacturing_plant_contact,
|
180
|
+
"pm" => :product_manager,
|
181
|
+
"pn" => :probation_or_legal_officer,
|
182
|
+
"po" => :production_representativean_industrial_specialist_assigned_to_a_contract_administration_office_and_charged_with_production_surveillance_of_government_contracts_being_performed_in_the_plant_or_plants_under_the_production_representatives_cognizance,
|
183
|
+
"pp" => :program_manager,
|
184
|
+
"pq" => :parent_or_guardian,
|
185
|
+
"pr" => :prototype_coordinator,
|
186
|
+
"ps" => :personnel_department,
|
187
|
+
"pt" => :partner,
|
188
|
+
"pu" => :report_preparer,
|
189
|
+
"pv" => :participating_laboratory_contact,
|
190
|
+
"pw" => :principal_study_contact_or_author,
|
191
|
+
"px" => :purchase_service_providerentity_from_which_medical_supplies_may_be_bought,
|
192
|
+
"py" => :packager,
|
193
|
+
"pz" => :patientindividual_receiving_medical_care,
|
194
|
+
"qa" => :quality_assurance_contact,
|
195
|
+
"qc" => :quality_coordinator,
|
196
|
+
"qi" => :quality_inspector,
|
197
|
+
"qm" => :quality_manager,
|
198
|
+
"qp" => :quoting_partythe_party_that_actually_submitted_a_quote_in_response_to_a_request_for_quotation,
|
199
|
+
"qr" => :ordering_officeran_individual_authorized_to_place_orders_against_existing_contracts,
|
200
|
+
"qy" => :port_engineer,
|
201
|
+
"ra" => :rental_company_administrative_contact,
|
202
|
+
"rb" => :real_estate_property_occupant,
|
203
|
+
"rc" => :rebatechargeback_contact,
|
204
|
+
"rd" => :receiving_dock,
|
205
|
+
"re" => :receiving_contact,
|
206
|
+
"rf" => :real_estate_property_key_holder,
|
207
|
+
"rg" => :registrar,
|
208
|
+
"rp" => :responsible_person,
|
209
|
+
"rq" => :requestor,
|
210
|
+
"rs" => :rate_supervisor_or_clerk,
|
211
|
+
"rz" => :respondant,
|
212
|
+
"sa" => :sales_administration,
|
213
|
+
"sb" => :student,
|
214
|
+
"sc" => :schedule_contact,
|
215
|
+
"sd" => :shipping_department,
|
216
|
+
"se" => :service_organization,
|
217
|
+
"sf" => :student_in_absentia,
|
218
|
+
"sg" => :secretary,
|
219
|
+
"sh" => :shipper_contact,
|
220
|
+
"si" => :investigator,
|
221
|
+
"sj" => :spouse,
|
222
|
+
"sk" => :school_clerk,
|
223
|
+
"sl" => :collector,
|
224
|
+
"sm" => :submitting_contact,
|
225
|
+
"sn" => :study_submitter_contact,
|
226
|
+
"so" => :service_order_writer,
|
227
|
+
"sp" => :special_program_contact,
|
228
|
+
"sq" => :systems_administrator,
|
229
|
+
"sr" => :sales_representative_or_department,
|
230
|
+
"ss" => :supervisor,
|
231
|
+
"st" => :service_technician,
|
232
|
+
"su" => :supplier_contact,
|
233
|
+
"sv" => :service_manager,
|
234
|
+
"sw" => :social_services_worker,
|
235
|
+
"sy" => :secondary_taxpayertaxpayer_who_is_filing_jointly_with_the_primary_taxpayer,
|
236
|
+
"ta" => :traffic_administrator,
|
237
|
+
"tb" => :telephone_answering_service_contact,
|
238
|
+
"tc" => :college_of_education_admissions_office,
|
239
|
+
"td" => :tender_developer,
|
240
|
+
"te" => :treasurer,
|
241
|
+
"th" => :school_of_theology_admissions_office,
|
242
|
+
"tm" => :transmitterthe_firm_organization_or_individual_who_transmits_returns_electronically_to_a_taxing_authority,
|
243
|
+
"tn" => :tenant,
|
244
|
+
"tp" => :primary_taxpayertaxpayer_whose_social_security_number_or_employer_identification_number_is_used_as_the_primary_identification_number_for_the_filing,
|
245
|
+
"tr" => :technical_marketing_representative,
|
246
|
+
"ty" => :platform_maintenance_manager,
|
247
|
+
"ug" => :undergraduate_admissions_office,
|
248
|
+
"up" => :union_president,
|
249
|
+
"uq" => :processor,
|
250
|
+
"ur" => :ultimate_receiver,
|
251
|
+
"vm" => :school_of_veterinary_medicine_admissions_office,
|
252
|
+
"vp" => :vice_president,
|
253
|
+
"wh" => :warehouse,
|
254
|
+
"wi" => :witness,
|
255
|
+
"wr" => :technical_writer,
|
256
|
+
"wv" => :waiver_application_contact,
|
257
|
+
"zz" => :mutually_defined,
|
258
|
+
},
|
259
|
+
3 => {
|
260
|
+
"aa" => :international_telephone_access_codedialing_code_required_to_call_another_country_in_addition_to_the_number,
|
261
|
+
"ab" => :joint_facsimile_and_phone_number,
|
262
|
+
"ac" => :message_only_voice_numbertelephone_number_which_provides_automated_messages_only,
|
263
|
+
"ad" => :delivery_location_phone,
|
264
|
+
"ae" => :area_code,
|
265
|
+
"ap" => :alternate_telephone,
|
266
|
+
"as" => :answering_service,
|
267
|
+
"au" => :defense_switched_networkdepartment_of_defense_telecommunications_system_and_successor_of_the_automatic_voice_network_autovon,
|
268
|
+
"bn" => :beeper_number,
|
269
|
+
"bt" => :btx_numbergerman_communications_number_for_online_service_provided_through_the_deutsche_bundespost,
|
270
|
+
"ca" => :cable,
|
271
|
+
"cp" => :cellular_phone,
|
272
|
+
"dn" => :defense_data_network_ddndepartment_of_defense_dod_data_communications_system,
|
273
|
+
"ea" => :internet_email_addressinternet_based_electronic_mail_address_with_a_structure_of_addressee__domain_name__domain_name_extension,
|
274
|
+
"ed" => :electronic_data_interchange_access_number,
|
275
|
+
"em" => :electronic_mail,
|
276
|
+
"ex" => :telephone_extension,
|
277
|
+
"ft" => :federal_telecommunications_system_fts,
|
278
|
+
"fu" => :facsimile_user_identifier,
|
279
|
+
"fx" => :facsimile,
|
280
|
+
"hf" => :home_facsimile_number,
|
281
|
+
"hp" => :home_phone_number,
|
282
|
+
"it" => :international_telephone,
|
283
|
+
"mn" => :modem_number,
|
284
|
+
"np" => :night_telephone,
|
285
|
+
"of" => :other_residential_facsimile_number,
|
286
|
+
"ot" => :other_residential_telephone_number,
|
287
|
+
"pa" => :appointment_phone,
|
288
|
+
"pc" => :personal_cellular,
|
289
|
+
"pp" => :personal_phone,
|
290
|
+
"ps" => :packet_switching,
|
291
|
+
"sp" => :showing_phonephone_number_to_call_for_information_about_a_property_showing,
|
292
|
+
"te" => :telephone,
|
293
|
+
"tl" => :telex,
|
294
|
+
"tm" => :telemail,
|
295
|
+
"tn" => :teletex_numberteletex_is_specific_type_of_telex_service_provided_by_deutsche_bundespost,
|
296
|
+
"tx" => :twx,
|
297
|
+
"ur" => :uniform_resource_locator_url,
|
298
|
+
"vm" => :voice_mail,
|
299
|
+
"wc" => :work_cellular,
|
300
|
+
"wf" => :work_facsimile_number,
|
301
|
+
"wp" => :work_phone_number,
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
CODES[5], CODES[7] = [CODES[3]]*2
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|