-
Notifications
You must be signed in to change notification settings - Fork 1
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
mock visit occurrence #111
Conversation
R/checkInputs.R
Outdated
getOccurrence <- function(cdm, tableName, start, end) { | ||
|
||
dataTable <- cdm[[tableName]] |> | ||
dplyr::select("person_id", start, end) |> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start -> dplyr::all_of(start)
end -> dplyr::all_of(end)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to delete this
R/checkInputs.R
Outdated
dataTable <- cdm[[tableName]] |> | ||
dplyr::select("person_id", start, end) |> | ||
dplyr::group_by() |> | ||
dplyr::rename(visit_start_date = start, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can do the rename at the select stage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is not needed
R/mockVisitOccurrence.R
Outdated
dplyr::pull() |> | ||
unique() | ||
if (length(tableName) == 0) { | ||
cli::cli_abort("Your cdm object don't contain clinical tables with visit_occurrence_id.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no error, just return the cdm the way it is and throw a warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ilovemane can you fix the comments I added please?
No description provided.