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

Fix wrong terminology used in place of Log Update #9089

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

yash-learner
Copy link
Member

@yash-learner yash-learner commented Nov 11, 2024

Proposed Changes

Things to check:

  • Changes related to events and daily_rounds is left out as events will be deprecated
  • Changing description requires backend change - Need to check whether a backend PR is required as changing the message would be simple but changing constants PATIENT_CONSULTATION_UPDATE_CREATED to PATIENT_LOG_UPDATE_CREATED requires a migration and also we may revamp this DailyRounds table to something else future based on FHIR

This pull request includes significant updates to the application's routing and terminology, specifically changing references from "daily rounds" to "log updates". The changes span multiple files and components, ensuring consistency across the codebase.

Key changes include:

Routing and Terminology Updates:

Component Updates:

Localization:

  • Change 1
  • Change 2
  • More?

@ohcnetwork/care-fe-code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

Summary by CodeRabbit

Release Notes

  • New Features

    • Added localization support for logging functionalities with new keys for log updates.
    • Updated navigation paths across various components to reflect the new "log_updates" terminology instead of "daily_rounds."
    • Enhanced internationalization support for component titles and button texts.
  • Bug Fixes

    • Improved error handling for patients without assigned beds when accessing log updates.
  • Tests

    • Updated Cypress end-to-end tests to reflect new button identifiers and ensure accurate interactions with the UI.
  • Chores

    • Reformatted Tailwind CSS configuration for better readability.

Copy link

coderabbitai bot commented Nov 11, 2024

Walkthrough

The pull request introduces changes to enhance the localization and routing of logging functionalities within the application. This includes adding new localization keys for logging updates, updating various route paths from "daily rounds" to "log updates," and modifying notification events to reflect the new terminology. The changes span multiple components and files, ensuring consistent terminology and improved user interface elements related to logging activities.

Changes

File Path Change Summary
public/locale/en.json Added localization keys: "log_update": "Log Update" and "log_updates": "Log Updates".
src/Routers/routes/ConsultationRoutes.tsx Updated route paths from daily-rounds to log_updates for various consultation routes.
src/common/constants.tsx Updated notification texts from "Patient Consultation Update" to "Patient Log Update".
src/components/Facility/ConsultationCard.tsx Changed navigation path for "Add Consultation Updates" button from /daily-rounds to /log_updates.
src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx Renamed tab from "daily_rounds" to "log_updates".
src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx Updated button href attributes to point to log_updates paths.
src/components/LogUpdate/CriticalCareEditor.tsx Updated button href from /daily-rounds to /log_updates.
src/components/LogUpdate/CriticalCarePreview.tsx Updated title to use translatable string {t("log_updates")}.
src/components/Notifications/NotificationsList.tsx Updated notification URLs to replace /daily-rounds/ with /log_updates/.
src/components/Notifications/ShowPushNotification.tsx Updated notification URLs to reflect new path structure for log updates.
src/components/Patient/DailyRoundListDetails.tsx Updated title and button href to use /log_updates.
src/components/Patient/DailyRounds.tsx Updated header text and navigation paths from daily_rounds to log_updates.
src/components/Patient/PatientInfoCard.tsx Updated button href to navigate to /log_updates instead of /daily-rounds.
cypress/e2e/patient_spec/PatientLogUpdate.cy.ts Renamed button identifiers in tests from "Daily Rounds" to "Log Updates".
tailwind.config.js Reformatted content array for improved readability.

Assessment against linked issues

Objective Addressed Explanation
Consistency in terminology for log updates (7350)
Update UI elements to reflect "Log Update" terminology (7350)
Change navigation paths from "daily rounds" to "log updates" (7350)
Ensure localization for log updates (7350)

Possibly related PRs

  • Avatar in UserAutoComplete #8967: The changes in the main PR involve adding new localization entries for logging functionalities, which relates to the updates made in the src/common/constants.tsx file where the terminology for patient consultation updates was changed to log updates, indicating a shift in how logging is referenced in the application.
  • Update tooltip position and rotation in Discussion Notes panel #8938: The main PR's focus on enhancing logging capabilities aligns with the changes in src/components/Facility/ConsultationCard.tsx, where the navigation for consultation updates was altered to reflect the new terminology for log updates, indicating a direct connection in the context of logging functionalities.
  • Added dynamic lock icon and strong types #9006: The main PR's updates to logging functionalities are relevant to the changes in src/components/Patient/PatientHome.tsx, where the handling of patient transfers and updates was refined, suggesting a broader context of improving patient management features, including logging.
  • New Cypress Test | Create Partial Investigation Log Update  #9034: The new Cypress test for creating patient investigations is related to the main PR as it involves logging actions within the patient consultation workflow, which is enhanced by the new localization entries for logging functionalities.
  • Add Cypress Test Suite for Facility Notice Board Functionality Verification #9045: The addition of a Cypress test suite for facility notifications connects to the main PR's focus on logging functionalities, as both involve improving user interactions and feedback mechanisms within the application.
  • Fix bug with recursion #9100: The fix for the recursion bug in the ConsultationDetails component relates to the main PR's focus on enhancing logging capabilities, as both aim to improve the overall performance and user experience of the application.

Suggested labels

needs review, tested, good to merge

Suggested reviewers

  • rithviknishad
  • shivankacker

🐇 In the fields where we hop and play,
Log updates are here to stay!
From daily rounds to logs anew,
A clearer path for me and you.
With every change, our work's refined,
A better way for all mankind! 🌼

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

cypress/pageobject/Patient/PatientConsultation.ts

Oops! 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'
Require stack:

  • /.eslintrc.json
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46)
    at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43)
    at _normalizeObjectConfigDataBody.next ()
    at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20)
    at _normalizeObjectConfigData.next ()
    at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e29a2b3 and 79a3616.

📒 Files selected for processing (4)
  • cypress/pageobject/Patient/PatientConsultation.ts (1 hunks)
  • public/locale/en.json (3 hunks)
  • src/components/Facility/ConsultationCard.tsx (3 hunks)
  • src/components/Facility/Consultations/DailyRoundsList.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/components/Facility/Consultations/DailyRoundsList.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • public/locale/en.json
  • src/components/Facility/ConsultationCard.tsx
🔇 Additional comments (1)
cypress/pageobject/Patient/PatientConsultation.ts (1)

118-119: LGTM! Verify other occurrences of old terminology.

The selector and text updates align with the PR objective of standardizing terminology from "daily rounds" to "log updates".

Let's verify if there are any remaining instances of old terminology in the test files:

✅ Verification successful

The previous search returned no results, which could mean either all terminology has been updated or we need a broader search. This new script:

  1. Searches for broader terms 'daily' or 'rounds' with context
  2. Searches for 'consultation' related terms with context
  3. Lists all TypeScript files in cypress directory to ensure we're searching in the right place

No remaining instances of old terminology found in test files

The search results show that all references to "daily rounds" have been replaced with "log updates" in the test files. The only occurrences of "rounds" found are:

  1. In PatientLogupdate.ts for rounds_type selector which appears to be a different feature
  2. Instances of "daily" are only found in medicine frequency contexts like "Twice daily"
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for old terminology in test files that might need updates

# Check for "daily rounds" or "consultation updates" in cypress files
echo "Searching for old terminology in Cypress files..."
rg -i "daily.?rounds|consultation.?updates" --type ts --glob "cypress/**"

# Check for old selectors that might need updates
echo "Searching for potentially outdated selectors..."
rg -i "view_consultation_updates|consultation_updates|daily.?rounds" --type ts --glob "cypress/**"

Length of output: 390


Script:

#!/bin/bash
# Let's try a broader search with more variations and context
echo "Searching for any mentions of 'daily' or 'rounds' in cypress files..."
rg -i "daily|rounds" -A 2 -B 2 --type ts --glob "cypress/**"

echo -e "\nSearching for consultation-related terms..."
rg -i "consultation" -A 2 -B 2 --type ts --glob "cypress/**"

echo -e "\nListing all files in cypress directory for context..."
fd . "cypress" -e ts -t f

Length of output: 64346


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Nov 11, 2024

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 79a3616
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/673510d3c682480008b577a5
😎 Deploy Preview https://deploy-preview-9089--care-ohc.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.

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Nov 12, 2024
Copy link

👋 Hi, @yash-learner,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@yash-learner yash-learner marked this pull request as ready for review November 12, 2024 21:15
@yash-learner yash-learner requested a review from a team as a code owner November 12, 2024 21:15
@yash-learner
Copy link
Member Author

Things to check:

  • Changes related to events and daily_rounds is left out as events will be deprecated
  • Changing description of notification requires backend change - Need to check whether a backend PR is required as changing the message would be simple but changing constants PATIENT_CONSULTATION_UPDATE_CREATED to PATIENT_LOG_UPDATE_CREATED requires a migration and also we may revamp this DailyRounds table to something else future based on FHIR.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (19)
src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (1)

Action Required: Update Dependent Test Files

The ID dailyround-entry is referenced in the following test files and needs to be updated accordingly:

  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
🔗 Analysis chain

Line range hint 28-31: Update remaining legacy terminology for consistency

While the URL paths have been updated, there are still references to "dailyround" in the codebase:

  1. The HTML element uses id="dailyround-entry"
  2. The component file is still located in the "DailyRounds" directory

Consider applying this change:

-      id="dailyround-entry"
+      id="log-update-entry"

Let's check if there are any CSS selectors or JavaScript code depending on this ID:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any references to the dailyround-entry ID
rg "dailyround-entry"

Length of output: 574

src/components/Patient/DailyRoundListDetails.tsx (2)

Line range hint 13-13: Consider adding proper TypeScript interface for props

The component currently uses any type for props which reduces type safety. Consider creating a proper interface:

interface DailyRoundListDetailsProps {
  facilityId: string;
  patientId: string;
  consultationId: string;
  id: string;
}

Line range hint 1-1: Update file and component names to match new terminology

For consistency with the new terminology:

  1. Rename the file from DailyRoundListDetails.tsx to LogUpdateDetails.tsx
  2. Rename the component from DailyRoundListDetails to LogUpdateDetails

This aligns with the PR objective of standardizing terminology from "daily rounds" to "log updates" throughout the application.

src/Routers/routes/ConsultationRoutes.tsx (2)

Line range hint 1-16: Update import statements to reflect new terminology.

The import statements still use the old terminology (e.g., DailyRoundListDetails, DailyRounds). These should be updated once the component names are changed to maintain consistency with the new "log updates" terminology.

Consider updating the imports like this:

- import { DailyRoundListDetails } from "@/components/Patient/DailyRoundListDetails";
- import { DailyRounds } from "@/components/Patient/DailyRounds";
+ import { LogUpdateDetails } from "@/components/Patient/LogUpdateDetails";
+ import { LogUpdates } from "@/components/Patient/LogUpdates";

Inconsistent Terminology Usage Detected

Several references to "daily_rounds" remain in the codebase, including API endpoints and model definitions. Ensure all instances are updated to "log_updates" to maintain consistency.

  • src/Utils/request/api.tsx
  • src/components/Patient/models.tsx
  • src/components/LogUpdate/CriticalCarePreview.tsx
  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
🔗 Analysis chain

Line range hint 84-112: Component names should be updated to match the new terminology.

While the routes have been updated to use "log_updates", the component names still use the old "DailyRounds" terminology. This creates inconsistency in the codebase.

  1. Component naming should be updated to match the new terminology:
- <DailyRounds
+ <LogUpdates
- <DailyRoundListDetails
+ <LogUpdateDetails
  1. Let's verify the impact of these route changes:

Update shell scripts to correct syntax errors

Please run the following corrected scripts to verify any remaining references to the old route patterns:


Correct the shell scripts and re-run verification

Please execute the following updated scripts to verify any remaining references to the old route patterns:


Run updated shell scripts to verify remaining references


Run updated shell scripts to verify remaining references

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to the old route patterns
rg -i "daily.?rounds" --type ts --type tsx

# Search for direct navigation calls that might be affected
rg "navigate\(.*daily.?rounds" --type ts --type tsx
rg "push\(.*daily.?rounds" --type ts --type tsx

Length of output: 213


Script:

#!/bin/bash
# Search for any remaining references to the old route patterns
rg -i "daily.?rounds" --type ts --type tsx

# Search for direct navigation calls that might be affected
rg "navigate\(.*daily.?rounds" --type ts --type tsx
rg "push\(.*daily.?rounds" --type ts --type tsx

# Search for navigate function patterns using ast-grep
ast-grep --pattern 'navigate($_)' --type typescript

Length of output: 466


Script:

#!/bin/bash
# Search for any remaining references to the old route patterns without specifying the type
rg -i "daily.?rounds" --type typescript --type tsx

# Search for direct navigation calls that might be affected without specifying the type
rg "navigate\(.*daily.?rounds" --type typescript --type tsx
rg "push\(.*daily.?rounds" --type typescript --type tsx

# Search for navigate function patterns using ast-grep without the --type flag
ast-grep --pattern 'navigate($_)'

Length of output: 21019


Script:

#!/bin/bash
# Search for any remaining references to the old route patterns with correct types
rg -i "daily.?rounds" --type ts --type tsx

# Search for direct navigation calls that might be affected with correct types
rg "navigate\(.*daily.?rounds" --type ts --type tsx
rg "push\(.*daily.?rounds" --type ts --type tsx

# Search for navigate function patterns using ast-grep without the --type flag
ast-grep --pattern 'navigate($_)'

Length of output: 20974


Script:

#!/bin/bash
# Search for any remaining references to the old route patterns using file extensions
rg -i "daily.?rounds" --glob "*.ts" --glob "*.tsx"

# Search for direct navigation calls that might be affected using file extensions
rg "navigate\(.*daily.?rounds" --glob "*.ts" --glob "*.tsx"
rg "push\(.*daily.?rounds" --glob "*.ts" --glob "*.tsx"

# Search for navigate function patterns related to daily rounds using ast-grep
ast-grep --pattern 'navigate("/facility/:facilityId/patient/:patientId/consultation/:id/log_updates")'
ast-grep --pattern 'navigate("/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id/update")'
ast-grep --pattern 'navigate("/facility/:facilityId/patient/:patientId/consultation/:consultationId/log_updates/:id")'

Length of output: 18921

src/components/LogUpdate/CriticalCareEditor.tsx (1)

181-181: Consider updating API endpoint naming for consistency.

The slug update from "daily_rounds" to "log_updates" aligns with the new terminology. However, the API endpoint routes.updateDailyRound still uses the old terminology.

Consider updating the API endpoint name to maintain consistency:

-routes.updateDailyRound
+routes.updateLogUpdate
src/components/Facility/ConsultationCard.tsx (1)

Line range hint 208-213: Update button text to use consistent terminology.

The button text still uses "Add Consultation Updates" while the PR aims to standardize terminology to "Log Updates". This creates an inconsistency in the UI.

Apply this change to maintain terminology consistency:

            <ButtonV2
              className="h-auto whitespace-pre-wrap border border-secondary-500 bg-white text-black hover:bg-secondary-300"
              onClick={() => {
                /* ... */
              }}
              disabled={!!itemData.discharge_date}
              authorizeFor={NonReadOnlyUsers}
            >
-             Add Consultation Updates
+             Add Log Update
            </ButtonV2>
src/components/LogUpdate/CriticalCarePreview.tsx (4)

Line range hint 32-42: Add error handling for failed data fetching

The component only handles loading state but doesn't handle error cases from the useQuery hook.

Consider adding error handling:

- const { data } = useQuery(routes.getDailyReport, {
+ const { data, error } = useQuery(routes.getDailyReport, {
    pathParams: {
      consultationId: props.consultationId,
      id: props.id,
    },
  });

+ if (error) {
+   return <ErrorMessage message={t("failed_to_load_log_update")} error={error} />;
+ }

  if (!data) {
    return <Loading />;
  }

Line range hint 249-269: Extract medical ranges and units into constants

The vital signs ranges and units are hardcoded in multiple places. This could lead to inconsistencies and make updates difficult.

Create a constants file for medical measurements:

// src/constants/medicalMeasurements.ts
export const VITAL_SIGNS = {
  BLOOD_PRESSURE: {
    SYSTOLIC: {
      MIN: 99,
      MAX: 139,
      UNIT: 'mmHg'
    },
    DIASTOLIC: {
      MIN: 49,
      MAX: 89,
      UNIT: 'mmHg'
    }
  },
  SPO2: {
    MIN: 89,
    MAX: 100,
    UNIT: '%'
  }
  // ... other measurements
};

Then update the RangeDetail components to use these constants:

 <RangeDetail
   label="Systolic"
   value={data.bp.systolic}
-  max={250}
-  unit="mmHg"
+  max={VITAL_SIGNS.BLOOD_PRESSURE.SYSTOLIC.MAX}
+  unit={VITAL_SIGNS.BLOOD_PRESSURE.SYSTOLIC.UNIT}
   valueDescriptions={rangeValueDescription({
-    low: 99,
-    high: 139,
+    low: VITAL_SIGNS.BLOOD_PRESSURE.SYSTOLIC.MIN,
+    high: VITAL_SIGNS.BLOOD_PRESSURE.SYSTOLIC.MAX,
   })}
 />

Line range hint 401-411: Add missing key prop to table rows

The table rows in the I/O Balance section are missing key props, which can cause React reconciliation issues and impact performance.

Fix the missing key prop:

- <tr>
+ <tr key={`${category.key}-${row.name}`}>
   <td className="px-2 py-1">
     <span className="font-semibold">
       {category.name}
     </span>
     : {row.name}
   </td>
   <td className="px-2 py-1 text-right">
     {row.quantity} ml
   </td>
 </tr>

Line range hint 249-269: Enhance accessibility for vital signs readings

The vital signs section lacks proper ARIA labels for screen readers to announce the medical values and their ranges.

Add ARIA labels to the vital signs section:

 <RangeDetail
   label="Blood Pressure"
   value={data.bp.systolic}
+  aria-label={`Systolic blood pressure ${data.bp.systolic} mmHg`}
   max={250}
   unit="mmHg"
   valueDescriptions={rangeValueDescription({
     low: 99,
     high: 139,
   })}
 />

Also applies to: 270-290

src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx (2)

Line range hint 1-691: Consider updating component and variable names for terminology consistency.

While the tab text has been updated, there are several instances where the old "daily rounds" terminology is still being used:

  • Component name DailyRoundsSortDropdown
  • Import statements for DailyRoundsFilter and DailyRoundsList
  • Variable names like dailyRoundsQuery and setDailyRoundsQuery

Consider updating these to maintain consistency with the new "log updates" terminology. Here's a suggested refactor:

- import DailyRoundsFilter from '@/components/Facility/Consultations/DailyRoundsFilter';
- import DailyRoundsList from '@/components/Facility/Consultations/DailyRoundsList';
+ import LogUpdatesFilter from '@/components/Facility/Consultations/LogUpdatesFilter';
+ import LogUpdatesList from '@/components/Facility/Consultations/LogUpdatesList';

- const [dailyRoundsQuery, setDailyRoundsQuery] = useState<QueryParams>();
+ const [logUpdatesQuery, setLogUpdatesQuery] = useState<QueryParams>();

- function DailyRoundsSortDropdown({
+ function LogUpdatesSortDropdown({
-   setDailyRoundsQuery,
+   setLogUpdatesQuery,
}: {
-   setDailyRoundsQuery: (query: QueryParams) => void;
+   setLogUpdatesQuery: (query: QueryParams) => void;
}) {
-  return <DailyRoundsFilter
+  return <LogUpdatesFilter
    onApply={(query) => {
-      setDailyRoundsQuery(query);
+      setLogUpdatesQuery(query);
    }}
  />;
}

Multiple References to "Daily Rounds" Detected

The terminology change from "daily rounds" to "log updates" affects numerous parts of the application, including component imports, interfaces, API endpoints, routing paths, and translation files.

🔗 Analysis chain

Line range hint 1-691: Verify the impact of terminology changes.

The terminology change from "daily rounds" to "log updates" might affect other parts of the application that interact with this component.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other occurrences of "daily rounds" terminology that might need updating

# Search for "daily rounds" in TypeScript/JavaScript files
echo "Files containing 'daily rounds' or 'dailyRounds':"
rg -i "daily.?rounds" --type=ts --type=tsx --type=js --type=jsx

# Search for translation keys containing "daily_rounds"
echo "\nTranslation files containing 'daily_rounds':"
rg "daily_rounds" --type=json

Length of output: 409


Script:

#!/bin/bash
# Description: Check for other occurrences of "daily rounds" terminology that might need updating

# Search for "daily rounds" or "dailyRounds" in TypeScript and JavaScript files by file extension
echo "Files containing 'daily rounds' or 'dailyRounds':"
rg -i "daily.?rounds" --glob "*.ts" --glob "*.tsx" --glob "*.js" --glob "*.jsx"

# Search for translation keys containing "daily_rounds"
echo "\nTranslation files containing 'daily_rounds':"
rg "daily_rounds" --glob "*.json"

Length of output: 18796


Script:

#!/bin/bash
# Description: Comprehensive search for all occurrences and related patterns of "daily rounds" terminology that may need updating

# Search for exact and camelCase variations in TypeScript and JavaScript files
echo "Files containing 'daily rounds', 'dailyRounds', or similar variations:"
rg -i "\bdaily.?rounds\b" --glob "*.ts" --glob "*.tsx" --glob "*.js" --glob "*.jsx"

# Search for related terms that might be impacted by the terminology change
echo "\nFiles containing related terminology:"
rg -i "\blog.?updates\b|\blogUpdates\b" --glob "*.ts" --glob "*.tsx" --glob "*.js" --glob "*.jsx"

# Search for translation keys containing "daily_rounds" or similar
echo "\nTranslation files containing 'daily_rounds' or related keys:"
rg "daily[_ ]rounds" --glob "*.json"

Length of output: 7381

src/components/Patient/DailyRounds.tsx (2)

Line range hint 1-558: Consider splitting this large component into smaller, focused components

The component is quite large (500+ lines) and handles multiple responsibilities including form state management, validation, submission, and various conditional rendering logic. Consider breaking it down into smaller, more focused components for better maintainability.

Suggested structure:

  • LogUpdateForm (main container)
    • VitalsSection
    • DiagnosisSection
    • NursingCareSection
    • PrescriptionSection

Line range hint 416-444: Consider consolidating duplicate navigation logic

The navigation paths after form submission contain duplicated logic. Consider extracting this into a helper function to improve maintainability.

+ const getNavigationPath = (roundType: string, consultationId: string, objId?: string) => {
+   if (["NORMAL", "TELEMEDICINE", "COMMUNITY_NURSES_LOG"].includes(roundType)) {
+     return `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`;
+   }
+   const suffix = roundType === "VENTILATOR" ? "critical_care/update" : "update";
+   return `/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates/${objId}/${suffix}`;
+ };

- if (["NORMAL", "TELEMEDICINE", "COMMUNITY_NURSES_LOG"].includes(state.form.rounds_type)) {
-   navigate(`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}`);
- } else {
-   navigate(`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/log_updates/${obj.id}/update`);
- }
+ navigate(getNavigationPath(state.form.rounds_type, consultationId, obj.id));
src/components/Patient/PatientInfoCard.tsx (4)

585-585: Consider maintaining URL path case consistency

The URL path uses underscore (log_updates) while the previous path used kebab-case (daily-rounds). Consider using kebab-case for consistency: log-updates.


Line range hint 586-595: Enhance error message clarity

The error message could be more descriptive to guide users on the requirement and next steps.

-  msg: "Please assign a bed to the patient",
+  msg: "A bed assignment is required before adding log updates. Please assign a bed to continue.",

Line range hint 1-24: Consider decomposing the component for better maintainability

The PatientInfoCard component is quite large and handles multiple responsibilities. Consider breaking it down into smaller, more focused components:

  • PatientHeader for basic patient information
  • PatientStats for medical statistics
  • PatientActions for action buttons and menus

Also applies to: 32-38


Line range hint 596-605: Enhance accessibility with ARIA labels

Consider adding ARIA labels to improve screen reader support for the log update button:

 <ButtonV2
   variant={...}
   href={...}
   onClick={...}
   className="w-full"
+  aria-label={`Add ${authUser.user_type === "Doctor" ? "File Note" : "Log Update"} for patient ${patient.name}`}
 >
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7cb54b3 and d60eba5.

📒 Files selected for processing (13)
  • public/locale/en.json (1 hunks)
  • src/Routers/routes/ConsultationRoutes.tsx (5 hunks)
  • src/common/constants.tsx (1 hunks)
  • src/components/Facility/ConsultationCard.tsx (1 hunks)
  • src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx (1 hunks)
  • src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (2 hunks)
  • src/components/LogUpdate/CriticalCareEditor.tsx (2 hunks)
  • src/components/LogUpdate/CriticalCarePreview.tsx (1 hunks)
  • src/components/Notifications/NotificationsList.tsx (1 hunks)
  • src/components/Notifications/ShowPushNotification.tsx (1 hunks)
  • src/components/Patient/DailyRoundListDetails.tsx (2 hunks)
  • src/components/Patient/DailyRounds.tsx (4 hunks)
  • src/components/Patient/PatientInfoCard.tsx (1 hunks)
🔇 Additional comments (16)
src/components/Notifications/ShowPushNotification.tsx (1)

27-27: LGTM! URL paths updated to reflect new terminology.

The changes from /daily-rounds/ to /log_updates/ in the URL paths align with the PR objectives to maintain consistent terminology across the application.

Also applies to: 29-29

src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (1)

62-63: LGTM! URL paths updated correctly

The URL paths have been properly updated to use "log_updates" instead of "daily-rounds", maintaining the existing logic for different round types.

Also applies to: 84-85

src/components/Patient/DailyRoundListDetails.tsx (3)

34-34: LGTM! Good use of localization

The change correctly implements localized terminology for "log update" while maintaining the ID display format.


54-54: LGTM! URL path updated consistently

The href has been correctly updated to use the new "log_updates" terminology.


35-35: Verify route configuration for the new path

The URL path has been updated to use "log_updates". Let's verify that this route is properly configured.

src/Routers/routes/ConsultationRoutes.tsx (1)

Line range hint 113-131: Verify the impact of nested critical care routes.

The critical care routes follow a different nesting pattern compared to other routes:

  • /log_updates/:id/critical_care
  • /log_updates/:id/critical_care/update

While the naming is consistent, this structure differs from the previous pattern and might affect existing navigation logic.

Let's verify the impact:

src/components/LogUpdate/CriticalCareEditor.tsx (2)

Line range hint 11-11: Track remaining terminology updates for backend changes.

Several instances of the old terminology remain in backend-related code:

  • DailyRoundsModel type
  • getDailyReport route
  • updateDailyRound route

These should be updated when the backend changes are implemented.

Let's identify all instances to be updated:

#!/bin/bash
# Search for remaining instances of old terminology
rg -g '*.{ts,tsx}' '(Daily(Rounds|Report)|daily[-_]rounds)'

Also applies to: 13-13


98-98: LGTM! Verify route handler update.

The URL path change from "daily-rounds" to "log_updates" aligns with the PR objectives for terminology consistency.

Let's verify that the corresponding route handler has been updated:

src/components/Facility/ConsultationCard.tsx (1)

203-203: LGTM! Path updated to use new terminology.

The navigation path has been correctly updated from /daily-rounds to /log_updates/ which aligns with the PR objective of standardizing terminology across the application.

src/components/Notifications/NotificationsList.tsx (1)

75-75: Verify consistent usage of new URL paths

The URL paths have been updated from "daily-rounds" to "log_updates" to align with the new terminology. Let's verify that this change is consistent across the codebase.

Also applies to: 77-77

✅ Verification successful

Consistent usage of new URL paths verified

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining instances of old terminology in routes and verify consistency of new paths

# Check for any remaining instances of "daily-rounds" in route definitions
echo "Checking for old terminology in routes..."
rg -l "daily-rounds" --type tsx --type ts

# Check for consistency in "log_updates" usage
echo -e "\nVerifying consistency of new terminology..."
rg -l "log_updates?" --type tsx --type ts

# Check for potential typos in "log_updates"
echo -e "\nChecking for potential typos..."
rg -l "log_u[^p]dates?" --type tsx --type ts

Length of output: 491


Script:

#!/bin/bash
# Description: Check for any remaining instances of old terminology in routes and verify consistency of new paths using file extensions.

# Check for any remaining instances of "daily-rounds" in route definitions
echo "Checking for old terminology in routes..."
rg "daily-rounds" --glob "*.ts" --glob "*.tsx"

# Check for consistency in "log_updates" usage
echo -e "\nVerifying consistency of new terminology..."
rg "log_updates" --glob "*.ts" --glob "*.tsx"

# Check for potential typos in "log_updates"
echo -e "\nChecking for potential typos..."
rg "log_u[^p]dates?" --glob "*.ts" --glob "*.tsx"

Length of output: 3964

src/components/LogUpdate/CriticalCarePreview.tsx (1)

64-64: LGTM: Terminology update aligns with project objectives

The change from hardcoded text to t("log_updates") correctly implements the terminology standardization while maintaining i18n support.

src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx (1)

691-691: LGTM! Terminology updated as per requirements.

The tab text has been correctly updated from "daily_rounds" to "log_updates" to align with the new terminology.

src/components/Patient/DailyRounds.tsx (3)

149-149: LGTM: Terminology updated correctly

The header text has been updated to use the new "log_update" terminology, maintaining consistency with the PR objectives.


416-416: LGTM: Navigation paths updated consistently

All navigation paths have been updated from "daily_rounds" to "log_updates", aligning with the terminology change requirements.

Also applies to: 444-444, 558-558


149-149: Verify terminology changes in translation files

The code uses translation keys for the updated terminology. Let's verify that corresponding translation entries exist.

Also applies to: 416-416, 444-444, 558-558

✅ Verification successful

Translation entries for "log_update" and related keys are present.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the translation files contain the new "log_update" keys

# Search for log_update related translation keys
rg -g '*.json' '"log_update":'
rg -g '*.json' '"LOG_UPDATE_'

Length of output: 2254

public/locale/en.json (1)

825-826: LGTM! The new entries align with the terminology standardization effort.

The added translations for "log_update" and "log_updates" maintain consistent casing and follow the singular/plural pattern used throughout the file.

@@ -24,9 +24,9 @@ export default function ShowPushNotification({ id }: { id: string }) {
case "PATIENT_CONSULTATION_UPDATED":
return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}`;
case "PATIENT_CONSULTATION_UPDATE_CREATED":
return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/daily-rounds/${caused_objects?.daily_round}`;
return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.daily_round}`;
Copy link

@coderabbitai coderabbitai bot Nov 12, 2024

Choose a reason for hiding this comment

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

💡 Codebase verification

The parameter daily_round is used in multiple locations and should be updated consistently:

  • src/Utils/request/api.tsx
  • src/components/Notifications/ShowPushNotification.tsx
  • src/components/Patient/ManagePatients.tsx
  • src/components/Patient/DailyRounds.tsx
  • src/components/Shifting/ShiftDetailsUpdate.tsx
  • src/components/Notifications/NotificationsList.tsx
  • src/components/Scribe/formDetails.ts
🔗 Analysis chain

Consider updating the parameter name for consistency.

While the URL paths have been updated to use log_updates, the parameter daily_round in caused_objects?.daily_round still uses the old terminology. Consider updating this to maintain consistency.

-        return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.daily_round}`;
+        return `/facility/${caused_objects?.facility}/patient/${caused_objects?.patient}/consultation/${caused_objects?.consultation}/log_updates/${caused_objects?.log_update}`;

Let's check if this parameter name is used elsewhere in the codebase:

Also applies to: 29-29

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for daily_round parameter usage in TypeScript/JavaScript files
rg -t ts -t tsx -t js "daily_round" -A 3 -B 3

Length of output: 73


Script:

#!/bin/bash
# Search for daily_round parameter usage in TypeScript/JavaScript files
rg -t ts -t typescriptreact -t js "daily_round" -A 3 -B 3

Length of output: 97


Script:

#!/bin/bash
# Search for daily_round parameter usage in TypeScript/JavaScript files
rg -g "*.ts" -g "*.tsx" -g "*.js" "daily_round" -A 3 -B 3

Length of output: 15086

Copy link
Member Author

Choose a reason for hiding this comment

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

We still call the backend model as DailyRound and not opening an PR as we will soon revamping it according FHIR

src/Utils/request/api.tsx

Backend api routes

src/components/Notifications/ShowPushNotification.tsx

/log_updates/${caused_objects?.daily_round -> this as well coming from backend

src/components/Patient/ManagePatients.tsx

This as well from backend

src/components/Patient/DailyRounds.tsx && src/components/Scribe/formDetails.ts

This is removed as a plug.

src/components/Shifting/ShiftDetailsUpdate.tsx

This as well related to Model.

src/components/Notifications/NotificationsList.tsx

Left out is the model field coming from backend


@rithviknishad what do you think ?

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

src/components/Notifications/NotificationsList.tsx Outdated Show resolved Hide resolved
@@ -653,12 +653,12 @@ export const NOTIFICATION_EVENTS: NotificationEvent[] = [
},
{
id: "PATIENT_CONSULTATION_UPDATE_CREATED",
text: "Patient Consultation Update Created",
text: "Patient Log Update Created",
Copy link

@coderabbitai coderabbitai bot Nov 12, 2024

Choose a reason for hiding this comment

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

💡 Codebase verification

Remaining instances of "Consultation Update" found.

Please update the following files to ensure terminology consistency:

  • src/components/Facility/ConsultationCard.tsx
  • src/common/constants.tsx
  • cypress/pageobject/Patient/PatientConsultation.ts
  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
  • cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts
🔗 Analysis chain

LGTM! The terminology changes align with the PR objectives.

The text changes from "Patient Consultation Update" to "Patient Log Update" are consistent with the broader effort to standardize terminology across the application.

Let's verify that this terminology change is consistently applied across the codebase:

Also applies to: 661-661


🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for any remaining instances of "Consultation Update" that might need to be updated

# Search for "Consultation Update" in all files
echo "Searching for remaining instances of 'Consultation Update'..."
rg -i "consultation update" --type ts --type tsx

# Search for notification text usage
echo "Checking notification text usage..."
rg -i "PATIENT_CONSULTATION_UPDATE" --type ts --type tsx

Length of output: 383


Script:

#!/bin/bash
# Description: Corrected search for any remaining instances of "Consultation Update" that might need to be updated

# Search for "Consultation Update" in all .ts and .tsx files
echo "Searching for remaining instances of 'Consultation Update' in .ts and .tsx files..."
rg -i "consultation update" -g "*.ts" -g "*.tsx"

# Search for notification text usage in .ts and .tsx files
echo "Checking notification text usage in .ts and .tsx files..."
rg -i "PATIENT_CONSULTATION_UPDATE" -g "*.ts" -g "*.tsx"

Length of output: 2033

Copy link
Member Author

@yash-learner yash-learner Nov 13, 2024

Choose a reason for hiding this comment

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

@coderabbitai Addressed in 79a3616, d2a2e05

Copy link

Choose a reason for hiding this comment

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

@yash-learner, thanks for addressing the previous feedback with your recent commits. However, I have found that there are still some remaining instances of "Consultation Update" in the codebase. Specifically, the phrase appears in the following files:

  • src/common/constants.tsx:

    • Line containing text: "Patient Consultation Updated",
  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts:

    • Lines containing cy.verifyNotification("Consultation updated successfully");
  • cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts:

    • Line containing cy.verifyNotification("Consultation updated successfully");

Could you please update these instances to "Log Update" to ensure consistent terminology throughout the application?

🔗 Analysis chain
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that there are no remaining instances of "Consultation Update" in the codebase

# Search for "Consultation Update" in all .ts and .tsx files
rg -i "consultation update" -g "*.ts" -g "*.tsx"

Length of output: 576

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Nov 13, 2024
rithviknishad
rithviknishad previously approved these changes Nov 13, 2024
@rithviknishad rithviknishad dismissed their stale review November 13, 2024 14:19

code rabbit found some more references...

Copy link

@coderabbitai coderabbitai bot left a 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/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (1)

Line range hint 1-15: Update import paths to reflect new terminology.

The import path still contains "DailyRounds" which should be updated to maintain consistency with the new "LogUpdate" terminology.

- import LogUpdateCardAttribute from "@/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute";
+ import LogUpdateCardAttribute from "@/components/Facility/Consultations/LogUpdates/LogUpdateCardAttribute";

Note: This change would require moving the file to the new directory structure. Would you like me to help create a GitHub issue to track this refactoring task?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 732e1c8 and 465274f.

📒 Files selected for processing (2)
  • cypress/e2e/patient_spec/PatientLogUpdate.cy.ts (6 hunks)
  • src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (3 hunks)
🔇 Additional comments (5)
src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (2)

62-63: LGTM! URL paths updated consistently.

The URL path changes from "daily-rounds" to "log_updates" are consistent with the PR objectives.

Also applies to: 84-85


29-29: LGTM! Verify test selectors.

The ID change from "dailyround-entry" to "logupdate-entry" aligns with the terminology standardization.

✅ Verification successful

ID change is properly synchronized across codebase

The verification shows that:

  • The old ID "dailyround-entry" has been completely removed from the codebase
  • The new ID "logupdate-entry" is consistently used in both the component and its corresponding test file (PatientLogUpdate.cy.ts)
  • All test references have been updated to use the new selector
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the old ID is still referenced in tests
# Expected: No references to old "dailyround-entry" ID in test files

rg "dailyround-entry" "cypress/e2e" "**/*.test.{ts,tsx,js,jsx}"

Length of output: 127


Script:

#!/bin/bash
# Let's try a more comprehensive search for test files and the ID
# First, find all test files
echo "=== Test files ==="
fd "\.(test|spec|cy)\.(ts|tsx|js|jsx)$"

echo -e "\n=== Searching for dailyround-entry ==="
rg "dailyround-entry"

echo -e "\n=== Searching for logupdate-entry ==="
rg "logupdate-entry"

Length of output: 2372

cypress/e2e/patient_spec/PatientLogUpdate.cy.ts (3)

Line range hint 1-365: Excellent test coverage across different scenarios!

The test suite comprehensively covers:

  • Different types of updates (TeleIcu, Progress, Critical, Normal)
  • Various patient types (admitted, domiciliary)
  • Creation and editing workflows
  • Data verification and reflection
  • Edge cases (incomplete MEWS score)

Line range hint 1-365: Test suite successfully aligns with PR objectives.

The changes effectively validate the terminology transition from "daily rounds" to "log updates" across:

  • Button text
  • Selectors
  • Notification messages
  • UI element interactions

133-135: LGTM! Terminology changes are consistent.

The button text and selector changes align with the PR objectives to standardize terminology from "daily rounds" to "log updates".

Let's verify the consistency of the new selector usage across the codebase:

Also applies to: 183-185, 198-200, 213-215, 288-290, 312-314

✅ Verification successful

Selector changes are correctly implemented

The changes from "dailyround-entry" to "logupdate-entry" have been consistently implemented across both the component (DefaultLogUpdateCard.tsx) and the test file (PatientLogUpdate.cy.ts). The new selector is used uniformly in all instances, and there are no remaining references to the old "dailyround-entry" selector.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that old selectors are not used elsewhere
# and new selectors are used consistently

# Check for any remaining instances of old selector
rg -l "dailyround-entry"

# Verify consistent usage of new selector
rg -l "logupdate-entry"

Length of output: 171


Script:

#!/bin/bash
# Let's check the actual content to see the context of these selectors
rg "dailyround-entry|logupdate-entry" -B2 -A2 src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx cypress/e2e/patient_spec/PatientLogUpdate.cy.ts

Length of output: 3096

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
src/components/Scribe/formDetails.ts (1)

294-294: Consider tracking commented prescription fields as technical debt

The file contains well-documented prescription-related fields that are currently commented out. Consider creating a ticket to track the implementation of these fields if they're planned for future use.

Would you like me to help create a GitHub issue to track this technical debt?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 465274f and 2487bd3.

📒 Files selected for processing (2)
  • src/components/Patient/DailyRounds.tsx (4 hunks)
  • src/components/Scribe/formDetails.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/Patient/DailyRounds.tsx
🔇 Additional comments (2)
src/components/Scribe/formDetails.ts (2)

243-246: LGTM! Improved type definition formatting

The type definition formatting changes enhance readability while maintaining the same structure.


255-255: LGTM! Added helpful example for investigation notes

The added example clearly demonstrates how to use the notes field in investigations.

src/components/Scribe/formDetails.ts Outdated Show resolved Hide resolved
@yash-learner
Copy link
Member Author

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)

src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx (1)> Line range hint 1-15: Update import paths to reflect new terminology.

The import path still contains "DailyRounds" which should be updated to maintain consistency with the new "LogUpdate" terminology.

- import LogUpdateCardAttribute from "@/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute";
+ import LogUpdateCardAttribute from "@/components/Facility/Consultations/LogUpdates/LogUpdateCardAttribute";

Note: This change would require moving the file to the new directory structure. Would you like me to help create a GitHub issue to track this refactoring task?

📜 Review details

@rithviknishad Do you think this change is required as of now ?

@rithviknishad
Copy link
Member

@yash-learner yes let's do that too

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.

"Log Update"- consistency in terminology
2 participants