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

Display patient age in mm dd when younger than 1y #6342

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Sep 25, 2023

WHAT

🤖 Generated by Copilot at 7274436

This pull request adds a new utility function formatAge that handles the display logic of the patient's age based on their date of birth and age in years. The function is used in various components across the application to show the patient's age more accurately and consistently with a unit suffix. The components that are updated include consultation details, investigation reports, legacy monitor card, treatment summary, patient manager, patient home, patient info card, sample details, shifting list view, shift details, and shifting board.

Proposed Changes

image
image
image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

HOW

🤖 Generated by Copilot at 7274436

  • Add formatAge function to src/Utils/utils.ts to display the age of the patient based on their date of birth and age in years (link)
  • Import formatAge function from src/Utils/utils.ts in various components that show the age of the patient (link, link, link, link, link, link, link, link, link, link, link, link)
  • Replace addTwoNumbers function with formatAge function in ConsultationUpdatesTab.tsx to display the age of the patient based on their date of birth and age in years (link)
  • Fetch and assign date_of_birth property from the API response in Reports/index.tsx and pass it to the ReportTable.tsx component (link, link, link)
  • Use formatAge function to display the age of the patient based on their date of birth and age in years in various components, optionally adding a suffix to indicate the unit of age (link, link, link, link, link, link, link, link, link, link, link, link)

@Ashesh3 Ashesh3 requested a review from a team September 25, 2023 13:23
@Ashesh3 Ashesh3 requested a review from a team as a code owner September 25, 2023 13:23
@Ashesh3 Ashesh3 requested a review from gigincg September 25, 2023 13:23
@vercel
Copy link

vercel bot commented Sep 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview Sep 25, 2023 1:23pm

@netlify
Copy link

netlify bot commented Sep 25, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 7274436
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/651189c9bc57f8000853a58f
😎 Deploy Preview https://deploy-preview-6342--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Ashesh3 Ashesh3 added the P1 breaking issue or vital feature label Sep 25, 2023
@cypress
Copy link

cypress bot commented Sep 25, 2023

Passing run #1305 ↗︎

0 75 0 0 Flakiness 0

Details:

Display patient age in mm dd when younger than 1y
Project: CARE Commit: 7274436152
Status: Passed Duration: 02:34 💡
Started: Sep 25, 2023 1:27 PM Ended: Sep 25, 2023 1:30 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@khavinshankar khavinshankar merged commit 308379e into develop Sep 26, 2023
34 checks passed
@khavinshankar khavinshankar deleted the fix-6339 branch September 26, 2023 09:49
@github-actions
Copy link

@Ashesh3 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cypress passed P1 breaking issue or vital feature tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display age of patients below 1 year
3 participants