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

Copy previous categorisations from multiple tables not just one #111

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

RayStick
Copy link
Member

@RayStick RayStick commented Jul 24, 2024

Closes #110
See description of issue for what this PR is solving

For PR reviewers to test:

  • Process 3 tables in this order: CHILD, BREAST_FEEDING and CHILD_BIRTHS
  • The previously code only copied from the last table
  • You can now see that CHILD_BIRTHS copies lots from CHILD, which is the desired functionality

Checklist before review:

  • Please comment on my PR while it's a draft and give me feedback on the development!
  • I added everything I wanted to add to this PR, please review!
  • The title of this PR is clear and self-explantory.
  • I added any appropriate labels to this PR.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 24, 2024
@RayStick RayStick changed the title multiple tables copy over Copy previous categorisations from multiple tables not just one Jul 24, 2024
@RayStick RayStick marked this pull request as ready for review July 24, 2024 09:54
@RayStick RayStick requested a review from Rainiefantasy July 24, 2024 09:54
@Rainiefantasy
Copy link
Contributor

I seem to always have issues XD
Ran:

devtools::load_all()
domain_mapping()

When entering table numbers to process:
I get the table name, and table last updated returned. Then I get an error message:
Error in distinct(., DataElement, .keep_all = TRUE) : could not find function "distinct"

@RayStick
Copy link
Member Author

my mistake - just made another commit - please try again :)

@Rainiefantasy
Copy link
Contributor

Adding to above -

  • when running domain_mapping() I get the above error, but when I run domain_mapping(output_dir="/test") (with directory), it lets me process the table but then at the end I get another error after reviewing categorisations:
    Would you like to review your categorisations? (y/n): n Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file '/test/OUTPUT_NationalCommunityChildHealthDatabase(NCCHD)_CHILD_2024-07-24-15-03-30.csv': No such file or directory
    This is on the copy-more-tables branch

@Rainiefantasy
Copy link
Contributor

Rainiefantasy commented Jul 24, 2024

Ignore this -- forgot to do the devtools::load_all()
From the changes pushed, I can now process table 2, but it errors on the second table with a similar distinct function error:
Error in distinct(., DataElement, .keep_all = TRUE) : could not find function "distinct"

@Rainiefantasy
Copy link
Contributor

Screenshot 2024-07-24 at 15 40 15 Looks great to me! categorisations copied from the child table to the child births table as expected

Copy link
Contributor

@Rainiefantasy Rainiefantasy left a comment

Choose a reason for hiding this comment

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

Reviewed changes and tested - output as expected, so approving for merge :)

@RayStick RayStick merged commit f06b0e8 into main Jul 24, 2024
2 checks passed
@RayStick RayStick deleted the copy-more-tables branch July 25, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table copying not sufficient - possible bug
2 participants