Class: ConceptQL::Operators::ConditionType

Inherits:
Operator
  • Object
show all
Defined in:
lib/conceptql/operators/condition_type.rb

Overview

Represents a operator 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 Operator

Operator::COLUMNS

Instance Attribute Summary

Attributes inherited from Operator

#arguments, #options, #upstreams, #values

Instance Method Summary collapse

Methods inherited from Operator

#columns, #evaluate, #initialize, #label, #select_it, #set_values, #sql, #stream, #types

Methods included from Metadatable

#allows_many_upstreams, #allows_one_upstream, #argument, #category, #desc, #humanized_class_name, #inherited, #just_class_name, #option, #predominant_types, #preferred_name, #reset_categories, #to_metadata, #types

Constructor Details

This class inherits a constructor from ConceptQL::Operators::Operator

Instance Method Details

#query(db) ⇒ Object



22
23
24
25
# File 'lib/conceptql/operators/condition_type.rb', line 22

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

#typeObject



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

def type
  :condition_occurrence
end