Skip to content

Conversation

@halcwb
Copy link
Collaborator

@halcwb halcwb commented Dec 29, 2025

This pull request introduces significant refactoring and expansion of the command structure within the OrderContext module, along with some minor improvements and renaming for clarity. The main focus is on making the command types and their handling more expressive, granular, and consistent, especially for various orderable and component property adjustments. Additionally, function names related to constraints are clarified across the codebase.

Key changes:

Command Structure Refactoring and Expansion

  • Refactored and expanded the OrderContext.Command discriminated union to introduce more granular and consistently named commands for schedule frequency, orderable dose/quantity/rate, and component quantity property adjustments. This includes replacing previous commands with new ones such as DecreaseScheduleFrequencyProperty, IncreaseOrderableDoseQuantityProperty, and DecreaseComponentQuantityProperty, among others.
  • Updated the command handler logic to match the new command structure, ensuring correct routing and processing of each new command type. [1] [2]

Naming and Function Signature Improvements

  • Renamed the constraint-setting function from setConstraints to setMinMaxConstraints throughout the Medication module for improved clarity and consistency. [1] [2] [3]
  • Minor improvements to comments and spelling for better code readability and maintainability. [1] [2]

Type and Helper Adjustments

  • Changed the type reference in logGenFormMessages to use GenFormResult<_> directly for improved clarity.

These changes collectively improve the maintainability, extensibility, and clarity of the order management logic, making it easier to add new command types and reason about property adjustments in the future.

…omponent quantity and added servers side code for this
@halcwb halcwb merged commit 30cf2d0 into informedica:master Dec 29, 2025
3 checks passed
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.

1 participant