JuliaHealth / OMOPCDMCohortCreator.jl

Create cohorts from databases utilizing the OMOP CDM
https://juliahealth.org/OMOPCDMCohortCreator.jl/stable
Other
8 stars 7 forks source link

functions needs to specify the column even the DataFrame passed to argument is nx1 #42

Closed Farreeda closed 1 year ago

Farreeda commented 1 year ago

In the tutorial section, strep_patients_race = occ.GetPatientRace(strep_patients, conn) this line should return nx2 table of the id of patients and their races, but it gives error such that strep_patients =

1677×1 DataFrame
  Row │ person_id
      │ Float64
──────┼───────────
    1 │     283.0
    2 │     326.0
    3 │     579.0
    4 │     334.0
    5 │     559.0
    6 │     295.0
    7 │      90.0
    8 │     116.0
    9 │     592.0
  ⋮   │     ⋮
 1669 │    5223.0
 1670 │    5151.0
 1671 │    5118.0
 1672 │    5301.0
 1673 │    5291.0
 1674 │    5152.0
 1675 │    5302.0
 1676 │    5153.0
 1677 │    5123.0

But it works only when specifying the column name in the argument strep_patients_race = occ.GetPatientRace(strep_patients.person_id, conn)

TheCedarPrince commented 1 year ago

Good catch @Farreeda ! Would you be willing to open a PR to fix this within the package documentation? Happy to help! :smile: