summariseOrphanCodes {CodelistGenerator}R Documentation

Find orphan codes related to a codelist using achilles counts and, if available, PHOEBE concept recommendations

Description

Find orphan codes related to a codelist using achilles counts and, if available, PHOEBE concept recommendations

Usage

summariseOrphanCodes(
  x,
  cdm,
  domain = c("condition", "device", "drug", "measurement", "observation", "procedure",
    "visit")
)

Arguments

x

A codelist for which to find related codes used in the database

cdm

cdm_reference via CDMConnector

domain

The domains to restrict results too. Only concepts from these domains will be returned.

Value

A summarised result containg the frequency of codes related to (but not in) the codelist

Examples

## Not run: 
cdm <- mockVocabRef("database")
codes <- getCandidateCodes(cdm = cdm,
keywords = "Musculoskeletal disorder",
domains = "Condition",
includeDescendants = FALSE)

orphan_codes <- summariseOrphanCodes(x = list("msk" = codes$concept_id),
cdm = cdm)

orphan_codes
CDMConnector::cdmDisconnect(cdm)

## End(Not run)

[Package CodelistGenerator version 3.1.0 Index]