-
Notifications
You must be signed in to change notification settings - Fork 524
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 unused code #9684
remove unused code #9684
Conversation
Warning Rate limit exceeded@rithviknishad has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 11 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (7)
WalkthroughThis pull request involves a significant refactoring of the codebase, primarily focusing on the removal of components, routes, and models related to medication and prescription management. The changes span multiple files across different directories, including components, hooks, types, and utility functions. The removal suggests a substantial restructuring of how medication-related functionality is handled in the application, potentially indicating a shift in the system's architectural approach to medical prescriptions. Changes
Possibly related PRs
Suggested Reviewers
Poem
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
|
CARE Run #4147
Run Properties:
|
Project |
CARE
|
Branch Review |
rithviknishad/chore/remove-unused-things
|
Run status |
Passed #4147
|
Run duration | 01m 11s |
Commit |
620123df18: remove unused code
|
Committer | Rithvik Nishad |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
3
|
View all changes introduced in this branch ↗︎ |
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
🧹 Nitpick comments (4)
src/components/Common/LanguageSelector.tsx (2)
5-5
: Consider removing unused imports ifclassNames
is not used.The current changes add
keysOf
to the import statement. IfclassNames
is no longer needed (or vice versa), remove the unused import to keep the code clean.
39-39
: Ensure proper type for event parameter, if needed.You removed the explicit type annotation on the map callback parameter (
e
). While TypeScript inference generally suffices, confirm that it meets your code standards and doesn't affect readability.src/components/Common/LanguageSelectorLogin.tsx (1)
5-5
: Same import comment as inLanguageSelector.tsx
.If
classNames
is not used, you may remove it to keep the imports consistent and concise. Otherwise, this usage is valid.src/components/Form/FormFields/TextFormField.tsx (1)
Line range hint
49-52
: Consider renaminglabelSuffixWithThreshold
.Now that threshold logic has been removed, this variable name may no longer accurately reflect its purpose. Renaming it to something like
labelSuffixElement
(or simply reusingfield.labelSuffix
directly) may improve clarity.- const labelSuffixWithThreshold = ( + const labelSuffixElement = (
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (47)
src/Utils/request/api.tsx
(0 hunks)src/components/Common/LanguageSelector.tsx
(3 hunks)src/components/Common/LanguageSelectorLogin.tsx
(3 hunks)src/components/Common/QRScanner.tsx
(0 hunks)src/components/Common/Readmore.tsx
(0 hunks)src/components/Common/RelativeDateUserMention.tsx
(0 hunks)src/components/Common/TemperatureFormField.tsx
(0 hunks)src/components/Form/FieldValidators.tsx
(0 hunks)src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx
(0 hunks)src/components/Form/FormFields/AutocompleteMultiselect.tsx
(0 hunks)src/components/Form/FormFields/CheckBoxFormField.tsx
(0 hunks)src/components/Form/FormFields/DosageFormField.tsx
(0 hunks)src/components/Form/FormFields/Month.tsx
(0 hunks)src/components/Form/FormFields/NumericWithUnitsFormField.tsx
(0 hunks)src/components/Form/FormFields/OtpFormField.tsx
(0 hunks)src/components/Form/FormFields/RangeAutocompleteFormField.tsx
(0 hunks)src/components/Form/FormFields/RangeFormField.tsx
(0 hunks)src/components/Form/FormFields/TextFormField.tsx
(1 hunks)src/components/Form/ModelCrudEditor.tsx
(0 hunks)src/components/Medicine/AdministerMedicine.tsx
(0 hunks)src/components/Medicine/DiscontinueMedication.tsx
(0 hunks)src/components/Medicine/EditPrescriptionForm.tsx
(0 hunks)src/components/Medicine/MedicineAdministration.tsx
(0 hunks)src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx
(0 hunks)src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx
(0 hunks)src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx
(0 hunks)src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx
(0 hunks)src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx
(0 hunks)src/components/Medicine/MedicineAdministrationSheet/utils.ts
(0 hunks)src/components/Medicine/MedicinePrescriptionSummary.tsx
(0 hunks)src/components/Medicine/PrescriptionDetailCard.tsx
(0 hunks)src/components/Medicine/PrescriptionTimeline.tsx
(0 hunks)src/components/Medicine/PrescriptionsTable.tsx
(0 hunks)src/components/Medicine/ResponsiveMedicineTables.tsx
(0 hunks)src/components/Medicine/models.ts
(0 hunks)src/components/Medicine/routes.ts
(0 hunks)src/components/Medicine/validators.ts
(0 hunks)src/components/Notifications/models.tsx
(0 hunks)src/components/Questionnaire/QuestionTypes/MedicationRequestQuestion.tsx
(1 hunks)src/components/Symptoms/SymptomsBuilder.tsx
(0 hunks)src/components/Symptoms/SymptomsCard.tsx
(0 hunks)src/components/Symptoms/api.ts
(0 hunks)src/components/Symptoms/types.ts
(0 hunks)src/components/Symptoms/utils.ts
(0 hunks)src/hooks/useNotificationSubscriptionState.ts
(0 hunks)src/i18n.ts
(1 hunks)src/types/emr/medicationRequest.ts
(1 hunks)
💤 Files with no reviewable changes (41)
- src/components/Form/FormFields/CheckBoxFormField.tsx
- src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx
- src/components/Common/RelativeDateUserMention.tsx
- src/components/Form/FormFields/Month.tsx
- src/components/Medicine/MedicineAdministrationSheet/utils.ts
- src/components/Symptoms/api.ts
- src/components/Medicine/EditPrescriptionForm.tsx
- src/components/Form/FormFields/DosageFormField.tsx
- src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx
- src/components/Form/FormFields/OtpFormField.tsx
- src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx
- src/components/Common/Readmore.tsx
- src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx
- src/components/Form/FormFields/RangeFormField.tsx
- src/components/Medicine/AdministerMedicine.tsx
- src/components/Common/TemperatureFormField.tsx
- src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx
- src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx
- src/hooks/useNotificationSubscriptionState.ts
- src/components/Medicine/DiscontinueMedication.tsx
- src/components/Medicine/MedicineAdministration.tsx
- src/components/Notifications/models.tsx
- src/components/Medicine/ResponsiveMedicineTables.tsx
- src/components/Form/ModelCrudEditor.tsx
- src/components/Symptoms/SymptomsCard.tsx
- src/components/Symptoms/types.ts
- src/components/Form/FormFields/NumericWithUnitsFormField.tsx
- src/components/Form/FormFields/AutocompleteMultiselect.tsx
- src/Utils/request/api.tsx
- src/components/Common/QRScanner.tsx
- src/components/Symptoms/SymptomsBuilder.tsx
- src/components/Medicine/PrescriptionsTable.tsx
- src/components/Form/FormFields/RangeAutocompleteFormField.tsx
- src/components/Medicine/routes.ts
- src/components/Medicine/validators.ts
- src/components/Medicine/PrescriptionTimeline.tsx
- src/components/Medicine/models.ts
- src/components/Form/FieldValidators.tsx
- src/components/Medicine/PrescriptionDetailCard.tsx
- src/components/Medicine/MedicinePrescriptionSummary.tsx
- src/components/Symptoms/utils.ts
🔇 Additional comments (7)
src/i18n.ts (1)
6-13
: Overall good implementation usingas const
.Defining
LANGUAGES
usingas const
is a great approach to ensure TypeScript infers the most specific types for the language codes. This improves type safety throughout the application.src/components/Common/LanguageSelector.tsx (1)
23-23
: Good approach filtering locales withcareConfig
.Filtering the locales according to
careConfig.availableLocales
ensures that only supported languages are presented to users. This logic is clear and aligned with best practices.src/components/Common/LanguageSelectorLogin.tsx (2)
22-22
: Filtering logic matchesLanguageSelector
.Consistent usage of
keysOf(LANGUAGES)
andcareConfig.availableLocales
is good for ensuring uniform behavior across components.
31-31
: Good approach for inlined language selection buttons.Mapping over
availableLocales
and displaying the corresponding language values is straightforward and user-friendly.src/types/emr/medicationRequest.ts (1)
5-14
: Unit list is well-defined with literal types.
TheDOSAGE_UNITS
array is correctly typed as a readonly tuple, ensuring the compiler provides accurate autocompletion and error-checking. This approach prevents accidental changes to the dosage units.src/components/Questionnaire/QuestionTypes/MedicationRequestQuestion.tsx (1)
20-20
: Good integration ofDOSAGE_UNITS
in theQuantityInput
.
ImportingDOSAGE_UNITS
from a single source centralizes dosage-unit definitions, ensuring consistency across the application.src/components/Form/FormFields/TextFormField.tsx (1)
16-16
: Unused “threshold” references appear fully removed.It looks like the code successfully removes the old threshold references. The import on line 16,
classNames
, is properly used below and there's no leftover threshold logic.
@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
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
Based on the comprehensive summary of changes, here are the release notes:
Removed Features
Type System Improvements
DOSAGE_UNITS
constant for more precise type definitionsCode Cleanup