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

Commits on Jan 16, 2024

  1. Remove redundant code

    Jennit07 committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    7d05ce9 View commit details
    Browse the repository at this point in the history
  2. Update documentation

    Jennit07 authored and github-actions[bot] committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    d1718f0 View commit details
    Browse the repository at this point in the history
  3. Style code

    Jennit07 authored and github-actions[bot] committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    6aec7b1 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. Reorder when we match on client variables

    This was causing NSUs to show a social care id. This now resolves this.
    Jennit07 committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    65e8caa View commit details
    Browse the repository at this point in the history
  2. Update documentation

    Jennit07 authored and github-actions[bot] committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    35bcddc View commit details
    Browse the repository at this point in the history
  3. Style code

    Jennit07 authored and github-actions[bot] committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    800083a View commit details
    Browse the repository at this point in the history
  4. Revert "Update logic to use end of Quarter"

    This reverts commit 004e831.
    Jennit07 committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    996db4c View commit details
    Browse the repository at this point in the history
  5. Style code

    Jennit07 authored and github-actions[bot] committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    d10376d View commit details
    Browse the repository at this point in the history
  6. Update documentation

    Jennit07 authored and github-actions[bot] committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    b8e1dd2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3591aca View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    47769e3 View commit details
    Browse the repository at this point in the history
  9. Remove check_quarter_format

    Jennit07 committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    85c22ad View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e4d9128 View commit details
    Browse the repository at this point in the history
  11. Style code

    Jennit07 authored and github-actions[bot] committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    daa9ee7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    702225f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d0fb3cd View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    bbf28dd View commit details
    Browse the repository at this point in the history
  2. Change date to lowercase

    Jennit07 committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    b3d826b View commit details
    Browse the repository at this point in the history
  3. Update documentation

    Jennit07 authored and github-actions[bot] committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    4ca03b7 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Configuration menu
    Copy the full SHA
    c589786 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e87385 View commit details
    Browse the repository at this point in the history
  3. Update documentation

    Jennit07 authored and github-actions[bot] committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    0e69e50 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0586dd7 View commit details
    Browse the repository at this point in the history
  5. Update documentation

    SwiftySalmon authored and github-actions[bot] committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    cbf5ae4 View commit details
    Browse the repository at this point in the history
  6. Bug - match on client variables before NSU (#896)

    @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.
    SwiftySalmon authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    cde4b3d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    63f6333 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e6c83f0 View commit details
    Browse the repository at this point in the history
  9. Review create_demog_test_flags function (#898)

    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
    SwiftySalmon authored Jan 24, 2024
    Configuration menu
    Copy the full SHA
    3233bfb View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Style code

    Jennit07 authored and github-actions[bot] committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    3055d54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    acb2639 View commit details
    Browse the repository at this point in the history
  3. Amend test workbooks to be in the format snake case (#903)

    Checked for snake case and made some changes to the workbook names. I
    have also updated the date stamp to be lower case as well.
    
    Closes #508
    SwiftySalmon authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    287e782 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Fix pick variables

    This was not taking the correct variables, leading to NSUs being assigned psychiatry
    Jennit07 committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    30cb567 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00ae978 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Remove redundant code (#894)

    closes #603
    SwiftySalmon authored Feb 6, 2024
    Configuration menu
    Copy the full SHA
    3b38160 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0712d1 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. SC Demographics and SDS (#900)

    * Style code
    
    * # read in sc demographics
    
    different variables - removed extract date as not accurate, using chi over upi after discussion with social care data management. Added in date of death just for fun.
    
    * social care demographics first draft
    
    removed a lot of the submitted variables and instead using chi variables from chi seeding. Other changes:
    - Fill in missing values,
    - create flag for latest social care id (one from database is not accurate), this makes sure that each chi only has ONE sc id as the latest to stop it creating duplicates
    - change postcode to choose chi over submitted
    
    * Style code
    
    * had a github error? Not sure what happened but commiting first draft of sc demographics
    
    * Style code
    
    * first draft sds.
    No major changes - only how demographics is matched on and how latest social care id is selected
    
    * Update documentation
    
    * demographics - add sending location to group by
    
    * Style code
    
    * Update documentation
    
    * Added ungroup()
    
    * Remove comments
    
    * Remove comments
    
    * Style code
    
    ---------
    
    Co-authored-by: SwiftySalmon <[email protected]>
    Co-authored-by: marjom02 <[email protected]>
    Co-authored-by: Jennit07 <[email protected]>
    Co-authored-by: Jennit07 <[email protected]>
    Co-authored-by: Zihao Li <[email protected]>
    6 people authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    744bbc0 View commit details
    Browse the repository at this point in the history
  2. Sc all at speedup (#904)

    * speed up process_sc_all_alarms_telecare function with data.table package
    
    * Update documentation
    
    ---------
    
    Co-authored-by: lizihao-anu <[email protected]>
    Co-authored-by: Megan McNicol <[email protected]>
    Co-authored-by: Jennit07 <[email protected]>
    4 people authored Feb 7, 2024
    Configuration menu
    Copy the full SHA
    cd8b359 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b1a9523 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Bug - high_cc in demographic cohort showing NAs instead of `TRUE/…

    …FALSE` (#911)
    
    Add case_when statement for `high_cc` cohort
    Jennit07 authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    6829c1a View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Configuration menu
    Copy the full SHA
    c7a1400 View commit details
    Browse the repository at this point in the history
  2. Update documentation

    SwiftySalmon authored and github-actions[bot] committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    ea19220 View commit details
    Browse the repository at this point in the history
  3. Style code

    SwiftySalmon authored and github-actions[bot] committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    a634ea7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c1f2a36 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    842e616 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Configuration menu
    Copy the full SHA
    760e2e5 View commit details
    Browse the repository at this point in the history
  2. Bug - NSUs being assigned psychiatry in the service use cohort (#908)

    Due to a coding error, the `dplyr::pick` was not working correctly when
    trying to take the average for assigning the label `unassigned`. This
    was causing NSUs to have the label `psychiatry` attached as this was the
    next name available. The fix is to specify all of the columns needed to
    take an average for assigning the label `unassigned`. This has a big
    impact on the figures.
    
    The  current 'live' files:
    
    ```
      service_use_cohort       n
       <chr>                <int>
     1 Elective Inpatient  488510
     2 Geriatric           293863
     3 Limited Daycases    725538
     4 Maternity           206488
     5 Multiple Emergency 1140659
     6 Outpatients        1102837
     7 Prescribing        3982957
     **8 Psychiatry         1601193**
     9 Routine Daycase     178739
    10 Single Emergency   1116014
    **11 Unassigned          250917**
    12 Unscheduled Care   1718283
    13 NA                   55697
    
    ```
    
    after the fix: 
    
    ```
       service_use_cohort       n
       <chr>                <int>
     1 Elective Inpatient  488521
     2 Geriatric           293869
     3 Limited Daycases    725583
     4 Maternity           206488
     5 Multiple Emergency 1140688
     6 Outpatients        1102878
     7 Prescribing        3982958
     **8 Psychiatry          111859**
     9 Routine Daycase     178742
    10 Single Emergency   1116042
    **11 Unassigned         1740237**
    12 Unscheduled Care   1718269
    13 NA                   55180
    ```
    
    Ive asked the source team if they can run through a test to see the
    impact on their figures so i am opening this as a draft for now incase
    further changes are needed.
    
    closes #907
    SwiftySalmon authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    1defb2b View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Bug - deal with missing variables (#914)

    * Add missing sc variables for no sc data
    
    * Fix code for including `_inc_dna` variables
    
    * Remove commented line
    Jennit07 authored Feb 16, 2024
    Configuration menu
    Copy the full SHA
    14cde16 View commit details
    Browse the repository at this point in the history
  2. Bug - Fix get pop path failing and preventing the indiv file from run…

    …ning. (#913)
    
    Fix bug - pop file paths breaking indiv file
    Jennit07 authored Feb 16, 2024
    Configuration menu
    Copy the full SHA
    625402b View commit details
    Browse the repository at this point in the history
  3. correct file hscp file path

    Jennit07 committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    36c5e74 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    63e2caf View commit details
    Browse the repository at this point in the history
  5. Review check_qtr_format function (#897)

    Opening a draft PR for now. I think we need to review the care home
    methodology before deciding if we need the quarter calculation
    functions. I will highlight areas in the code which i am not sure about
    as i want to make sure we pick up the correct logic.
    
    For now i have concluded that we can remove the `check_qtr_format`
    function so have removed this from the code.
    
    Closes Issue #886
    rchlv authored Feb 16, 2024
    Configuration menu
    Copy the full SHA
    c684b81 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2024

  1. Update process_sc_all_home_care.R

    A small issue was identified when running targets. Linked with changes to the function `fix_sc_end_dates()`
    lizihao-anu authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    ad629b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    640548b View commit details
    Browse the repository at this point in the history
  3. remove duplicate columns

    lizihao-anu authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    e0da70c View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Fix targets (#892)

    * fix sc_client_lookup sc_send_lca
    
    * fix an issue of get_pop_path
    
    * Style code
    
    * fix the rest of get_pop_path from get_datazone_pop_path
    
    * Update documentation
    
    * fix sc_send_lca
    
    * add missing year column
    
    * explicitly specify the argument year to avoid corruption of targets
    
    * Update documentation
    
    * new data pipeline with targets
    remove create_individual_files from targets and append it to run_targets script
    
    * minor changes
    
    * Style code
    
    * undo sc_send_lca bit
    
    * Update targets scripts
    
    * Remove top level targets scripts
    
    ---------
    
    Co-authored-by: lizihao-anu <[email protected]>
    Co-authored-by: Megan McNicol <[email protected]>
    Co-authored-by: Jennit07 <[email protected]>
    Co-authored-by: Jennifer Thom <[email protected]>
    5 people authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    9699394 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aa83adb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f5c7448 View commit details
    Browse the repository at this point in the history
  4. Update process_sc_all_home_care.R (#916)

    A small issue was identified when running targets. Linked with changes
    to the function `fix_sc_end_dates()`
    SwiftySalmon authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    612a409 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b7e7138 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c9e103e View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. Configuration menu
    Copy the full SHA
    3c2a360 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. Configuration menu
    Copy the full SHA
    ad79baa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6c2b6d5 View commit details
    Browse the repository at this point in the history
  3. Update documentation

    rchlv authored and github-actions[bot] committed May 17, 2024
    Configuration menu
    Copy the full SHA
    d47c0a1 View commit details
    Browse the repository at this point in the history
  4. Style code

    rchlv authored and github-actions[bot] committed May 17, 2024
    Configuration menu
    Copy the full SHA
    ec0c5ef View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Configuration menu
    Copy the full SHA
    8a704e0 View commit details
    Browse the repository at this point in the history
  2. Add activity after death flag

    rchlv committed May 20, 2024
    Configuration menu
    Copy the full SHA
    746d65d View commit details
    Browse the repository at this point in the history
  3. Join data back to episode file

    rchlv committed May 20, 2024
    Configuration menu
    Copy the full SHA
    861bb2b View commit details
    Browse the repository at this point in the history
  4. Solve git conflict

    Merge branch 'add_activity_after_death' of https://github.com/Public-Health-Scotland/source-linkage-files into add_activity_after_death
    # Please enter a commit message to explain why this merge is necessary,
    # especially if it merges an updated upstream into a topic branch.
    #
    # Lines starting with '#' will be ignored, and an empty message aborts
    # the commit.
    rchlv committed May 20, 2024
    Configuration menu
    Copy the full SHA
    f8d1d9a View commit details
    Browse the repository at this point in the history
  5. Style code

    rchlv authored and github-actions[bot] committed May 20, 2024
    Configuration menu
    Copy the full SHA
    8ea7941 View commit details
    Browse the repository at this point in the history
  6. Update documentation

    rchlv authored and github-actions[bot] committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b8589ad View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Configuration menu
    Copy the full SHA
    3b22b92 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    2b43e3f View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. changes to activity after death flag

    marjom02 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    e3a646f View commit details
    Browse the repository at this point in the history
  2. Update documentation

    SwiftySalmon authored and github-actions[bot] committed May 27, 2024
    Configuration menu
    Copy the full SHA
    5e5c71a View commit details
    Browse the repository at this point in the history
  3. Update R/add_activity_after_death_flag.R

    Co-authored-by: Jennit07 <[email protected]>
    SwiftySalmon and Jennit07 authored May 27, 2024
    Configuration menu
    Copy the full SHA
    5ed7cf3 View commit details
    Browse the repository at this point in the history
  4. Update R/add_activity_after_death_flag.R

    Co-authored-by: Jennit07 <[email protected]>
    SwiftySalmon and Jennit07 authored May 27, 2024
    Configuration menu
    Copy the full SHA
    8faac6e View commit details
    Browse the repository at this point in the history
  5. added .data$ to variables

    marjom02 committed May 27, 2024
    Configuration menu
    Copy the full SHA
    1406ff0 View commit details
    Browse the repository at this point in the history
  6. Update documentation

    SwiftySalmon authored and github-actions[bot] committed May 27, 2024
    Configuration menu
    Copy the full SHA
    c535165 View commit details
    Browse the repository at this point in the history
  7. Style code

    SwiftySalmon authored and github-actions[bot] committed May 27, 2024
    Configuration menu
    Copy the full SHA
    edb4782 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9aea212 View commit details
    Browse the repository at this point in the history