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.1.6 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.5 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.4 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.3 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.2 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.1 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.1.0 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.84 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.83 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.82 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.81 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.80 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.79 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.78 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.77 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.76 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.75 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.74 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.73 lib/core_ext/segments/nk1.rb
ruby-hl7-extensions-0.0.72 lib/core_ext/segments/nk1.rb