OHDSI Home | Forums | Wiki | Github

Test data for era scripts

Has anyone created some simple condition_occ and drug_exp data to test the era codes that they would share. I’m thinking of several rows or so that allow one to test the various functions and their extremes along with expected era results. If not, we’ll be creating something and will share back. I thought this might be something an original developer might have done. (Note- we’ve got tons of real data to “test” on but its impossible to pull out expected results or test extremes). Thanks

Hello Lisa,
I have a gist that walks through the era building logic, complete with sample insert statements to demonstrate the approach. It’s not exactly a test case suite for each corner case, but it creates the necessary tables as temp tables (using MSSQL dialect, sorry!) but it contains 2 people with various drug exposure lengths (as well as a mix of days-supply vs. exposure end date, and it normalizes it). You can use that as a starting point to create fake data.

-Chris

OK thanks, we’ll start there and post back anything we come up with! We’re working in PostgreSQL those conversion may be useful.

t