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

Patient Age Group #52

Merged
merged 9 commits into from
Mar 21, 2024
Merged

Patient Age Group #52

merged 9 commits into from
Mar 21, 2024

Conversation

MatthewTurk247
Copy link
Collaborator

Patient Age Group

♻️ Current situation & Problem

We need a way to determine whether a patient is part of the upcoming pediatric study or the upcoming adult study so that UI can be updated accordingly.

⚙️ Release Notes

  • Adds the logic for tagging patients for pediatric/adult study based on date of birth and time of account creation. This information is stored in Firebase for later use in layout of the UI.

✅ Testing

Because of the guard statement at the beginning of the function body of interest, the bulk of the meaningful testing will be manual inspections of Firebase.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for the improvements @MatthewTurk247; I had feedback regarding the storage of the information. Apart from this the overall approach looks good to me.

PAWS/PAWSStandard.swift Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 28.44%. Comparing base (2e271bb) to head (d9e4956).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   28.17%   28.44%   +0.27%     
==========================================
  Files          34       35       +1     
  Lines        1232     1245      +13     
==========================================
+ Hits          347      354       +7     
- Misses        885      891       +6     
Files Coverage Δ
PAWS/Helper/Date+Bool.swift 87.50% <87.50%> (ø)
PAWS/PAWSStandard.swift 3.44% <0.00%> (-0.08%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e271bb...d9e4956. Read the comment docs.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

@MatthewTurk247 Thank you for the updates. I have a question regarding the unit test. If we run into the code coverage issues I think we can merge it slightly below coverage as long as the core logic in e.g. a Date extension is tested.

PAWSTests/PAWSTests.swift Outdated Show resolved Hide resolved
@MatthewTurk247 MatthewTurk247 merged commit 5085051 into main Mar 21, 2024
7 checks passed
@MatthewTurk247 MatthewTurk247 deleted the patient-age branch March 21, 2024 22:51
@MatthewTurk247 MatthewTurk247 mentioned this pull request Mar 27, 2024
1 task
@PSchmiedmayer PSchmiedmayer mentioned this pull request Apr 6, 2024
1 task
MatthewTurk247 added a commit that referenced this pull request Apr 26, 2024
# Switch Bios

## ♻️ Current situation & Problem
Provides support for switching the list of contacts featured in the app,
depending on whether the user is enrolled in the pediatric study or the
adult study. Each patient is assigned an age group in Firebase when they
sign up.


## ⚙️ Release Notes 
- Uses a Boolean variable (based on `account` environment variable)
indicating whether the logged-in user is in the pediatric age group or
the adult age group.
- Adds new localized strings and if statements to switch between text.
- Adds UI tests for said switches.


## 📚 Documentation
See #52.


## ✅ Testing
Included in code changes.


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).

---------

Co-authored-by: Paul Schmiedmayer <PSchmiedmayer@users.noreply.github.com>
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.

2 participants