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

Consultation update page form UI updated #9074

Closed
wants to merge 46 commits into from

Conversation

modamaan
Copy link
Contributor

@modamaan modamaan commented Nov 10, 2024

Proposed Changes

Updated UI
Screenshot 2024-11-10 070815

@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

  • New Features

    • Updated the layout of the Daily Round List Details to a card-based design for improved visual representation.
    • Enhanced organization of health metrics and additional sections for respiratory information.
  • Bug Fixes

    • Improved dynamic waiting for visibility in the Patient Log update process, replacing static wait times.
    • Added timeout handling for notification visibility checks in the verification command.
  • Documentation

    • Updated method signatures to reflect changes in implementation.

@modamaan modamaan requested a review from a team as a code owner November 10, 2024 01:40
Copy link
Contributor

coderabbitai bot commented Nov 10, 2024

Walkthrough

The pull request introduces UI improvements for the Daily Rounds patient details page. The changes focus on enhancing the visual presentation of patient information by transitioning from a div-based layout to a more structured card-based design. The modifications include reorganizing health metrics into a grid format, introducing badges for patient categorization, and refining the display of medical information such as blood pressure, respiratory details, and physical examination data.

Changes

File Change Summary
src/components/Patient/DailyRoundListDetails.tsx Redesigned component layout using Card components, added Badge for patient details, restructured health metrics grid
cypress/pageobject/Patient/PatientLogupdate.ts Updated clickUpdateDetail method to use dynamic visibility check instead of static delay
cypress/support/commands.ts Modified verifyNotification command to include 30-second timeout for notification visibility

Assessment against linked issues

Objective Addressed Explanation
Update form UI on Consultation Update page [#9067]

Suggested Labels

needs review, tested

Suggested Reviewers

  • rithviknishad
  • Jacobjeevan

Poem

🐰 A rabbit's tale of UI delight,
Cards and badges now shine so bright!
Metrics grid, a visual feast,
Patient details, no longer a beast.
Code transformed with magical might! 🩺✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66a8b0b and 933632c.

📒 Files selected for processing (2)
  • cypress/pageobject/Patient/PatientLogupdate.ts (1 hunks)
  • cypress/support/commands.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • cypress/support/commands.ts
  • cypress/pageobject/Patient/PatientLogupdate.ts

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 10, 2024

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 2e4ad9c
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/6761b5f442834d00088e13dc
😎 Deploy Preview https://deploy-preview-9074--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 Deploy-Failed Deplyment is not showing preview label Nov 10, 2024
Copy link
Contributor

@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: 4

🧹 Outside diff range and nitpick comments (10)
src/components/ui/separator.tsx (1)

14-26: Consider using CSS variables for better maintainability.

The implementation is solid, but the hardcoded color values could be moved to CSS variables for better maintainability and theming support.

Consider this improvement:

-        "shrink-0 bg-gray-200 dark:bg-gray-800",
+        "shrink-0 bg-[var(--separator-color)]",

Then define in your CSS:

:root {
  --separator-color: #e5e7eb;
}
.dark {
  --separator-color: #1f2937;
}
src/components/ui/badge.tsx (3)

1-4: Minor: Fix import formatting.

The imports should follow consistent formatting with semicolons and proper ordering (third-party modules before local imports).

-import * as React from "react"
-import { cva, type VariantProps } from "class-variance-authority"
+import { type VariantProps, cva } from "class-variance-authority";
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
🧰 Tools
🪛 GitHub Check: lint

[failure] 1-1:
Replace import·*·as·React·from·"react"⏎import·{·cva,·type·VariantProps·}·from·"class-variance-authority" with import·{·type·VariantProps,·cva·}·from·"class-variance-authority";⏎import·*·as·React·from·"react";


[failure] 4-4:
Insert ;


6-24: Consider adding size variants and improving accessibility.

The variant implementation is solid with good dark mode support and focus states. Consider these enhancements:

  1. Add size variants for more flexibility:
 const badgeVariants = cva(
   "inline-flex items-center rounded-md border border-gray-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-gray-950 focus:ring-offset-2 dark:border-gray-800 dark:focus:ring-gray-300",
   {
     variants: {
+      size: {
+        sm: "text-xs px-2 py-0.5",
+        md: "text-sm px-2.5 py-1",
+        lg: "text-base px-3 py-1.5",
+      },
       variant: {
         // ... existing variants
       },
     },
     defaultVariants: {
       variant: "default",
+      size: "sm",
     },
   }
 );
🧰 Tools
🪛 GitHub Check: lint

[failure] 23-23:
Insert ,


[failure] 24-24:
Insert ;


26-28: Add JSDoc documentation and explicit aria props.

Consider adding documentation and explicit aria props for better type safety and developer experience.

+/**
+ * Badge component props
+ * @property {string} variant - Visual style variant of the badge
+ * @property {string} className - Additional CSS classes
+ */
 export interface BadgeProps
   extends React.HTMLAttributes<HTMLDivElement>,
-    VariantProps<typeof badgeVariants> {}
+    VariantProps<typeof badgeVariants> {
+    'aria-label'?: string;
+}
src/components/ui/card.tsx (3)

5-18: Consider using semantic HTML for better accessibility.

While the implementation is solid, consider using <article> or <section> instead of <div> to improve semantic meaning and accessibility.

-  <div
+  <article
     ref={ref}
     className={cn(
       "rounded-xl border border-gray-200 bg-white text-gray-950 shadow dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50",
       className
     )}
     {...props}
-  />
+  />
🧰 Tools
🪛 GitHub Check: lint

[failure] 13-13:
Insert ,


[failure] 17-17:
Insert ;


20-30: Consider using semantic HTML header element.

For better semantic structure and accessibility, consider using a <header> element instead of a <div>.

-  <div
+  <header
     ref={ref}
     className={cn("flex flex-col space-y-1.5 p-6", className)}
     {...props}
-  />
+  />

56-74: Consider semantic elements for content and footer.

Enhance the semantic structure:

For CardContent:

-  <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
+  <main ref={ref} className={cn("p-6 pt-0", className)} {...props} />

For CardFooter:

-  <div
+  <footer
     ref={ref}
     className={cn("flex items-center p-6 pt-0", className)}
     {...props}
-  />
+  />
src/components/Patient/DailyRoundListDetails.tsx (3)

Line range hint 49-82: Consider improving mobile layout for the update button.

While the overall header layout is well-structured, the update button placement on mobile could be improved. Currently, it has a mt-2 which might create inconsistent spacing on smaller screens.

Consider this modification:

-          <div>
-            <div className="mt-2">
+          <div className="sm:ml-4">
+            <div className="sm:mt-0">
               <ButtonV2
                 href={`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds/${id}/update`}
               >

83-117: Clean up unnecessary whitespace in JSX.

The code contains some unnecessary whitespace characters that should be removed for consistency.

Apply these changes:

-                  Temperature:{" "}
+                  Temperature:
-                  {" "}
-                  {dailyRoundListDetailsData.pulse ?? "-"}
+                  {dailyRoundListDetailsData.pulse ?? "-"}

118-142: Consider adding visual indicators for BP values.

The blood pressure section could benefit from visual indicators to quickly assess if the values are within normal range.

Consider adding a color-coded badge or icon based on the BP values:

+const getBPStatus = (systolic?: number, diastolic?: number) => {
+  if (!systolic || !diastolic) return null;
+  if (systolic >= 140 || diastolic >= 90) return "high";
+  if (systolic <= 90 || diastolic <= 60) return "low";
+  return "normal";
+};

 <div className="space-y-4">
-  <h3 className="text-lg font-medium">Blood Pressure</h3>
+  <div className="flex items-center gap-2">
+    <h3 className="text-lg font-medium">Blood Pressure</h3>
+    {getBPStatus(
+      dailyRoundListDetailsData.bp?.systolic,
+      dailyRoundListDetailsData.bp?.diastolic
+    ) && (
+      <Badge variant={getBPStatus(
+        dailyRoundListDetailsData.bp?.systolic,
+        dailyRoundListDetailsData.bp?.diastolic
+      )}>
+        {getBPStatus(
+          dailyRoundListDetailsData.bp?.systolic,
+          dailyRoundListDetailsData.bp?.diastolic
+        )}
+      </Badge>
+    )}
+  </div>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 84fdffe and 2be148b.

📒 Files selected for processing (4)
  • src/components/Patient/DailyRoundListDetails.tsx (3 hunks)
  • src/components/ui/badge.tsx (1 hunks)
  • src/components/ui/card.tsx (1 hunks)
  • src/components/ui/separator.tsx (1 hunks)
🧰 Additional context used
🪛 GitHub Check: lint
src/components/ui/badge.tsx

[failure] 1-1:
Replace import·*·as·React·from·"react"⏎import·{·cva,·type·VariantProps·}·from·"class-variance-authority" with import·{·type·VariantProps,·cva·}·from·"class-variance-authority";⏎import·*·as·React·from·"react";


[failure] 4-4:
Insert ;


[failure] 23-23:
Insert ,


[failure] 24-24:
Insert ;


[failure] 33-33:
Insert ;


[failure] 36-36:
Insert ;

src/components/ui/card.tsx

[failure] 1-1:
Insert ;


[failure] 3-3:
Insert ;


[failure] 13-13:
Insert ,


[failure] 17-17:
Insert ;

🔇 Additional comments (7)
src/components/ui/separator.tsx (4)

1-4: LGTM! Clean imports following best practices.

The imports are well-organized, using RadixUI primitives for accessibility and the utility function for consistent styling.


6-13: LGTM! Excellent TypeScript implementation.

The component is well-typed using forwardRef with proper type inheritance from RadixUI primitives. Default props are sensibly chosen for common use cases.


27-29: LGTM! Proper component naming and export.

Correctly sets the display name for debugging and uses appropriate export style for a UI component.


1-29: Verify integration with consultation update page.

Let's ensure this separator component is properly integrated into the consultation update page UI mentioned in the PR objectives.

src/components/ui/badge.tsx (1)

36-36: LGTM!

The exports are well-structured, exporting both the component and variants for flexibility.

🧰 Tools
🪛 GitHub Check: lint

[failure] 36-36:
Insert ;

src/components/ui/card.tsx (1)

1-76: Well-structured component library implementation!

The card components are well-implemented with:

  • Consistent use of forwardRef
  • Proper TypeScript types
  • Flexible className composition
  • Dark mode support
  • Modular component structure

The implementation aligns well with the PR objectives to improve the consultation update page form UI.

🧰 Tools
🪛 GitHub Check: lint

[failure] 1-1:
Insert ;


[failure] 3-3:
Insert ;


[failure] 13-13:
Insert ,


[failure] 17-17:
Insert ;

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

Line range hint 1-48: LGTM! Well-organized imports and component setup.

The new imports are properly structured and the component setup maintains good separation of concerns with proper data fetching.

src/components/ui/badge.tsx Outdated Show resolved Hide resolved
src/components/ui/card.tsx Outdated Show resolved Hide resolved
src/components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@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 (4)
src/components/ui/card.tsx (4)

5-19: Enhance Card component accessibility.

Consider adding ARIA role and attributes to improve accessibility:

 <div
   ref={ref}
+  role="article"
+  aria-labelledby={props['aria-labelledby']}
   className={cn(
     "rounded-xl border border-gray-200 bg-white text-gray-950 shadow dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50",
     className,
   )}
   {...props}
 />

20-31: Use semantic HTML for CardHeader.

Consider using header element instead of div for better semantic structure:

-<div
+<header
   ref={ref}
   className={cn("flex flex-col space-y-1.5 p-6", className)}
   {...props}
-/>
+/>

56-63: Consider making padding configurable.

The current implementation has hardcoded padding values. Consider making them configurable through props for better flexibility:

+interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {
+  noPadding?: boolean;
+}

 const CardContent = React.forwardRef<
   HTMLDivElement,
-  React.HTMLAttributes<HTMLDivElement>
+  CardContentProps
->(({ className, ...props }, ref) => (
+>(({ className, noPadding, ...props }, ref) => (
   <div
     ref={ref}
-    className={cn("p-6 pt-0", className)}
+    className={cn(!noPadding && "p-6 pt-0", className)}
     {...props}
   />
 ));

64-74: Use semantic HTML for CardFooter.

Consider using footer element instead of div for better semantic structure:

-<div
+<footer
   ref={ref}
   className={cn("flex items-center p-6 pt-0", className)}
   {...props}
-/>
+/>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2be148b and d78ddf9.

📒 Files selected for processing (2)
  • src/components/ui/badge.tsx (1 hunks)
  • src/components/ui/card.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/ui/badge.tsx
🔇 Additional comments (3)
src/components/ui/card.tsx (3)

1-4: LGTM! Clean and well-organized imports.


32-55: Skipping review for CardTitle and CardDescription.

A previous review comment already covers the semantic HTML improvements needed for these components.


76-83: LGTM! Clean and well-organized exports.

Copy link
Contributor

@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 (5)
src/components/ui/card.tsx (3)

5-18: Add ARIA role for better accessibility.

The Card component would benefit from an explicit ARIA role to improve screen reader support.

 <div
   ref={ref}
+  role="article"
   className={cn(
     "rounded-xl border border-gray-200 bg-white text-gray-950 shadow dark:border-gray-800 dark:bg-gray-950 dark:text-gray-50",
     className,
   )}
   {...props}
 />

63-73: Add semantic role to footer component.

Consider adding a semantic role to the footer component for better accessibility.

 <div
   ref={ref}
+  role="contentinfo"
   className={cn("flex items-center p-6 pt-0", className)}
   {...props}
 />

1-82: Consider implementing component composition patterns.

This card component system provides a good foundation for the consultation update form UI. To maximize reusability and maintainability:

  1. Consider creating preset card variants for different use cases (e.g., consultation cards, patient info cards)
  2. Document common composition patterns in Storybook or similar documentation
  3. Create higher-level components for specific consultation form sections using these card components

This will help maintain consistency across the consultation update page and other similar features.

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

Line range hint 49-82: Enhance accessibility for patient details section.

While the layout is well-structured, consider adding ARIA attributes to improve screen reader experience.

-      <Card className="w-full max-w-8xl mx-auto my-5">
+      <Card className="w-full max-w-8xl mx-auto my-5" role="region" aria-label="Patient Details">
-            <div className="flex flex-col sm:flex-row sm:items-center gap-2">
+            <div className="flex flex-col sm:flex-row sm:items-center gap-2" role="group" aria-label="Patient Category and Timestamp">

143-217: Add validation for respiratory rate.

Consider adding validation for the respiratory rate to ensure it falls within normal ranges.

const isValidRespiratoryRate = (rate: number) => rate >= 12 && rate <= 25;

// Usage:
<p className="text-sm text-muted-foreground">
  {dailyRoundListDetailsData.resp && isValidRespiratoryRate(Number(dailyRoundListDetailsData.resp))
    ? dailyRoundListDetailsData.resp
    : "-"}
</p>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d78ddf9 and f713b4f.

📒 Files selected for processing (4)
  • src/components/Patient/DailyRoundListDetails.tsx (3 hunks)
  • src/components/ui/badge.tsx (1 hunks)
  • src/components/ui/card.tsx (1 hunks)
  • src/components/ui/separator.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/ui/badge.tsx
  • src/components/ui/separator.tsx
🔇 Additional comments (7)
src/components/ui/card.tsx (4)

1-4: LGTM! Clean and focused imports.


20-30: LGTM! Well-structured header component.


32-53: LGTM! Semantic HTML elements properly implemented.

Previous review suggestions for semantic HTML have been successfully addressed.


75-82: LGTM! Clean and organized exports.

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

1-15: LGTM! Well-organized imports with appropriate icon choices.

The new imports enhance the UI with meaningful icons and modern components.


118-142: LGTM! Clean layout for blood pressure readings.

The separation of systolic and diastolic values improves readability.


219-235: Update badge styling as suggested in previous review.

The Bootstrap badge classes are still present and should be updated to match the new UI components.

src/components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

I'd recommend to change to using this component (https://github.com/ohcnetwork/care_fe/blob/develop/src/components/LogUpdate/CriticalCarePreview.tsx) instead as that's the ones used for newer daily rounds and making improvements there. Do rename the component too when doing that to something generic (LogUpdatePreviewPage / LogUpdateDetails).

@modamaan
Copy link
Contributor Author

modamaan commented Nov 11, 2024

Screenshot 2024-11-11 203615
@rithviknishad Do you want to update this component?

@rithviknishad
Copy link
Member

Yup

@rithviknishad
Copy link
Member

Do delete the old component too once done

Copy link
Contributor

@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 (3)
src/components/LogUpdate/CriticalCarePreview.tsx (3)

1-1: Improve import statement formatting

The import statement should be formatted with each icon on a new line for better readability.

-import { ClipboardIcon, StethoscopeIcon, UserIcon,Bandage, Bed } from "lucide-react";
+import {
+  Bandage,
+  Bed,
+  ClipboardIcon,
+  StethoscopeIcon,
+  UserIcon,
+} from "lucide-react";
🧰 Tools
🪛 GitHub Check: lint

[failure] 1-1:
Replace ·ClipboardIcon,·StethoscopeIcon,·UserIcon,Bandage,·Bed· with ⏎··Bandage,⏎··Bed,⏎··ClipboardIcon,⏎··StethoscopeIcon,⏎··UserIcon,⏎


120-143: Fix inconsistent spacing in className attributes

There are multiple instances of double spaces in className attributes.

-              <div className="flex items-center  rounded-lg border p-4">
+              <div className="flex items-center rounded-lg border p-4">
-              <div className="flex items-center  rounded-lg border p-4">
+              <div className="flex items-center rounded-lg border p-4">
-              <div className="flex items-center  rounded-lg border p-4">
+              <div className="flex items-center rounded-lg border p-4">

290-305: Consider centralizing unit suffixes

The "ml/h" suffix is repeated in multiple places. Consider centralizing it as a constant to ensure consistency and easier maintenance.

+const FLOW_RATE_UNIT = "ml/h";
+
 <Section title="Dialysis">
   <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-2">
     <div>
       <Detail
         label="Fluid Balance"
         value={data.dialysis_fluid_balance}
-        suffix="ml/h"
+        suffix={FLOW_RATE_UNIT}
       />
     </div>
     <div>
       <Detail
         label="Net Balance"
         value={data.dialysis_net_balance}
-        suffix="ml/h"
+        suffix={FLOW_RATE_UNIT}
       />
     </div>
   </div>
 </Section>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f713b4f and 860cd70.

📒 Files selected for processing (1)
  • src/components/LogUpdate/CriticalCarePreview.tsx (6 hunks)
🧰 Additional context used
🪛 GitHub Check: lint
src/components/LogUpdate/CriticalCarePreview.tsx

[failure] 1-1:
Replace ·ClipboardIcon,·StethoscopeIcon,·UserIcon,Bandage,·Bed· with ⏎··Bandage,⏎··Bed,⏎··ClipboardIcon,⏎··StethoscopeIcon,⏎··UserIcon,⏎


[failure] 5-5:
Delete

🔇 Additional comments (3)
src/components/LogUpdate/CriticalCarePreview.tsx (3)

73-100: LGTM! Well-structured grid layout with clear visual hierarchy

The implementation uses a clean grid layout with consistent spacing and meaningful icons, improving the visual organization of patient information.


Line range hint 241-274: LGTM! Well-implemented responsive grid layout

The grid layout implementation properly handles different screen sizes and maintains consistent spacing.


336-377: LGTM! Well-structured vital signs display

The implementation properly handles:

  • Medical terminology with subscript text
  • Range-based value descriptions
  • Responsive grid layout

@modamaan
Copy link
Contributor Author

modamaan commented Nov 12, 2024

@nihal467
Copy link
Member

nihal467 commented Nov 18, 2024

@modamaan the build itself is failing, tag me for QA review once the PR is ready for review

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

github-actions bot commented Dec 9, 2024

👋 Hi, @modamaan,
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.

Copy link
Contributor

@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/ui/card.tsx (1)

4-4: Remove or fix the testing comment.

The comment "// tesing" appears to be:

  1. Misspelled (should be "testing")
  2. Missing a newline after it
  3. Lacks meaningful context or purpose

Consider removing this comment if it's not needed, or provide more context if it serves a specific purpose.

🧰 Tools
🪛 eslint

[error] 4-4: Insert

(prettier/prettier)

🪛 GitHub Check: lint

[failure] 4-4:
Insert

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ae15064 and e27d9c1.

📒 Files selected for processing (1)
  • src/components/ui/card.tsx (1 hunks)
🧰 Additional context used
🪛 eslint
src/components/ui/card.tsx

[error] 4-4: Insert

(prettier/prettier)

🪛 GitHub Check: lint
src/components/ui/card.tsx

[failure] 4-4:
Insert

🔇 Additional comments (1)
src/components/ui/card.tsx (1)

Line range hint 1-93: LGTM! Well-structured card components.

The card components are well-implemented with:

  • Proper TypeScript typing and React.forwardRef usage
  • Semantic HTML structure (h3 for titles, p for descriptions)
  • Consistent styling using Tailwind classes
  • Clear component organization and naming

This provides a solid foundation for the UI updates in the Consultation Update page form.

🧰 Tools
🪛 eslint

[error] 4-4: Insert

(prettier/prettier)

🪛 GitHub Check: lint

[failure] 4-4:
Insert

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Dec 11, 2024
@rithviknishad
Copy link
Member

rithviknishad commented Dec 17, 2024

Closing as this has been removed in the actively developed re-architecture branch in favour of Questionnaire.

#9262

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deploy-Failed Deplyment is not showing preview work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the form UI on the Consultation Update page
4 participants