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

Viv3ckj/extend-validation-and-study-periods #95

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

viv3ckj
Copy link
Contributor

@viv3ckj viv3ckj commented Jan 9, 2025

The major change in this PR is the updating of the get_nhsbsa_data function.
When running the code in get_pf_medication_validation_data.R, I ran into a lexical error, which was a critical issue that prevented the code from proceeding when the API returned invalid responses. Therefore the script seemed to fail immediately whenever the server responded with anything other than valid JSON. By introducing retries, the script could recover from temporary issues like rate limiting or server overload.

The validation datasets now include September (for consultation validation data), and October (for medication validation data). The study monthly intervals have all been increased by one month.

Closes #92

@viv3ckj viv3ckj requested a review from milanwiedemann January 9, 2025 12:34
Copy link
Member

@milanwiedemann milanwiedemann left a comment

Choose a reason for hiding this comment

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

Thanks, looks great! Just one small thing before we rerun, should we make all measures intervals end in Nov 2024 or was there a reason for different end dates?

monthly_intervals_measure_med_counts = 7
Copy link
Member

@milanwiedemann milanwiedemann Jan 9, 2025

Choose a reason for hiding this comment

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

Just checking if there's a reason for the differnt end date that we're getting here? I remember that we decided to have different start dates depending on what we're looking at, but cant remember why we're having different end dates. Should all intervals end in November 2024?

  measure            start_date add_months end_date  
1 pf_breakdown       2023-11-01         12 2024-11-01
2 condition_provider 2023-01-01         22 2024-11-01
3 descriptive_stats  2024-02-01          9 2024-11-01
4 medications        2023-11-01          9 2024-08-01
5 med_counts         2024-02-01          7 2024-09-01

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@milanwiedemann Yup I can change the monthy intervals to make it more consistent, do we want the end date to be November 2024 or December 2024?

@viv3ckj viv3ckj merged commit 4e15124 into main Jan 10, 2025
1 check passed
@viv3ckj viv3ckj deleted the viv3ckj/extend-study-dates branch January 10, 2025 11:10
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.

Update study period of analyses and pull latest NHS BSA validation datasets
2 participants