Skip to content

Commit c252e3b

Browse files
committed
fixed all stage cols
1 parent f7c7cb9 commit c252e3b

6 files changed

Lines changed: 16 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@
7878
- mets cols thru to condition mods
7979

8080
## 0.3.0
81-
- all stage modifier mapper
81+
- all stage modifier mapper
82+
83+
## 0.3.1
84+
- fixed all stage cols

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "omop-constructs"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = "For building complex constructs on top of the omop-alchemy library."
55
readme = "README.md"
66
authors = [

src/omop_constructs/alchemy/modifiers/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
MetastaticDiseaseModifierMV,
1010
AllStageModifierMV
1111
)
12-
from .condition_modifier_mv import ModifiedCondition
12+
from .condition_modifier_mv import ModifiedCondition, StageModifier
1313

1414
__all__ = [
1515
"TStageMV",
@@ -21,5 +21,6 @@
2121
"SizeModifierMV",
2222
"ModifiedCondition",
2323
"MetastaticDiseaseModifierMV",
24-
"AllStageModifierMV"
24+
"AllStageModifierMV",
25+
"StageModifier"
2526
]

src/omop_constructs/alchemy/modifiers/condition_modifier_join.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
)
1919

2020
condition_concept = so.aliased(Concept, name='condition_concept')
21+
stage_concept = so.aliased(Concept, name='stage_concept')
2122

2223
modified_conditions_join = (
2324
sa.select(
@@ -147,10 +148,10 @@
147148
Condition_Occurrence.condition_concept_id,
148149
condition_concept.concept_name.label('condition_concept'),
149150
Episode_Event.episode_id.label('condition_episode'),
150-
AllStageModifierMV.stage_id.label('stage_id'),
151-
AllStageModifierMV.stage_date.label('stage_date'),
152-
AllStageModifierMV.stage_concept_id.label('stage_concept_id'),
153-
AllStageModifierMV.stage_label.label('stage_label'),
151+
AllStageModifierMV.measurement_id.label('stage_id'),
152+
AllStageModifierMV.measurement_date.label('stage_date'),
153+
AllStageModifierMV.measurement_concept_id.label('stage_concept_id'),
154+
stage_concept.concept_name.label('stage_label'),
154155
)
155156
.join(
156157
Episode_Event,
@@ -169,4 +170,5 @@
169170
isouter=True
170171
)
171172
.join(condition_concept, condition_concept.concept_id==Condition_Occurrence.condition_concept_id)
173+
.join(stage_concept, stage_concept.concept_id==AllStageModifierMV.measurement_concept_id)
172174
)

src/omop_constructs/alchemy/modifiers/modifier_mappers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class MetastaticDiseaseModifierMV(MeasModCols, MaterializedViewMixin, Base):
116116
measurement_concept_id = sa.Column(sa.Integer)
117117

118118
@register_construct
119-
class AllStageModifierMV(StageColumns, MaterializedViewMixin, Base):
119+
class AllStageModifierMV(MeasModCols, MaterializedViewMixin, Base):
120120
__mv_name__ = "all_stage_modifier_mv"
121121
__mv_select__ = all_stage_select.select()
122122
__mv_index__ = "measurement_event_id"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)