OHDSI / ClinicalCharacteristics

[under development] table shell approach to OMOP characterization
Apache License 2.0
0 stars 0 forks source link

Allow users to use a char twice in same ClinChar object #4

Closed mdlavallee92 closed 2 months ago

mdlavallee92 commented 5 months ago
clinChar <- makeClinChar(
  targetCohortIds = 2,
  targetCohortNames = "Obesity",
  dbms = "redshift",
  cdmDatabaseSchema = executionSettings$cdmDatabaseSchema,
  workDatabaseSchema = executionSettings$workDatabaseSchema,
  cohortTable = executionSettings$cohortTable
) |>
  addAgeChar(categorize = age10yrGrp()) |>
  addGenderChar() |>
  addRaceChar() |>
  addYearChar(categorize = year5yrGrp()) |>
  #addLocationChar(locationTable = makeLocationTable(connection, cdmDatabaseSchema = executionSettings$cdmDatabaseSchema)) |>
  addConditionPresence(
    conceptSets = charlsonConcepts(),
    timeWindows = makeTimeTable(time_a = -365, time_b = -1),
    limit = "first",
    score = charlsonIndexScore(ageId = 1)
  )
|>
  addConditionPresence(
    conceptSets = otherCondConcepts,
    timeWindows = makeTimeTable(time_a = -730, time_b = -1),
    limit = "first"
  )
mdlavallee92 commented 2 months ago

closing to address in v1