Sha256: 8f9cf62b224e3523097f506898ade53cdb12de27a13bc7bc309258735b49f3b9
Contents?: true
Size: 1.12 KB
Versions: 23
Compression:
Stored size: 1.12 KB
Contents
module Extensions module HL7 module Segments module IN1 def self.included base base.send :include, InstanceMethods base.extend ClassMethods end module InstanceMethods def insurance_co self.value_for_field("4") end def insurance_plan self.value_for_field("2.2") end def insured_name lname = self.value_for_field("16.1") fname = self.value_for_field("16.2") middle = self.value_for_field("16.3") if !lname.blank? and !fname.blank? "#{lname}, #{fname} #{middle}" elsif !lname.blank? lname end end def insured_address if self.value_for_field("19") address1, address2, city, state, zip = self.value_for_field("19").split(@item_delim) "#{address1}#{address2.blank? ? "," : ", #{address2},"} #{city}, #{state}, #{zip}" else "" end end end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems