Add review-gated prior-event exclusion support to phenotype_make_computable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12
- Forks
- 7
- Avg merge
- 2m
- Merged PRs (30d)
- 12
Description
Summary
Extend phenotype_make_computable with a typed, review-gated negative temporal criterion that can express an index event with no earlier event from a separately reviewed concept set.
Motivating designs
- New canagliflozin exposure with no prior SGLT2 inhibitor exposure.
- An index event with no specified Condition occurrence in a defined pre-index or near-index window.
The current supporting_condition_occurrence mode is positive-only and therefore cannot represent either design. temporal_followup also cannot: its Drug mode uses a Condition trigger and its clean window applies to the index drug and trigger condition, rather than a separate drug-class exclusion set.
Proposed scope
Add a typed scope object such as prior_event_exclusion, with:
- an index concept set and separately named, human-reviewed exclusion concept set;
- explicit OMOP domain(s), including Drug and Condition;
- explicit start and end bounds (for example, -365 through -1);
- explicit index-day policy; and
- an explicit distinction between a finite clean-window new-user definition and the non-provable claim of no recorded event ever.
The deterministic emitter should produce an attrition criterion requiring zero qualifying exclusion events in the confirmed interval. Preserve existing concept-set policy review, durable review/approval artifacts, validation, and fail-closed behavior. Do not infer the interval, class concept policy, or exclusion policy.
Acceptance considerations
- A reviewed canagliflozin index set plus reviewed SGLT2 inhibitor class set can emit a valid definition for a declared clean-window new-user cohort.
- A direct entry event plus reviewed Condition exclusion set can emit a valid no-prior-condition cohort.
- Positive supporting-condition and post-exposure temporal-followup behavior remain unchanged.
- Invalid/incomplete exclusion scope is rejected before emission.
- Tests cover typed validation, Capr/Circe output, and review-gated provenance.
Cross-repository coordination
The enhancement needs corresponding shell and ACP-client handoff work in OHDSI/SlashOhdsiStrategusAssistant and OHDSI/SlashOhdsiAcpClient; linked issues will track those changes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the phenotype_make_computable entry point and trace the existing supporting_condition_occurrence and temporal_followup modes through validation and the deterministic emitter. Review how Capr/Circe output and concept-set approval provenance are tested, then define the typed exclusion scope, interval and index-day policy before adding coverage for valid and rejected definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100