darwin-eu / omopgenerics

https://darwin-eu.github.io/omopgenerics/
Apache License 2.0
2 stars 1 forks source link

warning binding results - `domain_id` is present in both 'strata' and 'additional'. This will be an error in the next release. #532

Open edward-burn opened 1 month ago

edward-burn commented 1 month ago

@catalamarti should this be allowed?

Warning message: domain_id is present in both 'strata' and 'additional'. This will be an error in the next release.

db <- DBI::dbConnect(RPostgres::Postgres(),
                     dbname = Sys.getenv("CDM5_POSTGRESQL_DBNAME"),
                     host = Sys.getenv("CDM5_POSTGRESQL_HOST"),
                     user = Sys.getenv("CDM5_POSTGRESQL_USER"),
                     password = Sys.getenv("CDM5_POSTGRESQL_PASSWORD"))
cdm <- CDMConnector::cdm_from_con(
  con = db,
  cdm_schema = Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA"),
  write_schema = c(schema =  Sys.getenv("CDM5_POSTGRESQL_SCRATCH_SCHEMA"),
                   prefix = "incp_"),
  achilles_schema = Sys.getenv("CDM5_POSTGRESQL_CDM_SCHEMA")
)

asthma_cs <- list("asthma" = 317009)

cdm$asthma <- CohortConstructor::conceptCohort(cdm = cdm,
                                               conceptSet = asthma_cs,
                                               name = "asthma")

result_1 <- CodelistGenerator::summariseCohortCodeUse(asthma_cs, cdm = cdm, "asthma")
result_2 <- CodelistGenerator::summariseOrphanCodes(asthma_cs, cdm = cdm)
results <- omopgenerics::bind(result_1, result_2)
catalamarti commented 1 week ago