-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to implement #253, we needed to turn our current dynamic vocabularies system on its head. Originally we had a single class that would impersonate all the dynamically generated vocabularies. Now we actually create a proper class for each dynamically generated library and even create OMOP and GDM-based variants. Now that each vocabulary is properly represented as a class, we can modify individual classes to behave as we'd like, so we should be able to get dynamically generated operators to include lab values much more easily now. As with many large overhauls, I ran into other issues that I addressed along the way: - Validations we're working correctly and I've addressed an issue where identical warnings could stack up within the same operator - ICD10 is now properly a multi-vocabulary operator - Removed all hard-coded vocabulary-related operators except for Read - Put existing behaviors under ConceptQL::Behaviors - Reworked how requiring operators works
- Loading branch information
1 parent
4fb2b77
commit 3074438
Showing
752 changed files
with
3,327 additions
and
3,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
operator,vocabulary_id,domain | ||
CPT or HCPCS,CPT4,procedure_occurrence | ||
CPT or HCPCS,HCPCS,procedure_occurrence | ||
ICD10,ICD10CM,condition_occurrence | ||
ICD10,ICD10WHO,condition_occurrence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module ConceptQL | ||
module Behaviors | ||
module CodeLister | ||
ConceptCode = Struct.new(:vocabulary, :code, :description) do | ||
def to_s | ||
if description | ||
"#{vocabulary} #{code}: #{description}" | ||
else | ||
"#{vocabulary} #{code}" | ||
end | ||
end | ||
end | ||
|
||
def code_list(db) | ||
describe_codes(db, arguments).map do |code, desc| | ||
ConceptCode.new(preferred_name, code, desc) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
module ConceptQL | ||
module Drugish | ||
def self.included(base) | ||
base.require_column(:drug_name) | ||
base.require_column(:drug_amount) | ||
base.require_column(:drug_amount_units) | ||
base.require_column(:drug_quantity) | ||
base.require_column(:drug_days_supply) | ||
module Behaviors | ||
module Drugish | ||
def self.included(base) | ||
base.require_column(:drug_name) | ||
base.require_column(:drug_amount) | ||
base.require_column(:drug_amount_units) | ||
base.require_column(:drug_quantity) | ||
base.require_column(:drug_days_supply) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
module ConceptQL | ||
module Labish | ||
def self.included(base) | ||
base.require_column :value_as_number | ||
base.require_column :value_as_string | ||
base.require_column :value_as_concept_id | ||
base.require_column :unit_source_value | ||
base.require_column :range_low | ||
base.require_column :range_high | ||
module Behaviors | ||
module Labish | ||
def self.included(base) | ||
base.require_column :value_as_number | ||
base.require_column :value_as_string | ||
base.require_column :value_as_concept_id | ||
base.require_column :unit_source_value | ||
base.require_column :range_low | ||
base.require_column :range_high | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.