Module: Extensions::HL7::Segments::IN1::InstanceMethods
- Defined in:
- lib/core_ext/segments/in1.rb
Instance Method Summary collapse
Instance Method Details
#insurance_co ⇒ Object
12 13 14 |
# File 'lib/core_ext/segments/in1.rb', line 12 def insurance_co self.value_for_field("4") end |
#insurance_plan ⇒ Object
16 17 18 |
# File 'lib/core_ext/segments/in1.rb', line 16 def insurance_plan self.value_for_field("2.2") end |
#insured_address ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/core_ext/segments/in1.rb', line 31 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 |
#insured_name ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/core_ext/segments/in1.rb', line 20 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 |