Skip to content

Exclude Argument in getCandidateCodes Excludes Partial Matches Instead of Exact Terms #241

@annasaura

Description

@annasaura

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions