class Roqua::Healthy::A19::EpicNameParser
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.
Public Instance Methods
firstname()
click to toggle source
# File lib/roqua/healthy/a19/epic_name_parser.rb, line 10 def firstname names[:legal].fetch('PID.5.2') end
initials()
click to toggle source
# File lib/roqua/healthy/a19/epic_name_parser.rb, line 14 def initials [names[:legal]['PID.5.2'][0], names[:legal]['PID.5.3']].map(&:presence).join(' ').strip end
lastname()
click to toggle source
# File lib/roqua/healthy/a19/epic_name_parser.rb, line 18 def lastname names[:legal].fetch('PID.5.1').fetch('PID.5.1.1') end
nickname()
click to toggle source
# File lib/roqua/healthy/a19/epic_name_parser.rb, line 22 def nickname return unless names[:nick] names[:nick].fetch('PID.5.2') end