Sha256: 557700afa20c508ee7261fc905d5f4897cb4f33703a4c6b7f582d69828471a9c

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

require 'roqua/healthy/a19/name_parser'

module Roqua
  module Healthy
    module A19
      # The CDIS EPD returns names in a format different from most other EPD vendors.
      # This parser overrides some methods that are affected by the differences.
      class CdisNameParser < NameParser
        def firstname
          names[:legal].fetch('PID.5.2')
        end

        def initials
          names[:legal].fetch('PID.5.3')
        end

        def lastname
          names[:legal].fetch('PID.5.1').fetch('PID.5.1.1')
        end

        def nickname
          return unless names[:nick]
          names[:nick].fetch('PID.5.2')
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
roqua-healthy-1.4.1 lib/roqua/healthy/a19/cdis_name_parser.rb