Closed shanmukhasampath closed 1 year ago
wait, dotn fix this at the moment we shuld use the official script, the one we use i dont think is the official way here https://ohdsi.github.io/CommonDataModel/sqlScripts.html#Condition_Eras
It is the same @javier-gracia-tabuenca-tuni . Except for the part I mentioned above in the issue.
ok, then you can change that error
There is an error in both era table SQLs where the
end_date
should be reverted back todrug_exposure_end_date
orcondition_end_date
. However, the SQL adds extra 60 or 120 days to the respectiveend_date
columns as shown belowCondition_Era https://github.com/FINNGEN/ETL/blob/b56df6a3ffbfb3da77c277f3fef60e6fd5543458/3_etl_code/ETL_Orchestration/sql/etl_condition_era.sql#L43
Drug_Era https://github.com/FINNGEN/ETL/blob/b56df6a3ffbfb3da77c277f3fef60e6fd5543458/3_etl_code/ETL_Orchestration/sql/etl_drug_era.sql#L50
For reference, this should be negative interval days from the official era SQL scripts https://github.com/OHDSI/ETL-CMS/blob/30dc50907993d65e376609ceb692a3e12921d88a/SQL/create_CDMv5_condition_era.sql#L53
It should look as below Condition_Era
Drug_Era