Public-Health-Scotland / source-linkage-files

This repo is for the syntax used for the PHS Source Linkage File project
https://public-health-scotland.github.io/source-linkage-files/
Other
4 stars 2 forks source link

remove and merge overlapping records in GP OoHs #940

Closed lizihao-anu closed 7 months ago

github-actions[bot] commented 8 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (3)

BOXI fnc MIU

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:Public-Health-Scotland/source-linkage-files.git](https://github.com/Public-Health-Scotland/source-linkage-files.git) repository on the `712-remove-merge-overlapping-records-in-gp-oohs` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8480103796/attempts/1' ```

OR

To have the bot accept them for you, reply quoting the following line: @check-spelling-bot apply updates.

Errors (2) See the [:open_file_folder: files](https://github.com/Public-Health-Scotland/source-linkage-files/pull/940/files/) view, the [:scroll:action log](https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8480103796/job/23235237755#step:4:1), or [:memo: job summary](https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8480103796/attempts/1#summary-23235237755) for details. [:x: Errors](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:x: ignored-expect-variant](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#ignored-expect-variant) | 13 [:information_source: no-newline-at-eof](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#no-newline-at-eof) | 1 See [:x: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
lizihao-anu commented 7 months ago

Not too sure what is happening here but when i read in the consultations data and run this function, 0 rows are returned. Could you please have another look at this? Thanks

My test run shows that it works fine. If you could try the following testing code,

devtools::load_all(".")

ooh_data = targets::tar_read(ooh_data_1920)
year = "1920"

consultations_extract <- process_extract_ooh_consultations(ooh_data[["consultations"]], year)
github-actions[bot] commented 7 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (3)

BOXI fnc MIU

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:Public-Health-Scotland/source-linkage-files.git](https://github.com/Public-Health-Scotland/source-linkage-files.git) repository on the `712-remove-merge-overlapping-records-in-gp-oohs` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8686129888/attempts/1' ```

OR

To have the bot accept them for you, reply quoting the following line: @check-spelling-bot apply updates.

Errors (2) See the [:open_file_folder: files](https://github.com/Public-Health-Scotland/source-linkage-files/pull/940/files/) view, the [:scroll:action log](https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8686129888/job/23817003855#step:4:1), or [:memo: job summary](https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8686129888/attempts/1#summary-23817003855) for details. [:x: Errors](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count -|- [:x: ignored-expect-variant](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#ignored-expect-variant) | 13 [:information_source: no-newline-at-eof](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#no-newline-at-eof) | 1 See [:x: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.
If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 7 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (3)

BOXI fnc MIU

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:Public-Health-Scotland/source-linkage-files.git](https://github.com/Public-Health-Scotland/source-linkage-files.git) repository on the `712-remove-merge-overlapping-records-in-gp-oohs` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8686288896/attempts/1' ```

OR

To have the bot accept them for you, reply quoting the following line: @check-spelling-bot apply updates.

If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
github-actions[bot] commented 7 months ago

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (3)

BOXI MIU SDcols

To accept these unrecognized words as correct, you could run the following commands ... in a clone of the [git@github.com:Public-Health-Scotland/source-linkage-files.git](https://github.com/Public-Health-Scotland/source-linkage-files.git) repository on the `712-remove-merge-overlapping-records-in-gp-oohs` branch ([:information_source: how do I use this?]( https://github.com/check-spelling/check-spelling/wiki/Accepting-Suggestions)): ``` sh curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' | perl - 'https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/8686529497/attempts/1' ```

OR

To have the bot accept them for you, reply quoting the following line: @check-spelling-bot apply updates.

If the flagged items are :exploding_head: false positives If items relate to a ... * binary file (or some other file you wouldn't want to check at all). Please add a file path to the `excludes.txt` file matching the containing file. File paths are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files. `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md]( ../tree/HEAD/README.md) (on whichever branch you're using). * well-formed pattern. If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it, try adding it to the `patterns.txt` file. Patterns are Perl 5 Regular Expressions - you can [test]( https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines. Note that patterns can't match multiline strings.
Jennit07 commented 7 months ago

Not too sure what is happening here but when i read in the consultations data and run this function, 0 rows are returned. Could you please have another look at this? Thanks

My test run shows that it works fine. If you could try the following testing code,

devtools::load_all(".")

ooh_data = targets::tar_read(ooh_data_1920)
year = "1920"

consultations_extract <- process_extract_ooh_consultations(ooh_data[["consultations"]], year)

Thanks @lizihao-anu I tried that and it worked fine. Not too sure why i was returning 0 Rows but it seems to have resolved. This was the code i was trying which is the eqivalent to using targets:

data <- read_extract_ooh_consultations(year = "1920")

test <- process_extract_ooh_consultations(data, year = "1920")