class ConceptQL::Operators::PlaceOfServiceCode

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

Public Instance Methods

query(db) click to toggle source
# File lib/conceptql/operators/place_of_service_code.rb, line 23
def query(db)
  db.from(:visit_occurrence___v)
    .join(:concept___c, { c__concept_id: Sequel.cast(:v__visit_source_concept_id, :bigint) })
    .where(c__concept_code: arguments.map(&:to_s))
    .where(c__vocabulary_id: 14)
end