Class: RxNav::Interaction

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/rx_nav/interaction.rb

Instance Method Summary collapse

Constructor Details

#initialize(interaction_hash) ⇒ Interaction

Returns a new instance of Interaction.



6
7
8
9
10
11
12
# File 'lib/rx_nav/interaction.rb', line 6

def initialize interaction_hash
  concepts = interaction_hash[:group_concepts][:concept]

  @drugs    = extract_drugs concepts
  @nui      = extract_interaction_id concepts
  @severity = interaction_hash[:severity]
end