OHDSI / CohortConstructor

https://ohdsi.github.io/CohortConstructor/
Apache License 2.0
1 stars 0 forks source link

error when creating conceptCohort() #334

Open ilovemane opened 4 hours ago

ilovemane commented 4 hours ago

I am sorry, but I ran into this error when I was trying to create this cohort with conceptCohort() in cprd_gold I was using the public_100k.

concept_code <- c(374919,   761978,   765565,  1340507,  3045574,  4046108,  4101729,  4102337,
                  4105353,  4137855,  4145049,  4178929,  4231948,  4258676, 35623817,
                  37110514, 37116351, 37311816, 40757943, 40761214, 44782559, 44784474)

multiple_sclerosis <- omopgenerics::newCodelist(list("multiple_sclerosis" = concept_code))

multiple_sclerosis

cdm$table <- cdm |> 
  conceptCohort(conceptSet = multiple_sclerosis,
                name = "table") 

it return below

Adding indexes to table
Error in attr(attr(cdm[[name]], "tbl_source"), "write_schema")[["schema"]] : 
  subscript out of bounds
ilovemane commented 3 hours ago

just adding that it only throws an error in version 0.3.0. It works in 0.2.2

edward-burn commented 2 hours ago

Ah I see this happens when a prefix is not used when creating the cdm, will fix that

edward-burn commented 47 minutes ago

This should now be fixed on the main branch @ilovemane