Skip to content

feat: centralize vital sign configurations and utilities in vital-signs.ts#32

Merged
ipuppet merged 1 commit intomainfrom
feature/add-test-types
Oct 14, 2025
Merged

feat: centralize vital sign configurations and utilities in vital-signs.ts#32
ipuppet merged 1 commit intomainfrom
feature/add-test-types

Conversation

@ipuppet
Copy link
Copy Markdown
Contributor

@ipuppet ipuppet commented Oct 14, 2025

This pull request refactors how vital sign and blood test configuration data is managed and displayed across several components. It centralizes configuration for vital signs and blood tests into shared modules, improves consistency in labeling, units, chart domains, and colors, and updates UI components to leverage these centralized configurations for better maintainability and clarity.

Centralization and Consistency of Vital Sign Configuration

  • Replaces local vital sign config imports with centralized imports from @/lib/vital-signs in multiple components, ensuring all vital sign labels, units, abbreviations, chart domains, and colors are managed from a single source. (blood-pressure-input.tsx, individual-vital-signs-form.tsx, latest-observations-display.tsx, observation-chart.tsx) [1] [2] [3] [4]

Improved Chart Rendering and Tooltip Formatting

  • Updates all observation chart components to use the centralized config for chart domains, colors, labels, and units, resulting in consistent chart appearance and tooltip formatting for each vital sign. (observation-chart.tsx) [1] [2] [3] [4] [5] [6] [7] [8] [9]

Consistent Display of Vital Sign Labels and Units

  • Updates the latest observations display to use centralized labels and units for all vital signs, replacing hardcoded strings with values from config for improved clarity and consistency. (latest-observations-display.tsx)

Blood Test Labeling Improvements

  • Uses a helper function getBloodTestLabel from the centralized constants module to display user-friendly blood test names in the blood test request form. (blood-test-request-form.tsx) [1] [2]

Unit Correction

  • Fixes the displayed unit for blood sugar in the bulk vital signs form from mmol/L to mg/dL for accuracy. (bulk-vital-signs-form.tsx)

@ipuppet ipuppet merged commit a948808 into main Oct 14, 2025
1 check passed
@ipuppet ipuppet deleted the feature/add-test-types branch October 16, 2025 07:51
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.

2 participants