Class: ConceptQL::Nodes::ConditionType

Inherits:
Node
  • Object
show all
Defined in:
lib/conceptql/nodes/condition_type.rb

Overview

Represents a node that will grab all conditions that match the condition type passed in

Condition Type represents which position the condition held in the raw data, e.g. primary inpatient header or 15th outpatient detail

Multiple types can be specified at once

Constant Summary

Constants inherited from Node

Node::KNOWN_TYPES

Instance Attribute Summary

Attributes inherited from Node

#values

Instance Method Summary collapse

Methods inherited from Node

#arguments, #children, #columns, #date_columns, #evaluate, #initialize, #select_it, #stream

Constructor Details

This class inherits a constructor from ConceptQL::Nodes::Node

Instance Method Details

#query(db) ⇒ Object



17
18
19
20
# File 'lib/conceptql/nodes/condition_type.rb', line 17

def query(db)
  db.from(:condition_occurrence_with_dates)
    .where(condition_type_concept_id: condition_occurrence_type_concept_ids)
end

#typesObject



13
14
15
# File 'lib/conceptql/nodes/condition_type.rb', line 13

def types
  [:condition_occurrence]
end