Class: HealthDataStandards::Import::C32::OrganizationImporter
- Inherits:
-
SectionImporter
- Object
- SectionImporter
- HealthDataStandards::Import::C32::OrganizationImporter
- Includes:
- Singleton
- Defined in:
- lib/health-data-standards/import/c32/organization_importer.rb
Instance Attribute Summary
Attributes inherited from SectionImporter
Instance Method Summary collapse
- #extract_organization(org_element) ⇒ Object
-
#initialize ⇒ OrganizationImporter
constructor
A new instance of OrganizationImporter.
Methods inherited from SectionImporter
#create_entries, #create_entry, #lookup_tag
Constructor Details
#initialize ⇒ OrganizationImporter
Returns a new instance of OrganizationImporter.
7 8 9 |
# File 'lib/health-data-standards/import/c32/organization_importer.rb', line 7 def initialize end |
Instance Method Details
#extract_organization(org_element) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/health-data-standards/import/c32/organization_importer.rb', line 11 def extract_organization(org_element) return unless org_element org = Organization.new org.name = org_element.at_xpath("./cda:name | ./cda:representedOrganization/cda:name").try(:text) org.addresses = org_element.xpath("./cda:addr").map { |addr| import_address(addr) } org.telecoms = org_element.xpath("./cda:telecom").map { |tele| import_telecom(tele) } org end |