darwin-eu / darwin-eu/CodelistGenerator
Exclude Argument in getCandidateCodes Excludes Partial Matches Instead of Exact Terms
- 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
Assessment
This issue has not been assessed yet.