Class: HealthDataStandards::Import::Cat1::EntryPackage

Inherits:
Object
  • Object
show all
Defined in:
lib/health-data-standards/import/cat1/entry_package.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, oid, stat = nil) ⇒ EntryPackage

Returns a new instance of EntryPackage.



8
9
10
11
12
# File 'lib/health-data-standards/import/cat1/entry_package.rb', line 8

def initialize (type, oid, stat = nil)
  self.importer_type = type
  self.hqmf_oid = oid
  self.status = stat
end

Instance Attribute Details

#hqmf_oidObject

Returns the value of attribute hqmf_oid.



6
7
8
# File 'lib/health-data-standards/import/cat1/entry_package.rb', line 6

def hqmf_oid
  @hqmf_oid
end

#importer_typeObject

Returns the value of attribute importer_type.



6
7
8
# File 'lib/health-data-standards/import/cat1/entry_package.rb', line 6

def importer_type
  @importer_type
end

#statusObject

Returns the value of attribute status.



6
7
8
# File 'lib/health-data-standards/import/cat1/entry_package.rb', line 6

def status
  @status
end

Instance Method Details

#package_entries(doc, nrh) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/health-data-standards/import/cat1/entry_package.rb', line 14

def package_entries (doc, nrh)
  entries = self.importer_type.create_entries(doc, nrh)
  entries.each do |entry| 
    entry.oid = self.hqmf_oid
    entry.status = self.status
  end          
  entries
end