Sha256: b019d91dbb94bdda19ef8627d878ba81cb4dcfcfebee2197740fdb26a80c58fc

Contents?: true

Size: 1.05 KB

Versions: 43

Compression:

Stored size: 1.05 KB

Contents

module Extensions
  module HL7
    module Segments
      module NK1

        def self.included base
          base.send :include, InstanceMethods
          base.extend ClassMethods
        end
        
        module InstanceMethods
          def to_hash
            @hash = {}
          end
        end
        
        module ClassMethods
          def index_for(field_name)
            return 1 if field_name == :set_id
            return 2 if field_name == :name           
            return 3 if field_name == :relationship
            return 4 if field_name == :address
            return 5 if field_name == :phone_number
            return 13 if field_name == :organization_name
            return 20 if field_name == :primary_language
            return 30 if field_name == :contact_persons_name
            return 31 if field_name == :contact_persons_telephone_number            
            return 32 if field_name == :contact_persons_address                                   
            return -1
          end
        end
        
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
ruby-hl7-extensions-0.4.8 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.7 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.6 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.5 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.4 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.3 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.2 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.1 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.4.0 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.3.6 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.3.4 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.3.3 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.3.2 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.3.1 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.2.2 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.2.1 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.2.0 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.9 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.8 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.7 lib/core_ext/segments/nk1.rb