conceptql 0.4.1 → 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 +44 -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/version.rb +1 -1
- data/lib/conceptql/vocabularies/entry.rb +0 -20
- data/lib/conceptql/vocabularies/vocabulary_class_factory.rb +2 -15
- metadata +2 -11
- 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/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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 765ed8955407259730aefd31f2062c0414dfcada248f171d9f0b903d6e304ca8
|
|
4
|
+
data.tar.gz: 8873e43bb80c25b5ef6f12c2c1cd3665e3c9bf0422bfc7f83d32de3f357be65f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c25623713499c6538146a8321d03081703f5b09012f53ab7ec54989e617e63c35f3e1912803030a30280d16bfd6951961bbeb44602a62afcfca5af688aebade1
|
|
7
|
+
data.tar.gz: e45862d4968dc501e3d42b59b83f404c36b48ccc8691986100771b899715889cf5e9731329e56bf84f9ee55f487db32ba0c19e8fae998857b3cbfb41c0165301
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,50 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.5.0] - 2026-10-29
|
|
8
|
+
|
|
9
|
+
### Removed
|
|
10
|
+
|
|
11
|
+
- **Breaking:** the `omopv4_plus` data model (OMOP CDM v4) is gone. ConceptQL now supports
|
|
12
|
+
only `gdm` and `gdm_wide`. A `ConceptQL::Database` created with `data_model: :omopv4_plus`
|
|
13
|
+
raises `ConceptQL::DataModel::UnsupportedError`, which says that the model was removed.
|
|
14
|
+
The OMOP query modifiers, `schemas/omopv4_plus.yml`, the OMOP part of the `read` operator,
|
|
15
|
+
the OMOP and cost vocabulary behaviors, the `omopv4_vocabulary_id` column of
|
|
16
|
+
`config/vocabularies.csv` and the rake task `test_omopv4_plus` are removed with it. The
|
|
17
|
+
OHDSI vocabularies (`ohdsi_vocabs`) are not affected. The SQL for `gdm` and `gdm_wide` does
|
|
18
|
+
not change.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- The gem ships the specification, `doc/spec.md`. `ConceptQL.spec_path` returns its path, so
|
|
23
|
+
applications can serve it without building a path into the gem directory. The Jigsaw
|
|
24
|
+
diagram editor serves it to agents over MCP.
|
|
25
|
+
- Annotate warns about a selected code that has more than one meaning in the vocabulary, with
|
|
26
|
+
the warning "code(s) with more than one meaning". Each item names the code and all of its
|
|
27
|
+
distinct names, for example DRG 410, which meant chemotherapy until 2007-09-30 and a biliary
|
|
28
|
+
tract procedure after that. `Lexicon#code_meanings` is the new cached lookup behind it.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- The `co_reported` description now says that a source record is kept only if every upstream
|
|
33
|
+
stream has an event in it, and that the events of all streams in any other record are
|
|
34
|
+
dropped without a warning. It no longer mentions OMOP visits. The spec has a new `co_reported` section that says the same. The
|
|
35
|
+
operator's behavior does not change. Applications that show operator descriptions (the
|
|
36
|
+
Jigsaw diagram editor) show the new text.
|
|
37
|
+
- The specification (`doc/spec.md` and its source `doc/spec.md.cql`) now describes GDM
|
|
38
|
+
instead of OMOP CDM v4. Every example statement now validates on `gdm_wide`. Each example
|
|
39
|
+
table comes from the DuckDB test fixture, with the columns `criterion_table` and
|
|
40
|
+
`criterion_domain` instead of `criterion_type`. The diagrams are drawn again from the same
|
|
41
|
+
data. Examples that used removed operators (`intersect`, `complement`, `primary_diagnosis`,
|
|
42
|
+
`place_of_service_code`, `visit_occurrence`, `procedure_cost`, `payer`, `value`,
|
|
43
|
+
`greater_than`) now use `filter`, `provenance`, `hospitalization`, `co_reported` and
|
|
44
|
+
`numeric_filter`, or are removed. The removed sections are "Intersect", "Complement",
|
|
45
|
+
"Casting to a visit_occurrence", "Cast all the Things!", the intersect question in
|
|
46
|
+
"Discussion about Set Operators", and "How to Handle fact_relationship Table from CDMv5".
|
|
47
|
+
The new sections are "Filter" and "Casting to death". The Appendix C proposal "Filter
|
|
48
|
+
Operator" is now "`as` Option for Filter", because the filter operator exists. "Time Windows" is now a `##` section,
|
|
49
|
+
so that no section is larger than about 23 KB.
|
|
50
|
+
|
|
7
51
|
## [0.4.1] - 2026-10-28
|
|
8
52
|
|
|
9
53
|
### Changed
|
data/config/vocabularies.csv
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
id,
|
|
2
|
-
ADMSRCE,
|
|
3
|
-
ADMTYPE,
|
|
4
|
-
ATC,
|
|
5
|
-
BETOS,
|
|
6
|
-
Clinical Code Type,
|
|
7
|
-
Concept Class,
|
|
8
|
-
Condition Type,
|
|
9
|
-
CPT4,
|
|
10
|
-
CPT4_HCPCS
|
|
11
|
-
CS_Schema,
|
|
12
|
-
Currency,
|
|
13
|
-
Death Type,
|
|
14
|
-
Device Type,
|
|
15
|
-
Domain,
|
|
16
|
-
DRG,
|
|
17
|
-
DrugTextString,
|
|
18
|
-
Drug Type,
|
|
19
|
-
DURATION_UNIT,
|
|
20
|
-
Ethnicity,
|
|
21
|
-
Gemscript
|
|
22
|
-
Gender,
|
|
23
|
-
HCFASPEC,
|
|
24
|
-
HCFATYPE,
|
|
25
|
-
HCPCS,
|
|
26
|
-
ICD03_Morphology,
|
|
27
|
-
ICD03_Topography,
|
|
28
|
-
ICD10,
|
|
29
|
-
ICD10PCS,
|
|
30
|
-
ICD10CM,
|
|
31
|
-
ICD9CM,
|
|
32
|
-
ICD9Proc,
|
|
33
|
-
LOINC,
|
|
34
|
-
GDM_CEN_TRACT_MEAS,
|
|
35
|
-
SEER_YOST_ACS_06_10,
|
|
36
|
-
SEER_YOST_ACS_10_14,
|
|
37
|
-
SEER_YOST_ACS_13_17,
|
|
38
|
-
MARCLA_OBS_TYPE,
|
|
39
|
-
Meas Type,
|
|
40
|
-
NDC,
|
|
41
|
-
Note Type,
|
|
42
|
-
NUCC,
|
|
43
|
-
Observation Type,
|
|
44
|
-
Obs Period Type,
|
|
45
|
-
OI_FILE_TYPE,
|
|
46
|
-
OI_INFORMATION_TYPE,
|
|
47
|
-
OI_PROV,
|
|
48
|
-
Place of Service,
|
|
49
|
-
PLCSRVC,
|
|
50
|
-
Procedure Type,
|
|
51
|
-
PROVIDER_FACILITY_TYPE,
|
|
52
|
-
Race,
|
|
53
|
-
Relationship,
|
|
54
|
-
Revenue Code,
|
|
55
|
-
RxNorm,
|
|
56
|
-
SEER_ADJAJC6M,
|
|
57
|
-
SEER_ADJAJC6N,
|
|
58
|
-
SEER_ADJAJC6T,
|
|
59
|
-
SEER_BEH,
|
|
60
|
-
SEER_CENSUS_POV_IND,
|
|
61
|
-
SEER_DAJCC7,
|
|
62
|
-
SEER_DAJCCSTG,
|
|
63
|
-
SEER_DXCONF,
|
|
64
|
-
SEER_GRADE,
|
|
65
|
-
SEER_LAT,
|
|
66
|
-
SEER_MARST,
|
|
67
|
-
SEER_MSEX,
|
|
68
|
-
SEER_NHIADE,
|
|
69
|
-
SEER_NOSRG,
|
|
70
|
-
SEER_RAD,
|
|
71
|
-
SEER_RADSURG,
|
|
72
|
-
SEER_SEQ,
|
|
73
|
-
SEER_SITERWHO,
|
|
74
|
-
SEER_SRACE,
|
|
75
|
-
SEER_SRC,
|
|
76
|
-
SEER_SXPRIF,
|
|
77
|
-
SEER_SXSITF,
|
|
78
|
-
SEER_TYPEFU,
|
|
79
|
-
SEER_URBRUR,
|
|
80
|
-
SNOMED,
|
|
81
|
-
Specialty,
|
|
82
|
-
STUS_CD,
|
|
83
|
-
TYPESRVC,
|
|
84
|
-
UCUM,
|
|
85
|
-
Visit,
|
|
86
|
-
Visit Type,
|
|
87
|
-
Vocabulary,
|
|
1
|
+
id,vocabulary_full_name,vocabulary_short_name,domain,hidden,format_regexp,aliases,requires_lexicon
|
|
2
|
+
ADMSRCE,ADMSRCE,,,,,,
|
|
3
|
+
ADMTYPE,ADMTYPE,,,,,,
|
|
4
|
+
ATC,WHO Anatomic Therapeutic Chemical Classification,WHO ATC,drug_exposure,,"^[ABCDGHJLMNPRSVabcdghjlmnprsv](\d{2}([A-Za-z]{1,2}(\d{2})?)?)?$",,
|
|
5
|
+
BETOS,BETOS,,,,,,
|
|
6
|
+
Clinical Code Type,Clinical Code Type,,,,,,
|
|
7
|
+
Concept Class,OMOP Concept Class,,,Y,,,
|
|
8
|
+
Condition Type,OMOP Condition Occurrence Type,,condition_occurrence,Y,,,
|
|
9
|
+
CPT4,Current Procedural Terminology version 4 (AMA),CPT,procedure_occurrence,,"^\w\d{3}\w$",cpt,
|
|
10
|
+
CPT4_HCPCS,CPT4 and HCPCS merged (OI supplemental),CPT4/HCPCS,procedure_occurrence,,"^\w\d{3}\w$",,Y
|
|
11
|
+
CS_Schema,CS_Schema,,,,,,
|
|
12
|
+
Currency,International Currency Symbol (ISO 4217),,,Y,,,
|
|
13
|
+
Death Type,OMOP Death Type,,death,Y,,,
|
|
14
|
+
Device Type,OMOP Device Type,,observation,Y,,,
|
|
15
|
+
Domain,OMOP Domain,,,Y,,,
|
|
16
|
+
DRG,Diagnosis-related group (CMS),DRG,procedure_occurrence,,"^\d{3}$",,
|
|
17
|
+
DrugTextString,Drug Text String,Drug Text String,drug_exposure,,,,
|
|
18
|
+
Drug Type,OMOP Drug Exposure Type,,drug_exposure,Y,,,
|
|
19
|
+
DURATION_UNIT,DURATION_UNIT,,,,,,
|
|
20
|
+
Ethnicity,OMOP Ethnicity,,person,Y,,,
|
|
21
|
+
Gemscript,,Gemscript,drug_exposure,,"^\d{8}$",,
|
|
22
|
+
Gender,OMOP Gender,,person,Y,,,
|
|
23
|
+
HCFASPEC,HCFASPEC,,,,,,
|
|
24
|
+
HCFATYPE,HCFATYPE,,,,,,
|
|
25
|
+
HCPCS,Healthcare Common Procedure Coding System (CMS),HCPCS,procedure_occurrence,,"^[A-Za-z]\d{4}$",,
|
|
26
|
+
ICD03_Morphology,ICD03_Morphology,,,,"^\d{4}/\d$",,
|
|
27
|
+
ICD03_Topography,ICD03_Topography,,,,"^[A-Za-z]\d{2}(\.\d{1,2})?$",,
|
|
28
|
+
ICD10,"International Classification of Diseases, Tenth Revision (WHO)",ICD-10 WHO,condition_occurrence,,"^([A-Za-z][0-9][0-9A-Za-z](\.\w{1,4})?|[A-Za-z][0-9][0-9A-Za-z]-[A-Za-z][0-9][0-9A-Za-z]|(?:I|II|III|IV|V|VI|VII|VIII|IX|X|XI|XII|XIII|XIV|XV|XVI|XVII|XVIII|XIX|XX|XXI|XXII))$",,
|
|
29
|
+
ICD10PCS,"ICD-10 Procedure Coding System (CMS)",ICD-10 PCS,procedure_occurrence,,"^[0-9BCDFGHX][0-9A-HJ-NP-Z]{6}$",icd10_pcs,
|
|
30
|
+
ICD10CM,"International Classification of Diseases, Tenth Revision, Clinical Modification (NCHS)",ICD-10 CM,condition_occurrence,,"^(?:QA[0-9]|[A-Za-z][0-9][0-9ABab])(\.[0-9A-Za-z]{1,4})?$",,
|
|
31
|
+
ICD9CM,"International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)",ICD-9 CM,condition_occurrence,,"^(V\d{2}(\.\d{1,2})?|\d{3}(\.\d{1,2})?|E\d{3}(\.\d)?)$",icd9,
|
|
32
|
+
ICD9Proc,"International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 3 (NCHS)",ICD-9 Proc,procedure_occurrence,,"^\d{2}(\.\d{1,2})?$",icd9_procedure,
|
|
33
|
+
LOINC,Logical Observation Identifiers Names and Codes (Regenstrief Institute),,observation,,"^\w{3,7}-\w$",,
|
|
34
|
+
GDM_CEN_TRACT_MEAS,Census Tract Measures from SEER,,observation,,,,
|
|
35
|
+
SEER_YOST_ACS_06_10,SEER's Yost Index calculated from ACS 2006-2010,,observation,,,,
|
|
36
|
+
SEER_YOST_ACS_10_14,SEER's Yost Index calculated from ACS 2010-2014,,observation,,,,
|
|
37
|
+
SEER_YOST_ACS_13_17,SEER's Yost Index calculated from ACS 2013-2017,,observation,,,,
|
|
38
|
+
MARCLA_OBS_TYPE,Market Clarity Observation Type,,observation,,,,
|
|
39
|
+
Meas Type,OMOP Measurement Type,,observation,Y,,,
|
|
40
|
+
NDC,National Drug Code (FDA and manufacturers),,drug_exposure,,"^(\d{5}\w{4}|\d{5}\w{6})$",,
|
|
41
|
+
Note Type,OMOP Note Type,,,Y,,,
|
|
42
|
+
NUCC,National Uniform Claim Committee Health Care Provider Taxonomy Code Set (NUCC),,,Y,,,
|
|
43
|
+
Observation Type,OMOP Observation Type,,observation,Y,,,
|
|
44
|
+
Obs Period Type,OMOP Observation Period Type,,observation_period,Y,,,
|
|
45
|
+
OI_FILE_TYPE,OI_FILE_TYPE,,,,,,
|
|
46
|
+
OI_INFORMATION_TYPE,OI_INFORMATION_TYPE,,,,,,
|
|
47
|
+
OI_PROV,OI_PROV,,,,,,
|
|
48
|
+
Place of Service,Place of Service Codes for Professional Claims (CMS),,visit_occurrence,Y,,,
|
|
49
|
+
PLCSRVC,PLCSRVC,,,,,,
|
|
50
|
+
Procedure Type,OMOP Procedure Occurrence Type,,procedure_occurrence,Y,,,
|
|
51
|
+
PROVIDER_FACILITY_TYPE,PROVIDER_FACILITY_TYPE,,,,,,
|
|
52
|
+
Race,Race and Ethnicity Code Set (USBC),,person,Y,,,
|
|
53
|
+
Relationship,OMOP Relationship,,,Y,,,
|
|
54
|
+
Revenue Code,UB04/CMS1450 Revenue Codes (CMS),Revenue Code,procedure_occurrence,,,revenue_code,
|
|
55
|
+
RxNorm,RxNorm (NLM),,drug_exposure,,"^\d{2,8}$",,
|
|
56
|
+
SEER_ADJAJC6M,SEER_ADJAJC6M,,,,,,
|
|
57
|
+
SEER_ADJAJC6N,SEER_ADJAJC6N,,,,,,
|
|
58
|
+
SEER_ADJAJC6T,SEER_ADJAJC6T,,,,,,
|
|
59
|
+
SEER_BEH,SEER_BEH,,,,,,
|
|
60
|
+
SEER_CENSUS_POV_IND,SEER_CENSUS_POV_IND,,,,,,
|
|
61
|
+
SEER_DAJCC7,SEER_DAJCC7,,,,,,
|
|
62
|
+
SEER_DAJCCSTG,SEER_DAJCCSTG,,,,,,
|
|
63
|
+
SEER_DXCONF,SEER_DXCONF,,,,,,
|
|
64
|
+
SEER_GRADE,SEER_GRADE,,,,,,
|
|
65
|
+
SEER_LAT,SEER_LAT,,,,,,
|
|
66
|
+
SEER_MARST,SEER_MARST,,,,,,
|
|
67
|
+
SEER_MSEX,SEER_MSEX,,,,,,
|
|
68
|
+
SEER_NHIADE,SEER_NHIADE,,,,,,
|
|
69
|
+
SEER_NOSRG,SEER_NOSRG,,,,,,
|
|
70
|
+
SEER_RAD,SEER_RAD,,,,,,
|
|
71
|
+
SEER_RADSURG,SEER_RADSURG,,,,,,
|
|
72
|
+
SEER_SEQ,SEER_SEQ,,,,,,
|
|
73
|
+
SEER_SITERWHO,SEER_SITERWHO,,,,,,
|
|
74
|
+
SEER_SRACE,SEER_SRACE,,,,,,
|
|
75
|
+
SEER_SRC,SEER_SRC,,,,,,
|
|
76
|
+
SEER_SXPRIF,SEER_SXPRIF,,,,,,
|
|
77
|
+
SEER_SXSITF,SEER_SXSITF,,,,,,
|
|
78
|
+
SEER_TYPEFU,SEER_TYPEFU,,,,,,
|
|
79
|
+
SEER_URBRUR,SEER_URBRUR,,,,,,
|
|
80
|
+
SNOMED,SNOMED-CT,SNOMED-CT,condition_occurrence,,"^\d{6,18}$",,
|
|
81
|
+
Specialty,Medicare provider/supplier specialty codes (CMS),,provider,Y,,,
|
|
82
|
+
STUS_CD,STUS_CD,,,,,,
|
|
83
|
+
TYPESRVC,TYPESRVC,,,,,,
|
|
84
|
+
UCUM,Unified Code for Units of Measure (Regenstrief Institute),,,Y,,,
|
|
85
|
+
Visit,OMOP Visit,,visit_occurrence,Y,,,
|
|
86
|
+
Visit Type,OMOP Visit Type,,visit_occurrence,Y,,,
|
|
87
|
+
Vocabulary,OMOP Vocabulary,,,Y,,,
|