Skip to content
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

Merged
merged 3 commits into from
Sep 12, 2024
Merged

mock visit occurrence #111

merged 3 commits into from
Sep 12, 2024

Conversation

ilovemane
Copy link
Collaborator

No description provided.

@ilovemane ilovemane linked an issue Sep 11, 2024 that may be closed by this pull request
@ilovemane ilovemane linked an issue Sep 11, 2024 that may be closed by this pull request
@ilovemane ilovemane removed a link to an issue Sep 11, 2024
R/checkInputs.R Outdated
getOccurrence <- function(cdm, tableName, start, end) {

dataTable <- cdm[[tableName]] |>
dplyr::select("person_id", start, end) |>
Copy link
Collaborator

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)

Copy link
Collaborator Author

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,
Copy link
Collaborator

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

Copy link
Collaborator Author

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

dplyr::pull() |>
unique()
if (length(tableName) == 0) {
cli::cli_abort("Your cdm object don't contain clinical tables with visit_occurrence_id.")
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@catalamarti catalamarti left a 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?

@catalamarti catalamarti merged commit 4da15d0 into main Sep 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MockVisitOccurrence()
2 participants