conceptql 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +64 -0
- data/config/vocabularies.csv +87 -87
- data/doc/spec.md +1951 -0
- data/lib/conceptql/behaviors/utilizable.rb +0 -2
- data/lib/conceptql/cli.rb +1 -1
- data/lib/conceptql/data_model/base.rb +1 -167
- data/lib/conceptql/data_model.rb +20 -4
- data/lib/conceptql/database.rb +2 -0
- data/lib/conceptql/lexicon/lexicon_strategy.rb +23 -3
- data/lib/conceptql/lexicon.rb +9 -1
- data/lib/conceptql/operators/co_reported.rb +4 -31
- data/lib/conceptql/operators/hospice.rb +1 -2
- data/lib/conceptql/operators/hospitalization.rb +1 -2
- data/lib/conceptql/operators/information_periods.rb +1 -3
- data/lib/conceptql/operators/one_in_two_out.rb +1 -2
- data/lib/conceptql/operators/operator.rb +3 -11
- data/lib/conceptql/operators/provenance.rb +1 -2
- data/lib/conceptql/operators/race.rb +2 -6
- data/lib/conceptql/operators/read.rb +1 -100
- data/lib/conceptql/operators/snf.rb +1 -2
- data/lib/conceptql/operators/vocabulary.rb +15 -2
- data/lib/conceptql/paths.rb +6 -0
- data/lib/conceptql/query.rb +5 -2
- data/lib/conceptql/rdbms/duckdb.rb +0 -4
- data/lib/conceptql/rdbms/generic.rb +0 -4
- data/lib/conceptql/rdbms/postgres.rb +0 -4
- data/lib/conceptql/rdbms/spark.rb +0 -4
- data/lib/conceptql/utils.rb +0 -43
- data/lib/conceptql/version.rb +1 -1
- data/lib/conceptql/vocabularies/entry.rb +0 -20
- data/lib/conceptql/vocabularies/vocabulary_class_factory.rb +2 -15
- metadata +16 -13
- data/lib/conceptql/data_model/omopv4_plus.rb +0 -12
- data/lib/conceptql/query_modifiers/omopv4_plus/admission_date_query_modifier.rb +0 -45
- data/lib/conceptql/query_modifiers/omopv4_plus/drug_query_modifier.rb +0 -80
- data/lib/conceptql/query_modifiers/omopv4_plus/pos_query_modifier.rb +0 -47
- data/lib/conceptql/query_modifiers/omopv4_plus/provenance_query_modifier.rb +0 -45
- data/lib/conceptql/query_modifiers/omopv4_plus/provider_query_modifier.rb +0 -26
- data/lib/conceptql/sql_formatters/formatter.rb +0 -25
- data/lib/conceptql/sql_formatters.rb +0 -22
- data/lib/conceptql/vocabularies/behaviors/costish.rb +0 -24
- data/lib/conceptql/vocabularies/behaviors/omopish.rb +0 -32
- data/schemas/omopv4_plus.yml +0 -729
- data/schemas/omopv4_plus_more_ignorables.tsv +0 -13
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "../../operators/vocabulary"
|
|
4
|
-
|
|
5
|
-
module ConceptQL
|
|
6
|
-
module Vocabularies
|
|
7
|
-
module Behaviors
|
|
8
|
-
module Costish
|
|
9
|
-
def query(db)
|
|
10
|
-
costs = db[:procedure_cost].where(column_to_search => values).select(:procedure_occurrence_id)
|
|
11
|
-
db[:procedure_occurrence].where(procedure_occurrence_id: costs)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def table
|
|
15
|
-
:procedure_occurrence
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def column_to_search
|
|
19
|
-
vocab_entry.id == "revenue_code" ? :revenue_code_source_value : :disease_class_source_value
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ConceptQL
|
|
4
|
-
module Vocabularies
|
|
5
|
-
module Behaviors
|
|
6
|
-
module Omopish
|
|
7
|
-
# Overrides Operator#tables
|
|
8
|
-
def tables
|
|
9
|
-
domains
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def vocabulary_condition
|
|
13
|
-
{ dm.source_vocabulary_id(domain) => vocabulary_id.to_i }
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def where_clause(_db)
|
|
17
|
-
conds = vocabulary_condition
|
|
18
|
-
conds[dm.source_value_column(domain)] = arguments unless select_all?
|
|
19
|
-
conds
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def query_cols
|
|
23
|
-
dm.table_columns(domain)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def translated_vocabulary_id
|
|
27
|
-
vocab_entry.omopv4_id
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|