Sha256: 76fcf2fda4e0d0a58f0dacffc643593278b27758c303aff6a9d481767a157357

Contents?: true

Size: 432 Bytes

Versions: 1

Compression:

Stored size: 432 Bytes

Contents

require_relative 'operator'

module ConceptQL
  module Operators
    class DrugTypeConcept < Operator
      desc 'Given a set of concept IDs in RxNorm, returns that set of drug exposures'
      argument :concept_ids, type: :codelist, vocab: 'RxNorm'

      def type
        :drug_exposure
      end

      def query(db)
        db.from(:drug_exposure)
          .where(drug_type_concept_id: arguments)
      end
    end
  end
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conceptql-0.2.0 lib/conceptql/operators/drug_type_concept.rb