Skip to content

Instantly share code, notes, and snippets.

@rondale-sc
Created March 22, 2012 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rondale-sc/2156191 to your computer and use it in GitHub Desktop.
Save rondale-sc/2156191 to your computer and use it in GitHub Desktop.
hippo-your-friend-in-5010
require 'hippo'
ts = Hippo::TransactionSets::HIPAA_835::Base.new
ts.ST do |st|
st.TransactionSetControlNumber = '0021'
st.ImplementationConventionReference = '1234random1241'
end
puts ts.to_s
# => ST*837*0021*005010X222A1~
# These two forms are functionally equivalent.
ts.L1000A do |l1000a|
l1000a.NM1.EntityTypeQualifier = '2'
l1000a.NM1.NameLastOrOrganizationName = 'PREMIER BILLING SERVICE'
l1000a.NM1.IdentificationCode = 'TGJ23'
end
puts ts.to_s
# => NM1*41*2*PREMIER BILLING SERVICE*****46*TGJ23~
# OR
ts.L1000A do |l1000a|
l1000a.NM1 do |nm1|
nm1.EntityTypeQualifier = '2'
nm1.NameLastOrOrganizationName = 'PREMIER BILLING SERVICE'
nm1.IdentificationCode = 'TGJ23'
end
end
puts ts.to_s
# => NM1*41*2*PREMIER BILLING SERVICE*****46*TGJ23~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment