Class: ConceptQL::Operators::PlaceOfServiceCode
- Defined in:
- lib/conceptql/operators/place_of_service_code.rb
Overview
Represents a operator that will grab all person rows that match the given place_of_service_codes
PlaceOfServiceCode parameters are passed in as a set of strings. Each string represents a single place_of_service_code. The place_of_service_code string must match one of the values in the concept_name column of the concept table. If you misspell the place_of_service_code name you won’t get any matches
Constant Summary
Constants inherited from Operator
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
16 17 18 19 20 21 |
# File 'lib/conceptql/operators/place_of_service_code.rb', line 16 def query(db) db.from(:visit_occurrence___v) .join(:vocabulary__concept___vc, { vc__concept_id: :v__place_of_service_concept_id }) .where(vc__concept_code: arguments.map(&:to_s)) .where(vc__vocabulary_id: 14) end |