darwin-eu / darwin-eu/CodelistGenerator

Exclude Argument in getCandidateCodes Excludes Partial Matches Instead of Exact Terms

Open
#241 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
R
Stars
18
Forks
9
PR merge metrics
No merged PRs in 30d

Description

The "exclude" argument in the getCandidateCodes function excludes all codes that contain the specified character vectors. However, I believe it would be more useful if it excluded only the exact words or character sequences specified.

For example, when phenotyping depression, I included codes containing the words "depression" or "depressive" and their descendants. However, some codes such as "ST depression" (referring to ECG changes and not the mental health condition) were also included. When I specified "ST depression" in the exclude argument, all codes containing the word "depression" were excluded, excluding the main codes relevant for the depression phenotype.

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.