Thank you for warm welcome.
I am so impressed with the research topic (phenome-wide approach to analysis of the association between birth-month and disease risks) and the paper published in JAMIA.
The IRB has approved this study in Ajou university, Korea.
Now, I do work with the code you shared.
I find small part of codes, which doesn't work with our CDM data.
(1)Upper case error
on 139th rows, " age_data$age = age_data$year_of_service-age_data$year_of_birth "
->this sentence should be replace with "age_data$age = age_data$YEAR_OF_SERVICE-AGE_DATA$YEAR_OF_BIRTH "
The error occurred because column names of our DB were in upper cases.
(2)an error in SQL sentence
on 65th row,
it works after I replace "GROUP BY (a.condition_concept_id) " with "GROUP BY a.condition_concept_id,c.concept_name ".
on 134th row,
it works after I replace "query_2$condition_source_value[j]" with "'",query_2$condition_source_value[j],"'" , because the values in condition_source_value were not integers in our DB.(They were in characters)
I do appreciate that I can have a chance to work with you on this fabulous research topic. I really hope that I can add little help to this project.
I'll send the data from my hospital ASAP after a brief review for possible mistakes I made