Sha256: 9cfa7ca67b7d013c950224e9ee3b07008afa88be228eaac0a7d7b0474d07de6c

Contents?: true

Size: 772 Bytes

Versions: 1

Compression:

Stored size: 772 Bytes

Contents

require_relative 'casting_operator'

module ConceptQL
  module Operators
    class Person < CastingOperator
      desc 'Returns all people in the database, or if given a upstream, converts all results to the set of patients contained in those results.'
      allows_one_upstream
      types :person

      def my_type
        :person
      end

      def i_point_at
        []
      end

      def these_point_at_me
        # I could list ALL the types we use, but the default behavior of casting,
        # when there is no explicit casting defined, is to convert everything to
        # person IDs
        #
        # So by defining no known castable relationships in this operator, all
        # types will be converted to person
        []
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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