OHDSI / Era-Constructor

This is a repo that contains standardized code for hte construction of Drug Eras, Dose Eras and Condition Eras
2 stars 8 forks source link

v5 changes for postgres_v5_drug_era_stockpile.sql #3

Open rstarr7 opened 8 years ago

rstarr7 commented 8 years ago

There are a couple of changes needed to run under v5.

where c.vocabulary_id = 8 and c.concept_class = 'Ingredient' should be where c.vocabulary_id = 'RxNorm' and c.concept_class_id = 'Ingredient'

rstarr7 commented 8 years ago

This is also an issue with postgres_v5_dose_era_stockpile.

and

, -1 as event_type, row_number() over( partition by person_id, _drug_concept_id, dose_unit_concept_id, effective_drugdose should be , -1 as event_type, row_number() over( partition by person_id, _ingredient_concept_id, unit_concept_id, dosevalue

and the insert should have a

From cteDoseEraEnds