Skip to content

feat: add population and drug-role restrictions for PHV scans - #31

Merged
MadDERt merged 3 commits into
WangLabCSU:develfrom
MadDERt:feat/phv-restrict
Oct 29, 2026
Merged

MadDERt merged 3 commits into
WangLabCSU:develfrom
MadDERt:feat/phv-restrict

Conversation

@MadDERt

@MadDERt MadDERt commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add faers_restrict() to filter reports by quarter, date window, sex,
    age, age group, and occurrence country. Supports intersected conditions,
    inverted selection, and partial-date handling.
  • Add .role_cod to ordinary and stratified scans to restrict drug
    exposure counting while preserving background report counts.
  • Support memory and DuckDB backends without modifying the input object.
  • Update documentation, examples, and NEWS. No new dependencies.

Validation

  • Relevant repository tests passed on both backends, with warnings recorded.
  • Additional local regression tests: 36 groups passed.
  • Real-data memory workflow: 68 checks passed on 456,337 reports,
    including independent count checks and input preservation.

@ShixiangWang

Copy link
Copy Markdown
Contributor

@MadDERt 确认可以合并了你就自己合并下哈

@MadDERt
MadDERt merged commit 5d3fbfb into WangLabCSU:devel Oct 29, 2026
11 checks passed
@MadDERt
MadDERt deleted the feat/phv-restrict branch October 29, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants