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

Add activity after death #953

Merged
merged 81 commits into from
May 27, 2024
Merged

Conversation

rchlv
Copy link
Collaborator

@rchlv rchlv commented May 17, 2024

Related to #862
WIP - Added function for get_all_slf_deaths_lookup_path which combines all financial years' extract.
- Added function for add_activity_after_death_flag

Following identification of activity recorded after death due to data quality or admin issues, an investigation into sources of death data available for SLFs was undertaken. This guided the addition of a new variable to flag records where activity occurred after the death of date. Further details about the issues and methodology can be found in the accompanying "Investigation into activity after death" report.

Jennit07 and others added 30 commits January 16, 2024 15:39
This was causing NSUs to show a social care id. This now resolves this.
@SwiftySalmon spotted an issue where NSUs were showing a social care id
attached. This was due to us matching on NSUs first and then SC Client
variables at the end. Previously we matched SC client variables first
and then NSUs onto the episode file. This difference occurred when we
split up matching on client variables at the year specific extracts.
This is a quick PR to reorder the functions to match our previous logic.
I have tested the 1920 file to check this and the issue is no longer
there.
Improved the function `create_demog_test_flags` function to include a
parameter for specifying `chi` or `anon_chi`. This is due to this
function being used for testing the extracts (which calls chi) and also
being used for testing the episode and individual file (which calls
anon_chi). This now allows flexibility for interchanging between the two
forms and simplifies the code by removing duplicated code.

Closes #850
@rchlv rchlv requested a review from Jennit07 May 20, 2024 15:31
@rchlv rchlv marked this pull request as ready for review May 20, 2024 15:31

This comment has been minimized.

This comment has been minimized.

Copy link
Collaborator

@SwiftySalmon SwiftySalmon left a comment

Choose a reason for hiding this comment

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

code looks fine! Need to run it tomorrow and see how the output looks

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (10)

anu
beddays
casewhen
CNWs
commiting
deathdate
GLS
lizihao
NAs
returnsthe

To accept these unrecognized words as correct, you could run the following commands

... in a clone of the [email protected]:Public-Health-Scotland/source-linkage-files.git repository
on the add_activity_after_death branch (ℹ️ how do I use this?):

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/9256605888/attempts/1'

OR

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

Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (272) from .github/actions/spelling/expect.txt and unrecognized words (10)

Dictionary Entries Covers Uniquely
cspell:k8s/dict/k8s.txt 153 2 1
cspell:swift/src/swift.txt 53 2
cspell:npm/dict/npm.txt 302 2
cspell:csharp/csharp.txt 32 1
cspell:filetypes/filetypes.txt 264 1

Consider adding them (in .github/workflows/spelling.yml) for uses: check-spelling/check-spelling@main in its with:

      with:
        extra_dictionaries:
          cspell:k8s/dict/k8s.txt
          cspell:swift/src/swift.txt
          cspell:npm/dict/npm.txt
          cspell:csharp/csharp.txt
          cspell:filetypes/filetypes.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling.yml) for uses: check-spelling/check-spelling@main in its with:

check_extra_dictionaries: ''
If the flagged items are 🤯 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 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 (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@SwiftySalmon SwiftySalmon merged commit d6c93d1 into June-24-update May 27, 2024
10 of 11 checks passed
@SwiftySalmon SwiftySalmon deleted the add_activity_after_death branch May 27, 2024 14:37
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.

4 participants