how can I define a cohort without using the cohort browser?

I want to define a complex cohort - eg. I want to exclude every person who has an ICD code that contains the word kidney OR renal; and I want to exclude every person who has cancer; and include only men. Cohort Browswer crashes when I try this. Can it be done on the command line /in R or in jupyter lab/ spark jupyter? Could someone please provide an example script? All I can find is guides about how to manipulate cohorts that have already been defined in cohort browser.

Comments

2 comments

Please sign in to leave a comment.