Created
March 22, 2012 05:00
-
-
Save rondale-sc/2156191 to your computer and use it in GitHub Desktop.
hippo-your-friend-in-5010
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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