-
Notifications
You must be signed in to change notification settings - Fork 522
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
Remove special character validations for names (patients and users) #9177
Remove special character validations for names (patients and users) #9177
Conversation
WalkthroughThe changes in this pull request involve updating the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint (1.23.1)
src/common/validation.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.json': Cannot find module '@typescript-eslint/parser'
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
🔇 Additional comments (1)public/locale/en.json (1)
The added translation key
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Deploying care-fe with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
src/components/Patient/PatientRegister.tsx (1)
Line range hint
435-441
: Consider documenting the name transformation behavior.While name validation has been removed, the code still transforms the name using
startCase(toLower())
. This ensures consistent capitalization but might need documentation for maintainers.Add a comment explaining the name transformation:
name: startCase(toLower(formData.name)), +// Ensures consistent name capitalization: first letter of each word capitalized
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
src/common/validation.tsx
(0 hunks)src/components/Patient/PatientRegister.tsx
(1 hunks)src/components/Users/UserAdd.tsx
(0 hunks)
💤 Files with no reviewable changes (2)
- src/common/validation.tsx
- src/components/Users/UserAdd.tsx
🔇 Additional comments (2)
src/components/Patient/PatientRegister.tsx (2)
Line range hint 392-419
: Review duplicate patient detection logic.
With the removal of name validation restrictions, the duplicate patient detection logic might need review. Currently, it only checks phone numbers, which could lead to more duplicate records now that name validation is relaxed.
Let's check the duplicate detection implementation:
72-72
: Confirm the removal of name validation.
The removal of the validateName
import aligns with the revert PR's objective. This change allows for more flexible name inputs by only validating that the field is non-empty.
Let's verify if there are any remaining references to name validation:
CARE Run #3942
Run Properties:
|
Project |
CARE
|
Branch Review |
revert-disallow-numeric-chars-in-patient-names
|
Run status |
Passed #3942
|
Run duration | 04m 57s |
Commit |
b8d1d27de7: Remove special character validations for names (patients and users)
|
Committer | Rithvik Nishad |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
129
|
View all changes introduced in this branch ↗︎ |
Reminder: To add the "needs testing" label, comment "ready for testing" on this PR. |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@rithviknishad Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
Proposed Changes
Summary by CodeRabbit
New Features
Bug Fixes
Refactor