From 2781d6681311f919f884f6a3fe3db960feaf8242 Mon Sep 17 00:00:00 2001 From: Ryan Duryea Date: Tue, 2 May 2023 10:27:36 -0700 Subject: [PATCH] Final set of edits for descriptions, refs #237 --- lib/conceptql/operators/after.rb | 2 +- lib/conceptql/operators/any_overlap.rb | 2 +- lib/conceptql/operators/before.rb | 2 +- lib/conceptql/operators/co_reported.rb | 3 ++- lib/conceptql/operators/contains.rb | 2 +- lib/conceptql/operators/during.rb | 2 +- lib/conceptql/operators/equal.rb | 3 ++- lib/conceptql/operators/first.rb | 2 +- lib/conceptql/operators/last.rb | 2 +- lib/conceptql/operators/numeric_filter.rb | 2 +- lib/conceptql/operators/one_in_two_out.rb | 7 ++----- lib/conceptql/operators/person.rb | 3 ++- lib/conceptql/operators/provenance.rb | 2 +- lib/conceptql/operators/trim_date_end.rb | 2 +- lib/conceptql/operators/trim_date_start.rb | 2 +- lib/conceptql/operators/union.rb | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/conceptql/operators/after.rb b/lib/conceptql/operators/after.rb index 3f3cb0f7..d9582d47 100644 --- a/lib/conceptql/operators/after.rb +++ b/lib/conceptql/operators/after.rb @@ -5,7 +5,7 @@ module Operators class After < TemporalOperator register __FILE__ - desc "Compares records on a person-by-person basis, passes along left hand records with a start_date that occurs after the earliest end_date of a right hand record." + desc "For each person, passes along left hand records with a start_date that occurs after the earliest end_date of a right hand record." allows_at_least_option within_skip :after diff --git a/lib/conceptql/operators/any_overlap.rb b/lib/conceptql/operators/any_overlap.rb index 2c2debf2..58498fe4 100644 --- a/lib/conceptql/operators/any_overlap.rb +++ b/lib/conceptql/operators/any_overlap.rb @@ -5,7 +5,7 @@ module Operators class AnyOverlap < TemporalOperator register __FILE__ - desc "Compares records on a person-by-person basis and passes along left hand records with a date range that overlaps in any way with a right hand record's date_range." + desc "For each person, passes along left hand records with a date range that overlaps in any way with a right hand record's date_range." def where_clause ((within_start <= l_start_date) & (l_start_date <= within_end)) | ((l_start_date <= within_start) & (within_start <= l_end_date)) diff --git a/lib/conceptql/operators/before.rb b/lib/conceptql/operators/before.rb index 8d5f9fbc..6301c855 100644 --- a/lib/conceptql/operators/before.rb +++ b/lib/conceptql/operators/before.rb @@ -5,7 +5,7 @@ module Operators class Before < TemporalOperator register __FILE__ - desc "Compares records on a person-by-person basis, passes along left hand records with an end_date that occurs before the most recent start_date of a right hand record." + desc "For each person, passes along left hand records with an end_date that occurs before the most recent start_date of a right hand record." allows_at_least_option within_skip :before diff --git a/lib/conceptql/operators/co_reported.rb b/lib/conceptql/operators/co_reported.rb index bfa746e7..f43086b3 100644 --- a/lib/conceptql/operators/co_reported.rb +++ b/lib/conceptql/operators/co_reported.rb @@ -6,7 +6,8 @@ module Operators class CoReported < PassThru register __FILE__ - desc 'Passes along all events that were co-reported in a database. For GDM, an event is considered to be "co-reported" if it shares the same context_id as another event.' + desc "Passes along all events that were co-reported in the same record in the source data." + allows_many_upstreams category "Combine Streams" default_query_columns diff --git a/lib/conceptql/operators/contains.rb b/lib/conceptql/operators/contains.rb index 5fa8eb08..b9bb75ab 100644 --- a/lib/conceptql/operators/contains.rb +++ b/lib/conceptql/operators/contains.rb @@ -5,7 +5,7 @@ module Operators class Contains < TemporalOperator register __FILE__ - desc "Compares records on a person-by-person basis and passes along left hand records with a start_date and end_date contained within a right hand record's start_date and end_date." + desc "For each person, passes along left hand records with a start_date and end_date containing a right hand record's start_date and end_date." def where_clause (within_start <= r_start_date) & (r_end_date <= within_end) diff --git a/lib/conceptql/operators/during.rb b/lib/conceptql/operators/during.rb index 6ffd2c87..d6795ce3 100644 --- a/lib/conceptql/operators/during.rb +++ b/lib/conceptql/operators/during.rb @@ -5,7 +5,7 @@ module Operators class During < TemporalOperator register __FILE__ - desc "Compares records on a person-by-person basis and passes along left hand records with a start_date within a right hand record's start_date and end_date." + desc "For each person, passes along left hand records with a start_date and end_date within a right hand record's start_date and end_date." def where_clause (within_start <= l_start_date) & (l_end_date <= within_end) diff --git a/lib/conceptql/operators/equal.rb b/lib/conceptql/operators/equal.rb index 926eab8b..28c6f8a3 100644 --- a/lib/conceptql/operators/equal.rb +++ b/lib/conceptql/operators/equal.rb @@ -5,7 +5,8 @@ module Operators class Equal < TemporalOperator register __FILE__ - desc 'Compares records on a person-by-person basis and passes along left hand records that have the same value_as_number as a right hand record.' + desc 'For each person, passes along left hand records that have the same value_as_number as a right hand record.' + require_column :value_as_number def where_clause diff --git a/lib/conceptql/operators/first.rb b/lib/conceptql/operators/first.rb index d63378cd..0db87bb8 100644 --- a/lib/conceptql/operators/first.rb +++ b/lib/conceptql/operators/first.rb @@ -17,7 +17,7 @@ module Operators class First < Occurrence register __FILE__ - desc "Passes along, per person, the record with the earliest start_date." + desc "For each person, passes along the record with the earliest start_date." def occurrence 1 diff --git a/lib/conceptql/operators/last.rb b/lib/conceptql/operators/last.rb index 68daaa5d..5093dc07 100644 --- a/lib/conceptql/operators/last.rb +++ b/lib/conceptql/operators/last.rb @@ -17,7 +17,7 @@ module Operators class Last < Occurrence register __FILE__ - desc "Passes along, per person, the record with the most recent start_date." + desc "For each person, passes along the record with the most recent start_date." def occurrence -1 diff --git a/lib/conceptql/operators/numeric_filter.rb b/lib/conceptql/operators/numeric_filter.rb index 07536f24..a19cd99a 100644 --- a/lib/conceptql/operators/numeric_filter.rb +++ b/lib/conceptql/operators/numeric_filter.rb @@ -11,7 +11,7 @@ module Operators class NumericFilter < Operator register __FILE__ - desc 'Includes records with a value_as_number that matches the given criteria. Excludes records where value_as_number is NULL.' + desc "Includes records with a value_as_number that match the given criteria." option :greater_than_or_equal_to, type: :float option :less_than_or_equal_to, type: :float diff --git a/lib/conceptql/operators/one_in_two_out.rb b/lib/conceptql/operators/one_in_two_out.rb index 3db6e79b..3e870daf 100644 --- a/lib/conceptql/operators/one_in_two_out.rb +++ b/lib/conceptql/operators/one_in_two_out.rb @@ -7,11 +7,8 @@ module Operators class OneInTwoOut < Operator register __FILE__ - desc <<-EOF -Applies a common pattern in research algorithms by searching for an event -that appears either once in an inpatient setting or -twice in an outpatient setting with a specified gap. - EOF + desc 'Identifies an event that appears either once in an inpatient setting or twice within a specified interval in an outpatient setting.' + allows_one_upstream validate_one_upstream validate_no_arguments diff --git a/lib/conceptql/operators/person.rb b/lib/conceptql/operators/person.rb index 6ebcf7b8..d47e147f 100644 --- a/lib/conceptql/operators/person.rb +++ b/lib/conceptql/operators/person.rb @@ -8,7 +8,8 @@ class Person < CastingOperator register __FILE__ - desc "Selects all person records." + desc "Selects all records in the person table." + allows_one_upstream domains :person diff --git a/lib/conceptql/operators/provenance.rb b/lib/conceptql/operators/provenance.rb index abedbf7d..959746e4 100644 --- a/lib/conceptql/operators/provenance.rb +++ b/lib/conceptql/operators/provenance.rb @@ -16,7 +16,7 @@ module Operators class Provenance < Operator register __FILE__ - desc "Passes along records with the indicated provenance." + desc "Passes along records with the indicated provenance (e.g. inpatient, outpatient, file type)." argument :provenance_types, label: 'Provenance Types', type: :codelist category "Filter Single Stream" diff --git a/lib/conceptql/operators/trim_date_end.rb b/lib/conceptql/operators/trim_date_end.rb index be32b8cf..1f6c826f 100644 --- a/lib/conceptql/operators/trim_date_end.rb +++ b/lib/conceptql/operators/trim_date_end.rb @@ -15,7 +15,7 @@ module Operators class TrimDateEnd < TrimDate register __FILE__ - desc "Trims, on a person-by-person basis, the end_date of all left hand records by the earliest start_date in the right hand records." + desc "For each person, trims the end_date of all left hand records by the earliest start_date in the right hand records." allows_one_upstream diff --git a/lib/conceptql/operators/trim_date_start.rb b/lib/conceptql/operators/trim_date_start.rb index 136c1b28..c30dd566 100644 --- a/lib/conceptql/operators/trim_date_start.rb +++ b/lib/conceptql/operators/trim_date_start.rb @@ -15,7 +15,7 @@ module Operators class TrimDateStart < TrimDate register __FILE__ - desc "Trims, on a person-by-person basis, the start_date of all left hand records by the most recent end_date in the right hand records." + desc "For each person, trims the start_date of all left hand records by the most recent end_date in the right hand records." allows_one_upstream diff --git a/lib/conceptql/operators/union.rb b/lib/conceptql/operators/union.rb index f0f2657f..e4d99400 100644 --- a/lib/conceptql/operators/union.rb +++ b/lib/conceptql/operators/union.rb @@ -27,7 +27,7 @@ def queries(db) end end - desc 'Pools sets of incoming records into a single large set of records.' + desc 'Combines sets of incoming records into a single large set of records.' allows_many_upstreams category "Combine Streams" default_query_columns