The line to find people who had the outcome prior:
https://github.com/OHDSI/Characterization/blob/main/inst/sql/sql_server/CaseCohortsPart1.sql#L60
excludes people using the first outcome with washout and min prior obs but this in theory may miss people with the outcome prior - should this be #outcomes_all instead of #outcomes_washout?