OHDSI Home | Forums | Wiki | Github

How to create an era in CONDITION_ERA if CONDITION_OCCURRENCE's Condition_End_Date is null?


(Chetan) #1

Hello @Christian_Reich,

I am trying to create era in CONDITION_ERA.

But I don’t have any data in my source system that can populate CONDITION_OCCURRENCE’s condition_end_date. So, my condition_end_date is basically null.

In this case what should be my condition_era_end_date?

Thanks.


(Qi Yang) #2

@CSC

Era tables are derived tables using standard codes. You don’t have to worry about null condition_end_date. It has algorithm to handle the situation, e.g., add 1 day or 30 days to the condition_start_date etc. The SQL code for generating these tables are here:


(Chetan) #3

Thanks a lot @QI_omop.

@Christian_Reich , @Chris_Knoll Just one more small question-

Should CONDITION_ERA be implemented as-is as provided in the above code? Or should it be customized?

Thanks in advance.


(Chris Knoll) #4

I think you should implement it as-is. even tho your conditions don’t have end-dates, the algorithm will assume a 1 day duration, with a 30 day ‘gap window’. Meaning: if you have 2 conditions within 30 days, they will be considered part of the same era. I wouldn’t modify that logic (to say, 45 days or 180 days) since the de facto standard is to use a 30 day gap.

Only changes you will need to make is to update the script to reference your own CDM schema.


(Chetan) #5

Thank you so much @Chris_Knoll :+1:


t