Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not create measurementCohort based on BMI #377

Open
xihang-chen opened this issue Oct 28, 2024 · 1 comment
Open

Could not create measurementCohort based on BMI #377

xihang-chen opened this issue Oct 28, 2024 · 1 comment

Comments

@xihang-chen
Copy link
Collaborator

xihang-chen commented Oct 28, 2024

Hi! I am trying to create a cohort with people whose BMI is between 30 and 60. However I wasn't quite able to nail as to what to put in valueAsNumber argument.

Here is my code:

cdm$bmi <- CohortConstructor::measurementCohort(
  cdm = cdm,
  name = "bmi",
  conceptSet = list("bmi" = c(36304833, 3038553)),
  valueAsNumber = list("..." = c(30, 60))
)

So the bmi concept_id I used were 36304833 and 3038553. However I wasn't sure what to put in valueAsNumber argument as unit_concept_id column are all NA for these codes.

This was ran on CPRD GOLD 100k

@nmercadeb
Copy link
Collaborator

Maybe we can accept non named list and if that is the case we don't filter "value_as_concept_id" column? Then users can use the function even if that column is NA
@edward-burn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants