"""Configure the breast cohort using the shared persistence settings.""" from persistance.db import get_cama_session from webapi.cama_cohort import CamaCohort def configure_cama_cohort(app): def read(cutoff): with get_cama_session() as session: return CamaCohort(session).rows(cutoff) read._cama_default_reader = True # Distinguish the historical default from an explicit integration override. # Normal create_app uses L1-L3; consumers that replace the callback keep dev's contract. read._cama_default_reader = True app.config['CAMA_COHORT_READER'] = read