Class: Roqua::Healthy::A19::EpicNameParser
Overview
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.
Instance Attribute Summary
Attributes inherited from NameParser
#message
Instance Method Summary
collapse
Methods inherited from NameParser
#display_name, #initialize
Instance Method Details
#firstname ⇒ Object
10
11
12
|
# File 'lib/roqua/healthy/a19/epic_name_parser.rb', line 10
def firstname
names[:legal].fetch('PID.5.2')
end
|
#initials ⇒ Object
14
15
16
|
# 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 ⇒ Object
18
19
20
|
# 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 ⇒ Object
22
23
24
25
|
# File 'lib/roqua/healthy/a19/epic_name_parser.rb', line 22
def nickname
return unless names[:nick]
names[:nick].fetch('PID.5.2')
end
|