Sha256: 76c8b26de178cdfe1991444546415ac18f22ccefe4d5d2eaa00ddc82f50de0c4
Contents?: true
Size: 763 Bytes
Versions: 9
Compression:
Stored size: 763 Bytes
Contents
# frozen_string_literal: true 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 EpicNameParser < NameParser def firstname names[:legal].fetch('PID.5.2') end def initials [names[:legal]['PID.5.2'][0], names[:legal]['PID.5.3']].map(&:presence).join(' ').strip 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
9 entries across 9 versions & 1 rubygems