darwin-eu-dev / DrugUtilisation

https://darwin-eu-dev.github.io/DrugUtilisation/
Apache License 2.0
4 stars 1 forks source link

Error in instantiating drug cohorts that have the same name #463

Closed xihang-chen closed 3 months ago

xihang-chen commented 3 months ago

This is the code I ran: cdm <- DrugUtilisation::generateAtcCohortSet(cdm = cdm, name = "anticholinesterases_feldman", atcName = "Anticholinesterases", level = c("ATC 4th"))

This is the error I got:

Error incheckConceptSet(): ! conceptSet must be a uniquely named list of integerish, no NA are allowed

Thanks to @catalamarti , the issue is because of when running CodelistGenerator::getATCCodes(cdm = cdm, level = "ATC 4th", name = "Anticholinesterases")

it produces two lists both named anticholinesterases.

@edward-burn do you reckon this is an issue that belongs here or over in CodelistGenerator?

edward-burn commented 3 months ago

@xihang-chen I think this is an issue for Codelistgenerator https://github.com/darwin-eu/CodelistGenerator/issues/153